/* Organization Documents — uniform card grid, read more via modal */

.doc-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:1.5rem;
  align-items:stretch;
}

.doc-card{
  display:flex;
  flex-direction:column;
  height:340px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:1.25rem;
  transition:box-shadow .15s ease, transform .15s ease;
}
.doc-card:hover{ box-shadow:0 8px 20px rgba(11,37,69,.08); transform:translateY(-2px); }

.doc-card-head{ display:flex; align-items:flex-start; gap:.75rem; margin-bottom:.65rem; }

.doc-icon{
  width:44px; height:44px; border-radius:10px; background:var(--bg);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.doc-icon i{ color:var(--teal); font-size:1.2rem; }

.doc-head-text{ min-width:0; }

.doc-title{
  font-size:1rem; line-height:1.3; margin:0 0 .3rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; min-height:2.6em;
}

.doc-badge{
  display:inline-block; background:var(--bg); border:1px solid var(--border);
  border-radius:999px; padding:.15rem .6rem; font-size:.72rem; font-weight:700; color:var(--navy);
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.doc-body{ flex:1; overflow:hidden; margin-bottom:.5rem; min-height:0; }

.doc-desc{
  color:var(--muted); font-size:.88rem; margin:0; line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}

.doc-readmore{
  background:none; border:none; padding:0; margin-top:.3rem;
  color:var(--teal); font-weight:700; font-size:.8rem; cursor:pointer;
}
.doc-readmore:hover{ text-decoration:underline; }

.doc-issued{ color:var(--muted); font-size:.8rem; margin:0 0 .65rem; }

.doc-actions{ display:flex; gap:.5rem; margin-top:auto; flex-wrap:nowrap; }
.doc-actions .btn{
  flex:1; min-width:0; text-align:center; justify-content:center;
  padding:.55rem .5rem; font-size:.82rem; gap:.35rem; white-space:nowrap;
}

/* Read-more modal */
.doc-modal-overlay{
  position:fixed; inset:0; background:rgba(11,37,69,.55);
  display:none; align-items:center; justify-content:center; padding:1rem; z-index:2000;
}
.doc-modal-overlay.active{ display:flex; }

.doc-modal{
  background:var(--card); border-radius:var(--radius-md); max-width:480px; width:100%;
  padding:1.5rem; position:relative; max-height:80vh; overflow-y:auto;
}
.doc-modal-close{
  position:absolute; top:.75rem; right:.75rem; width:32px; height:32px; border-radius:50%;
  background:var(--bg); border:none; font-size:1rem; color:var(--muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.doc-modal-close:hover{ background:var(--border); }

.doc-modal h3{ font-size:1.1rem; margin:0 0 .4rem; padding-right:2rem; }
.doc-modal .doc-badge{ margin-bottom:.75rem; }
.doc-modal p{ color:var(--muted); font-size:.92rem; line-height:1.6; margin:0 0 .5rem; white-space:pre-wrap; }
.doc-modal .doc-actions{ margin-top:1rem; }

@media (max-width:480px){
  .doc-card{ height:auto; min-height:300px; }
}