/* ============================================================
   MATES PAL COLEGIO — main.css v2
   Diseño CLARO — 4 colores del logo — Rediseño completo
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Fondos */
  --bg:       #FFFFFF;
  --bg-soft:  #F7F7FA;
  --bg-mid:   #EFEFF5;
  --bg-dark:  #16162A;   /* hero y secciones invertidas */

  /* 4 colores del logo */
  --rojo:     #ED4D6E;
  --purpura:  #6444E3;
  --azul:     #126EEB;
  --amarillo: #F2BC20;

  /* Fondos suaves por color (para cards) */
  --rojo-bg:    #FFF0F3;
  --purpura-bg: #F3F0FF;
  --azul-bg:    #EEF5FF;
  --amarillo-bg:#FFFBEB;

  /* Versiones oscuras (texto sobre claro) */
  --rojo-dk:    #B5294A;
  --purpura-dk: #4628C7;
  --azul-dk:    #0A4DB8;
  --amarillo-dk:#8A6600;

  /* Texto */
  --ink:    #111122;
  --ink-2:  #3D3D5C;
  --muted:  #7B7B9E;
  --border: #E2E2EE;
  --white:  #FFFFFF;

  /* Tipografía */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --nav-h: 66px;
  --r:     12px;
  --r-lg:  20px;
  --max-w: 1120px;

  /* Sombras */
  --shadow-sm: 0 1px 4px rgba(17,17,34,.06), 0 4px 16px rgba(17,17,34,.06);
  --shadow-md: 0 4px 8px rgba(17,17,34,.06), 0 12px 32px rgba(17,17,34,.08);
  --shadow-lg: 0 8px 16px rgba(17,17,34,.06), 0 24px 64px rgba(17,17,34,.1);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── BARRA FIRMA 4 COLORES ───────────────────────────────── */
/* La barra que identifica el sitio — aparece en nav top y entre secciones */
.color-bar {
  height: 4px;
  background: linear-gradient(90deg,
    var(--rojo)    0%   25%,
    var(--purpura) 25%  50%,
    var(--azul)    50%  75%,
    var(--amarillo)75%  100%
  );
  flex-shrink: 0;
}
.color-bar-thin {
  height: 2px;
  background: linear-gradient(90deg,
    var(--rojo) 0% 25%, var(--purpura) 25% 50%,
    var(--azul) 50% 75%, var(--amarillo) 75% 100%
  );
}

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 40px; gap: 32px;
}
.nav::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--rojo) 0% 25%, var(--purpura) 25% 50%,
    var(--azul) 50% 75%, var(--amarillo) 75% 100%
  );
}
.nav-brand img { height: 38px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links a {
  font-family: var(--font-body); font-size: .85rem; font-weight: 500;
  color: var(--ink-2); padding: 6px 12px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-mid); color: var(--ink); }
.nav-links a.active { color: var(--purpura); font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-dropdown > a::after {
  content: '▾'; font-size: .6rem; color: var(--muted); transition: transform .2s;
}
.nav-dropdown:hover > a::after { transform: rotate(-180deg); }
.nav-drop-menu {
  display: none; position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 6px; min-width: 210px;
  box-shadow: var(--shadow-lg); z-index: 300;
}
.nav-dropdown:hover .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; font-size: .83rem;
  color: var(--ink-2) !important; transition: background .15s;
}
.nav-drop-menu a:hover { background: var(--bg-soft); color: var(--ink) !important; }
.drop-sep { height: 1px; background: var(--border); margin: 5px 0; }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn-preu {
  background: var(--purpura) !important;
  color: var(--white) !important;
  font-weight: 700 !important; font-size: .82rem !important;
  padding: 9px 18px !important; border-radius: 9px !important;
  transition: opacity .2s, transform .15s !important;
}
.btn-preu:hover { opacity: .88 !important; transform: translateY(-1px) !important; }

