/* ==========================================================================
   MAMBISA — hoja de estilos única
   Sin dependencias externas: funciona en red interna sin internet.
   ========================================================================== */

/* --- Colores de la bandera cubana ---------------------------------------
   Los tres colores de origen, sin tocar. Todo lo demás se deriva de ellos.
   ----------------------------------------------------------------------- */
:root {
  --cuba-azul:   #002a8f;   /* franjas */
  --cuba-rojo:   #cf142b;   /* triángulo */
  --cuba-blanco: #ffffff;   /* franjas y estrella */
}

/* --- Tokens: tema oscuro por defecto ------------------------------------ */
:root {
  /* Superficies: azul de la bandera oscurecido, no gris neutro */
  --bg:            #04091a;
  --bg-elev:       #0a1228;
  --bg-elev-2:     #142040;
  --bg-inset:      #020614;
  --border:        #1d2b54;
  --border-strong: #2c3f72;

  --text:          #eef2fa;
  --text-muted:    #9aa8c6;
  --text-faint:    #7a88ab;

  /* Acento: el rojo del triángulo, aclarado lo justo para que el blanco
     encima siga cumpliendo contraste (5,0:1) */
  --accent:        #d81e35;
  --accent-hover:  #ef3549;
  --accent-soft:   rgba(216, 30, 53, 0.14);
  --accent-text:   #ff8b96;

  /* Azul de la bandera aclarado para poder usarlo como color de texto */
  --info:          #5b8cf5;
  --info-soft:     rgba(91, 140, 245, 0.14);
  --warn:          #dca43f;
  --warn-soft:     rgba(220, 164, 63, 0.14);
  --ok:            #3faa73;
  --ok-soft:       rgba(63, 170, 115, 0.14);

  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.35);

  --ff: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
  --header-h: 64px;
}

/* --- Tema claro ---------------------------------------------------------- */
:root[data-theme="light"] {
  /* El blanco de la bandera como base, con los grises tintados de azul */
  --bg:            #f2f5fc;
  --bg-elev:       #ffffff;
  --bg-elev-2:     #e8edf9;
  --bg-inset:      #dde4f3;
  --border:        #d2dae9;
  --border-strong: #b1bdd6;

  --text:          #0b1430;
  --text-muted:    #4d5875;
  --text-faint:    #626d88;   /* oscurecido: #737f9c sólo daba 4,0:1 sobre blanco */

  /* Sobre blanco el rojo se oscurece para cumplir contraste (6,1:1) */
  --accent:        #c31226;
  --accent-hover:  #a30d1f;
  --accent-soft:   rgba(195, 18, 38, 0.09);
  --accent-text:   #a30d1f;

  --info:          #002a8f;
  --info-soft:     rgba(0, 42, 143, 0.09);
  --warn:          #8a5c0c;
  --warn-soft:     rgba(138, 92, 12, 0.10);
  --ok:            #10693c;
  --ok-soft:       rgba(16, 105, 60, 0.10);

  --shadow:    0 1px 2px rgba(0,20,60,.07), 0 8px 24px rgba(0,20,60,.09);
  --shadow-sm: 0 1px 3px rgba(0,20,60,.09);
}

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Cabecera ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(12px);
  }
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand:hover { text-decoration: none; }
/* Escudo MAMBISA. Dos archivos, uno por tema: sobre fondo oscuro el escudo
   va blanco, y sobre fondo claro va azul. */
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  background: url("../img/isotipo-oscuro.svg") center / contain no-repeat;
}
:root[data-theme="light"] .brand-mark {
  background-image: url("../img/isotipo.svg");
}
.brand-name {
  font-weight: 750; font-size: 1.14rem; letter-spacing: .08em;
  color: var(--text); text-transform: uppercase;
  line-height: 1;
}
.brand-sub {
  display: block; font-size: .655rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: .925rem; font-weight: 550;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

.header-tools { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-elev-2); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-icon-moon { display: none; }

/* --- Hero / encabezado de página ---------------------------------------- */
.page-head {
  padding: 46px 0 34px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 340px at 12% -20%, var(--accent-soft), transparent 70%),
    var(--bg-elev);
}
.page-head .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-text);
  margin-bottom: 10px;
}
.page-head h1 { margin-bottom: .35em; }
.page-head .lead {
  font-size: 1.06rem; color: var(--text-muted);
  max-width: 66ch; margin: 0;
}

