/* ════════════════════════════════════════════════════════════════════════════
   UNESCOWFUCA – Hoja de estilos principal (sitio público)
   Identidad: azul cobalto #0A56A5 · verde #2FB26B
   Tipografía: Source Sans 3 (texto) · Source Serif 4 (titulares)
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Marca */
  --primary:        #0A56A5;
  --primary-dark:   #07427E;
  --primary-deep:   #052C55;
  --primary-mid:    #1971C2;
  --primary-50:     #EDF4FC;
  --primary-100:    #DBEAF9;
  --primary-200:    #B5D2F2;
  --accent:         #2FB26B;
  --accent-dark:    #1F8A4E;
  --accent-50:      #E7F6ED;

  /* Neutros (grises con matiz azul) */
  --text:           #1c2340;
  --text-muted:     #535b78;
  --text-soft:      #6f7692;
  --bg-light:       #f5f7fb;
  --bg-white:       #ffffff;
  --border:         #e2e6f0;
  --border-strong:  #cfd5e4;
  --footer-bg:      #062A4E;

  /* Tipografía */
  --font-sans:      'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:     'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Forma y profundidad */
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --shadow-xs:      0 1px 2px rgba(16,24,64,.06);
  --shadow-sm:      0 2px 8px rgba(16,24,64,.06), 0 1px 2px rgba(16,24,64,.04);
  --shadow-md:      0 10px 30px -10px rgba(16,24,64,.18), 0 2px 6px rgba(16,24,64,.05);
  --shadow-lg:      0 24px 48px -16px rgba(16,24,64,.28);
  --ease:           cubic-bezier(.2,.7,.2,1);
  --focus-ring:     0 0 0 3px rgba(10,86,165,.6);

  /* Altura del masthead fijo (la actualiza main.js) */
  --masthead-h:     140px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--masthead-h) + 1rem); }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-white);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { color: var(--primary); line-height: 1.25; }

a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-mid); }

img { max-width: 100%; }

::selection { background: var(--accent); color: var(--primary-deep); }

/* Foco visible accesible y coherente */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -60px;
  background: var(--accent); color: var(--primary-deep);
  padding: .6rem 1rem; font-weight: 700; border-radius: var(--radius-sm);
  z-index: 2000; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; color: var(--primary-deep); }

/* ── Aviso legal ────────────────────────────────────────────────────────── */
.legal-banner {
  background: var(--primary-50);
  color: #36406a;
  font-size: .8rem;
  line-height: 1.45;
  padding: .55rem 0;
  border-bottom: 1px solid var(--primary-100);
}
.legal-banner .bi-shield-check { color: var(--primary); }
.legal-banner.is-hidden { display: none; }
.legal-banner-close {
  background: none; border: none;
  color: var(--primary);
  opacity: .6;
  cursor: pointer;
  padding: .15rem .35rem;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 4px;
  transition: opacity .15s, background .15s;
}
.legal-banner-close:hover { opacity: 1; background: var(--primary-100); }

/* ── Barra superior ─────────────────────────────────────────────────────── */
.topbar {
  background: var(--primary-deep);
  color: rgba(255,255,255,.72);
  font-size: .8rem;
  padding: .35rem 0;
}
.topbar-tagline { letter-spacing: .01em; }
.topbar-social { gap: .15rem !important; }
.social-link, .admin-link {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .88rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px;
  border-radius: 50%;
  transition: color .2s, background .2s;
}
.social-link:hover, .admin-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.admin-link { font-size: .8rem; gap: .35rem; border-radius: 999px; padding: 0 .55rem; }

/* ── Masthead (cabecera + navegación, fija al hacer scroll) ─────────────── */
.site-masthead {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--bg-white);
  transition: box-shadow .3s var(--ease);
}
.site-masthead.is-scrolled { box-shadow: 0 8px 24px -14px rgba(16,24,64,.45); }

.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  padding-top: 1rem; padding-bottom: 1rem;
  transition: padding .3s var(--ease);
}
.site-masthead.is-scrolled .site-header-inner { padding-top: .5rem; padding-bottom: .5rem; }

.logo-link { color: var(--primary); min-width: 0; }
.logo-text-mark {
  width: 52px; height: 52px;
  background: var(--primary);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-serif);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: width .3s var(--ease), height .3s var(--ease);
}
.logo-text-mark--sm { width: 36px; height: 36px; font-size: 1.1rem; border-radius: var(--radius-sm); }
.logo-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.005em;
  line-height: 1.05;
}
.logo-subtitle {
  font-size: .68rem;
  color: var(--text-soft);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-top: .25rem;
  font-weight: 600;
}
.site-logo { height: 56px; width: auto; object-fit: contain; filter: brightness(0) saturate(100%) invert(34%) sepia(71%) saturate(3350%) hue-rotate(194deg) brightness(96%) contrast(90%); transition: height .3s var(--ease); }
.site-masthead.is-scrolled .site-logo { height: 42px; }
.site-masthead.is-scrolled .logo-text-mark { width: 42px; height: 42px; font-size: 1.3rem; }