.nav-search-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-size: .8rem; color: var(--muted);
  font-family: var(--font-body); cursor: pointer;
  text-decoration: none; transition: border-color .2s, color .2s;
}
.nav-search-btn:hover { border-color: var(--purpura); color: var(--purpura); }

/* Burger mobile */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: all .3s;
}

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  flex-direction: column; gap: 2px; padding: 12px 16px 20px; z-index: 199;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--ink-2); font-size: .9rem; font-weight: 500;
  padding: 10px 12px; border-radius: 8px; transition: background .15s;
}
.mobile-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.mob-sep {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  padding: 8px 12px 4px; margin-top: 6px;
  border-top: 1px solid var(--border);
}
.mob-sep:first-child { border-top: none; margin-top: 0; }
.btn-preu-mob {
  background: var(--purpura); color: var(--white) !important;
  font-weight: 700; text-align: center; border-radius: 10px;
  padding: 12px; margin-top: 8px;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 72px) 40px 80px;
  background: var(--bg);
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 64px;
  max-width: 100%; position: relative;
  border-bottom: 1px solid var(--border);
}
/* Firma: cuadrícula matemática sutil en fondo */
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .5;
}
.hero-left { position: relative; z-index: 1; }
.hero-right { position: relative; z-index: 1; }

/* Etiqueta "profe" */
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purpura-bg); border: 1px solid rgba(100,68,227,.2);
  border-radius: 999px; padding: 5px 14px;
  font-family: var(--font-mono); font-size: .7rem;
  color: var(--purpura-dk); letter-spacing: .08em;
  margin-bottom: 24px;
}
.hero-tag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purpura);
}

/* Título hero: tipografía negra enorme */
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 800; line-height: 1.05;
  color: var(--ink); letter-spacing: -.03em;
  margin-bottom: 22px;
}
/* Palabras clave con subrayado de colores del logo */
.hero h1 .hl-r { color: var(--rojo); }
.hero h1 .hl-p { color: var(--purpura); }
.hero h1 .hl-b { color: var(--azul); }
.hero h1 .hl-y { color: var(--amarillo-dk); }

