
/* ECA / UNAM · CSS local sin CDN, sin jQuery y sin dependencias externas. */

:root {
  --azul-unam: #1a387d;
  --azul-unam-2: #10275f;
  --azul-profundo: #071933;
  --dorado-unam: #c8a53a;
  --dorado-2: #ead48a;
  --blanco: #ffffff;
  --tinta: #172033;
  --texto: #233044;
  --muted: #68758a;
  --linea: rgba(26, 56, 125, .14);
  --fondo: #f6f8fc;
  --panel: rgba(255, 255, 255, .92);
  --panel-solid: #ffffff;
  --sombra-suave: 0 14px 35px rgba(26, 56, 125, .12);
  --sombra-fuerte: 0 24px 70px rgba(7, 25, 51, .18);
  --radio: 1.15rem;
  --radio-xl: 1.75rem;
  --container: 1180px;
  --nav-h: 84px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --fondo: #07101f;
  --panel: rgba(12, 24, 44, .86);
  --panel-solid: #0c182c;
  --tinta: #f5f7fb;
  --texto: #d8e1f1;
  --muted: #a7b4ca;
  --linea: rgba(255, 255, 255, .12);
  --sombra-suave: 0 18px 45px rgba(0, 0, 0, .32);
  --sombra-fuerte: 0 28px 80px rgba(0, 0, 0, .48);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(200,165,58,.18), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(26,56,125,.18), transparent 30rem),
    var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; }
img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--dorado-unam); outline-offset: 3px; }
::selection { background: var(--dorado-unam); color: #071933; }

.skip-link {
  position: absolute;
  top: .65rem;
  left: .65rem;
  z-index: 9999;
  transform: translateY(-160%);
  background: var(--azul-unam);
  color: white;
  padding: .7rem 1rem;
  border-radius: .6rem;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--linea);
  box-shadow: 0 10px 35px rgba(7, 25, 51, .08);
}
html[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, rgba(26,56,125,.96), rgba(7,25,51,.96));
}

.brand-row {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: min(620px, 58vw);
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
}
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.icon-button, .menu-toggle {
  border: 1px solid var(--linea);
  background: var(--panel-solid);
  color: var(--azul-unam);
  border-radius: 999px;
  min-width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  box-shadow: 0 8px 22px rgba(7,25,51,.08);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.icon-button:hover, .menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(7,25,51,.12); }
html[data-theme="dark"] .icon-button, html[data-theme="dark"] .menu-toggle {
  background: rgba(255,255,255,.09);
  color: white;
  border-color: rgba(255,255,255,.18);
}
.menu-toggle { padding-inline: .9rem; display: none; }
.menu-toggle svg, .icon-button svg { width: 1.25rem; height: 1.25rem; }