/* Búsqueda (cabecera) */
.search-form { position: relative; }
.search-input {
  border: 1px solid var(--border-strong);
  background: var(--bg-light);
  border-radius: 999px;
  padding: .55rem 2.9rem .55rem 1.15rem;
  font-size: .93rem;
  color: var(--text);
  outline: none;
  width: 260px;
  transition: border-color .2s, box-shadow .2s, background .2s, width .3s var(--ease);
}
.search-input::placeholder { color: var(--text-soft); }
.search-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10,86,165,.1);
  width: 300px;
}
.search-btn {
  position: absolute; right: .3rem; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); border: none; border-radius: 50%;
  color: #fff; cursor: pointer; font-size: .85rem;
  transition: background .2s;
}
.search-btn:hover { background: var(--primary-mid); }

/* ── Navegación principal (escritorio) ─────────────────────────────────── */
.main-nav { background: var(--primary); padding: 0; }
.main-nav .navbar-nav { gap: 0; flex-wrap: wrap; }
.main-nav .nav-link {
  position: relative;
  color: rgba(255,255,255,.86) !important;
  font-size: .8rem;
  font-weight: 700;
  padding: 1rem .95rem !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .2s, background .2s;
}
.main-nav .nav-link::after {
  content: '';
  position: absolute; left: .95rem; right: .95rem; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s var(--ease);
}
.main-nav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.06); }
.main-nav .nav-link:hover::after { transform: scaleX(.5); }
.main-nav .nav-link.active { color: #fff !important; }
.main-nav .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border: none; background: none; }

/* ── Botón hamburguesa (móvil, dentro de la cabecera) ── */
.mobile-menu-btn {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  width: 44px; height: 44px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background .2s;
}
.mobile-menu-btn:hover { background: var(--primary-100); }
.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
@media (max-width: 991.98px) { .mobile-menu-btn { display: flex; } }

/* ── Overlay ── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,44,85,.55);
  z-index: 1040;
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mobile-overlay.is-visible { opacity: 1; visibility: visible; }

/* ── Drawer off-canvas (desde la izquierda) ── */
.mobile-drawer {
  position: fixed;
  top: 0; left: 0; right: auto;
  width: min(320px, 86vw);
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  z-index: 1050;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .35s var(--ease), visibility .35s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer.is-open { transform: translateX(0); visibility: visible; }
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.mobile-drawer-title { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.mobile-drawer-close {
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.mobile-drawer-close:hover { background: rgba(255,255,255,.18); }
.mobile-drawer-search { padding: 1rem 1.25rem; flex-shrink: 0; }
.mobile-search-wrap {
  display: flex;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  overflow: hidden;
}
.mobile-search-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: #fff;
  padding: .6rem 1rem;
  font-size: .95rem;
  outline: none;
}
.mobile-search-input::placeholder { color: rgba(255,255,255,.55); }
.mobile-search-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  padding: .5rem .9rem;
  cursor: pointer;
  font-size: 1rem;
}
.mobile-search-btn:hover { color: #fff; }
.mobile-nav-list { list-style: none; padding: .25rem .75rem; margin: 0; flex: 1; }
.mobile-nav-list li { margin: 0 0 2px; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem .9rem;
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background .18s, color .18s;
}
.mobile-nav-link i { font-size: .9rem; opacity: .6; flex-shrink: 0; }
.mobile-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.mobile-nav-link.is-active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.mobile-nav-link.is-active i { color: var(--accent); opacity: 1; }
.mobile-drawer-lang {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.mobile-lang-btn {
  display: block;
  text-align: center;
  padding: .5rem .6rem;
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.2);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.mobile-lang-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.mobile-lang-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--primary-deep); }

/* ── Hero / banners ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 560px;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(10,86,165,.12), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(31,51,153,.9), transparent 70%),
    linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 55%, var(--primary-mid) 100%);
  display: flex; align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: -2;
}
/* Capa de contraste: oscurece a la izquierda para el texto y deja respirar la foto */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,44,85,.92) 0%, rgba(7,66,126,.78) 38%, rgba(10,86,165,.35) 72%, rgba(10,86,165,.12) 100%),
    linear-gradient(0deg, rgba(5,44,85,.55) 0%, transparent 35%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 5rem 1.25rem; }
