/* ============================================================
   SAEP · index.css  (requiere global.css)
   Página de inicio institucional — refinado con principios Impeccable
   ============================================================ */

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

/* ── Topbar institucional ── */
.topbar {
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .45rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.topbar-items span {
  display: flex;
  align-items: center;
  gap: .4rem;
  /* Impeccable: bump from .6 → .68 para legibilidad en fondo oscuro */
  color: rgba(255, 255, 255, .72);
  font-size: .68rem;
  letter-spacing: .03em;
}

.topbar-cycle {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #a8c4ff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Header ── */
.hdr {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 24px rgba(0, 0, 0, .18);
}

.hdr-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hdr-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 1;
  min-width: 0;
}

.hdr-logo > div {
  min-width: 0;
}

.hdr-emblem {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  flex-shrink: 0;
}

.hdr-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdr-school {
  font-size: .62rem;
  /* Impeccable: bump opacity de .62 → .72 */
  color: rgba(255, 255, 255, .72);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdr-nav-wrap {
  flex: 1;
}

.hdr-nav {
  display: flex;
  gap: .05rem;
  list-style: none;
  justify-content: flex-end;
  margin-right: 1.5rem;
}

.hdr-nav a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 500;
  padding: .38rem .85rem;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.hdr-nav a:hover,
.hdr-nav a.active {
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.hdr-cta {
  flex-shrink: 0;
  background: rgba(255, 255, 255, .15);
  border: 1.5px solid rgba(255, 255, 255, .32);
  color: #fff;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
  padding: .5rem 1.15rem;
  border-radius: 7px;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}

.hdr-cta:hover {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .5);
}

/* ── Hero ── */
.hero {
  /* Impeccable: evitar gradiente monocromático genérico.
     Agregamos una nota fría en el ángulo superior y una cálida+sutil en el inferior */
  background: linear-gradient(160deg,
    #001845 0%,
    #003d9b 45%,
    #004aba 72%,
    #001e5c 100%
  );
  padding: 5rem 1.5rem 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: -120px;
  background-image:
    repeating-linear-gradient(
      -50deg,
      transparent 0, transparent 48px,
      rgba(255,255,255,.025) 48px, rgba(255,255,255,.025) 96px
    );
  /* perf: slowed way down & no will-change — was causing constant repaints */
  animation: patternDrift 90s linear infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.hero-content {
  max-width: 560px;
  animation: heroFadeIn .7s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  /* Impeccable: .55 → .72 para legibilidad en fondo oscuro */
  color: rgba(255, 255, 255, .72);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.eyebrow-line {
  display: block;
  width: 32px;
  height: 1.5px;
  background: #a8c4ff;
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -.025em;
}

.hero-title em {
  font-style: italic;
  /* Impeccable: subir opacidad de .75 → .88 */
  color: rgba(255, 255, 255, .88);
  display: block;
  font-size: .88em;
  font-weight: 600;
}

.hero-desc {
  color: rgba(255, 255, 255, .78);
  font-size: .93rem;
  line-height: 1.8;
  /* Impeccable: font-weight 300 en fondo oscuro → problemas de contraste. Subir a 400 */
  font-weight: 400;
  margin-bottom: 2.25rem;
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
}

.btn-hero-pri {
  background: #fff;
  color: var(--navy-dark);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
  padding: .8rem 1.65rem;
  border-radius: 8px;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
  position: relative;
  overflow: hidden;
}

.btn-hero-pri:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
}

.btn-hero-sec {
  border: 1.5px solid rgba(255, 255, 255, .38);
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  padding: .8rem 1.5rem;
  border-radius: 8px;
  transition: background .22s, border-color .22s, transform .22s var(--ease-out);
}

.btn-hero-sec:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .58);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  /* perf: removed backdrop-filter blur — expensive on animated hero */
  border-radius: 16px;
  padding: 1.75rem 2.25rem;
  animation: heroFadeIn .7s ease .15s both;
  flex-shrink: 0;
}

.hstat {
  text-align: center;
  padding: 0 2rem;
}

.hstat-n {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -.04em;
}

.hstat-l {
  font-size: .65rem;
  /* Impeccable: .5 → .65 para cumplir contraste mínimo */
  color: rgba(255, 255, 255, .65);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: .45rem;
  font-weight: 500;
}

.hstat-div {
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, .14);
}

