/* ---------------------------------------------------------
   Máster en Consultoría UPM-AEC — hoja de estilos
--------------------------------------------------------- */

:root {
  --blue-dark: #0081b2;
  --blue-light: #46c2f1;
  --ink: #1f2933;
  --ink-soft: #52606d;
  --bg: #ffffff;
  --bg-alt: #f5f9fb;
  --border: #e3e9ec;
  --radius: 10px;
  --max-width: 1120px;
  --shadow: 0 10px 30px rgba(15, 60, 80, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
/* Dos franjas: arriba los logos (se desplaza con la página) y debajo el menú,
   que queda fijo gracias al top negativo del sticky. */
#site-header {
  --header-top-h: 109px; /* alto de .header-top, borde incluido */
  position: sticky;
  top: calc(-1 * var(--header-top-h));
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-top { height: var(--header-top-h); border-bottom: 1px solid var(--border); box-sizing: border-box; }
.header-top .header-inner { height: 100%; justify-content: space-between; }

.brand { flex-shrink: 0; display: block; }
.brand img { display: block; height: 80px; width: auto; }

.partner-logo { position: relative; height: 56px; flex-shrink: 1; min-width: 0; }
.partner-logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
/* El logo es una sola imagen: dos zonas enlazadas encima (UPM a la izquierda, AEC a la derecha) */
.partner-link { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.partner-link--upm { left: 0; width: 38%; }
.partner-link--aec { left: 38%; right: 0; }
.partner-link:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

.header-nav .header-inner { padding-top: 6px; padding-bottom: 6px; }

.primary-nav { margin: 0 auto; }
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.primary-nav a {
  display: block;
  padding: 10px 12px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.primary-nav a:hover { background: var(--bg-alt); color: var(--blue-dark); }
.primary-nav a.active { color: #fff; background: var(--blue-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 90px 0 70px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(3, 40, 58, 0.92), rgba(0, 129, 178, 0.75));
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 10px; line-height: 1.15; }
.hero .hero-dates { font-size: 1.1rem; opacity: 0.95; margin: 0 0 24px; }
.hero .hero-lede { max-width: 760px; font-size: 1.05rem; opacity: 0.95; }
.hero .hero-lede strong { font-weight: 700; }

.hero-page {
  padding: 60px 0;
}
.hero-page h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--blue-light); color: #06222f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--blue-dark); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 28px; }
h2.centered { text-align: center; }

/* Facts grid (modality, credits, price...) */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 860px) { .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts-grid { grid-template-columns: 1fr; } }
.fact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.fact-card dt { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 6px; }
.fact-card dd { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat-card img { height: 56px; margin: 0 auto 12px; }
.stat-card .stat-number { font-size: 2rem; font-weight: 800; color: var(--blue-dark); display: block; }
.stat-card .stat-label { color: var(--ink-soft); font-size: 0.95rem; }

/* Objectives list */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  background: var(--blue-light);
  color: #06222f;
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Two-column feature block with image */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.feature-row img { border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-row.reverse .feature-media { order: 2; }
@media (max-width: 760px) {
  .feature-row, .feature-row.reverse .feature-media { order: initial; }
  .feature-row { grid-template-columns: 1fr; }
}

/* Curriculum grid */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.curriculum-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fff;
  font-weight: 700;
  color: var(--blue-dark);
  border-left: 4px solid var(--blue-light);
}

/* Calendar table */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-table th, .calendar-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.calendar-table th { color: var(--ink-soft); font-weight: 600; width: 40%; }
.calendar-table tr:last-child th, .calendar-table tr:last-child td { border-bottom: none; }

/* Module accordions (Programa) */
.module {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: #fff;
  overflow: hidden;
}
.module summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
}
.module summary::-webkit-details-marker { display: none; }
.module summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--blue-dark);
  font-weight: 400;
}
.module[open] summary::after { content: "–"; }
.module .module-coordinator { font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); display: block; margin-top: 4px; }
.module-body { padding: 0 24px 24px; display: grid; gap: 28px; grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 700px) { .module-body { grid-template-columns: 1fr; } }
.module-body h4 { margin: 0 0 12px; color: var(--blue-dark); }
.module-body ul { margin: 0; padding-left: 20px; }
.module-body li { margin-bottom: 6px; }
.faculty-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.faculty-list li strong { display: block; }
.faculty-list li span { color: var(--ink-soft); font-size: 0.92rem; }