.hero-pretitle {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.hero-pretitle::before { content: ''; width: 32px; height: 2px; background: var(--accent); display: inline-block; }
.hero-pretitle .bi { display: none; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin-bottom: 1.1rem;
  max-width: 760px;
  color: #fff;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: rgba(255,255,255,.86);
  max-width: 600px;
  margin-bottom: 2.1rem;
  line-height: 1.6;
}

/* Botones del hero */
.btn-hero-primary, .btn-hero-secondary {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.7rem;
  font-weight: 700;
  font-size: .86rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s, color .2s;
}
.btn-hero-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 10px 24px -10px rgba(10,86,165,.8);
}
.btn-hero-primary::after { content: '\2192'; font-weight: 400; font-size: 1.05em; transition: transform .2s var(--ease); }
.btn-hero-primary:hover { background: var(--primary-mid); border-color: var(--primary-mid); color: #fff; transform: translateY(-2px); }
.btn-hero-primary:hover::after { transform: translateX(3px); }
.btn-hero-secondary {
  border: 2px solid rgba(255,255,255,.55);
  color: #fff;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(4px);
}
.btn-hero-secondary:hover { background: #fff; border-color: #fff; color: var(--primary); transform: translateY(-2px); }

/* ── Secciones ─────────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-light); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.25rem; }
.section-eyebrow {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .45rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.01em;
  margin-bottom: .75rem;
}
.section-line { width: 48px; height: 3px; background: var(--accent); border: none; opacity: 1; border-radius: 3px; margin: 0; }
.section-link-all {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--primary);
  font-weight: 700;
  font-size: .8rem;
  text-decoration: none;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .6rem 1.15rem;
  border: 1.5px solid var(--primary-200);
  border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.section-link-all:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.section-link-all .bi { transition: transform .2s var(--ease); }
.section-link-all:hover .bi { transform: translateX(3px); }

/* ── Pilares ───────────────────────────────────────────────────────────── */
.section-pillars { padding: 0 0 4.5rem; background: var(--bg-light); }
.section-pillars .row { position: relative; z-index: 5; margin-top: -3.5rem; }
.pillar-card {
  position: relative;
  height: 100%;
  text-align: left;
  padding: 1.75rem 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.pillar-card:hover::before { transform: scaleX(1); }
.pillar-icon {
  width: 52px; height: 52px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.45rem;
  margin: 0 0 1.1rem;
  flex-shrink: 0;
  transition: background .3s, color .3s, border-color .3s;
}
.pillar-card:hover .pillar-icon { background: var(--primary); color: var(--accent); border-color: var(--primary); }
.pillar-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: .45rem; line-height: 1.25; }
.pillar-desc { font-size: .95rem; color: var(--text-muted); line-height: 1.55; }
.pillar-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.pillar-btn::after { content: '\2192'; transition: transform .2s var(--ease); }
.pillar-btn:hover { color: var(--primary-mid); }
.pillar-btn:hover::after { transform: translateX(3px); }

/* ── Tarjeta de noticia ────────────────────────────────────────────────── */
.news-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  height: 100%;
  background: #fff;
  position: relative;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-100); }
.news-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease);
}
.news-card:hover .news-card-img { transform: scale(1.04); }
.news-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 80% 20%, rgba(10,86,165,.25), transparent 50%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  display: flex; align-items: center; justify-content: center;
}
.news-card-img-placeholder i { font-size: 2.6rem; color: rgba(255,255,255,.35); }
.news-card-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; position: relative; background: #fff; }
.news-card-date {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .55rem;
}
.news-card-title {
  font-family: var(--font-serif);
  font-size: 1.18rem !important;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .6rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title a { color: inherit; text-decoration: none; }
/* Toda la tarjeta es clicable a través del enlace del título */
.news-card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.news-card:hover .news-card-title a { color: var(--primary-mid); }
.news-card-excerpt {
  font-size: .95rem; color: var(--text-muted); margin-bottom: 1.1rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-read {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  position: relative; z-index: 2;
}
.news-card-read .bi { transition: transform .2s var(--ease); }
.news-card:hover .news-card-read .bi { transform: translateX(4px); }

/* ── Cabecera de páginas interiores ─────────────────────────────────────── */
.page-hero {
  background:
    radial-gradient(800px 300px at 100% 0%, rgba(10,86,165,.14), transparent 60%),
    linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-mid) 100%);
  color: #fff;
  padding: 3.5rem 0 3.25rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-hero .hero-bg { z-index: -2; opacity: .2; animation: none; }
/* Motivo decorativo: anillos concéntricos (evoca el globo / la red global) */
.page-hero::before {
  content: '';
  position: absolute; right: -120px; top: 50%;
  width: 520px; height: 520px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 38px, rgba(255,255,255,.06) 38px 39px);
  z-index: -1;
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0 30%, transparent 30%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  color: #fff;
  max-width: 900px;
  text-wrap: balance;
}
.page-hero p { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 760px; opacity: 1 !important; }
.page-hero .breadcrumb {
  font-size: .8rem;
  margin-bottom: 1rem;
  display: inline-flex;
  flex-wrap: wrap;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .3rem .95rem;
}
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item a { color: rgba(255,255,255,.75); text-decoration: none; }
.page-hero .breadcrumb-item.active { color: #fff; font-weight: 600; }
.page-hero .breadcrumb-item a:hover { color: var(--accent); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); content: '\203A'; }