/* ── Access Band ── */
.access-band {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.access-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: stretch;
}

.access-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: background .2s;
  position: relative;
}

.access-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .24s var(--ease-out);
  border-radius: 2px 2px 0 0;
}

.access-card:hover { background: var(--surface-container-low); }
.access-card:hover::after { transform: scaleX(1); }
.access-card:hover .ac-arrow { transform: translateX(4px); }

.ac-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ac-icon--alumnos  { background: var(--navy-faint);           color: var(--navy);  }
.ac-icon--docentes { background: rgba(0, 110, 47, .1);        color: var(--green); }
.ac-icon--directivos { background: rgba(128, 80, 0, .1);     color: var(--amber); }

.ac-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .14rem;
}

.ac-sub {
  font-size: .73rem;
  color: var(--muted);
}

.ac-arrow {
  margin-left: auto;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .22s var(--ease-out), color .2s;
}

.access-sep {
  width: 1px;
  background: var(--border);
  margin: .75rem 0;
}

/* ── Content Layout ── */
.wrap {
  display: flex;
  gap: 2rem;
  padding: 2rem 1.5rem;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Panels ── */
.panel {
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-xs);
}

.sec-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--surface-container-low);
  gap: 1rem;
}

.sec-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.sec-t {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.015em;
}

.sec-sub {
  font-size: .76rem;
  color: var(--muted);
  margin-top: .22rem;
}

.sec-lnk {
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: .35rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  margin-top: .3rem;
}

.sec-lnk:hover {
  background: var(--surface-container-low);
  border-color: var(--primary);
}

/* ── News ── */
.news-stack {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.news-card {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow .24s var(--ease-smooth), transform .24s var(--ease-out);
}

.news-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.08);
  transform: translateX(3px);
}

.news-accent {
  width: 3.5px;
  flex-shrink: 0;
  transition: width .24s var(--ease-out);
}

.news-card:hover .news-accent { width: 5px; }

.nc--importante   .news-accent { background: var(--red);   }
.nc--academico    .news-accent { background: var(--blue);  }
.nc--evento       .news-accent { background: var(--amber); }
.nc--sistemas     .news-accent { background: var(--green); }
/* Impeccable: reemplazar #7c3aed (purple) con --blue más oscuro */
.nc--orientaciones .news-accent { background: #1a4fbd; }

.news-body-wrap {
  padding: .95rem 1.2rem;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .38rem;
}

.badge {
  display: inline-block;
  padding: .15rem .52rem;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.b-importante    { background: var(--red-dim);  color: var(--red);   }
.b-academico     { background: var(--blue-dim); color: var(--blue);  }
.b-evento        { background: var(--amber-dim);color: var(--amber); }
.b-sistemas      { background: var(--green-dim);color: var(--green); }
/* Impeccable: reemplazar purple con azul institucional */
.b-orientaciones { background: rgba(26, 79, 189, .1); color: #1a4fbd; }

.news-date {
  font-size: .67rem;
  color: var(--muted);
  margin-left: auto;
}

.news-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: .28rem;
}

.news-body {
  font-size: .77rem;
  color: var(--text2);
  line-height: 1.65;
}

/* ── Downloads ── */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dl-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: box-shadow .28s var(--ease-smooth), transform .28s var(--ease-out);
  background: var(--surface-container-low);
}

.dl-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,.09);
  transform: translateY(-3px);
}

.dl-icon {
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: .2rem;
  box-shadow: var(--shadow-xs);
  /* Impeccable: quitamos la transición de rotate que era gimmicky */
  transition: transform .28s var(--ease-out);
}

/* Impeccable: scale limpio, sin rotación */
.dl-card:hover .dl-icon { transform: scale(1.1); }