.hero-desc {
  font-size: 1.05rem; color: var(--ink-2);
  line-height: 1.75; max-width: 480px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stat cards del hero — fondo suave coloreado */
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 20px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .num {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
  line-height: 1; margin-bottom: 5px; letter-spacing: -.03em;
}
.stat-card .lbl {
  font-size: .72rem; color: var(--muted);
  font-family: var(--font-mono); line-height: 1.4;
}
.stat-c-r { border-top: 3px solid var(--rojo); }
.stat-c-r .num { color: var(--rojo); }
.stat-c-p { border-top: 3px solid var(--purpura); }
.stat-c-p .num { color: var(--purpura); }
.stat-c-b { border-top: 3px solid var(--azul); }
.stat-c-b .num { color: var(--azul); }
.stat-c-y { border-top: 3px solid var(--amarillo); }
.stat-c-y .num { color: var(--amarillo-dk); }

/* Cita destacada en hero */
.hero-quote {
  background: var(--purpura-bg); border-left: 3px solid var(--purpura);
  border-radius: 0 var(--r) var(--r) 0; padding: 18px 20px;
}
.hero-quote p { font-size: .875rem; color: var(--ink-2); font-style: italic; line-height: 1.65; margin-bottom: 8px; }
.hero-quote .qa { font-size: .72rem; color: var(--purpura-dk); font-weight: 600; font-family: var(--font-mono); }

/* ── SECCIÓN BASE ─────────────────────────────────────────── */
.section { padding: 88px 40px; }
.sec-white { background: var(--bg); }
.sec-soft  { background: var(--bg-soft); }
.sec-mid   { background: var(--bg-mid); }
.sec-dark  {
  background: var(--bg-dark); color: var(--white);
}

.s-inner { max-width: var(--max-w); margin: 0 auto; }

.s-head { text-align: center; margin-bottom: 52px; }
.s-head.left { text-align: left; }

.s-eye {
  display: inline-block; font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 12px;
  padding: 4px 12px; border-radius: 999px;
}
.eye-r { color: var(--rojo-dk);    background: var(--rojo-bg); }
.eye-p { color: var(--purpura-dk); background: var(--purpura-bg); }
.eye-b { color: var(--azul-dk);    background: var(--azul-bg); }
.eye-y { color: var(--amarillo-dk);background: var(--amarillo-bg); }
/* Versión invertida para secciones oscuras */
.eye-r-inv { color: #F87E97; background: rgba(237,77,110,.2); }
.eye-p-inv { color: #A78BFA; background: rgba(100,68,227,.2); }
.eye-y-inv { color: #FDE68A; background: rgba(242,188,32,.2); }

.s-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.025em; color: var(--ink);
}
.s-title.inv { color: var(--white); }
.s-desc {
  max-width: 540px; margin: 14px auto 0;
  color: var(--ink-2); font-size: .96rem; line-height: 1.75;
}
.s-desc.left { margin-left: 0; }
.s-desc.inv  { color: rgba(255,255,255,.7); }

/* ── BOTONES ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  border-radius: var(--r); padding: 12px 24px; cursor: pointer;
  border: none; text-decoration: none; transition: transform .15s, opacity .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--purpura); color: var(--white);
  box-shadow: 0 4px 16px rgba(100,68,227,.3);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(100,68,227,.4); }

.btn-red {
  background: var(--rojo); color: var(--white);
  box-shadow: 0 4px 16px rgba(237,77,110,.3);
}
.btn-blue {
  background: var(--azul); color: var(--white);
  box-shadow: 0 4px 16px rgba(18,110,235,.3);
}
.btn-yellow {
  background: var(--amarillo); color: var(--ink);
  box-shadow: 0 4px 16px rgba(242,188,32,.35);
}
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--purpura); color: var(--purpura); }
.btn-outline-inv {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn-outline-inv:hover { border-color: var(--white); }

/* ── RAMAS (ecosistema) ──────────────────────────────────── */
.ramas-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.rama {
  border-radius: var(--r-lg); padding: 36px;
  display: block; text-decoration: none;
  transition: box-shadow .25s, transform .25s;
  position: relative; overflow: hidden;
}
.rama:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.rama-mpc {
  background: var(--bg-soft); border: 1.5px solid var(--border);
}
.rama-mpc::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--rojo), var(--purpura));
}

