/* ============================================================
   Normatividad (page-normatividad.php)
   Solo lo que NO está en main.css: banda de título de la página,
   ajustes de la biblioteca como página (no overlay) y visor PDF.
   ============================================================ */

/* ---- Banda de título + buscador ---- */
.norma-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:26px;flex-wrap:wrap;margin-bottom:6px;
}
.norma-head-text .lead{margin-top:12px}
.normatividad .lib-search{margin-bottom:6px}

/* En página (no overlay): alinear filtros y rejilla con el .wrap */
.normatividad .lib-filters{padding:26px 0 4px;max-width:none}
.normatividad .lib-grid{max-width:none;margin-top:22px}

/* Ocultar tarjetas filtradas */
.bookcard.is-hidden{display:none}

/* ---- Visor de PDF (#pdfViewer) ---- */
.pdf-viewer{
  position:fixed;inset:0;z-index:1300;display:flex;padding:26px;
  background:rgba(16,28,52,.68);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);
  opacity:0;visibility:hidden;transition:opacity .28s var(--ease),visibility .28s;
}
.pdf-viewer.show{opacity:1;visibility:visible}

.pdf-viewer-panel{
  width:min(1080px,100%);height:100%;margin:auto;display:flex;flex-direction:column;
  background:#fff;border-radius:16px;overflow:hidden;box-shadow:var(--shadow-lg);
  transform:translateY(14px) scale(.985);transition:transform .3s var(--ease);
}
.pdf-viewer.show .pdf-viewer-panel{transform:translateY(0) scale(1)}

.pdf-viewer-bar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 18px;border-bottom:1px solid var(--line);background:#fff;flex-shrink:0;
}
.pdf-viewer-title{
  font-family:'Poppins',sans-serif;font-weight:600;font-size:15px;color:var(--navy);
  line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.pdf-viewer-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}

.pdf-viewer-download{
  display:inline-flex;align-items:center;gap:8px;
  font-family:'Poppins',sans-serif;font-weight:600;font-size:13.5px;color:#fff;
  background:var(--green);padding:9px 18px;border-radius:30px;text-decoration:none;
  box-shadow:0 10px 22px -10px rgba(24,144,48,.7);
  transition:background .2s,transform .25s var(--ease);
}
.pdf-viewer-download:hover{background:var(--green-d);transform:translateY(-2px)}
.pdf-viewer-download svg{width:16px;height:16px}

.pdf-viewer-close{
  display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:var(--tint-neutral);border:1px solid var(--line);color:var(--ink-soft);
  cursor:pointer;transition:background .2s,color .2s;
}
.pdf-viewer-close:hover{background:var(--navy);border-color:var(--navy);color:#fff}
.pdf-viewer-close svg{width:17px;height:17px}

.pdf-viewer-body{flex:1;background:#e9edf4;min-height:0}
.pdf-viewer-body iframe{display:block;width:100%;height:100%;border:none}

/* Bloqueo de scroll mientras el visor está abierto */
body.pdf-viewer-open{overflow:hidden}

/* ---- Responsive ---- */
@media (max-width:760px){
  .norma-head{align-items:stretch;flex-direction:column}
  .normatividad .lib-search{width:100%;max-width:none;margin-bottom:0}
  .normatividad .lib-filters{padding-top:20px}
  .pdf-viewer{padding:10px}
  .pdf-viewer-panel{border-radius:14px}
  .pdf-viewer-bar{padding:11px 12px}
  .pdf-viewer-title{font-size:13.5px}
  .pdf-viewer-download span{display:none}
  .pdf-viewer-download{padding:9px 14px}
}