.nav-wrap {
  background: linear-gradient(90deg, var(--azul-unam), var(--azul-unam-2));
  border-top: 3px solid var(--dorado-unam);
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: .15rem;
  padding: 0;
  margin: 0;
}
.nav-item { position: relative; }
.nav-link, .submenu-toggle {
  border: 0;
  background: transparent;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 52px;
  padding: .85rem 1rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: .8rem;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.nav-link:hover, .submenu-toggle:hover, .nav-link[aria-current="page"] {
  background: rgba(255,255,255,.12);
  color: var(--dorado-2);
}
.nav-link::after, .submenu-toggle::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .42rem;
  height: 2px;
  background: var(--dorado-unam);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-link:hover::after, .submenu-toggle:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.chevron { width: .75rem; height: .75rem; transition: transform .18s ease; }
.nav-item:hover .chevron, .nav-item:focus-within .chevron { transform: rotate(180deg); }
.submenu {
  position: absolute;
  top: calc(100% - .3rem);
  left: .4rem;
  min-width: 280px;
  list-style: none;
  padding: .55rem;
  margin: 0;
  background: var(--panel-solid);
  border: 1px solid var(--linea);
  border-radius: 1rem;
  box-shadow: var(--sombra-fuerte);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.nav-item:hover .submenu, .nav-item:focus-within .submenu, .nav-item.is-open .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.submenu a {
  display: flex;
  gap: .45rem;
  align-items: flex-start;
  padding: .75rem .85rem;
  border-radius: .75rem;
  text-decoration: none;
  color: var(--texto);
  font-weight: 650;
}
.submenu a:hover { background: rgba(26,56,125,.08); color: var(--azul-unam); }
html[data-theme="dark"] .submenu a:hover { color: var(--dorado-2); background: rgba(255,255,255,.08); }

.social-strip {
  background: var(--panel-solid);
  border-bottom: 1px solid var(--linea);
}
.social-strip .container {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.social-caption {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 650;
}
.social-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--linea);
  color: var(--azul-unam);
  background: linear-gradient(180deg, #fff, #f5f7fc);
  box-shadow: 0 8px 18px rgba(7,25,51,.08);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease;
}
.social-link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(7,25,51,.15); color: #071933; }
.social-link svg { width: 1.12rem; height: 1.12rem; }
html[data-theme="dark"] .social-strip { background: rgba(6,16,32,.92); }
html[data-theme="dark"] .social-link { color: var(--dorado-2); background: rgba(255,255,255,.08); }

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 7vw, 6rem);
  background:
    linear-gradient(135deg, rgba(26,56,125,.96), rgba(7,25,51,.98)),
    radial-gradient(circle at 80% 10%, rgba(200,165,58,.45), transparent 22rem);
  color: white;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -12rem -12rem auto auto;
  width: 36rem;
  height: 36rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(200,165,58,.42), rgba(200,165,58,0) 65%);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -14rem auto;
  width: 40rem;
  height: 40rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.kicker {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: var(--dorado-2);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
}
.kicker::before { content: ""; width: 2.2rem; height: 3px; border-radius: 99px; background: var(--dorado-unam); }
h1, h2, h3, h4 { color: var(--tinta); line-height: 1.14; margin: 0 0 .75rem; }
.hero h1 { color: white; font-size: clamp(2.25rem, 5.5vw, 4.75rem); letter-spacing: -.045em; max-width: 13ch; }
.hero p { color: rgba(255,255,255,.88); font-size: clamp(1rem, 1.5vw, 1.22rem); max-width: 62ch; }
.hero-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radio-xl);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--sombra-fuerte);
}
.hero-card-inner {
  background: white;
  color: var(--texto);
  border-radius: 1.35rem;
  padding: 1.25rem;
}
.hero-card h2 { color: var(--azul-unam); font-size: 1.25rem; }
.hero-card .date { color: var(--azul-unam); font-weight: 900; font-size: 1.1rem; }
.hero-card ul { margin: .75rem 0 0; padding-left: 1.25rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.9rem;
  padding: .72rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(7,25,51,.18); }
.btn-primary { background: linear-gradient(135deg, var(--dorado-unam), var(--dorado-2)); color: #071933; }
.btn-secondary { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.28); }
.btn-blue { background: linear-gradient(135deg, var(--azul-unam), var(--azul-unam-2)); color: white; }
.btn-outline { border-color: var(--linea); background: var(--panel-solid); color: var(--azul-unam); }
html[data-theme="dark"] .btn-outline { color: var(--dorado-2); }

.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 4rem) 0; }
.section-title { max-width: 760px; margin-bottom: 2rem; }
.section-title h2 { font-size: clamp(1.8rem, 3.3vw, 3rem); letter-spacing: -.03em; }
.section-title p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.grid { display: grid; gap: 1.15rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.25rem;
  box-shadow: var(--sombra-suave);
  backdrop-filter: blur(10px);
}
.card.featured { border-top: 5px solid var(--dorado-unam); }
.card h3 { font-size: 1.22rem; }
.card p { color: var(--muted); margin-top: .35rem; }
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
  background: linear-gradient(135deg, rgba(26,56,125,.14), rgba(200,165,58,.18));
  color: var(--azul-unam);
}
html[data-theme="dark"] .card-icon { color: var(--dorado-2); background: rgba(255,255,255,.08); }
.card-icon svg { width: 1.35rem; height: 1.35rem; }

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: linear-gradient(135deg, rgba(26,56,125,.10), rgba(200,165,58,.14));
  border: 1px solid var(--linea);
  border-left: 6px solid var(--dorado-unam);
  border-radius: var(--radio);
  padding: 1.2rem;
}
.notice strong { color: var(--tinta); }

.timeline { position: relative; display: grid; gap: .8rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 1rem;
  padding: 1rem;
}
.timeline-date { font-weight: 900; color: var(--azul-unam); }
html[data-theme="dark"] .timeline-date { color: var(--dorado-2); }
.timeline-title { font-weight: 800; color: var(--tinta); }
.timeline-desc { color: var(--muted); }