.hero {
  padding: 74px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1100px 520px at 78% -10%, var(--accent-soft), transparent 68%),
    radial-gradient(700px 380px at 5% 110%, var(--info-soft), transparent 70%),
    var(--bg-elev);
}
.hero h1 { max-width: 20ch; }
.hero .lead {
  font-size: 1.14rem; color: var(--text-muted);
  max-width: 60ch; margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-size: .94rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: 0 0 17px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost {
  background: var(--bg-elev); color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-elev-2); border-color: var(--text-faint); color: var(--text); }

.btn-sm { padding: 6px 13px; font-size: .855rem; }
.btn-block { width: 100%; justify-content: center; }

/* --- Secciones ---------------------------------------------------------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); font-size: .95rem; }

/* --- Rejillas ----------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

/* --- Tarjetas ----------------------------------------------------------- */
.card {
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
a.card:hover, .card.is-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 7px; color: var(--text); font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .925rem; }
.card-foot {
  margin-top: auto; padding-top: 15px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

.card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-inset);
  display: grid; place-items: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder-icon { width: 34px; height: 34px; color: var(--text-faint); opacity: .55; }

.card-icon {
  width: 40px; height: 40px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
  margin-bottom: 13px;
}
.card-icon svg { width: 20px; height: 20px; }

/* --- Metadatos y etiquetas ---------------------------------------------- */
.meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: .78rem; color: var(--text-faint);
  margin-bottom: 11px;
}
.meta time { font-variant-numeric: tabular-nums; }
.meta .dot { opacity: .5; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .715rem; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg-elev-2); color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.tag-info   { background: var(--info-soft);   color: var(--info);        border-color: transparent; }
.tag-warn   { background: var(--warn-soft);   color: var(--warn);        border-color: transparent; }
.tag-ok     { background: var(--ok-soft);     color: var(--ok);          border-color: transparent; }

.filetype {
  font-family: var(--ff-mono);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg-inset); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --- Filtros ------------------------------------------------------------ */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 24px;
}
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  border-radius: 999px;
  font: inherit; font-size: .865rem; font-weight: 550;
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

.search-box { position: relative; margin-left: auto; min-width: 230px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint); pointer-events: none;
}
.search-box input { padding-left: 35px; }

/* --- Formularios -------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: .86rem; font-weight: 600; color: var(--text);
}
.field .hint { font-size: .8rem; color: var(--text-faint); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="url"], input[type="date"],
input[type="search"], input[type="password"], input[type="file"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  font: inherit; font-size: .94rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* `hidden` es un atributo del HTML, pero cualquier regla con `display` lo
   pisa: sin esto, un aviso vacío marcado como oculto se dibuja igual. */
[hidden] { display: none !important; }

/* --- Avisos ------------------------------------------------------------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  font-size: .92rem;
  margin-bottom: 20px;
}
.notice svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.notice p:last-child { margin-bottom: 0; }
.notice-info { background: var(--info-soft); border-color: transparent; }
.notice-info svg { color: var(--info); }
.notice-warn { background: var(--warn-soft); border-color: transparent; }
.notice-warn svg { color: var(--warn); }
.notice-ok   { background: var(--ok-soft);   border-color: transparent; }
.notice-ok svg { color: var(--ok); }
.notice-error { background: var(--accent-soft); border-color: transparent; }
.notice-error svg { color: var(--accent); }

/* --- Estados ------------------------------------------------------------ */
.empty {
  padding: 54px 24px; text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--bg-elev);
  grid-column: 1 / -1;
}
.empty svg { width: 34px; height: 34px; color: var(--text-faint); margin: 0 auto 12px; }
.empty h3 { color: var(--text); }
.empty p { margin: 0; font-size: .93rem; }

.skeleton {
  height: 168px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-elev) 25%, var(--bg-elev-2) 50%, var(--bg-elev) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Artículo / cuerpo de noticia --------------------------------------- */
.article-body { max-width: 72ch; font-size: 1.02rem; }
.article-body p { margin-bottom: 1.1em; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.article-body li { margin-bottom: .4em; }

/* --- Modal -------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .68);
}
.modal.is-open { display: grid; }
.modal-panel {
  width: 100%; max-width: 760px;
  max-height: 86vh; overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 32px 34px;
  position: relative;
}
.modal-panel.is-wide { max-width: 980px; }
.modal-close { position: absolute; top: 16px; right: 16px; }

/* --- Vídeo -------------------------------------------------------------- */
.video-frame {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }

.play-badge {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.3);
  transition: background .16s;
}
a.card:hover .play-badge { background: rgba(0,0,0,.14); }
.play-badge span {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.play-badge svg { width: 22px; height: 22px; margin-left: 2px; }

/* --- Estadísticas ------------------------------------------------------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat {
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-value {
  font-size: 1.95rem; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.stat-label {
  font-size: .765rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); margin-top: 5px;
}

/* --- Pie ---------------------------------------------------------------- */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 44px 0 28px;
  font-size: .91rem;
}
.footer-grid {
  display: grid; gap: 34px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 34px;
}
.site-footer h4 {
  font-size: .755rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 13px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-about p { color: var(--text-muted); max-width: 42ch; }

.social { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color .15s, border-color .15s, background .15s;
}
.social a:hover { color: var(--text); border-color: var(--border-strong); }
.social svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-faint); font-size: .85rem;
}