/* ── Contenido de página ───────────────────────────────────────────────── */
.page-content { padding: 3.5rem 0 4.5rem; }
.page-content-body { font-size: 1.0625rem; line-height: 1.75; color: #2a3150; }
.page-content-body h1, .page-content-body h2,
.page-content-body h3, .page-content-body h4,
.page-content-body h5, .page-content-body h6 { color: var(--primary); font-weight: 700; }
.page-content-body h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 1rem; letter-spacing: -.01em; }
.page-content-body h2 { font-family: var(--font-serif); font-size: 1.7rem; margin-top: 2.5rem; margin-bottom: 1rem; letter-spacing: -.01em; }
.page-content-body h3 { font-family: var(--font-serif); font-size: 1.35rem; margin-top: 2rem; margin-bottom: .75rem; }
.page-content-body h4 { font-size: 1.12rem; margin-top: 1.5rem; }
.page-content-body > :first-child { margin-top: 0; }
.page-content-body a { color: var(--primary); font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.page-content-body a:hover { color: var(--primary-mid); }
.page-content-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.page-content-body p { margin-bottom: 1.25rem; }
.page-content-body ul, .page-content-body ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.page-content-body li { margin-bottom: .4rem; }
.page-content-body li::marker { color: var(--accent-dark); }
.page-content-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.page-content-body th, .page-content-body td { border: 1px solid var(--border); padding: .65rem .85rem; }
.page-content-body th { background: var(--primary-50); color: var(--primary); }
.page-content-body hr { border-color: var(--border); opacity: 1; margin: 2.5rem 0; }
.page-extra { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); position: relative; }
.page-extra::before { content: ''; position: absolute; top: -2px; left: 0; width: 64px; height: 3px; border-radius: 3px; background: var(--accent); }

/* Cita destacada */
blockquote,
.article-body blockquote,
.page-content-body blockquote,
.note-editable blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem 1.75rem 1.5rem 2rem;
  border-left: 4px solid var(--accent);
  background: var(--primary-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.65;
}

/* ── Barra lateral de secciones ────────────────────────────────────────── */
.section-sidebar {
  position: sticky;
  top: calc(var(--masthead-h) + 1.5rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem .75rem 1rem;
  box-shadow: var(--shadow-xs);
}
.section-sidebar-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0 .75rem;
  margin: 0 0 .6rem;
}
.section-sidebar-list { list-style: none; padding: 0; margin: 0; }
.section-sidebar-list li { margin-bottom: 2px; }
.section-sidebar-list a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
  transition: background .18s, color .18s;
}
.section-sidebar-list a .bi { font-size: .75rem; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.section-sidebar-list a:hover { background: var(--primary-50); color: var(--primary); }
.section-sidebar-list a:hover .bi { opacity: .6; transform: none; }
.section-sidebar-list a.is-active { background: var(--primary); color: #fff; font-weight: 700; }
.section-sidebar-list a.is-active .bi { opacity: 1; transform: none; color: var(--accent); }

/* ── Estados vacíos / 404 ──────────────────────────────────────────────── */
.empty-state {
  display: flex; align-items: center; gap: .9rem;
  background: var(--bg-light);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  color: var(--text-muted);
}
.empty-state > .bi { font-size: 1.4rem; color: var(--primary); flex-shrink: 0; }
.empty-state--center { flex-direction: column; text-align: center; padding: 3rem 1.5rem; }
.empty-state--center > .bi { font-size: 2.4rem; color: var(--primary-200); }
.credentials-grid > .empty-state { grid-column: 1 / -1; }

.not-found { padding: 6rem 1rem; text-align: center; }
.not-found-code {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--primary-100);
  margin-bottom: .5rem;
}
.not-found h1 { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1.75rem; }

/* ── Red de colaboradores (credenciales) ───────────────────────────────── */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.cred-person-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
  text-align: center;
  display: flex; flex-direction: column;
}
.cred-person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cred-person-img { width: 100%; overflow: hidden; background: var(--primary-50); }
.cred-person-img img { width: 100%; height: auto; display: block; }
.cred-person-noimg {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-200);
  font-size: 4rem;
}
.cred-person-info { padding: 1rem .9rem 1.15rem; border-top: 3px solid var(--accent); flex: 1; }
.cred-person-name { font-weight: 700; font-size: 1rem; color: var(--primary); line-height: 1.3; margin-bottom: .25rem; }
.cred-person-role { font-size: .85rem; color: var(--text-muted); margin-bottom: .2rem; }
.cred-person-dates { font-size: .75rem; color: var(--text-soft); margin-top: .3rem; }