.dl-name {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.dl-desc {
  font-size: .73rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin-top: .4rem;
  color: var(--primary);
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
  padding: .44rem .8rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  transition: background .2s, border-color .2s;
  align-self: flex-start;
}

.dl-btn:hover {
  background: var(--navy-faint);
  border-color: var(--primary);
}

/* ── Sidebar ── */
.sidebar {
  width: 296px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Login card */
.login-card {
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .3s var(--ease-smooth);
}

.login-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
}

.login-head {
  background: linear-gradient(155deg, #001845 0%, var(--navy) 100%);
  padding: 1.6rem 1.5rem 1.45rem;
  text-align: center;
  position: relative;
}

.login-head::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,.2) 30%,
    rgba(255,255,255,.2) 70%,
    transparent
  );
}

.login-seal {
  width: 52px;
  height: 52px;
  margin: 0 auto .75rem;
  border: 2px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.015em;
}

.login-sub {
  font-size: .67rem;
  /* Impeccable: subir de .62 → .72 */
  color: rgba(255, 255, 255, .72);
  margin-top: .22rem;
  letter-spacing: .04em;
}

.login-body {
  padding: 1.4rem 1.5rem;
}

.fg { margin-bottom: .95rem; }

.fl {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .38rem;
}

.iw {
  position: relative;
  display: flex;
  align-items: center;
}

.ii {
  position: absolute;
  left: .78rem;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}

.iw input {
  width: 100%;
  padding: .62rem .78rem .62rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text);
  background: var(--surface-container-low);
  transition: border-color .22s, box-shadow .22s, background .22s;
  font-family: var(--font);
}

.iw input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(0, 61, 155, .13);
  background: var(--white);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: .5rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--text2);
  cursor: pointer;
}

.fgt {
  font-size: .73rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.fgt:hover { text-decoration: underline; }

.btn-pri {
  width: 100%;
  padding: .72rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  transition: background .22s, transform .2s var(--ease-out), box-shadow .22s;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}

.btn-pri:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,61,155,.28);
}

.btn-pri:active { transform: none; }

.login-error {
  margin: .8rem 0 0;
  padding: .6rem .78rem;
  border-radius: var(--radius);
  background: rgba(186, 26, 26, .07);
  color: var(--red);
  font-size: .78rem;
  line-height: 1.5;
  min-height: 0;
  border-left: 3px solid var(--red);
}

.login-error:empty { display: none; }

.login-note {
  text-align: center;
  font-size: .68rem;
  color: var(--muted);
  margin-top: .7rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .95rem 0;
  color: var(--muted);
  font-size: .68rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-gh {
  width: 100%;
  padding: .62rem 1rem;
  background: var(--surface-container-low);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .81rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.btn-gh:hover {
  background: var(--white);
  border-color: var(--outline);
}

/* ── Orientaciones card ── */
.orientaciones-card {
  background: linear-gradient(155deg, #001845 0%, var(--navy) 100%);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.oc-header {
  padding: 1rem 1.2rem .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.oc-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: .1rem;
  letter-spacing: -.01em;
}

.oc-cycle {
  font-size: .64rem;
  color: rgba(255, 255, 255, .62);
  letter-spacing: .06em;
}

.oc-list {
  padding: .9rem 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.oc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .85rem;
  background: rgba(255, 255, 255, .08);
  border-radius: .9rem;
  text-align: center;
  transition: transform .22s var(--ease-out), background .2s;
}

.oc-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .14);
}

.oc-card img {
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  border-radius: .75rem;
}

.oc-card span {
  color: rgba(255, 255, 255, .95);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
}

@media (max-width: 680px) {
  .oc-list {
    grid-template-columns: 1fr;
  }
}

.oc-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  /* Impeccable: .85 → .92 */
  color: rgba(255, 255, 255, .92);
  font-size: .8rem;
  font-weight: 500;
  transition: transform .22s var(--ease-out);
}

.oc-item:hover { transform: translateX(4px); }

.oc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--oc-color, #fff);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--oc-color, rgba(255,255,255,.5));
}

.oc-btn {
  display: block;
  margin: .25rem 1.5rem 1.3rem;
  font-size: .73rem;
  font-weight: 600;
  /* Impeccable: .6 → .72 */
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: color .2s;
}

.oc-btn:hover { color: #fff; }

/* ── Footer ── */
.ftr {
  background: var(--navy-dark);
  margin-top: 1.25rem;
}

.ftr-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.1fr;
  gap: 2.5rem;
}