/* --- Utilidades --------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--ff-mono); font-size: .9em; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    gap: 2px; padding: 12px 16px 18px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 13px; font-size: 1rem; }
  .brand-sub { display: none; }
  .search-box { margin-left: 0; width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-panel { padding: 26px 20px 28px; }
  .hero { padding: 52px 0 46px; }
  .section { padding: 42px 0; }
}

@media (max-width: 860px) {
  /* La rejilla de contacto declara sus columnas en línea: aquí las colapsamos. */
  #contacto-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .toolbar, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Versión biblioteca + servicios
   ========================================================================== */

/* --- Áreas y servicios --------------------------------------------------- */
.card.area .card-icon,
.area-cabecera .card-icon { width: 46px; height: 46px; border-radius: 11px; }
.card.area .card-icon svg,
.area-cabecera .card-icon svg { width: 23px; height: 23px; }

.area-bloque { scroll-margin-top: calc(var(--header-h) + 24px); }
.area-bloque + .area-bloque { margin-top: 52px; padding-top: 44px; border-top: 1px solid var(--border); }
.area-cabecera { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.area-cabecera .card-icon { margin: 4px 0 0; flex: 0 0 46px; }
.area-cabecera h2 { margin-bottom: .2em; }
.area-cabecera p { margin: 0; color: var(--text-muted); }

.card.servicio h3 { font-size: 1.02rem; }

/* --- Biblioteca ---------------------------------------------------------- */
.card.item .meta { gap: 6px; }
.tag svg { width: 11px; height: 11px; margin-right: 4px; }
.filtros-fila { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.filtros-fila .etiqueta {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint);
}

/* --- Actualidad ---------------------------------------------------------- */
.noticias { list-style: none; margin: 0; padding: 0; }
.noticias .noticia {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.noticias .noticia:first-child { padding-top: 4px; }
.noticias .noticia .meta { margin-bottom: 6px; }
.noticia-titulo {
  display: inline; color: var(--text); font-weight: 600; font-size: 1.02rem; line-height: 1.45;
}
.noticia-titulo:hover { color: var(--accent-text); }
.noticia-titulo svg.externo { width: 13px; height: 13px; vertical-align: -1px; opacity: .55; }
.noticias .noticia p { margin: 6px 0 0; color: var(--text-muted); font-size: .92rem; }
.noticias.compacta .noticia { padding: 12px 0; }
.noticias.compacta .noticia p { display: none; }
.nota-fuentes { font-size: .82rem; color: var(--text-faint); margin-top: 18px; }

/* --- Franja de llamada a la acción ---------------------------------------- */
.cta-banda {
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 30px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 220px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--bg-elev);
}
.cta-banda h2 { margin: 0 0 .25em; }
.cta-banda p { margin: 0; color: var(--text-muted); max-width: 56ch; }

/* --- Formulario de contacto ------------------------------------------------ */
/* Campo trampa: fuera de la vista y del lector de pantalla, pero no display:none
   (algunos bots se saltan los campos ocultos con display:none). */
.trampa {
  position: absolute !important; left: -10000px !important; top: auto !important;
  width: 1px; height: 1px; overflow: hidden;
}
.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9rem; color: var(--text-muted); font-weight: 450;
}
.check input { width: auto; margin-top: 4px; accent-color: var(--accent); flex: 0 0 auto; }
.form-pie { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
button[disabled] { opacity: .6; cursor: progress; }
optgroup { font-style: normal; font-weight: 700; }

/* --- Texto legal ---------------------------------------------------------- */
.texto-legal { max-width: 74ch; }
.texto-legal h2 { font-size: 1.2rem; margin-top: 1.8em; }
.texto-legal ul { padding-left: 1.3em; }
.texto-legal li { margin-bottom: .35em; }

@media (max-width: 780px) {
  .cta-banda { padding: 24px 20px; }
  .area-cabecera { gap: 12px; }
}