.rama-preu {
  background: var(--bg-dark); color: var(--white);
}
.rama-preu::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--purpura), var(--azul));
}
.rama-badge {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--font-mono); font-size: .58rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
  background: var(--amarillo); color: var(--ink);
}
.rama-ico { font-size: 2rem; margin-bottom: 18px; }
.rama-tag {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 10px; display: block; font-weight: 500;
}
.tag-r  { color: var(--rojo); }
.tag-p  { color: var(--purpura); }
.tag-pi { color: #A78BFA; }  /* púrpura sobre oscuro */
.tag-b  { color: var(--azul); }
.tag-y  { color: var(--amarillo-dk); }
.tag-yi { color: #FDE68A; }  /* amarillo sobre oscuro */

.rama h3 {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 800; line-height: 1.15; margin-bottom: 12px;
  color: var(--ink); letter-spacing: -.02em;
}
.rama-preu h3 { color: var(--white); }
.rama p { font-size: .875rem; line-height: 1.72; color: var(--ink-2); margin-bottom: 22px; }
.rama-preu p { color: rgba(255,255,255,.65); }

.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.pill { font-size: .72rem; padding: 4px 12px; border-radius: 999px; font-weight: 500; }
.pill-r { background: var(--rojo-bg);    color: var(--rojo-dk); }
.pill-p { background: var(--purpura-bg); color: var(--purpura-dk); }
.pill-b { background: var(--azul-bg);    color: var(--azul-dk); }
.pill-y { background: var(--amarillo-bg);color: var(--amarillo-dk); }
.pill-d { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); } /* sobre dark */

.rama-link {
  font-weight: 700; font-size: .875rem; transition: gap .2s;
  display: inline-flex; align-items: center; gap: 7px;
}
.rama-mpc .rama-link { color: var(--purpura); }
.rama-preu .rama-link { color: #A78BFA; }
.rama:hover .rama-link { gap: 13px; }

/* ── CONTENIDOS (4 ejes) ─────────────────────────────────── */
.cont-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.cont-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 26px 22px;
  text-decoration: none; color: var(--ink);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: block;
}
.cont-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cc-r:hover { border-color: var(--rojo);    box-shadow: 0 8px 28px rgba(237,77,110,.12); }
.cc-p:hover { border-color: var(--purpura); box-shadow: 0 8px 28px rgba(100,68,227,.12); }
.cc-b:hover { border-color: var(--azul);    box-shadow: 0 8px 28px rgba(18,110,235,.12); }
.cc-y:hover { border-color: var(--amarillo);box-shadow: 0 8px 28px rgba(242,188,32,.15); }

.cont-ico { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.cont-card h4 { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: 7px; color: var(--ink); }
.cont-card .desc { font-size: .78rem; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.cont-count { font-family: var(--font-mono); font-size: .68rem; margin-bottom: 14px; display: block; font-weight: 600; }
.cnt-r { color: var(--rojo); }
.cnt-p { color: var(--purpura); }
.cnt-b { color: var(--azul); }
.cnt-y { color: var(--amarillo-dk); }
.topic-list { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.topic-link {
  font-size: .75rem; color: var(--muted); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0; transition: color .15s;
}
.topic-link::before { content: '›'; color: var(--border); }
.cc-r .topic-link:hover { color: var(--rojo); }
.cc-p .topic-link:hover { color: var(--purpura); }
.cc-b .topic-link:hover { color: var(--azul); }
.cc-y .topic-link:hover { color: var(--amarillo-dk); }

/* ── PAES STRIP ──────────────────────────────────────────── */
.paes-inner {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: start;
}
.paes-bg {
  position: absolute; right: -10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display); font-size: 16rem; font-weight: 800;
  color: rgba(255,255,255,.03); line-height: 1; pointer-events: none;
  letter-spacing: -.05em;
}
.paes-list { display: flex; flex-direction: column; gap: 8px; }
.paes-item {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r); padding: 14px 18px;
  text-decoration: none; color: var(--white);
  transition: background .2s, border-color .2s;
}
.paes-item:hover { background: rgba(100,68,227,.25); border-color: var(--purpura); }
.paes-year {
  font-family: var(--font-mono); font-size: .65rem;
  color: var(--amarillo); min-width: 64px; letter-spacing: .07em; font-weight: 600;
}
.paes-title { font-size: .855rem; font-weight: 500; flex: 1; line-height: 1.4; }
.paes-arr { color: rgba(255,255,255,.3); transition: transform .2s, color .2s; }
.paes-item:hover .paes-arr { transform: translateX(4px); color: #A78BFA; }

/* ── TESTIMONIOS ─────────────────────────────────────────── */
.test-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.test-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.test-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.test-score {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
  padding: 5px 12px; border-radius: 8px; margin-bottom: 16px;
}
.ts-r { background: var(--rojo-bg);    color: var(--rojo-dk); }
.ts-p { background: var(--purpura-bg); color: var(--purpura-dk); }
.ts-b { background: var(--azul-bg);    color: var(--azul-dk); }
.ts-y { background: var(--amarillo-bg);color: var(--amarillo-dk); }
.test-card blockquote {
  font-size: .855rem; color: var(--ink-2); line-height: 1.75;
  margin-bottom: 18px; font-style: italic;
}
.test-author { display: flex; align-items: center; gap: 11px; }
.test-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.test-name   { font-weight: 700; font-size: .875rem; color: var(--ink); }
.test-career { font-size: .72rem; color: var(--muted); }
.test-card.preu-cta {
  background: var(--purpura-bg); border-color: rgba(100,68,227,.25);
}

/* ── PROFESOR ────────────────────────────────────────────── */
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.prof-img-wrap { position: relative; }
.prof-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--r-lg); display: block; }
.prof-accent {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--rojo), var(--purpura), var(--azul), var(--amarillo));
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.prof-float {
  position: absolute; right: -16px; top: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.prof-float-badge {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 13px; white-space: nowrap;
  font-size: .72rem; font-family: var(--font-mono); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.prof-bio { color: var(--ink-2); line-height: 1.8; margin: 18px 0 28px; font-size: .93rem; }
.logros { display: flex; flex-direction: column; gap: 14px; }
.logro { display: flex; align-items: flex-start; gap: 14px; }
.logro-ico {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.l-r { background: var(--rojo-bg); }
.l-p { background: var(--purpura-bg); }
.l-b { background: var(--azul-bg); }
.l-y { background: var(--amarillo-bg); }
.logro-t strong { display: block; font-size: .88rem; color: var(--ink); margin-bottom: 2px; font-weight: 700; }
.logro-t span   { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ── CTA FINAL ───────────────────────────────────────────── */
.cta-final { text-align: center; position: relative; overflow: hidden; }
.cta-final-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(100,68,227,.06) 0%, transparent 70%);
}
.cta-actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer { background: var(--bg-dark); padding: 56px 40px 28px; }
.ft-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: var(--max-w); margin: 0 auto;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.ft-logo  { height: 34px; width: auto; margin-bottom: 14px; }
.ft-brand p { font-size: .82rem; color: rgba(255,255,255,.38); line-height: 1.7; max-width: 240px; }
.ft-shortcuts { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.ft-shortcut {
  font-size: .7rem; padding: 4px 10px; border-radius: 6px;
  text-decoration: none; font-family: var(--font-mono); font-weight: 500;
}
.ft-col h5 {
  font-size: .65rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; font-family: var(--font-mono);
  color: rgba(255,255,255,.3); margin-bottom: 14px;
}
.ft-col a {
  display: block; font-size: .82rem; color: rgba(255,255,255,.55);
  margin-bottom: 9px; text-decoration: none; transition: color .2s;
}
.ft-col a:hover { color: var(--white); }
.ft-bottom {
  max-width: var(--max-w); margin: 22px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: rgba(255,255,255,.25); flex-wrap: wrap; gap: 8px;
}
.ft-strip {
  height: 4px;
  background: linear-gradient(90deg,
    var(--rojo) 0% 25%, var(--purpura) 25% 50%,
    var(--azul) 50% 75%, var(--amarillo) 75% 100%
  );
}

/* ── PÁGINAS INTERIORES ──────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 52px) 40px 48px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  position: relative;
}
.page-hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
}
.page-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.page-breadcrumb a { color: var(--muted); transition: color .2s; }
.page-breadcrumb a:hover { color: var(--ink); }
.page-breadcrumb span { color: var(--border); }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800; line-height: 1.1;
  color: var(--ink); letter-spacing: -.025em;
}
.page-hero p { font-size: 1rem; color: var(--ink-2); max-width: 600px; line-height: 1.75; margin-top: 14px; }
.page-hero-icon { font-size: 3.5rem; line-height: 1; }

/* Cat layout */
.cat-layout { display: grid; grid-template-columns: 260px 1fr; }
.cat-sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  padding: 28px 20px; position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.cat-sidebar::-webkit-scrollbar { width: 3px; }
.cat-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-title {
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; display: block;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  text-decoration: none; color: var(--ink-2); font-size: .84rem; font-weight: 500;
  transition: background .15s, color .15s; border: 1.5px solid transparent;
}
.sidebar-link:hover { background: var(--bg-mid); color: var(--ink); }
.sidebar-link.active { background: var(--white); color: var(--purpura); border-color: var(--border); font-weight: 600; box-shadow: var(--shadow-sm); }
.sl-ico { font-size: .95rem; flex-shrink: 0; }
.sl-count { margin-left: auto; font-family: var(--font-mono); font-size: .6rem; color: var(--muted); }
.sidebar-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.sidebar-eje-title { font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; display: block; }
.sidebar-eje-link {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: 7px;
  text-decoration: none; font-size: .79rem; color: var(--muted); transition: background .15s, color .15s;
}
.sidebar-eje-link::before { content: '›'; color: var(--border); font-size: .7rem; }
.sidebar-eje-link:hover { background: var(--bg-mid); color: var(--ink); }
.sidebar-eje-links { display: flex; flex-direction: column; gap: 1px; }
.cat-main { padding: 36px 40px; }

/* Post cards en categoría */
.posts-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.posts-header h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.posts-count { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); letter-spacing: .08em; }
.posts-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.post-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-2px); }
.pc-r:hover { border-color: var(--rojo);    box-shadow: 0 6px 20px rgba(237,77,110,.1); }
.pc-p:hover { border-color: var(--purpura); box-shadow: 0 6px 20px rgba(100,68,227,.1); }
.pc-b:hover { border-color: var(--azul);    box-shadow: 0 6px 20px rgba(18,110,235,.1); }
.pc-y:hover { border-color: var(--amarillo);box-shadow: 0 6px 20px rgba(242,188,32,.12); }
.post-card-tag { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.ptag-r { color: var(--rojo); }
.ptag-p { color: var(--purpura); }
.ptag-b { color: var(--azul); }
.ptag-y { color: var(--amarillo-dk); }
.post-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.post-card p  { font-size: .8rem; color: var(--muted); line-height: 1.6; flex: 1; }
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border);
}
.post-card-link { font-size: .78rem; font-weight: 700; display: flex; align-items: center; gap: 5px; transition: gap .2s; }
.post-card:hover .post-card-link { gap: 9px; }
.plink-r { color: var(--rojo); }
.plink-p { color: var(--purpura); }
.plink-b { color: var(--azul); }
.plink-y { color: var(--amarillo-dk); }
.post-card-meta { font-family: var(--font-mono); font-size: .6rem; color: var(--muted); }
.nivel-badge { font-family: var(--font-mono); font-size: .58rem; background: var(--bg-mid); color: var(--muted); padding: 3px 8px; border-radius: 4px; }