.ftr-brand {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.ftr-emblem {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: .38rem;
}

.ftr-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.ftr-desc {
  font-size: .75rem;
  /* Impeccable: .5 → .62 */
  color: rgba(255, 255, 255, .62);
}

.ftr-copy {
  font-size: .67rem;
  /* Impeccable: .35 → .45 (mínimo visible) */
  color: rgba(255, 255, 255, .45);
  margin-top: .38rem;
}

.ftr-col {
  display: flex;
  flex-direction: column;
  gap: .68rem;
}

.ftr-col-title {
  font-size: .64rem;
  font-weight: 700;
  /* Impeccable: .4 → .55 */
  color: rgba(255, 255, 255, .55);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}

.ftr-col a {
  /* Impeccable: .65 → .75 */
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .42rem;
  transition: color .2s;
}

.ftr-col a:hover { color: #fff; }

.ftr-dev {
  color: #fff;
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .42rem;
  transition: color .2s;
}

.ftr-dev::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  flex-shrink: 0;
}

.ftr-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: .9rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ftr-bottom span {
  font-size: .66rem;
  /* Impeccable: .28 → .42 */
  color: rgba(255, 255, 255, .42);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ftr-inner {
    grid-template-columns: 1fr 1fr;
  }
  .ftr-brand { grid-column: 1 / -1; }
  .hstat { padding: 0 1.5rem; }
}

@media (max-width: 980px) {
  .wrap {
    flex-direction: column;
    padding: 1.25rem;
  }
  .sidebar { width: 100%; }
  .hdr-nav-wrap { display: none; }
}

@media (max-width: 720px) {
  .topbar-items { display: none; }
  .hdr-inner { padding: 0 1rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero-inner { flex-direction: column; gap: 2.25rem; }
  .hero-stats {
    width: 100%;
    justify-content: center;
    padding: 1.25rem 1rem;
  }
  .hstat { padding: 0 1.2rem; }
  .hstat-n { font-size: 1.8rem; }
  .access-inner { flex-direction: column; }
  .access-sep { width: 100%; height: 1px; margin: 0; }
  .dl-grid { grid-template-columns: 1fr; }
  .ftr-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 1.75rem 1rem;
  }
  .ftr-bottom {
    padding: .75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: .28rem;
  }
  .wrap { padding: 1rem; }
  .panel { padding: 1.4rem 1.25rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-hero-pri,
  .btn-hero-sec { text-align: center; }
}


/* ================================================================
   SAEP · ANIMATIONS v3 — GPU-only, Impeccable-compliant
   ================================================================ */

/* ── Easing tokens ──
   Impeccable: eliminar cubic-bezier con overshoot (.34, 1.56, .64, 1)
   → reemplazado con out-expo sin rebote */
:root {
  --ease-spring  : cubic-bezier(.22, 1, .36, 1);   /* out-expo — sin overshoot */
  --ease-out     : cubic-bezier(.25, .46, .45, .94);
  --ease-smooth  : cubic-bezier(.4,  0,    .2,  1);
}

/* ================================================================
   TOPBAR & HEADER — entrada al cargar
   ================================================================ */

.topbar {
  animation: slideDown .55s var(--ease-out) both;
}

.hdr {
  animation: slideDown .6s var(--ease-out) .04s both;
  transition:
    background      .4s var(--ease-smooth),
    box-shadow      .4s var(--ease-smooth),
    backdrop-filter .4s var(--ease-smooth);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* Header scrolled — glassmorphism */
.hdr.is-scrolled {
  background: rgba(0, 24, 69, .96);
  box-shadow: 0 8px 48px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

/* Scroll progress bar */
.hdr-progress {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2.5px;
  background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(180,210,255,.7));
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  z-index: 10;
}

/* Logo hover */
.hdr-emblem {
  transition: transform .32s var(--ease-spring), background .25s;
}

.hdr-logo:hover .hdr-emblem {
  transform: scale(1.1);
  background: rgba(255,255,255,.18);
}

/* Nav links — underline animado */
.hdr-nav a { position: relative; }

.hdr-nav a::after {
  content: '';
  position: absolute;
  inset: auto .65rem 2px;
  height: 1.5px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .26s var(--ease-spring);
}

.hdr-nav a:hover::after,
.hdr-nav a.active::after { transform: scaleX(1); }

/* CTA shimmer */
.hdr-cta {
  position: relative;
  overflow: hidden;
  transition: background .25s, border-color .25s, transform .22s var(--ease-spring);
}

.hdr-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.26) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform .58s var(--ease-smooth);
}

.hdr-cta:hover { transform: translateY(-1px); }
.hdr-cta:hover::before { transform: translateX(100%); }

/* ================================================================
   HERO BACKGROUND
   ================================================================ */

@keyframes patternDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(96px, -96px); }
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 68% 38%, rgba(0, 82, 204, .2) 0%, transparent 65%),
    radial-gradient(ellipse 45% 55% at 18% 72%, rgba(0, 33, 94, .15) 0%, transparent 60%);
  /* perf: removed meshPulse (scale on large element = expensive repaint) */
  pointer-events: none;
}