/* ── Videos ────────────────────────────────────────────────────────────── */
.video-card {
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  background: #fff;
  transition: box-shadow .3s var(--ease);
}
.video-card:hover { box-shadow: var(--shadow-md); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: var(--primary-deep); }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-embed .ratio { position: absolute; inset: 0; }
.video-info { padding: 1.15rem 1.35rem 1.35rem; }
.video-title { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 700; color: var(--primary); margin-bottom: .35rem; line-height: 1.3; }
.video-desc { font-size: .93rem; color: var(--text-muted); line-height: 1.55; }

/* ── Contacto ──────────────────────────────────────────────────────────── */
.contact-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.contact-card {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: rgba(255,255,255,.88);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.contact-card::after {
  content: ''; position: absolute; right: -80px; bottom: -80px;
  width: 240px; height: 240px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 22px, rgba(255,255,255,.07) 22px 23px);
  pointer-events: none;
  z-index: -1;
}
.contact-card h5 { color: #fff; font-weight: 700; font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: .25rem; }
.contact-card-sub { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 1.5rem 0 .75rem; }
.contact-card hr { border-color: rgba(255,255,255,.2); opacity: 1; margin: 1.1rem 0 1.4rem; }
.contact-card a { color: #fff; text-decoration-color: var(--accent); }
.contact-card .footer-social a { background: rgba(255,255,255,.12); }
.contact-card .footer-social a:hover { background: var(--accent); color: var(--primary-deep); }
.contact-icon {
  color: var(--accent);
  font-size: 1rem;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-line { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; word-break: break-word; line-height: 1.45; }

/* Formularios públicos */
.form-label { font-weight: 600; font-size: .92rem; color: var(--text); margin-bottom: .4rem; }
.fw-600 { font-weight: 600; }
.form-control, .form-select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .7rem .95rem;
  font-size: 1rem;
  color: var(--text);
  background-color: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control::placeholder { color: var(--text-soft); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(10,86,165,.1); }
.btn-primary-custom {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  padding: .75rem 1.9rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
  cursor: pointer;
  font-size: .85rem;
  text-decoration: none;
}
.btn-primary-custom:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(10,86,165,.6);
}
.alert { border-radius: var(--radius); }

/* ── Artículo de noticia ───────────────────────────────────────────────── */
.article-header {
  background: linear-gradient(180deg, var(--primary-50) 0%, #fff 100%);
  padding: 3rem 0 2.25rem;
  border-bottom: 1px solid var(--border);
}
.article-header .breadcrumb { font-size: .82rem; margin-bottom: 1.1rem; }
.article-header .breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; }
.article-header .breadcrumb a:hover { color: var(--accent-dark); }
.article-header .breadcrumb-item.active { color: var(--text-soft); }
.article-header .breadcrumb-item + .breadcrumb-item::before { content: '\203A'; color: var(--text-soft); }
.article-category {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: .7rem;
}
.article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  max-width: 900px;
  text-wrap: balance;
}
.article-lead { font-size: 1.2rem; line-height: 1.6; color: var(--text-muted); max-width: 820px; margin: .9rem 0 0; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.4rem;
  font-size: .88rem; color: var(--text-muted);
  margin-top: 1.25rem !important;
}
.article-meta > span { display: inline-flex; align-items: center; gap: .45rem; }
.article-meta .bi { color: var(--accent-dark); }
.article-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}
.article-body { font-size: 1.125rem; line-height: 1.8; color: #262d4a; }
.article-body p { margin-bottom: 1.35rem; }
.article-body h1, .article-body h2,
.article-body h3, .article-body h4,
.article-body h5, .article-body h6 { color: var(--primary); margin-top: 2.2rem; margin-bottom: .9rem; }
.article-body h2, .article-body h3 { font-family: var(--font-serif); }
.article-body a { color: var(--primary); font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.article-body li::marker { color: var(--accent-dark); }
.article-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article-back {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--primary); font-size: .84rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  text-decoration: none;
}
.article-back .bi { transition: transform .2s var(--ease); }
.article-back:hover .bi { transform: translateX(-4px); }
/* ── Compartir en redes ────────────────────────────────────────────────── */
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; }
.share-label {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-soft);
}
.share-buttons { display: flex; flex-wrap: wrap; gap: .45rem; }
.share-btn {
  --brand: var(--primary);
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-50); color: var(--primary);
  border: 1px solid var(--primary-100);
  font-size: 1.02rem; line-height: 1;
  text-decoration: none; cursor: pointer; padding: 0;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.share-bar .share-btn:hover, .share-bar .share-btn:focus-visible {
  background: var(--brand); border-color: var(--brand); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px var(--brand);
}
.share-btn--facebook  { --brand: #1877f2; }
.share-btn--x         { --brand: #0f1419; }
.share-btn--instagram { --brand: #d62976; }
.share-bar .share-btn--instagram:hover, .share-bar .share-btn--instagram:focus-visible {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.share-btn--linkedin  { --brand: #0a66c2; }
.share-btn--whatsapp  { --brand: #25d366; }
.share-btn--copy, .share-btn--native { --brand: var(--primary); }
.share-bar .share-btn--copy.is-copied { background: #16a34a; border-color: #16a34a; color: #fff; }
.share-btn[hidden] { display: none; }
.share-bar--compact { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.share-bar--compact .share-btn { width: 36px; height: 36px; font-size: .95rem; background: #fff; }

/* Aviso flotante (enlace copiado) */
.share-toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 3000;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 440px);
  display: flex; align-items: center; gap: .6rem;
  background: var(--primary-deep); color: #fff;
  padding: .8rem 1.15rem; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .92rem; line-height: 1.4;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.share-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.share-toast .bi { color: #4ade80; font-size: 1.1rem; flex-shrink: 0; }
.share-toast.is-error .bi { color: #fca5a5; }

/* ── Paginación ────────────────────────────────────────────────────────── */
.pagination { gap: .35rem; }
.page-link {
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 999px !important;
  min-width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.page-link:hover { color: var(--primary); background: var(--primary-50); border-color: var(--primary-100); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Separador de sección ──────────────────────────────────────────────── */
.accent-bar { height: 1px; background: var(--border); border: none; opacity: 1; margin: 0; }

/* ── Búsqueda ──────────────────────────────────────────────────────────── */
.search-page-form {
  display: flex; gap: .6rem; align-items: center;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: .35rem .35rem .35rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  max-width: 720px;
  transition: border-color .2s, box-shadow .2s;
}
.search-page-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(10,86,165,.1); }
.search-page-form > .bi { color: var(--text-soft); }
.search-page-form input { border: none !important; box-shadow: none !important; padding-left: 0; background: transparent; }
.search-page-form .btn-primary-custom { padding: .6rem 1.4rem; white-space: nowrap; width: auto; }
.search-summary { font-size: .95rem; color: var(--text-muted); margin-bottom: 1rem; }
.search-group-title {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-soft); margin: 2rem 0 .25rem;
}
.search-results .result-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.search-results .result-item h4 { font-family: var(--font-serif); font-size: 1.22rem; margin-bottom: .3rem; }
.search-results .result-item h4 a { color: var(--primary); text-decoration: none; }
.search-results .result-item h4 a:hover { color: var(--primary-mid); text-decoration: underline; text-decoration-color: var(--accent); }
.result-date { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: .3rem; }
.result-excerpt { color: var(--text-muted); font-size: .96rem; margin: 0; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  background: radial-gradient(900px 400px at 100% 0%, rgba(31,51,153,.55), transparent 60%), var(--footer-bg);
  color: rgba(255,255,255,.78);
}
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent) 0 25%, var(--primary-mid) 25% 100%);
}
.footer-top { padding: 4.5rem 0 3rem; }
.footer-logo-img { height: 40px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
.footer-brand { font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: .01em; }
.footer-desc { font-size: .95rem; color: rgba(255,255,255,.66); line-height: 1.65; max-width: 360px; }
.footer-heading {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.footer-nav, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-nav { columns: 2; column-gap: 1.5rem; }
.footer-nav li, .footer-contact li { margin-bottom: .6rem; font-size: .95rem; break-inside: avoid; }
.footer-nav a, .footer-contact a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .25em; }
.footer-contact li { display: flex; gap: .7rem; align-items: flex-start; word-break: break-word; }
.footer-contact li i { color: var(--accent); margin-top: .2rem; flex-shrink: 0; }
.footer-social { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s var(--ease), border-color .2s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: var(--primary-deep); transform: translateY(-2px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.4rem 0;
  font-size: .86rem;
  color: rgba(255,255,255,.6);
}
.footer-legal { font-size: .8rem; color: rgba(255,255,255,.5); font-style: italic; line-height: 1.55; margin-bottom: .75rem; }
.footer-powered { color: rgba(255,255,255,.3); }

/* ── Selector de idioma (topbar) ───────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 2px;
}
.lang-btn {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .12rem .55rem;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.lang-btn:hover { color: #fff; }
.lang-btn--active, .lang-btn--active:hover { color: var(--primary-deep); background: var(--accent); }
.lang-divider { display: none; }

/* ── Selector de idioma (footer) ───────────────────────────────────────── */
.lang-switcher-footer { display: flex; gap: .5rem; flex-wrap: wrap; }
.lang-btn-footer {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.2);
  transition: background .2s, color .2s, border-color .2s;
}
.lang-btn-footer:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.lang-btn-footer--active, .lang-btn-footer--active:hover { background: var(--accent); color: var(--primary-deep); border-color: var(--accent); }

/* ── Botones flotantes ─────────────────────────────────────────────────── */
.fab-group {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 1020;
}
.fab-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  background: var(--primary);
  color: #fff;
  border: 2px solid rgba(255,255,255,.92);
  box-shadow: 0 10px 24px -8px rgba(5,44,85,.6);
  transition: transform .2s var(--ease), background .2s, opacity .25s, visibility .25s;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:hover { background: var(--primary-mid); transform: translateY(-2px); }
.fab-top { opacity: 0; visibility: hidden; }
.fab-top.is-visible { opacity: 1; visibility: visible; }
.fab-menu { display: none; background: var(--accent); color: var(--primary-deep); }
.fab-menu:hover { background: #1971C2; }

/* ── Utilidades ────────────────────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }

/* ── Año badge ─────────────────────────────────────────────────────────── */
.year-badge {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: .3rem 1rem;
  font-size: .84rem;
  font-weight: 700;
  margin: 0 .4rem .4rem 0;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.year-badge:hover, .year-badge.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Slider de banners ─────────────────────────────────────────────────── */
.hero-slider-wrap { position: relative; overflow: hidden; background: var(--primary-deep); }
.carousel-item.hero { min-height: 560px; }

@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.carousel-item.active .hero-bg,
section.hero .hero-bg { animation: heroZoom 14s ease-out both; }

#heroCarousel .carousel-indicators {
  justify-content: flex-start;
  margin: 0 auto 1.75rem;
  padding: 0 calc(var(--bs-gutter-x, 1.5rem) * .5 + 1.25rem);
  max-width: 1320px;
}
#heroCarousel .carousel-indicators [data-bs-slide-to] {
  width: 28px;
  height: 4px;
  border-radius: 4px;
  background-color: rgba(255,255,255,.45);
  border: none;
  margin: 0 6px 0 0;
  opacity: 1;
  transition: background .25s, width .35s var(--ease);
}
#heroCarousel .carousel-indicators .active { background-color: var(--accent); width: 48px; }

.hero-carousel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  transition: background .2s, transform .2s var(--ease), color .2s;
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px);
}
.carousel-control-prev:hover .hero-carousel-arrow,
.carousel-control-next:hover .hero-carousel-arrow { background: #fff; color: var(--primary); transform: scale(1.06); }
.carousel-control-prev, .carousel-control-next { width: 80px; opacity: 1; z-index: 3; }

#heroCarousel.carousel-fade .carousel-item { opacity: 0; transition: opacity .8s ease-in-out; }
#heroCarousel.carousel-fade .carousel-item.active { opacity: 1; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
  .hero-content { padding-bottom: 7rem; }
}

@media (max-width: 1199.98px) {
  .search-input, .search-input:focus { width: 220px; }
  .main-nav .nav-link { padding: .95rem .7rem !important; font-size: .76rem; letter-spacing: .05em; }
  .main-nav .nav-link::after { left: .7rem; right: .7rem; }
}

@media (max-width: 991.98px) {
  .logo-name { font-size: 1.2rem; }
  .fab-menu { display: flex; }
  .section-pillars { padding-top: 3rem; }
  .section-pillars .row { margin-top: 0; }
  .section-sidebar { position: static; }
}

@media (max-width: 767.98px) {
  body { font-size: 1rem; }

  .topbar-tagline { display: none; }
  .topbar .container { justify-content: flex-end !important; }

  .logo-subtitle  { display: none; }
  .logo-text-mark { width: 42px; height: 42px; font-size: 1.25rem; }
  .site-logo      { height: 44px; }
  .site-masthead.is-scrolled .site-logo { height: 38px; }
  .site-header-inner { padding-top: .7rem; padding-bottom: .7rem; }

  .hero, .carousel-item.hero { min-height: 440px; }
  .hero-content { padding: 3.5rem 1.25rem 4rem; }
  .hero::after { background: linear-gradient(180deg, rgba(5,44,85,.55) 0%, rgba(5,44,85,.85) 100%); }
  .btn-hero-primary, .btn-hero-secondary { padding: .75rem 1.3rem; font-size: .8rem; }
  .carousel-control-prev, .carousel-control-next { display: none; }
  #heroCarousel .carousel-indicators { padding: 0 1.25rem; margin-bottom: 1.25rem; }

  .section       { padding: 3.25rem 0; }
  .section-head  { margin-bottom: 1.5rem; }
  .section-pillars { padding: 2.5rem 0 3rem; }
  .pillar-card   { padding: 1.35rem 1.1rem; }
  .pillar-icon   { width: 44px; height: 44px; font-size: 1.2rem; margin-bottom: .8rem; border-radius: 12px; }
  .pillar-title  { font-size: 1.05rem; }
  .pillar-desc   { font-size: .88rem; }

  .page-hero    { padding: 2.25rem 0 2rem; }
  .page-hero::before { width: 320px; height: 320px; right: -140px; }
  .page-content { padding: 2.25rem 0 3rem; }

  .article-header { padding: 2rem 0 1.5rem; }
  .article-img    { margin-bottom: 1.75rem; border-radius: var(--radius); }
  .article-body   { font-size: 1.05rem; }

  .contact-form-card, .contact-card { padding: 1.35rem; }
  .contact-form-card .btn-primary-custom { width: 100%; }

  .footer-top { padding: 3rem 0 2rem; }
  .footer-bottom .container { text-align: center; }
}

@media (max-width: 575.98px) {
  .topbar     { font-size: .74rem; }
  .logo-name  { font-size: 1.05rem; }
  .hero h1    { font-size: 1.75rem; }
  .hero-sub   { font-size: .98rem; }
  .pillar-desc { display: none; }
  .pillar-btn  { padding-top: .6rem; }
  .section-pillars [class*="col-6"] .pillar-card { text-align: center; align-items: center; }
  .section-pillars [class*="col-6"] .pillar-icon { margin-left: auto; margin-right: auto; }
  .section-pillars [class*="col-6"] .pillar-btn { align-self: center; }
  .news-card-body { padding: 1.1rem 1.15rem 1.25rem; }
  .credentials-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .fab-group { right: 1rem; bottom: 1rem; }
  .fab-btn { width: 44px; height: 44px; }
  .search-page-form { border-radius: var(--radius); padding: .35rem .35rem .35rem .9rem; }
  .search-page-form .btn-primary-custom { padding: .6rem 1rem; }
  .search-page-form .btn-label { display: none; }
  .pagination { flex-wrap: wrap; 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 {
  .legal-banner, .topbar, .site-masthead, .fab-group, .site-footer, .section-sidebar, .mobile-drawer, .mobile-overlay { display: none !important; }
  .page-hero, .article-header { background: none !important; color: #000 !important; }
  .page-hero h1 { color: #000 !important; }
}

/* ── Modal de credenciales protegidas ──────────────────────────────────── */
.cred-person-card--button { width: 100%; padding: 0; appearance: none; cursor: pointer; }
.cred-person-card--button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cred-person-card--button .cred-person-img { position: relative; }
.cred-person-card--button .cred-person-img::after { content: 'Ver credencial'; position: absolute; inset: auto .7rem .7rem; padding: .42rem .7rem; border-radius: .3rem; background: rgba(19,34,120,.88); color: #fff; font-size: .78rem; font-weight: 700; opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }
.cred-person-card--button:hover .cred-person-img::after, .cred-person-card--button:focus-visible .cred-person-img::after { opacity: 1; transform: translateY(0); }
/* Modal de credenciales: coincide visualmente con unescowfuca.us. */
.credential-modal .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
.credential-modal .modal-header { background: #132278; color: #fff; border: 0; }
.credential-modal .modal-title { color: #fff; }
.credential-modal .btn-close { filter: invert(1); }
.credential-modal .modal-body { background: #fff; padding: 1rem; }
.credential-modal .modal-body img { max-height: 75vh; width: auto; box-shadow: 0 10px 30px -10px rgba(16,24,64,.18), 0 2px 6px rgba(16,24,64,.05); background: #fff; }
.credential-modal-note { color: #535b78; font-size: .85rem; margin-top: .85rem; }

.credential-modal .modal-content, .credential-modal .modal-body, .credential-modal .modal-footer { background: #fff; }
.credential-modal .modal-footer { border-top-color: #fff; }

.credential-protected, .credential-protected img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.cred-person-card--button .cred-person-img::after { content: '🔒 Ver credencial'; }
.credential-modal-note .bi { color: #132278; }

/* ── Scrollbar institucional ───────────────────────────────────────────── */
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--primary-50); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--primary-50); }
::-webkit-scrollbar-thumb { background: var(--accent); border: 3px solid var(--primary-50); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }
::-webkit-scrollbar-corner { background: var(--primary-50); }
