/* =========================================================
   ANDES · pages.css
   Estilos específicos de cada página
   ========================================================= */

/* =============== INICIO =============== */

/* Carrusel principal */
.hero-carousel { height: min(88vh, 780px); min-height: 560px; }
.hero-carousel .slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.1) 100%);
}
.hero-carousel .media-empty { place-content: start end; justify-items: end; padding: 20px 24px; text-align: right; }
.hero-carousel .media-empty svg, .hero-carousel .media-empty b { display: none; }
.slide-caption {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 210px;
  color: #fff;
}
.slide-caption .inner { max-width: 620px; }
.slide-caption .eyebrow { color: var(--gold); }
.slide-caption h1, .slide-caption h2 { color: #fff; margin-bottom: 18px; }
.slide-caption h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.slide-caption p { color: rgba(255,255,255,.8); font-size: 1.06rem; margin-bottom: 26px; }
.hero-wordmark { width: min(500px, 82vw); height: auto; margin-bottom: 22px; filter: drop-shadow(0 4px 24px rgba(0,0,0,.6)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-carousel .carousel-controls { left: 0; right: 0; bottom: 18px; width: min(var(--max), 100% - 32px); margin-inline: auto; }
.hero-carousel .carousel-arrows { display: flex; gap: 8px; margin-left: auto; }
.hero-carousel .carousel-btn { background: rgba(0,0,0,.7); }

/* Franja de datos debajo del carrusel */
.facts-bar { border-bottom: 1px solid var(--border); background: var(--bg); }
.facts-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); }
.fact { padding: 28px 24px; border-right: 1px solid var(--border); }
.fact:last-child { border-right: 0; }
.fact-num { font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; line-height: 1; display: block; }
.fact-label { font-size: .84rem; color: var(--muted); }

.countdown-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.countdown { display: flex; gap: 18px; }
.cd-unit { display: flex; flex-direction: column; }
.cd-unit span { font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.cd-sep { font-family: var(--font-head); font-size: 2rem; color: var(--border-strong); line-height: 1; }

/* Banda de llamada a la acción */
.cta-band { padding: 88px 0 200px; }
.cta-band p { max-width: 560px; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.benefit { padding: 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.benefit:nth-child(4n) { border-right: 0; }
.benefit:nth-last-child(-n+4) { border-bottom: 0; }
.benefit svg { color: var(--accent-text); margin-top: 3px; }

/* =============== COMPETENCIA =============== */
.mission-list { display: grid; gap: 0; margin-top: 20px; border-top: 1px solid var(--border); }
.mission-list li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .95rem; }
.mission-list b { font-family: var(--font-head); font-size: 1rem; color: var(--accent-text); min-width: 22px; }

.criteria { display: grid; gap: 14px; margin-top: 24px; }
.criteria-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; font-size: .9rem; font-weight: 500; }

/* Altímetro */
.altitude { display: grid; grid-template-columns: 280px 220px 1fr; gap: 24px; align-items: stretch; }
.cat-list { display: grid; gap: 8px; align-content: start; }
.cat-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s;
}
.cat-btn:hover { border-color: var(--border-strong); }
.cat-btn.active { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); }
.cat-btn b { display: block; font-family: var(--font-head); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; }
.cat-btn small { color: var(--muted); font-size: .8rem; }
.cat-btn .alt { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--c); }

.altimeter {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 1fr auto; gap: 10px;
  padding: 20px 16px 16px; min-height: 440px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.alt-scale { position: relative; }
.alt-scale span { position: absolute; right: 0; transform: translateY(50%); font-family: var(--font-head); font-size: .8rem; color: var(--muted); }
.alt-track { position: relative; width: 4px; justify-self: center; background: var(--border-strong); border-radius: 2px; }
.alt-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--accent); border-radius: 2px; transition: height 1.3s cubic-bezier(.2,.8,.2,1); }
.alt-rocket {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%) rotate(-45deg);
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--surface); color: var(--accent-text);
  transition: bottom 1.3s cubic-bezier(.2,.8,.2,1);
}
.alt-rocket svg { width: 24px; height: 24px; }
.alt-readout { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 12px; text-align: center; }
.alt-readout small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.alt-readout strong { display: block; font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; }
.alt-readout span { font-size: .8rem; color: var(--muted); }