/* Artículo */
.article-layout { display: grid; grid-template-columns: 1fr 290px; gap: 48px; max-width: var(--max-w); margin: 0 auto; padding: 44px 40px; }
.article-body h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 32px 0 12px; border-top: 1px solid var(--border); padding-top: 24px; letter-spacing: -.02em; }
.article-body h2:first-child { border-top: none; padding-top: 0; }
.article-body h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 22px 0 9px; }
.article-body p  { font-size: .95rem; color: var(--ink-2); line-height: 1.85; margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 10px 0 16px 22px; display: flex; flex-direction: column; gap: 7px; }
.article-body li { font-size: .92rem; color: var(--ink-2); line-height: 1.7; }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body img { border-radius: var(--r); margin: 16px auto; border: 1px solid var(--border); }
.article-body a { color: var(--purpura); text-decoration: underline; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--r); border: 1px solid var(--border); }
.art-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.art-table th, .art-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.art-table th { background: var(--bg-soft); color: var(--ink); font-weight: 700; font-size: .82rem; }
.art-table tr:last-child td { border-bottom: none; }
.art-table tr:hover td { background: var(--bg-soft); }

/* Sidebar artículo */
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.aside-card { background: var(--bg-soft); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-bottom: 14px; }
.aside-card h4 { font-size: .75rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.aside-link { display: flex; align-items: center; gap: 7px; font-size: .79rem; color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--border); transition: color .15s; }
.aside-link:last-child { border-bottom: none; }
.aside-link:hover { color: var(--purpura); }
.aside-link::before { content: '›'; color: var(--border); }
.paes-aside { background: var(--purpura-bg); border-color: rgba(100,68,227,.25); text-align: center; }
.paes-aside .big-icon { font-size: 2.2rem; margin-bottom: 8px; }
.paes-aside p { font-size: .8rem; color: var(--ink-2); margin-bottom: 12px; }
.toc-list { display: flex; flex-direction: column; gap: 3px; counter-reset: toc; }
.toc-item { display: flex; align-items: center; gap: 8px; font-size: .77rem; color: var(--muted); text-decoration: none; padding: 4px 0; transition: color .15s; counter-increment: toc; }
.toc-item::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: .6rem; color: var(--border); min-width: 22px; }
.toc-item:hover { color: var(--purpura); }