.page-hero {
  padding: clamp(2.8rem, 7vw, 5.5rem) 0;
  color: white;
  background:
    linear-gradient(135deg, rgba(26,56,125,.97), rgba(7,25,51,.97)),
    radial-gradient(circle at 80% 0%, rgba(200,165,58,.28), transparent 24rem);
}
.page-hero h1 { color: white; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.035em; }
.page-hero p { color: rgba(255,255,255,.84); max-width: 72ch; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.contact-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; align-items: start; }
.contact-list svg { width: 1.2rem; margin-top: .2rem; color: var(--dorado-unam); }

.local-map {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--linea);
  border-radius: var(--radio-xl);
  background:
    linear-gradient(135deg, rgba(26,56,125,.12), rgba(200,165,58,.14)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(26,56,125,.04) 12px 24px);
}
.local-map b { display: block; color: var(--tinta); font-size: 1.25rem; }

.footer {
  margin-top: 3rem;
  color: white;
  background: linear-gradient(135deg, var(--azul-unam), var(--azul-profundo));
}
.footer-gold-line { height: 6px; background: linear-gradient(90deg, var(--dorado-unam), var(--dorado-2), var(--dorado-unam)); }
.footer-main { padding: 2.4rem 0; }
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 1.5rem; }
.footer-logo { width: min(560px, 100%); max-height: 74px; object-fit: contain; object-position: left center; margin-bottom: 1rem; }
.footer h2, .footer h3 { color: white; }
.footer h3 { font-size: 1rem; margin-bottom: .75rem; color: var(--dorado-2); }
.footer p, .footer a, .footer li { color: rgba(255,255,255,.86); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--dorado-2); text-decoration: underline; text-underline-offset: 4px; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 1rem 0 1.4rem;
  font-size: .9rem;
  color: rgba(255,255,255,.72);
}
.footer-bottom {
  background: rgba(0,0,0,.22);
  padding: 1rem 0;
  font-size: .92rem;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(200,165,58,.16);
  color: var(--dorado-2);
  border: 1px solid rgba(200,165,58,.28);
  font-weight: 800;
  font-size: .82rem;
}
.pill-list { display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.pill-list li {
  padding: .45rem .7rem;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--panel-solid);
  font-weight: 700;
  color: var(--muted);
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1040px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --nav-h: 72px; }
  .brand-row { padding-block: .65rem; }
  .brand-logo { width: min(520px, 68vw); max-height: 58px; }
  .menu-toggle { display: inline-flex; }
  .nav-wrap {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    max-height: calc(100vh - var(--nav-h));
    overflow: auto;
    box-shadow: var(--sombra-fuerte);
  }
  body.nav-open .nav-wrap { display: block; }
  .main-nav { justify-content: stretch; }
  .nav-list { width: 100%; flex-direction: column; padding: .7rem; }
  .nav-link, .submenu-toggle { width: 100%; justify-content: space-between; border-radius: .8rem; }
  .nav-link::after, .submenu-toggle::after { display: none; }
  .submenu {
    position: static;
    min-width: 0;
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin: 0 .2rem .5rem;
    background: rgba(255,255,255,.10);
    box-shadow: none;
    border-color: rgba(255,255,255,.12);
  }
  .nav-item.is-open .submenu { display: block; }
  .submenu a { color: white; }
  .submenu a:hover { color: var(--dorado-2); background: rgba(255,255,255,.10); }
  .social-strip .container { flex-direction: column; align-items: flex-start; padding-block: .85rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 1.2rem), var(--container)); }
  .brand-logo { width: min(78vw, 360px); }
  .icon-button { min-width: 2.55rem; height: 2.55rem; }
  .menu-toggle span { display: none; }
  .hero-card { padding: .8rem; }
  .card { padding: 1rem; }
  .footer-bottom .container { display: grid; }
}

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