/* meshPulse removed — was scaling a full-viewport element every 9s */

/* Orbs flotantes — perf: removed filter:blur (forces per-frame repaint).
   Now static, using large radial-gradient soft circles instead. */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  /* perf: no filter:blur, no will-change, no animation */
}

.hero-orb-1 {
  width: 520px; height: 520px;
  /* larger + softer gradient replaces the blur effect visually */
  background: radial-gradient(circle, rgba(30, 100, 220, .18) 0%, rgba(30,100,220,.06) 45%, transparent 70%);
  top: -160px; right: 4%;
}

.hero-orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(0, 50, 140, .2) 0%, rgba(0,50,140,.06) 45%, transparent 70%);
  bottom: -100px; right: 30%;
}

.hero-orb-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(80, 140, 255, .12) 0%, transparent 70%);
  top: 28%; left: 3%;
}

/* ================================================================
   HERO CONTENT — entrada escalonada
   ================================================================ */

.hero-eyebrow  { animation: fadeUpSoft .7s  var(--ease-out) .1s  both; }
.hero-title    { animation: fadeUpSoft .75s var(--ease-out) .22s both; }
.hero-desc     { animation: fadeUpSoft .7s  var(--ease-out) .38s both; }
.hero-actions  { animation: fadeUpSoft .65s var(--ease-out) .52s both; }
.hero-stats    { animation: fadeInScale .7s var(--ease-spring) .3s both; }

@keyframes fadeUpSoft {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* Stats hover — solo lift vertical, sin scale exagerado */
.hstat {
  transition: transform .26s var(--ease-spring);
}

.hstat:hover { transform: translateY(-2px); }

/* Botón hero */
.btn-hero-pri {
  position: relative;
  overflow: hidden;
}

/* Ripple compartido */
.ripple-fx {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  transform: scale(0);
  animation: rippleExpand .6s var(--ease-smooth) forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to { transform: scale(1); opacity: 0; }
}

/* ================================================================
   SCROLL REVEALS
   ================================================================ */

.anim-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-spring);
}

.anim-reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-spring);
}

.anim-reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-spring);
}

.anim-reveal.in-view,
.anim-reveal-left.in-view,
.anim-reveal-right.in-view {
  opacity: 1;
  transform: none;
}

/* ================================================================
   ACCESS BAND — micro-interacciones
   ================================================================ */

.access-card {
  transition: background .2s, transform .22s var(--ease-spring);
  will-change: transform;
}

/* Impeccable: quitamos rotate(-8deg) — gimmicky para portal educativo */
.ac-icon {
  transition: transform .28s var(--ease-spring), background .22s;
}

.access-card:hover .ac-icon { transform: scale(1.1); }

/* ================================================================
   SCROLL-TO-TOP BUTTON
   ================================================================ */

.scroll-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(16px) scale(.88);
  pointer-events: none;
  transition:
    opacity   .35s var(--ease-out),
    transform .35s var(--ease-spring),
    background .22s,
    box-shadow .22s;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  /* perf: removed box-shadow pulse animation (repaints every frame).
     Using a pseudo-element ring with transform:scale instead — GPU-only */
}