/* Tip / concepto boxes */
.tip-box { background: var(--amarillo-bg); border: 1px solid rgba(242,188,32,.3); border-radius: var(--r); padding: 14px 18px; margin: 16px 0; display: flex; gap: 11px; align-items: flex-start; }
.tip-box .tip-ico { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.tip-box p { margin: 0; font-size: .87rem; color: var(--ink-2); }

/* PAES page */
.paes-stat-pill { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 6px 16px; font-family: var(--font-mono); font-size: .7rem; color: var(--white); display: flex; align-items: center; gap: 8px; }
.paes-hero-strip { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.paes-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-r { background: var(--rojo); } .dot-p { background: var(--purpura); } .dot-b { background: var(--azul); } .dot-y { background: var(--amarillo); }
.resolucion-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.resolucion-card { background: var(--bg-soft); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 7px; transition: border-color .2s, transform .2s; }
.resolucion-card:hover { transform: translateY(-2px); border-color: var(--purpura); box-shadow: var(--shadow-sm); }
.res-type { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.res-m1 { color: var(--rojo-dk); } .res-m2 { color: var(--purpura-dk); } .res-guia { color: var(--azul-dk); }
.resolucion-card h3 { font-size: .92rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.res-cta { font-size: .77rem; color: var(--muted); margin-top: auto; }

/* Profesor page */
.prof-page-grid { display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: start; max-width: var(--max-w); margin: 0 auto; padding: 48px 40px; }
.prof-page-img { position: sticky; top: calc(var(--nav-h) + 20px); }
.prof-page-img img { width: 100%; border-radius: var(--r-lg); object-fit: cover; }
.prof-page-accent { height: 4px; background: linear-gradient(90deg, var(--rojo), var(--purpura), var(--azul), var(--amarillo)); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.prof-page-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.prof-page-badge { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 10px 13px; font-size: .72rem; color: var(--ink-2); display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); }
.timeline { display: flex; flex-direction: column; gap: 0; margin: 24px 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 24px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 18px; top: 38px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.tl-dot { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; border: 2px solid var(--border); }
.tl-dot.d-r { background: var(--rojo-bg);    border-color: rgba(237,77,110,.3); }
.tl-dot.d-p { background: var(--purpura-bg); border-color: rgba(100,68,227,.3); }
.tl-dot.d-b { background: var(--azul-bg);    border-color: rgba(18,110,235,.3); }
.tl-dot.d-y { background: var(--amarillo-bg);border-color: rgba(242,188,32,.4); }
.tl-year  { font-family: var(--font-mono); font-size: .63rem; color: var(--muted); margin-bottom: 3px; }
.tl-title { font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: 3px; }
.tl-desc  { font-size: .8rem; color: var(--muted); line-height: 1.55; }

/* Buscador */
.buscar-input {
  width: 100%; background: var(--bg-soft); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 48px 14px 18px;
  color: var(--ink); font-size: 1rem; font-family: var(--font-body);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.buscar-input:focus { border-color: var(--purpura); box-shadow: 0 0 0 3px rgba(100,68,227,.1); }

/* Simulador */
.sim-filter-btn {
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  padding: 6px 16px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.sim-filter-btn:hover, .sim-filter-btn.active {
  background: var(--purpura); color: var(--white); border-color: var(--purpura);
}
.alt-btn {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-soft); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 12px 14px; cursor: pointer;
  transition: all .2s; font-family: var(--font-body); text-align: left; width: 100%;
}
.alt-btn:hover { background: var(--purpura-bg); border-color: var(--purpura); }
.alt-btn.correcto { background: #ECFDF5; border-color: #22C55E; }
.alt-btn.incorrecto { background: var(--rojo-bg); border-color: var(--rojo); }
.alt-letter {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  background: var(--bg-mid); color: var(--muted); border: 1.5px solid var(--border);
}

/* Calendario */
.cal-timeline-dot { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.cal-evento { display: flex; gap: 18px; padding-bottom: 20px; position: relative; }
.cal-evento::before { content: ''; position: absolute; left: 18px; top: 42px; bottom: 0; width: 1px; background: var(--border); }
.cal-evento:last-child::before { display: none; }
.cal-card { flex: 1; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; transition: box-shadow .2s; }
.cal-card:hover { box-shadow: var(--shadow-sm); }
.cal-card.importante { border-left-width: 3px; }
.cal-card.importante.c-r { border-left-color: var(--rojo); }
.cal-card.importante.c-y { border-left-color: var(--amarillo); }
.cal-card.importante.c-p { border-left-color: var(--purpura); }
.cal-card.importante.c-b { border-left-color: var(--azul); }

/* Admin */
.admin-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; }
.admin-card h2 { font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.admin-stat-box { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 16px; }
.admin-stat-box .n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--purpura); }
.admin-stat-box .l { font-size: .72rem; color: var(--muted); }

/* ── ANIMACIONES ─────────────────────────────────────────── */
.anim { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.anim.visible { opacity: 1; transform: translateY(0); }
.anim-d1 { transition-delay: .07s; } .anim-d2 { transition-delay: .14s; }
.anim-d3 { transition-delay: .21s; } .anim-d4 { transition-delay: .28s; }
.anim-d5 { transition-delay: .35s; } .anim-d6 { transition-delay: .42s; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cont-grid { grid-template-columns: repeat(2,1fr); }
  .ramas-grid { grid-template-columns: 1fr; }
  .test-grid { grid-template-columns: repeat(2,1fr); }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 900px) {
  .nav { padding: 0 16px; gap: 0; }
  .nav-links, .nav-right { display: none; }
  .nav-burger { display: flex; }
  .hero { grid-template-columns: 1fr; padding: calc(var(--nav-h) + 40px) 20px 56px; gap: 40px; }
  .section { padding: 64px 20px; }
  .paes-inner { grid-template-columns: 1fr; gap: 36px; }
  .prof-grid { grid-template-columns: 1fr; gap: 36px; }
  .prof-float { display: none; }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; height: auto; }
  .cat-main { padding: 24px 20px; }
  .article-layout { grid-template-columns: 1fr; padding: 28px 20px; }
  .article-sidebar { position: static; }
  .prof-page-grid { grid-template-columns: 1fr; padding: 28px 20px; }
  .prof-page-img { position: static; }
  .prof-page-badges { grid-template-columns: 1fr; }
  .page-hero { padding: calc(var(--nav-h) + 36px) 20px 36px; }
  .page-hero-inner { grid-template-columns: 1fr; }
  .ft-grid { grid-template-columns: 1fr; gap: 24px; }
  .ft-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 600px) {
  .cont-grid { grid-template-columns: 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .resolucion-grid { grid-template-columns: 1fr; }
  .ramas-grid { grid-template-columns: 1fr; }
}