.cat-detail { display: flex; flex-direction: column; }
.cat-detail h3 { font-size: 2rem; margin-top: 10px; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 20px 0; overflow: hidden; }
.spec { padding: 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.spec:nth-child(2n) { border-right: 0; }
.spec:nth-last-child(-n+2) { border-bottom: 0; }
.spec small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.spec strong { font-family: var(--font-head); font-size: 1.35rem; }
.cat-detail .btn { margin-top: auto; align-self: flex-start; }

.offset-card { display: flex; gap: 20px; align-items: flex-start; margin-top: 24px; }
.offset-card .card-icon { margin: 0; }

/* Telemetría CanSat */
.telemetry { margin-top: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.tm-head { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; margin-bottom: 14px; }
.tm-head small { color: var(--muted); font-weight: 400; margin-left: auto; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tm-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; }
.tm-grid div { padding: 10px; border-right: 1px solid var(--border); }
.tm-grid div:last-child { border-right: 0; }
.tm-grid small { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tm-grid strong { font-family: var(--font-head); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
#tmChart { width: 100%; height: 90px; }

/* =============== FORMACIÓN =============== */
.modules { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.module { padding: 28px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.module:nth-child(3n) { border-right: 0; }
.module:nth-last-child(-n+3) { border-bottom: 0; }
.module-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.module-head svg { color: var(--accent-text); width: 20px; height: 20px; }
.module h4 { margin: 0; font-size: 1.1rem; }
.module p { font-size: .9rem; }

/* =============== INSCRIPCIONES =============== */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.price-card { display: flex; flex-direction: column; padding: 36px 32px; background: var(--surface); border-right: 1px solid var(--border); position: relative; }
.price-card:last-child { border-right: 0; }
.price-card.featured { background: var(--surface-2); }
.price-card.featured::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.price-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.price-name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.price { font-family: var(--font-head); font-size: 3.6rem; font-weight: 700; line-height: 1; margin: 12px 0 4px; }
.price small { font-size: 1.1rem; color: var(--muted); font-weight: 600; margin-left: 4px; }
.price-alt { font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.price-card .btn { margin-top: auto; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step { border-top: 1px solid var(--border-strong); padding-top: 20px; }
.process-step .card-num { color: var(--accent-text); margin-bottom: 8px; }

.map-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.map-svg { width: 100%; height: auto; }
.map-shape { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.route line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.city circle { fill: var(--text); stroke: var(--surface); stroke-width: 3; transition: fill .2s; cursor: pointer; }
.city text { font-size: 11px; font-weight: 600; fill: var(--text); font-family: var(--font-body); }
.city.active circle { fill: var(--accent); }
.region-list { display: grid; margin: 24px 0; border-top: 1px solid var(--border); }
.region { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.region span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.region.active span:first-child { color: var(--accent-text); }

/* =============== RANKING =============== */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: end; margin-bottom: 32px; }
.pod { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.pod::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--m); border-radius: var(--radius) var(--radius) 0 0; }
.pod.p1 { padding-top: 40px; }
.pod-pos { font-family: var(--font-head); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--m); }
.pod b { display: block; font-family: var(--font-head); font-size: 1.35rem; text-transform: uppercase; margin-top: 8px; }
.pod small { color: var(--muted); font-size: .84rem; }
.pod .pts { display: block; margin-top: 12px; font-family: var(--font-head); font-size: 1.6rem; }
.rank-controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pos { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.score { display: flex; align-items: center; gap: 10px; }
.score .progress { flex: 1; min-width: 70px; }
.score b { font-family: var(--font-head); font-size: 1.1rem; min-width: 28px; }

/* =============== VOLUNTARIADO =============== */
.vol-progress { margin: 28px 0; }
.vol-progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.vol-progress-head span { font-size: .86rem; color: var(--muted); }
.vol-progress-head strong { font-family: var(--font-head); font-size: 1.8rem; }

/* =============== Responsive =============== */
@media (max-width: 1024px) {
  .altitude { grid-template-columns: 1fr 200px; }
  .cat-detail { grid-column: 1 / -1; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .module:nth-child(n) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .module:nth-child(2n) { border-right: 0; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .benefit:nth-child(n) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .benefit:nth-child(2n) { border-right: 0; }
  .process { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .slide-caption { bottom: 110px; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--border); }
  .fact:nth-child(2), .fact:nth-child(3) { border-bottom: 1px solid var(--border); }
  .fact:nth-child(3) { border-right: 0; }
  .pricing { grid-template-columns: 1fr; }
  .price-card { border-right: 0; border-bottom: 1px solid var(--border); }
  .price-card:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  .hero-carousel { min-height: 600px; height: 92vh; }
  .hero-carousel .carousel-counter { display: none; }
  .altitude { grid-template-columns: 1fr; }
  .altimeter { min-height: 340px; }
  .modules, .benefits, .process { grid-template-columns: 1fr; }
  .module:nth-child(n), .benefit:nth-child(n) { border-right: 0; }
  .tm-grid { grid-template-columns: 1fr 1fr; }
  .tm-grid div:nth-child(2) { border-right: 0; }
  .tm-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .podium { grid-template-columns: 1fr; }
  .podium .p1 { order: -1; }
  .countdown { gap: 10px; }
  .cd-unit span { font-size: 2rem; }
  .criteria-row { grid-template-columns: 100px 1fr; }
}
