/* ============================================================
   El Hangar de los Tests — hoja de estilos compartida (home + navegación)
   Misma paleta y tipografía que las herramientas de test, para
   que entrar en un test no se sienta como cambiar de sitio.
   ============================================================ */

:root {
  --bg: #f8f6fc;
  --bg2: #efe9fa;
  --surface: #ffffff;
  --surface2: #f3eefb;
  --border: #ddd3f0;
  --border-soft: #ece6f7;
  --accent: #8b5cf6;
  --accent2: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --teal: #0d9488;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --text: #1e1b2e;
  --text2: #5b5470;
  --text3: #8a8299;
  --radius: 10px;
  --radius-lg: 18px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 1000px 560px at 8% -8%, rgba(139, 92, 246, 0.10), transparent 58%),
    radial-gradient(ellipse 760px 540px at 102% 2%, rgba(45, 212, 191, 0.07), transparent 55%),
    radial-gradient(ellipse 900px 700px at 50% 115%, rgba(124, 58, 237, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Site header / nav ---------- */

.site-nav {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.mark-glyph {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13.5px;
  color: var(--text3);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text2); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text3); opacity: 0.6; }
.breadcrumb .current { color: var(--text); }

/* ---------- Shell / sections ---------- */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
}

main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Hero ---------- */

.hero {
  padding: 2rem 0 1.4rem;
  position: relative;
}

.hero-eyebrow {
  font-size: 12.5px;
  color: var(--teal);
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.14;
  max-width: 18ch;
  background: linear-gradient(135deg, #1e1b2e 15%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  margin-top: 0.9rem;
  font-size: 15px;
  color: var(--text2);
  max-width: 54ch;
  line-height: 1.55;
}

.hero-trajectory {
  position: absolute;
  top: 0.5rem;
  right: -1rem;
  width: 380px;
  max-width: 40vw;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.hero-eyebrow, .hero h1, .hero p.lede {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-trajectory { display: none; }
}

/* ---------- Curso picker (home) ---------- */

.curso-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.2rem 0 1rem;
}

.curso-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.2rem;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 210px;
  min-width: 160px;
}

.curso-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
}

.curso-card .num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.1rem;
  color: var(--accent);
  line-height: 1;
}

.curso-card .label {
  font-size: 14.5px;
  color: var(--text2);
}

.curso-card .count {
  font-size: 12.5px;
  color: var(--text3);
  margin-top: auto;
  padding-top: 0.6rem;
}

/* ---------- Section framing ---------- */

.section {
  padding: 2.4rem 0;
  border-top: 1px solid var(--border-soft);
}

.section:first-child { border-top: none; }

.section-head {
  margin-bottom: 1.6rem;
}

.section-head h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--text);
}

.section-head p {
  margin-top: 0.4rem;
  font-size: 14.5px;
  color: var(--text3);
  max-width: 60ch;
}

/* ---------- Specialty picker ---------- */

.esp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.esp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
  flex: 1 1 150px;
  min-width: 150px;
}

.esp-card:hover {
  border-color: var(--teal);
  background: var(--surface2);
  transform: translateY(-2px);
}

.esp-card .code {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--text);
}

.esp-card .sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 0.3rem;
}

/* ---------- Subject list ---------- */

.subject-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  transition: border-color 0.18s;
}

.subject-card:hover { border-color: var(--border); }

.subject-info { min-width: 220px; flex: 1; }

.subject-info h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.subject-info p {
  font-size: 13.5px;
  color: var(--text3);
  margin-top: 0.25rem;
  max-width: 56ch;
}

.subject-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Varias convocatorias de una misma asignatura (p. ej. Parcial / Ordinario)
   usan siempre el mismo degradado: ninguna debe parecer la opción
   "por defecto" ni la "secundaria". */
.btn-open {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  transition: filter 0.15s;
  white-space: nowrap;
}
.btn-open:hover { filter: brightness(1.1); }

/* ---------- Placeholder ("próximamente") cards ---------- */

.subject-card.placeholder {
  opacity: 0.55;
  border-style: dashed;
}

.tag-soon {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 2rem;
}

.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text3);
}

.site-footer-inner a { color: var(--text3); transition: color 0.15s; }
.site-footer-inner a:hover { color: var(--text2); }

.foot-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }

/* ---------- Misc ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13.5px;
  color: var(--text3);
  margin-bottom: 1.2rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ---------- Home: ajuste móvil para ver los 4 cursos sin scroll ---------- */
@media (max-width: 520px) {
  .hero { padding: 1.3rem 0 1rem; }
  .hero-eyebrow { margin-bottom: 0.5rem; }
  .hero h1 { font-size: 1.5rem; max-width: 100%; }
  .hero p.lede { font-size: 13.5px; margin-top: 0.6rem; line-height: 1.5; }
  .curso-grid { margin: 1rem 0 0.5rem; gap: 0.6rem; }
  .curso-card {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
    padding: 0.8rem 0.9rem;
    gap: 0.25rem;
  }
  .curso-card .num { font-size: 1.5rem; }
  .curso-card .label { font-size: 13px; }
  .curso-card .count { font-size: 11px; padding-top: 0.2rem; }
}