.scroll-top.visible::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 61, 155, .4);
  animation: scrollRingPulse 3s ease-out infinite;
  pointer-events: none;
}

.scroll-top:hover {
  background: var(--navy-dark);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
}

.scroll-top:hover::after { animation: none; opacity: 0; }

.scroll-top:active { transform: translateY(0) scale(.96); }

/* perf: uses transform:scale — GPU composited, zero repaints */
@keyframes scrollRingPulse {
  0%   { transform: scale(1);    opacity: .7; }
  70%  { transform: scale(1.9); opacity: 0;  }
  100% { transform: scale(1.9); opacity: 0;  }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  .anim-reveal,
  .anim-reveal-left,
  .anim-reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-bg-pattern,
  .hero-orb,
  .hero-mesh,
  .scroll-top.visible::after { animation: none !important; }
}

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s var(--ease-out);
}

.pdf-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 40, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pdf-modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
  width: 100%;
  max-width: 860px;
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(.97);
  transition: transform .3s var(--ease-spring);
}

.pdf-modal.is-open .pdf-modal-box {
  transform: none;
}

.pdf-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.pdf-modal-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.pdf-modal-dl {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: .38rem .85rem;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  transition: background .2s, color .2s;
}

.pdf-modal-dl:hover {
  background: var(--primary);
  color: #fff;
}

.pdf-modal-close {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--bg-alt, #f5f7fa);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .18s, color .18s;
}

.pdf-modal-close:hover {
  background: #e8eaf0;
  color: var(--text);
}

.pdf-modal-frame {
  flex: 1;
  border: none;
  width: 100%;
  background: #f3f4f6;
}

/* ================================================================
   DOWNLOAD CARDS — dual-action variant
   ================================================================ */

.dl-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: auto;
  padding-top: .5rem;
}

.dl-preview-btn {
  display: flex;
  align-items: center;
  gap: .38rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
}

.dl-preview-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 61, 155, .04);
}

/* Make dl-card use flex column so dl-actions sticks to bottom */
.dl-card {
  display: flex;
  flex-direction: column;
}

.dl-card .dl-btn {
  margin-top: auto;
}

/* ================================================================
   COMUNICADOS LIST
   ================================================================ */

.comunicados-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.com-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, transform .22s var(--ease-spring);
}

.com-item:hover {
  border-color: var(--primary-light, #5b8def);
  box-shadow: 0 4px 16px rgba(0,61,155,.07);
  transform: translateX(3px);
}

.com-num {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 61, 155, .07);
  padding: .3rem .6rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.com-body {
  flex: 1;
  min-width: 0;
}

.com-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.com-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.com-link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-alt, #f5f7fa);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .18s, color .18s;
  text-decoration: none;
}

.com-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ================================================================
   CONTACT TEASER
   ================================================================ */

.contact-teaser {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy, #003d9b) 100%);
  border: none;
}

.ct-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ct-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ct-text { flex: 1; }

.ct-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .2rem;
}

.ct-sub {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  margin: 0;
}

.ct-btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--navy-dark, #001845);
  font-size: .8rem;
  font-weight: 700;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, transform .22s var(--ease-spring);
}

.ct-btn:hover {
  background: rgba(255,255,255,.88);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .ct-inner { flex-wrap: wrap; }
  .ct-btn { width: 100%; text-align: center; }
  .pdf-modal-box { height: 94vh; border-radius: 10px; }
}

/* ================================================================
   PAGE HERO (used by subpages)
   ================================================================ */

.page-hero {
  background: linear-gradient(160deg, #001845 0%, #003d9b 60%, #004aba 100%);
  padding: 3.5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: -60px;
  background-image: repeating-linear-gradient(
    -50deg,
    transparent 0, transparent 48px,
    rgba(255,255,255,.02) 48px, rgba(255,255,255,.02) 96px
  );
  pointer-events: none;
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: .6rem;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .5rem;
  line-height: 1.2;
}

.page-hero-sub {
  font-size: .92rem;
  color: rgba(255,255,255,.72);
  margin: 0;
  max-width: 520px;
}

/* ================================================================
   FULL-PAGE WRAP (subpages)
   ================================================================ */

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-wrap--narrow {
  max-width: 820px;
}