/* Info / contact cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.info-card h3 { margin-top: 0; color: var(--blue-dark); }

/* Steps (Admisión) */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { position: relative; padding-left: 48px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px;
  background: var(--blue-dark);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.doc-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.doc-list li { padding-left: 24px; position: relative; }
.doc-list li::before { content: "•"; color: var(--blue-dark); position: absolute; left: 0; font-weight: 900; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--blue-dark), #045b7d);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 640px; margin: 0 auto 24px; opacity: 0.95; }

/* ---------- Footer ---------- */
#site-footer {
  background: #0d2733;
  color: #cfe3ec;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.footer-col h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.footer-col p { margin: 0 0 10px; font-size: 0.92rem; }
.footer-col a { color: #9fd7ee; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 1160px) {
  #site-header { --header-top-h: 84px; top: 0; }
  .header-inner { padding: 0 24px; }
  .brand img { height: 60px; }
  .partner-logo { height: 40px; margin-left: auto; }
  .nav-toggle { display: flex; margin-left: 0; }
  .header-top { border-bottom: 0; }
  .header-nav { position: relative; }
  .header-nav .header-inner { padding: 0; }
  .primary-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; padding: 12px 24px 20px; }
}
@media (max-width: 600px) {
  #site-header { --header-top-h: 68px; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .brand img { height: 46px; }
  .partner-logo { height: 24px; }
}
@media (max-width: 380px) {
  .partner-logo { display: none; }
  .nav-toggle { margin-left: auto; }
}

/* =========================================================
   Portada (index.html) — estilos propios, prefijo .home-
   ========================================================= */
.home { --navy: #0b2a3a; --tint: #eef7fb; }
.home h2 { letter-spacing: -0.02em; line-height: 1.15; }

.home-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.home-eyebrow-light { color: var(--blue-light); }

/* Botones de la portada */
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home .btn { border-radius: 999px; padding: 13px 24px; transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.home .btn span { display: inline-block; transition: transform .15s; }
.home .btn:hover span { transform: translateX(3px); }
.home-btn-solid { background: var(--blue-dark); color: #fff; box-shadow: 0 8px 20px rgba(0,129,178,.28); }
.home-btn-solid:hover { background: #006d97; transform: translateY(-2px); }
.home-btn-ghost { border-color: #c9dde6; color: var(--ink); background: #fff; }
.home-btn-ghost:hover { border-color: var(--blue-dark); color: var(--blue-dark); }
.home-btn-light { background: #fff; color: var(--navy); }
.home-btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.home-btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.home-btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Hero */
.home-hero {
  padding: 56px 0 96px;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(70,194,241,.18), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--tint) 100%);
  overflow: hidden;
}
.home-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.home-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cfe6ef;
  font-size: 0.85rem; font-weight: 600; color: var(--blue-dark);
  box-shadow: 0 2px 8px rgba(15,60,80,.06);
}
.home-pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22b573;
  box-shadow: 0 0 0 0 rgba(34,181,115,.5);
  animation: home-pulse 2s infinite;
}
@keyframes home-pulse {
  70% { box-shadow: 0 0 0 8px rgba(34,181,115,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,181,115,0); }
}
.home-kicker { margin: 22px 0 8px; font-weight: 600; color: var(--ink-soft); }
.home-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--blue-dark);
}
.home-accent { display: block; }
.home-by {
  max-width: 60ch; margin: -4px 0 18px;
  padding-left: 14px; border-left: 3px solid var(--blue-light);
  font-size: 1.12rem; line-height: 1.45; color: var(--ink);
}
.home-by strong { color: var(--navy); }
.home-lede { max-width: 60ch; font-size: 1.06rem; color: var(--ink-soft); margin: 0 0 28px; }
.home-lede strong { color: var(--ink); }
.home-note { margin: 18px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.home-hero-media { position: relative; }
.home-hero-media img {
  width: 100%; height: auto;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
}
.home-float {
  position: absolute; left: 4%; bottom: 8%;
  display: flex; flex-direction: column;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 18px 40px rgba(11,42,58,.14);
}
.home-float-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.home-float-label { font-size: 0.85rem; color: var(--ink-soft); }

/* Datos clave: panel que monta sobre el hero */
.home-facts-wrap { padding: 0; margin-top: -56px; position: relative; z-index: 2; }
.home-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(11,42,58,.08);
  overflow: hidden;
}
.home-facts > div { padding: 24px 28px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.home-facts > div:nth-child(3n) { border-right: none; }
.home-facts > div:nth-last-child(-n+3) { border-bottom: none; }
.home-facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: 6px; }
.home-facts dd { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }

/* Cifras */
.home-stats { background: var(--navy); color: #fff; margin-top: 72px; padding: 56px 0; }
.home-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.home-stats-grid > div { border-left: 1px solid rgba(255,255,255,.15); padding-left: 24px; }
.home-stat-number { display: block; font-size: clamp(2.4rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.home-stat-label { display: block; margin-top: 6px; color: #a9c8d6; font-size: 0.95rem; }

/* Competencias */
.home-banner {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  padding: 40px;
  overflow: hidden;
  color: #fff;
}
.home-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,42,58,.92) 0%, rgba(11,42,58,.55) 55%, rgba(11,42,58,.1) 100%); }
.home-banner > div { position: relative; }
.home-banner h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); max-width: 16ch; }

/* Estructura */
.home-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.home-section-head h2 { margin: 0; }
.home-link { font-weight: 700; text-decoration: none; }
.home-link:hover { text-decoration: underline; }
.home-modules { list-style: none; margin: 0; padding: 0; counter-reset: mod; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-modules li {
  counter-increment: mod;
  position: relative;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700; font-size: 1.08rem; color: var(--navy);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.home-modules li::before {
  content: "Módulo " counter(mod, decimal-leading-zero);
  display: block; margin-bottom: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dark);
}
.home-modules li:hover { border-color: var(--blue-light); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11,42,58,.07); }
.home-modules li.home-module-final { background: linear-gradient(120deg, var(--blue-dark), #045b7d); color: #fff; border-color: transparent; }
.home-modules li.home-module-final::before { content: "Cierre"; color: #bfe9fa; }

/* CTA */
.home-cta-wrap { padding-top: 0; }
.home-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  padding: 48px 56px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(70,194,241,.45), transparent 60%),
    linear-gradient(120deg, var(--navy), #045b7d);
}
.home-cta h2 { color: #fff; margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.home-cta p { margin: 0; color: #cfe6ef; }

/* Responsive portada */
@media (max-width: 980px) {
  .home-hero { padding: 40px 0 88px; }
  .home-hero-inner { grid-template-columns: 1fr; gap: 24px; padding: 0 24px; }
  .home-hero-media { max-width: 560px; margin: 0 auto; }
  .home-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-facts > div { border-right: 1px solid var(--border) !important; border-bottom: 1px solid var(--border) !important; }
  .home-facts > div:nth-child(2n) { border-right: none !important; }
  .home-facts > div:nth-last-child(-n+2) { border-bottom: none !important; }
  .home-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-cta { padding: 36px 28px; }
  .home-banner { padding: 28px; min-height: 200px; }
}
@media (max-width: 520px) {
  .home-facts, .home-modules { grid-template-columns: 1fr; }
  .home-facts > div { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .home-facts > div:last-child { border-bottom: none !important; }
  .home-stats-grid { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-pill-dot { animation: none; }
  .home *, .home *::before { transition: none !important; }
}

/* =========================================================
   Cabecera de página clara (páginas interiores modernas)
   ========================================================= */
.page-hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(70,194,241,.18), transparent 60%),
    linear-gradient(180deg, #fff 0%, #eef7fb 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #0b2a3a;
}
.page-hero-lede { max-width: 62ch; font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 24px; }
.page-hero-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.page-hero-chips li {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cfe6ef;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.page-hero-chips strong { color: #0b2a3a; }

/* =========================================================
   Programa y Profesorado
   ========================================================= */
.prog-section { padding-top: 48px; }
.prog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }

/* Índice lateral */
.prog-index { position: sticky; top: 100px; }
.prog-index ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.prog-index a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 0 8px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.93rem;
  transition: color .15s, border-color .15s;
}
.prog-index a span { font-size: 0.75rem; font-weight: 800; color: #9fb3bd; min-width: 18px; }
.prog-index a:hover, .prog-index a.current { color: var(--blue-dark); border-left-color: var(--blue-dark); }
.prog-index a.current span { color: var(--blue-dark); }

/* Tarjeta de módulo */
.prog-list { display: grid; gap: 16px; }
.prog-module {
  scroll-margin-top: 100px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.prog-module:hover { border-color: #cfe6ef; }
.prog-module[open] { box-shadow: 0 20px 44px rgba(11,42,58,.08); border-color: #cfe6ef; }
.prog-module summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 28px;
}
.prog-module summary::-webkit-details-marker { display: none; }
.prog-num {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #eef7fb;
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 1rem;
}
.prog-module[open] .prog-num { background: var(--blue-dark); color: #fff; }
.prog-title { display: block; font-size: 1.22rem; font-weight: 800; color: #0b2a3a; letter-spacing: -0.01em; }
.prog-coord { display: block; margin-top: 4px; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }
.prog-coord-label {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #eef7fb;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-dark);
  vertical-align: 1px;
}
.prog-coord strong { color: var(--ink); font-weight: 700; }
.prog-coord-role::before { content: " · "; }
.prog-chevron {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
  transition: transform .2s, background .2s;
}
.prog-chevron::before {
  content: "";
  position: absolute; left: 50%; top: 45%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--blue-dark);
  border-bottom: 2px solid var(--blue-dark);
  transform: translate(-50%, -50%) rotate(45deg);
}
.prog-module[open] .prog-chevron { transform: rotate(180deg); background: #eef7fb; }

.prog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  padding: 8px 28px 30px 96px;
}
.prog-block h3 {
  margin: 0 0 14px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-dark);
  display: flex; align-items: center; gap: 8px;
}
.prog-count {
  padding: 1px 8px; border-radius: 999px;
  background: #eef7fb; color: var(--blue-dark);
  font-size: 0.72rem; letter-spacing: 0;
}
.prog-topics { list-style: none; margin: 0; padding: 0; }
.prog-topics li {
  position: relative;
  padding: 9px 0 9px 22px;
  border-bottom: 1px dashed var(--border);
  line-height: 1.5;
}
.prog-topics li:last-child { border-bottom: none; }
.prog-topics li::before {
  content: "";
  position: absolute; left: 2px; top: 18px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--blue-light);
  transform: rotate(45deg);
}
.prog-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prog-people li {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f9fb;
}
.prog-avatar {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  color: #fff; font-weight: 800; font-size: 0.85rem; letter-spacing: .02em;
}
.prog-people strong { display: block; color: #0b2a3a; line-height: 1.3; }
.prog-person-role { display: block; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; margin-top: 2px; }
.prog-person-org { display: inline-block; margin-top: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dark); }

.prog-module-final .prog-num { background: linear-gradient(135deg, var(--blue-dark), #045b7d); color: #fff; }
.prog-block-date { align-self: start; padding: 24px; border-radius: 16px; background: #0b2a3a; color: #fff; }
.prog-block-date h3 { color: var(--blue-light); }
.prog-date { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }

@media (max-width: 1080px) {
  .prog-body { grid-template-columns: 1fr; gap: 28px; padding-left: 28px; }
}
@media (max-width: 900px) {
  .prog-layout { grid-template-columns: 1fr; gap: 24px; }
  .prog-index { position: static; }
  .prog-index ol { display: flex; flex-wrap: wrap; gap: 8px; border-left: none; }
  .prog-index a { padding: 6px 12px; margin: 0; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; }
  .prog-index a:hover, .prog-index a.current { border-color: var(--blue-dark); }
}
@media (max-width: 560px) {
  .prog-module summary { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 14px; }
  .prog-chevron { display: none; }
  .prog-num { width: 40px; height: 40px; border-radius: 12px; }
  .prog-body { padding: 4px 18px 22px; }
  .page-hero { padding: 44px 0 40px; }
}

/* =========================================================
   Preinscripción y Admisión
   ========================================================= */
.page-hero-chips li { display: inline-flex; align-items: center; gap: 6px; }
.page-hero-chips .home-pill-dot { display: inline-block; }

/* Pasos en línea de tiempo */
.adm-steps {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px;
  position: relative;
}
.adm-steps::before {
  content: ""; position: absolute; top: 26px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
  opacity: .35;
}
.adm-steps li { position: relative; text-align: center; }
.adm-step-num {
  position: relative;
  display: grid; place-items: center;
  width: 54px; height: 54px; margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue-dark);
  color: var(--blue-dark);
  font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 0 0 6px #fff;
}
.adm-steps li:last-child .adm-step-num { background: var(--blue-dark); color: #fff; }
.adm-steps p { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.45; }

/* Documentación + resumen */
.adm-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: start; }
.adm-muted { color: var(--ink-soft); }
.adm-doc-list { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 10px; }
.adm-doc-list li {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-weight: 600;
}
.adm-doc-icon {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  background: #eef7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230081b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 14l2 2 4-4'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.adm-optional { color: var(--ink-soft); }
.adm-optional .adm-doc-icon { filter: grayscale(1); opacity: .7; }
.adm-tag {
  margin-left: auto;
  padding: 2px 10px; border-radius: 999px;
  background: #f1f4f6; color: var(--ink-soft);
  font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.adm-note {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: 14px;
  background: #e6f4fa;
  border-left: 4px solid var(--blue-dark);
}
.adm-note svg { flex-shrink: 0; width: 22px; height: 22px; fill: none; stroke: var(--blue-dark); stroke-width: 2; stroke-linecap: round; margin-top: 2px; }
.adm-note p { margin: 0; color: var(--ink); }

.adm-summary {
  position: sticky; top: 100px;
  padding: 32px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(400px 220px at 100% 0%, rgba(70,194,241,.4), transparent 60%),
    linear-gradient(150deg, #0b2a3a, #045b7d);
  box-shadow: 0 24px 50px rgba(11,42,58,.18);
}
.adm-summary h2 { color: #fff; font-size: 1.4rem; margin: 0 0 20px; }
.adm-summary dl { margin: 0 0 24px; }
.adm-summary dl > div { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.adm-summary dt { font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fd7ee; margin-bottom: 4px; }
.adm-summary dd { margin: 0; font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.adm-summary-btn { display: block; text-align: center; white-space: normal; }
.adm-summary-contact { margin: 14px 0 0; text-align: center; font-size: 0.85rem; color: #cfe6ef; overflow-wrap: anywhere; }
.adm-summary-contact a { color: #fff; }

.adm-cta { padding-top: 64px; }

@media (max-width: 900px) {
  .adm-grid { grid-template-columns: 1fr; gap: 32px; }
  .adm-summary { position: static; }
  .adm-steps { grid-template-columns: 1fr; gap: 0; }
  .adm-steps::before { top: 27px; bottom: 27px; left: 26px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--blue-light), var(--blue-dark)); }
  .adm-steps li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center; text-align: left; padding: 8px 0; }
  .adm-step-num { margin: 0; }
}
@media (max-width: 520px) {
  .adm-summary { padding: 24px; }
  .adm-tag { margin-left: 48px; }
}

/* =========================================================
   Información General y Calendario
   ========================================================= */
.inf-anchor { scroll-margin-top: 90px; }
.inf-muted { color: var(--ink-soft); }
.inf-jump { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #d6e8ef; }
.inf-jump a { font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; }
.inf-jump a:hover { color: var(--blue-dark); }

.inf-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-bottom: 36px; }
.inf-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; }
.inf-objectives {
  list-style: none; margin: 0; padding: 0; counter-reset: io;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.inf-objectives li {
  counter-increment: io;
  padding: 22px 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-weight: 600; line-height: 1.5; color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.inf-objectives li:hover { border-color: var(--blue-light); transform: translateY(-2px); }
.inf-objectives li::before {
  content: counter(io, decimal-leading-zero);
  display: block; margin-bottom: 10px;
  font-size: 0.85rem; font-weight: 800; color: var(--blue-light);
}
.inf-quote {
  margin: 36px auto 0; max-width: 46ch;
  text-align: center;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; line-height: 1.4; letter-spacing: -0.01em;
  color: #0b2a3a;
}

.inf-dark { background: #0b2a3a; color: #fff; }
.inf-dark h2 { color: #fff; }
.inf-adv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.inf-adv article {
  padding: 28px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
}
.inf-adv svg {
  width: 46px; height: 46px; padding: 11px; border-radius: 12px;
  background: rgba(70,194,241,.15);
  fill: none; stroke: var(--blue-light); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.inf-adv p { margin: 18px 0 0; color: #d5e6ee; line-height: 1.6; }

.inf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.inf-panel { background: #fff; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.inf-panel > img { width: 100%; height: 220px; object-fit: cover; }
.inf-panel-body { padding: 28px 30px 30px; }
.inf-panel h2 { font-size: 1.45rem; margin-bottom: 12px; }
.inf-checks { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; }
.inf-checks li { position: relative; padding-left: 32px; line-height: 1.5; }
.inf-checks li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #eef7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230081b2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.inf-cal { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.inf .calendar-table { border-radius: 18px; border-collapse: separate; border-spacing: 0; box-shadow: 0 18px 40px rgba(11,42,58,.06); }
.inf .calendar-table th, .inf .calendar-table td { padding: 18px 24px; }
.inf .calendar-table th { font-size: 0.78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-dark); }
.inf .calendar-table td { font-weight: 700; color: #0b2a3a; }
.inf-cta { padding-top: 64px; }

@media (max-width: 980px) {
  .inf-intro, .inf-cal, .inf-pair { grid-template-columns: 1fr; gap: 28px; }
  .inf-objectives, .inf-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .inf-objectives, .inf-adv { grid-template-columns: 1fr; }
  .inf .calendar-table th, .inf .calendar-table td { display: block; width: auto; padding: 4px 20px; border: none; }
  .inf .calendar-table th { padding-top: 16px; }
  .inf .calendar-table td { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .inf-panel-body { padding: 22px; }
}

/* =========================================================
   Contacto
   ========================================================= */
.con-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.con-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
}
.con-card h2 { font-size: 1.3rem; margin: 0; }
.con-card .home-eyebrow { margin-bottom: 4px; }
.con-card-main {
  color: #fff; border: none;
  background:
    radial-gradient(360px 200px at 100% 0%, rgba(70,194,241,.4), transparent 60%),
    linear-gradient(150deg, #0b2a3a, #045b7d);
}
.con-card-main h2 { color: #fff; }
.con-person { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 6px; }
.con-person .prog-avatar { width: 52px; height: 52px; font-size: 1rem; }
.con-role { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }
.con-addr { display: flex; gap: 10px; margin: 6px 0 8px; font-size: 0.92rem; line-height: 1.5; color: inherit; opacity: .92; }
.con-addr svg, .con-action svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.con-addr-lg { font-size: 1.02rem; margin: 16px 0 24px; color: var(--ink); }
.con-addr-lg svg { color: var(--blue-dark); }
.con-action {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f5f9fb;
  color: var(--ink);
  font-weight: 600; font-size: 0.92rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background .15s, color .15s;
}
.con-action svg { color: var(--blue-dark); margin-top: 0; }
.con-action:hover { background: #e6f4fa; color: var(--blue-dark); }
.con-card-main .con-action { background: rgba(255,255,255,.1); color: #fff; }
.con-card-main .con-action svg { color: var(--blue-light); }
.con-card-main .con-action:hover { background: rgba(255,255,255,.18); color: #fff; }

.con-location { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.con-map { border-radius: 22px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(11,42,58,.08); aspect-ratio: 16 / 10; }
.con-map iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 980px) {
  .con-grid { grid-template-columns: 1fr 1fr; }
  .con-card-main { grid-column: 1 / -1; }
  .con-location { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .con-grid { grid-template-columns: 1fr; }
  .con-map { aspect-ratio: 4 / 3; }
}

/* Portada · Objetivos (general + específicos) */
.home-muted { color: var(--ink-soft); margin: 6px 0 0; }
.home-rounded { border-radius: 20px; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.home-goal { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: center; }
.home-goal h2 { margin-bottom: 18px; }
.home-goal-lead {
  margin: 0 0 18px;
  padding-left: 22px;
  border-left: 4px solid var(--blue-light);
  font-size: clamp(1.12rem, 1.9vw, 1.35rem); font-weight: 600; line-height: 1.5; letter-spacing: -0.01em;
  color: #0b2a3a;
}
.home-goal-sub { margin: 0; color: var(--ink-soft); }
.home-goals-head { margin: 64px 0 24px; }
.home-goals {
  list-style: none; margin: 0; padding: 0; counter-reset: goal;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.home-goals li {
  counter-increment: goal;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--ink-soft); line-height: 1.55;
  transition: border-color .2s, box-shadow .2s;
}
.home-goals li:hover { border-color: #cfe6ef; box-shadow: 0 14px 30px rgba(11,42,58,.06); }
.home-goals li::before {
  content: counter(goal, decimal-leading-zero);
  grid-row: span 2;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: #eef7fb; color: var(--blue-dark);
  font-weight: 800;
}
.home-goals h3 { margin: 2px 0 6px; font-size: 1.06rem; line-height: 1.35; color: #0b2a3a; }
.home-goals p { margin: 0; font-size: 0.95rem; }

/* Portada · Objetivos específicos como selector (escritorio) / acordeón (móvil) */
.goals-picker {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: 32px; row-gap: 6px;
  align-items: start;
}
.goals-tab {
  grid-column: 1;
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: 100%;
  padding: 12px 16px 12px 14px;
  font: inherit; text-align: left;
  background: transparent;
  border: 1px solid transparent; border-radius: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.goals-tab::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--blue-light), var(--blue-dark));
  transform: scaleY(0); transition: transform .25s ease;
}
.goals-tab:hover { background: #f3f9fc; color: #0b2a3a; }
.goals-tab:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.goals-tab.is-active { background: #fff; border-color: var(--border); color: #0b2a3a; box-shadow: 0 10px 24px rgba(11,42,58,.06); }
.goals-tab.is-active::before { transform: scaleY(1); }
.goals-num {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: #eef7fb; color: var(--blue-dark);
  font-weight: 800; font-size: 0.95rem;
  transition: background .2s, color .2s;
}
.goals-picker--codes .goals-num { width: auto; min-width: 44px; padding: 0 8px; font-size: 0.85rem; }
.goals-picker--codes .goals-tab { grid-template-columns: 56px minmax(0, 1fr) auto; }
.goals-picker--codes .goals-panel-num { font-size: 5.5rem; top: 14px; }
.goals-tab.is-active .goals-num { background: linear-gradient(135deg, var(--blue-dark), var(--blue-light)); color: #fff; }
.goals-title { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.goals-chevron {
  width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); opacity: .45;
  transition: transform .2s, opacity .2s;
}
.goals-tab.is-active .goals-chevron { opacity: 1; color: var(--blue-dark); }

.goals-panel { grid-column: 2; grid-row: 1 / span var(--goals-rows, 10); position: sticky; top: 100px; }
.goals-panel[hidden] { display: none; }
.goals-panel-inner {
  position: relative; overflow: hidden;
  padding: 40px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(70,194,241,.4), transparent 60%),
    linear-gradient(150deg, #0b2a3a, #045b7d);
  box-shadow: 0 24px 50px rgba(11,42,58,.18);
  animation: goals-in .35s ease both;
  display: flex; flex-direction: column;
  min-height: var(--goals-h, auto);
}
.goals-panel-num {
  position: absolute; right: 28px; top: 6px;
  font-size: 7.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  color: rgba(255,255,255,.08);
  pointer-events: none;
}
.goals-panel h3 { position: relative; margin: 0 0 16px; max-width: 22ch; font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.25; color: #fff; }
.goals-panel p { position: relative; margin: 0; font-size: 1.05rem; line-height: 1.65; color: #d5e6ee; }
.goals-panel-foot { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 32px; flex-wrap: wrap; }
.goals-progress { flex: 1 1 120px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.goals-progress span { display: block; height: 100%; border-radius: 4px; background: var(--blue-light); transition: width .4s ease; }
.goals-count { font-size: 0.85rem; font-weight: 700; color: #9fd7ee; }
.goals-nav { display: flex; gap: 8px; }
.goals-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  font: inherit; font-size: 1.05rem;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.goals-nav button:hover:not(:disabled) { background: rgba(255,255,255,.2); border-color: #fff; }
.goals-nav button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.goals-nav button:disabled { opacity: .35; cursor: default; }

@keyframes goals-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .goals-picker { grid-template-columns: 1fr; row-gap: 8px; }
  .goals-tab { border-color: var(--border); background: #fff; }
  .goals-tab::before { display: none; }
  .goals-chevron { transform: rotate(45deg); }
  .goals-tab.is-active .goals-chevron { transform: rotate(-135deg); }
  .goals-panel { grid-column: 1; grid-row: auto; position: static; }
  .goals-panel-inner { padding: 26px 22px; border-radius: 18px; }
  .goals-panel-num { font-size: 5rem; right: 16px; }
  .goals-panel p { font-size: 0.98rem; }
  .goals-panel h3, .goals-panel-foot { display: none; }
  .goals-panel-num { display: none; }
}
@media (max-width: 520px) {
  .goals-tab { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .goals-num { width: 38px; height: 38px; border-radius: 10px; font-size: 0.85rem; }
  .goals-title { font-size: 0.96rem; }
}
@media (prefers-reduced-motion: reduce) {
  .goals-panel-inner { animation: none; }
  .goals-tab, .goals-tab::before, .goals-chevron, .goals-progress span { transition: none; }
}

/* Portada · Competencias con pestañas */
.home-banner-sub { margin: 10px 0 0; color: #d5e6ee; max-width: 48ch; }
.home-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  margin: 28px 0 20px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.home-tabs a {
  font: inherit; font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.home-tabs a span { padding: 1px 8px; border-radius: 999px; background: #eef7fb; color: var(--blue-dark); font-size: 0.78rem; }
.home-tabs a:hover { background: var(--blue-dark); color: #fff; }
.home-tabs a:hover span { background: rgba(255,255,255,.2); color: #fff; }
.home-tabs a:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

.home-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.home-comp {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.home-comp:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(11,42,58,.08); border-color: #cfe6ef; }
.home-comp-code {
  display: inline-block;
  padding: 3px 10px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  color: #fff; font-size: 0.78rem; font-weight: 800; letter-spacing: .06em;
}
.home-comp h3 { margin: 14px 0 8px; font-size: 1.05rem; line-height: 1.3; color: #0b2a3a; }
.home-comp p { margin: 0; font-size: 0.93rem; line-height: 1.55; color: var(--ink-soft); }

@media (max-width: 980px) {
  .home-goal { grid-template-columns: 1fr; gap: 28px; }
  .home-goal .home-rounded { aspect-ratio: 16 / 9; }
  .home-goals { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .home-goals li { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .home-goals li::before { grid-row: auto; width: 40px; height: 40px; border-radius: 12px; }
  .home-tabs { display: flex; border-radius: 18px; }
  .home-tabs a { flex: 1 1 100%; justify-content: center; }
}

.home-comp-group { scroll-margin-top: 100px; }
.home-comp-group + .home-comp-group { margin-top: 44px; }
.home-comp-group-title {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  font-size: 1.3rem; color: #0b2a3a; letter-spacing: -0.01em;
}
.home-comp-group-title span { font-size: 0.8rem; font-weight: 700; letter-spacing: .08em; color: var(--blue-dark); }