/* ===== Ajustes solicitados v2: header ancho completo, modo claro por defecto, menú blanco, redes antes del menú ===== */
.header-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(.9rem, 3.4vw, 3rem);
}
.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(26,56,125,.12);
  box-shadow: 0 10px 26px rgba(7,25,51,.08);
}
html[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, #0a1b3d, #07101f);
}
.brand-row {
  min-height: 98px;
  padding-block: .7rem;
}
.brand-link {
  flex: 1 1 auto;
  min-width: 0;
}
.brand-logo {
  width: min(980px, calc(100vw - 11rem));
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}
.icon-button, .menu-toggle {
  border-color: rgba(26,56,125,.18);
  background: #fff;
  color: var(--azul-unam);
}
.social-strip {
  background: #fff;
  border-top: 1px solid rgba(26,56,125,.10);
  border-bottom: 1px solid rgba(26,56,125,.10);
}
.social-shell {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.social-caption { color: #365174; }
.social-link {
  background: #fff;
  border-color: rgba(26,56,125,.15);
  box-shadow: 0 8px 16px rgba(7,25,51,.07);
}
.social-instagram { color: #c13584; }
.social-facebook { color: #1877f2; }
.social-x { color: #000; }
.social-youtube { color: #ff0000; }
.social-mail { color: var(--azul-unam); }
.social-link:hover { color: currentColor; transform: translateY(-2px) scale(1.04); }
.nav-wrap {
  background: #fff;
  border-top: 3px solid var(--dorado-unam);
  border-bottom: 1px solid rgba(26,56,125,.12);
}
.main-nav { justify-content: center; }
.nav-link, .submenu-toggle {
  color: var(--azul-unam);
  min-height: 54px;
  border-radius: .7rem;
}
.nav-link:hover, .submenu-toggle:hover, .nav-link[aria-current="page"] {
  background: rgba(26,56,125,.08);
  color: var(--azul-unam-2);
}
.nav-link::after, .submenu-toggle::after { background: var(--dorado-unam); }
.submenu {
  background: #fff;
  border: 1px solid rgba(26,56,125,.14);
}
.submenu a { color: var(--texto); }
.submenu a:hover { background: rgba(26,56,125,.07); color: var(--azul-unam); }
html[data-theme="dark"] .social-strip,
html[data-theme="dark"] .nav-wrap {
  background: #07101f;
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .submenu-toggle { color: #fff; }
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .submenu-toggle:hover,
html[data-theme="dark"] .nav-link[aria-current="page"] { color: var(--dorado-2); background: rgba(255,255,255,.08); }
html[data-theme="dark"] .submenu { background: #0c182c; border-color: rgba(255,255,255,.14); }
html[data-theme="dark"] .submenu a { color: #eef3ff; }
html[data-theme="dark"] .social-caption { color: rgba(255,255,255,.75); }
html[data-theme="dark"] .social-x { color: #fff; }
html[data-theme="dark"] .social-link { background: rgba(255,255,255,.08); }
.page-hero-light {
  color: var(--texto);
  background:
    radial-gradient(circle at 82% 0%, rgba(200,165,58,.18), transparent 24rem),
    linear-gradient(135deg, #fff, #f3f6fc 58%, #eef3fb);
  border-bottom: 1px solid rgba(26,56,125,.10);
}
.page-hero-light h1 { color: var(--azul-unam); }
.page-hero-light p { color: var(--texto); }
.page-hero-light .kicker { color: var(--azul-unam); }
.convocatoria-grid {
  display: grid;
  gap: 1.15rem;
  align-items: stretch;
}
.convocatoria-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.conv-card {
  position: relative;
  overflow: hidden;
  background: var(--panel-solid);
  border: 1px solid rgba(26,56,125,.14);
  border-radius: var(--radio-xl);
  box-shadow: var(--sombra-suave);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.conv-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--azul-unam), var(--dorado-unam));
}
.conv-card-active { box-shadow: 0 20px 50px rgba(26,56,125,.18); }
.conv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .85rem;
}
.period-tag {
  color: var(--azul-unam);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .78rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .28rem .58rem;
  font-size: .76rem;
  font-weight: 900;
  white-space: nowrap;
}
.status-open { background: rgba(26,56,125,.10); color: var(--azul-unam); }
.status-soon { background: rgba(200,165,58,.18); color: #7a5a00; }
.conv-program { margin: 0 0 .55rem; color: var(--muted); font-weight: 750; }
.conv-card h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); color: var(--azul-unam); }
.conv-card h3 u { text-decoration-color: var(--dorado-unam); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.conv-section { border-top: 1px solid var(--linea); padding-top: .85rem; margin-top: .85rem; }
.conv-section h4 { color: var(--azul-unam-2); font-size: .95rem; margin-bottom: .3rem; }
.conv-section p { margin: 0; }
.conv-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: auto; padding-top: 1rem; }
.btn-disabled {
  color: #6c7585;
  background: #eef1f6;
  border-color: rgba(26,56,125,.10);
  cursor: not-allowed;
  box-shadow: none;
}
.disabled-callout {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,254,.96)),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(26,56,125,.035) 10px 20px);
}
.system-access {
  border-radius: var(--radio-xl);
  padding: clamp(1.2rem, 3vw, 2rem);
  background: linear-gradient(135deg, var(--azul-unam), var(--azul-unam-2));
  color: white;
  box-shadow: var(--sombra-fuerte);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
}
.system-access h2 { color: white; }
.system-access p { color: rgba(255,255,255,.86); margin-bottom: 0; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.archive-year {
  background: var(--panel-solid);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1rem;
  box-shadow: var(--sombra-suave);
}
.archive-year h3 { color: var(--azul-unam); }
.archive-year .pill-list { display: grid; }
.archive-year .pill-list li { border-radius: .85rem; }
.footer {
  background: linear-gradient(135deg, #1a387d 0%, #10275f 52%, #071933 100%);
}
.footer-disclaimer { background: rgba(255,255,255,.035); border-radius: 1rem; margin-bottom: 1.2rem; padding-inline: 1rem; }
.footer-grid { grid-template-columns: 1.45fr 1fr 1fr 1fr; }

@media (max-width: 1040px) {
  .convocatoria-grid-3 { grid-template-columns: 1fr 1fr; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .system-access { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .brand-logo { width: min(640px, calc(100vw - 8rem)); max-height: 68px; }
  .social-shell { flex-direction: column; align-items: flex-start; padding-block: .8rem; }
  .nav-wrap { top: auto; background: #fff; }
  body.nav-open .nav-wrap { display: block; }
  .submenu { background: rgba(26,56,125,.05); border-color: rgba(26,56,125,.12); }
  .submenu a { color: var(--azul-unam); }
  html[data-theme="dark"] .submenu { background: rgba(255,255,255,.08); }
  html[data-theme="dark"] .submenu a { color: white; }
}
@media (max-width: 680px) {
  .convocatoria-grid-3, .archive-grid { grid-template-columns: 1fr; }
  .brand-logo { width: min(76vw, 420px); }
  .brand-row { min-height: 78px; }
}


/* ===== Ajustes v3: redes arriba, logo y menú en una sola línea, contraste blanco/azul ===== */
.site-header { overflow: visible; }
.social-strip { order: 0; }
.brand-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  background: #fff;
}
.brand-link { flex: 0 1 auto; max-width: 46vw; }
.brand-logo {
  width: min(560px, 44vw);
  max-height: 68px;
}
.nav-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}
.nav-wrap {
  position: static;
  flex: 1 1 auto;
  display: block;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.main-nav { justify-content: flex-end; }
.nav-list { align-items: center; justify-content: flex-end; gap: .2rem; }
.nav-link, .submenu-toggle {
  min-height: 44px;
  padding: .6rem .72rem;
  font-size: .96rem;
  white-space: nowrap;
}
.header-actions { margin-left: .2rem; }
.menu-toggle { display: none; }
.social-shell { min-height: 42px; }
.social-caption { font-size: .92rem; }
.social-link { width: 2.1rem; height: 2.1rem; }
.status-done { background: rgba(104,117,138,.14); color: #536176; }
.map-card {
  overflow: hidden;
  border-radius: var(--radio-xl);
  background: var(--panel-solid);
  border: 1px solid var(--linea);
  box-shadow: var(--sombra-fuerte);
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
}
.map-info { padding: clamp(1.2rem, 3vw, 2rem); }
.map-frame { min-height: 420px; background: #e9edf5; }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
html[data-theme="dark"] .brand-row { background: linear-gradient(135deg, #0a1b3d, #07101f); }
html[data-theme="dark"] .nav-wrap { background: transparent; }
html[data-theme="dark"] .icon-button, html[data-theme="dark"] .menu-toggle { background: rgba(255,255,255,.08); color: #fff; }
html[data-theme="dark"] .map-card { background: var(--panel-solid); }

@media (max-width: 1160px) {
  .brand-link { max-width: 42vw; }
  .brand-logo { width: min(500px, 42vw); }
  .nav-link, .submenu-toggle { padding-inline: .55rem; font-size: .92rem; }
}
@media (max-width: 1040px) {
  .brand-link { max-width: 62vw; }
  .brand-logo { width: min(560px, 62vw); }
  .menu-toggle { display: inline-flex; }
  .nav-wrap {
    display: none;
    position: absolute;
    inset: calc(100% + 0px) 0 auto 0;
    z-index: 1001;
    max-height: calc(100vh - 112px);
    overflow: auto;
    background: #fff;
    border-top: 3px solid var(--dorado-unam);
    border-bottom: 1px solid var(--linea);
    box-shadow: var(--sombra-fuerte);
  }
  body.nav-open .nav-wrap { display: block; }
  .main-nav { justify-content: stretch; }
  .nav-list { width: 100%; flex-direction: column; align-items: stretch; padding: .7rem; }
  .nav-link, .submenu-toggle { width: 100%; justify-content: space-between; min-height: 48px; font-size: 1rem; }
  .nav-link::after, .submenu-toggle::after { display: none; }
  .submenu {
    position: static;
    min-width: 0;
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin: 0 .2rem .5rem;
    background: rgba(26,56,125,.045);
    box-shadow: none;
    border-color: rgba(26,56,125,.12);
  }
  .nav-item.is-open .submenu { display: block; }
  .submenu a { color: var(--azul-unam); }
  .submenu a:hover { color: var(--azul-unam-2); background: rgba(26,56,125,.08); }
  html[data-theme="dark"] .nav-wrap { background: #07101f; border-color: rgba(255,255,255,.14); }
  html[data-theme="dark"] .submenu { background: rgba(255,255,255,.08); }
  html[data-theme="dark"] .submenu a { color: #fff; }
}
@media (max-width: 820px) {
  .brand-row { min-height: 72px; }
  .brand-link { max-width: 66vw; }
  .brand-logo { width: min(500px, 66vw); max-height: 58px; }
  .social-shell { align-items: center; flex-direction: row; flex-wrap: wrap; padding-block: .5rem; }
  .social-caption { font-size: .82rem; }
  .map-card { grid-template-columns: 1fr; }
  .map-frame, .map-frame iframe { min-height: 340px; }
}
@media (max-width: 520px) {
  .brand-link { max-width: 70vw; }
  .brand-logo { width: min(70vw, 360px); }
  .social-shell { justify-content: center; text-align: center; }
  .social-links { justify-content: center; width: 100%; }
  .header-actions { gap: .4rem; }
}


/* ===== Ajustes v4: header sticky compacto, loader, accesibilidad y animaciones ===== */
:root { --font-scale: 1; --sticky-header-h: 82px; }
html { font-size: calc(16px * var(--font-scale, 1)); scroll-padding-top: calc(var(--sticky-header-h) + 1rem); }
body { overflow-x: hidden; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(26,56,125,.12);
  box-shadow: 0 10px 32px rgba(7,25,51,.10);
}
html[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, rgba(10,27,61,.96), rgba(7,16,31,.96));
}
.brand-row { min-height: var(--sticky-header-h); }
.social-strip {
  position: relative;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid rgba(26,56,125,.12);
  box-shadow: 0 6px 18px rgba(7,25,51,.05);
}
.social-shell { min-height: 46px; }
.social-facebook { color: #1877f2; }
.social-youtube { color: #ff0000; }
.social-x { color: #111; }
.social-instagram { color: #c13584; }
.social-mail { color: var(--azul-unam); }
.social-link:hover { color: currentColor; transform: translateY(-2px) scale(1.04); }

/* Panel de tema y zoom */
.accessibility-menu { position: relative; }
.controls-toggle-icons { display: inline-flex; align-items: center; justify-content: center; }
.controls-toggle-icons svg { width: 1.24rem; height: 1.24rem; }
.controls-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .65rem);
  min-width: 245px;
  background: var(--panel-solid);
  border: 1px solid var(--linea);
  border-radius: 1rem;
  box-shadow: var(--sombra-fuerte);
  padding: .75rem;
  z-index: 1300;
  transform-origin: top right;
  animation: panelIn .16s ease both;
}
.controls-panel[hidden] { display: none; }
.controls-title {
  margin: .1rem .35rem .55rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.control-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--texto);
  text-align: left;
  padding: .62rem .7rem;
  border-radius: .72rem;
  font-weight: 750;
}
.control-row:hover, .control-row.is-active { background: rgba(26,56,125,.08); color: var(--azul-unam); }
.controls-separator { height: 1px; background: var(--linea); margin: .55rem 0; }
.font-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.control-button {
  border: 1px solid var(--linea);
  background: linear-gradient(180deg, #fff, #f5f7fc);
  color: var(--azul-unam);
  border-radius: .75rem;
  min-height: 2.35rem;
  font-weight: 900;
}
.control-button:hover { border-color: rgba(200,165,58,.6); box-shadow: 0 8px 18px rgba(7,25,51,.10); }
html[data-theme="dark"] .controls-panel { background: #0c182c; border-color: rgba(255,255,255,.14); }
html[data-theme="dark"] .control-row { color: #eef3ff; }
html[data-theme="dark"] .control-row:hover, html[data-theme="dark"] .control-row.is-active { background: rgba(255,255,255,.08); color: var(--dorado-2); }
html[data-theme="dark"] .control-button { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Loader local */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(200,165,58,.18), transparent 28rem),
    linear-gradient(135deg, #fff, #f3f6fc);
  transition: opacity .35s ease, visibility .35s ease;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-card {
  width: min(92vw, 520px);
  display: grid;
  place-items: center;
  gap: .6rem;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(26,56,125,.12);
  border-radius: 1.25rem;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 24px 70px rgba(7,25,51,.15);
}
.loader-card img { width: min(310px, 78vw); height: auto; }
.loader-card span { color: var(--azul-unam); font-weight: 850; letter-spacing: .02em; }
html[data-theme="dark"] .page-loader { background: linear-gradient(135deg, #07101f, #0c182c); }
html[data-theme="dark"] .loader-card { background: rgba(12,24,44,.92); border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .loader-card span { color: var(--dorado-2); }

/* Botón volver arriba */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 1.5rem);
  bottom: clamp(1rem, 3vw, 1.5rem);
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, var(--azul-unam), var(--azul-unam-2));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  box-shadow: 0 16px 38px rgba(7,25,51,.28);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { box-shadow: 0 22px 48px rgba(7,25,51,.35); transform: translateY(-2px) scale(1.03); }
.back-to-top svg { width: 1.5rem; height: 1.5rem; }

/* Animaciones */
body:not(.is-loaded) main { opacity: 0; }
body.is-loaded main { animation: pageIn .55s ease both; }
.hero, .page-hero, .page-hero-light { animation: heroIn .7s ease both; }
.reveal { opacity: 0; transform: translateY(22px) scale(.99); transition: opacity .62s ease, transform .62s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.grid .reveal:nth-child(2), .convocatoria-grid .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3), .convocatoria-grid .reveal:nth-child(3) { transition-delay: .14s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroIn { from { opacity: .86; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Convocatorias pasadas/read-only */
.conv-card-past {
  filter: grayscale(.55);
  background: linear-gradient(180deg, #f2f4f7, #e9edf3);
  border-color: rgba(104,117,138,.28);
  color: #596579;
  box-shadow: 0 12px 30px rgba(83,97,118,.12);
}
.conv-card-past::before { background: linear-gradient(90deg, #9aa4b4, #c8ced8); }
.conv-card-past h3, .conv-card-past h4, .conv-card-past .period-tag { color: #536176; }
.conv-card-past .btn-primary, .conv-card-past .btn-outline {
  background: #eef1f6;
  color: #536176;
  border-color: rgba(104,117,138,.25);
  box-shadow: none;
}
.muted-note { color: var(--muted); display: block; margin-top: .45rem; }

/* Footer sin columnas delgadas */
.footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
}
.footer-grid > div:first-child { min-width: min(100%, 320px); }
.footer-main { padding: clamp(1.6rem, 4vw, 2.7rem) 0; }

@media (max-width: 1040px) {
  :root { --sticky-header-h: 76px; }
  .controls-panel { right: -.25rem; }
  .social-shell { justify-content: center; text-align: center; gap: .75rem; }
  .social-caption { width: 100%; }
  .social-links { justify-content: center; width: 100%; }
}
@media (max-width: 820px) {
  :root { --sticky-header-h: 72px; }
  .social-strip { font-size: .92rem; }
  .social-shell { padding-block: .55rem; }
  .controls-panel { position: fixed; right: .75rem; top: calc(var(--sticky-header-h) + .65rem); width: min(320px, calc(100vw - 1.5rem)); }
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
}
@media (max-width: 560px) {
  :root { --sticky-header-h: 68px; }
  .footer-grid { grid-template-columns: 1fr; }
  .back-to-top { width: 2.85rem; height: 2.85rem; }
  .loader-card { padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .page-loader { transition: none; }
}


/* Degradación progresiva: si JS está desactivado, no se oculta el contenido ni aparece el loader. */
.page-loader { display: none; }
html.js .page-loader { display: grid; }
body:not(.is-loaded) main { opacity: 1; }
html.js body:not(.is-loaded) main { opacity: 0; }
@media (max-width: 1040px) {
  .nav-wrap {
    position: fixed;
    top: var(--sticky-header-h);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--sticky-header-h));
  }
}

/* =========================================================
   Ajustes v5: sin página Directorio y contraste de convocatorias en modo oscuro
   ========================================================= */
html[data-theme="dark"] .page-hero-light {
  color: #eaf0ff;
  background:
    radial-gradient(circle at 86% 0%, rgba(234,212,138,.14), transparent 22rem),
    radial-gradient(circle at 8% 0%, rgba(26,56,125,.45), transparent 26rem),
    linear-gradient(135deg, #0f213d 0%, #0a172c 58%, #07101f 100%);
  border-bottom-color: rgba(234,212,138,.18);
}
html[data-theme="dark"] .page-hero-light h1,
html[data-theme="dark"] .page-hero-light .kicker {
  color: #f7dc82;
}
html[data-theme="dark"] .page-hero-light p {
  color: #e3ebfa;
}

html[data-theme="dark"] .conv-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(234,212,138,.08), transparent 16rem),
    linear-gradient(180deg, #10233f, #0b172c);
  color: #e6eefc;
  border-color: rgba(234,212,138,.20);
  box-shadow: 0 20px 52px rgba(0,0,0,.38);
}
html[data-theme="dark"] .conv-card::before {
  background: linear-gradient(90deg, #f0d77f, #1a387d 65%, #7e9bef);
}
html[data-theme="dark"] .conv-card h3,
html[data-theme="dark"] .conv-card h4,
html[data-theme="dark"] .conv-card .period-tag {
  color: #f7dc82;
}
html[data-theme="dark"] .conv-program,
html[data-theme="dark"] .conv-section p,
html[data-theme="dark"] .conv-card small {
  color: #d8e4f7;
}
html[data-theme="dark"] .conv-section {
  border-top-color: rgba(255,255,255,.14);
}
html[data-theme="dark"] .status-open {
  background: rgba(247,220,130,.16);
  color: #ffe9a6;
  border: 1px solid rgba(247,220,130,.25);
}
html[data-theme="dark"] .status-done {
  background: rgba(148,163,184,.20);
  color: #dce6f7;
  border: 1px solid rgba(148,163,184,.28);
}
html[data-theme="dark"] .status-soon {
  background: rgba(234,212,138,.14);
  color: #ffe9a6;
  border: 1px solid rgba(234,212,138,.24);
}

/* Periodos anteriores: estilo readonly, pero legible */
html[data-theme="dark"] .conv-card-past {
  filter: none;
  background:
    linear-gradient(180deg, rgba(28,39,59,.96), rgba(15,23,42,.96)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(148,163,184,.08) 12px 24px);
  border-color: rgba(148,163,184,.30);
  color: #d5deec;
  box-shadow: 0 14px 34px rgba(0,0,0,.32);
}
html[data-theme="dark"] .conv-card-past::before {
  background: linear-gradient(90deg, #7f8ba1, #c1cad8);
}
html[data-theme="dark"] .conv-card-past h3,
html[data-theme="dark"] .conv-card-past h4,
html[data-theme="dark"] .conv-card-past .period-tag {
  color: #e1e8f4;
}
html[data-theme="dark"] .conv-card-past .conv-program,
html[data-theme="dark"] .conv-card-past p,
html[data-theme="dark"] .conv-card-past small {
  color: #c9d3e4;
}
html[data-theme="dark"] .conv-card-past .btn-primary,
html[data-theme="dark"] .conv-card-past .btn-outline {
  background: rgba(148,163,184,.14);
  color: #e1e8f4;
  border-color: rgba(148,163,184,.32);
  box-shadow: none;
}
html[data-theme="dark"] .conv-card-past .btn-primary:hover,
html[data-theme="dark"] .conv-card-past .btn-outline:hover {
  background: rgba(148,163,184,.22);
  color: #fff;
}

/* Próximamente: oscuro con franja de aviso y contraste alto */
html[data-theme="dark"] .disabled-callout {
  background:
    linear-gradient(180deg, rgba(14,29,54,.98), rgba(9,19,36,.98)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(234,212,138,.065) 12px 24px);
  border-color: rgba(234,212,138,.22);
}
html[data-theme="dark"] .disabled-callout::before {
  background: linear-gradient(90deg, #d5b953, #806515);
}
html[data-theme="dark"] .disabled-callout h3,
html[data-theme="dark"] .disabled-callout .period-tag {
  color: #f7dc82;
}
html[data-theme="dark"] .disabled-callout p {
  color: #dce6f7;
}
html[data-theme="dark"] .btn-disabled {
  background: rgba(255,255,255,.10);
  color: #e7eefc;
  border-color: rgba(234,212,138,.22);
}
html[data-theme="dark"] .muted-note {
  color: #bcc9dd;
}
