/* ═══════════════════════════════════════════════════════════════
   BS PROYECT – Campeonato Argentino de Karting
   Página Web Gemela · Diseño idéntico a la App Mobile
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0A1628;
  color: #FFFFFF;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── COLOR TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:          #0A1628;
  --surface:     #0F2035;
  --surfaceAlt:  #162D50;
  --border:      #1E3A5F;
  --violet:      #1A56DB;
  --violetLight: #3B82F6;
  --cyan:        #38BDF8;
  --cyanDark:    #0284C7;
  --lilac:       #4A6D8C;
  --fuchsia:     #38BDF8;
  --text:        #FFFFFF;
  --textSec:     #94B8E0;
  --textMuted:   #4A6D8C;
  --success:     #00E676;
  --warning:     #FFD600;
  --danger:      #FF4444;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 999px;
}

/* ── UTILITIES ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }

/* ── LOADING SCREEN ────────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 60px;
  gap: 0;
}
.loading-logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin-bottom: 24px;
}
.loading-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 30px;
  line-height: 1.4;
}
.progress-bar-wrapper {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
  width: 0%;
  transition: width 1.5s ease;
}

/* ── APP SHELL (SPA Landing Page – scroll vertical) ────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#app.hidden { display: none; }
#main-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ── TOP HEADER ────────────────────────────────────────────────── */
.top-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.top-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  position: relative;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.header-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}
.header-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  line-height: 1.2;
}
.header-badge {
  font-size: 9px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 1.5px;
  white-space: nowrap;
}

/* ── MAIN NAV (links horizontales) ─────────────────────────────── */
.main-nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.main-nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--textSec);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.main-nav-link:hover {
  color: var(--cyan);
  background: rgba(56,189,248,0.08);
}
.main-nav-link.active {
  color: var(--cyan);
  background: rgba(56,189,248,0.12);
}
.main-nav-link.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

/* ── HAMBURGER (móvil) ─────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s;
}

@media (max-width: 999px) {
  .main-nav { display: none; }
  .nav-toggle { display: none; }
}

/* ── SITE FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  margin-top: 40px;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--textSec);
  font-weight: 600;
}
.footer-privacy {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.footer-privacy:hover { border-color: var(--cyan); }

/* ── PAGE (SPA Landing – todas siempre visibles) ───────────────── */
.page {
  display: block !important;
  min-height: 80vh;
  padding-top: 80px;
  scroll-margin-top: 72px;
}
/* Excepciones: las vistas de detalle siguen siendo modales */
#page-noticia-detalle,
#page-evento-detalle {
  display: none !important;
  min-height: 0;
  padding-top: 0;
}
#page-noticia-detalle.active,
#page-evento-detalle.active {
  display: block !important;
  animation: fadeIn 0.25s ease;
  min-height: calc(100vh - 70px);
}
/* Cuando se abre un detalle, ocultamos TODAS las secciones del landing y
   solo mostramos la vista de detalle activa (igual que la app móvil). */
body.viewing-detail .page { display: none !important; }
body.viewing-detail #page-evento-detalle.active,
body.viewing-detail #page-noticia-detalle.active {
  display: block !important;
  min-height: calc(100vh - 70px);
  padding-top: 0;
}
body.viewing-detail .footer-bar { display: none !important; }
body.viewing-detail .bottom-nav { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ── BOTTOM NAV (mobile tabs) ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.35);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  background: none;
  border: none;
  color: var(--textMuted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}
.nav-btn .nav-icon { color: inherit; }
.nav-btn .nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.nav-btn.active { color: var(--cyan); }
.nav-btn:hover { color: var(--cyan); }
@media (min-width: 1000px) {
  .bottom-nav { display: none; }
  #main-content { padding-bottom: 40px; }
}

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-banner {
  width: 100%;
  line-height: 0;
  background: #FFFFFF;
}
.hero-bg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
}
.hero-content {
  position: relative;
  padding: 28px 16px 24px;
  background: #0A1628;
}
.hero-content > .hero-badge,
.hero-content > .hero-title,
.hero-content > .hero-sub,
.hero-content > .seo-intro,
.hero-content > .weather-bar,
.hero-content > .next-event-card {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 4px;
}
.hero-sub {
  font-size: 16px;
  color: var(--textSec);
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
}
.seo-intro {
  font-size: 13px;
  line-height: 1.45;
  color: var(--textSec);
  text-align: center;
  max-width: 520px;
  margin: 0 auto 18px;
  padding: 0 8px;
}
.seo-intro strong {
  color: var(--text);
  font-weight: 600;
}
.seo-intro a {
  color: var(--cyan);
  text-decoration: underline;
}

/* ── WEATHER BAR ────────────────────────────────────────────────── */
.weather-bar {
  background: rgba(10, 22, 40, 0.88);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.weather-loading { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 12px; }
.weather-inner { display: flex; align-items: center; width: 100%; }
.weather-main { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.weather-temp { font-size: 22px; font-weight: 800; color: #fff; }
.weather-city { font-size: 9px; color: rgba(255, 255, 255, 0.85); text-transform: uppercase; font-weight: 600; }
.v-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.2); margin: 0 14px; }
.weather-details { flex: 1; display: flex; justify-content: space-between; }
.detail-item { display: flex; flex-direction: column; align-items: center; }
.detail-label { font-size: 8px; font-weight: 900; color: var(--cyan); margin-bottom: 2px; }
.detail-val { font-size: 12px; font-weight: 700; color: #fff; }
.weather-error { color: rgba(255, 255, 255, 0.75); font-size: 12px; text-align: center; }

/* ── NEXT EVENT CARD ────────────────────────────────────────────── */
.next-event-card {
  background: rgba(10,22,40,0.9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26,86,219,0.27);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(26,86,219,0.25);
}
.next-event-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.next-event-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-event-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.next-event-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #fff;
}
.btn-ver-calendario {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.btn-ver-calendario:hover { opacity: 0.88; }

/* ── COUNTDOWN (HERO) ───────────────────────────────────────────── */
.timer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
  gap: 4px;
}
.timer-segment { display: flex; flex-direction: column; align-items: center; flex: 1; }
.timer-digit {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  min-width: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.timer-label { font-size: 8px; font-weight: 800; color: var(--cyan); margin-top: 4px; letter-spacing: 1px; }
.timer-sep { font-size: 22px; font-weight: 800; color: rgba(255,255,255,0.3); margin-top: -16px; }

/* ── SECTIONS ───────────────────────────────────────────────────── */
.section { padding: 20px 16px 0; }
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.section-icon { margin-right: 8px; font-size: 15px; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--textMuted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.link-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ── QUICK GRID ─────────────────────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-card {
  border: none;
  border-radius: var(--radius-lg);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s, opacity 0.15s;
  position: relative;
  overflow: hidden;
}
.quick-card:hover { transform: scale(1.03); opacity: 0.92; }
.quick-card.cyan  { background: linear-gradient(135deg, var(--cyan), var(--cyanDark)); }
.quick-card.white { background: linear-gradient(135deg, #FFFFFF, #C8D6E5); color: #0A1628; }
.quick-card.red   { background: linear-gradient(135deg, #CC0000, #880000); }
.quick-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* ── HOME NEWS SCROLL ───────────────────────────────────────────── */
.news-scroll {
  display: flex;
  overflow-x: auto;
  gap: 14px;
  padding: 10px 0;
  scrollbar-width: none;
}
.news-scroll::-webkit-scrollbar { display: none; }
.home-news-card {
  min-width: 200px;
  width: 200px;
  height: 130px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s;
}
.home-news-card:hover { transform: scale(1.02); }
.home-news-card--no-img {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(56, 189, 248, 0.15) 100%);
}
.home-news-card--has-img {
  background-color: var(--surfaceAlt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.home-news-card img,
.home-news-card .home-news-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.home-news-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 45%, transparent 100%);
}
.home-news-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px;
}
.home-news-date { font-size: 10px; font-weight: 800; color: var(--cyan); margin-bottom: 3px; }
.home-news-title { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.4; }

/* ── FOOTER BAR ─────────────────────────────────────────────────── */
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(26,86,219,0.13), rgba(56,189,248,0.07));
  border-radius: var(--radius-md);
  margin: 20px 16px 6px;
  font-size: 12px;
  color: var(--lilac);
  font-weight: 700;
  border: 1px solid rgba(26,86,219,0.2);
}

/* ── PAGE HEADER (inner pages) ──────────────────────────────────── */
.page-header {
  background: linear-gradient(180deg, #0F2035, #0A1628);
  padding: 24px 16px 18px;
  border-bottom: 1px solid var(--border);
}
.page-header-row { display: flex; align-items: center; gap: 10px; }
.page-header-icon { font-size: 24px; }
.page-header-title { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: 0.5px; }
.page-header-sub { font-size: 13px; color: var(--lilac); margin-top: 2px; }
.page-content { padding: 0 16px; }
.section-title-sm {
  font-size: 13px;
  font-weight: 700;
  color: var(--textMuted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 0 8px;
}

/* ── SPINNER ────────────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 12px;
  color: var(--textSec);
  font-size: 14px;
}
.spinner-sm {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EVENT CARD (Calendario) ────────────────────────────────────── */
.event-card {
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #162D50, #0F2035);
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 4px 12px rgba(26,86,219,0.2);
}
.event-card:hover { transform: translateY(-2px); }
.event-card-inner { padding: 16px; }
.event-card-header { display: flex; align-items: center; margin-bottom: 12px; gap: 10px; }
.event-icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.event-name { font-size: 16px; font-weight: 800; color: var(--text); }
.event-date { font-size: 13px; color: var(--cyan); font-weight: 600; margin-top: 2px; }
.event-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.event-info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 13px; color: var(--textSec); }
.event-ver-mas {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; margin-top: 10px;
  font-size: 10px; font-weight: 700; color: var(--cyan);
}
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; opacity: 0.6;
}
.empty-icon { font-size: 50px; margin-bottom: 10px; }
.empty-text { color: var(--textMuted); text-align: center; }

/* ── POSICIONES / CAMPEONATO ────────────────────────────────────── */
.year-tabs-bar {
  display: flex;
  overflow-x: auto;
  padding: 10px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: none;
}
.year-tabs-bar::-webkit-scrollbar { display: none; }
.year-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
  color: var(--textSec);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.year-tab.active {
  background: rgba(255,0,127,0.15);
  border-color: var(--fuchsia);
  color: var(--lilac);
}
.cat-tabs-bar {
  display: flex;
  overflow-x: auto;
  padding: 10px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.cat-tabs-bar::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
  color: var(--textSec);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-tab.active {
  background: rgba(26,86,219,0.2);
  border-color: var(--violet);
  color: var(--lilac);
  font-weight: 700;
}

/* Podium */
.podium-wrapper { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 20px 0; }
.podium-pillar {
  width: 90px; border-radius: var(--radius-md); display: flex;
  flex-direction: column; align-items: center; padding-top: 10px;
  overflow: hidden; border: 1px solid var(--border);
}
.podium-icon { font-size: 24px; margin-bottom: 4px; }
.podium-name { font-size: 11px; color: var(--text); font-weight: 700; text-align: center; padding: 0 6px; }
.podium-pts { font-size: 10px; color: var(--textSec); margin-bottom: 8px; }
.podium-step {
  width: 100%; display: flex; align-items: center; justify-content: center;
  margin-top: auto; font-size: 16px; font-weight: 900; color: #fff;
}
/* Standings table */
.standings-table {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.standings-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.standings-row:last-child { border-bottom: none; }
.standings-row.top3 { border-left: 3px solid; }
.s-pos { width: 28px; text-align: center; font-size: 13px; color: var(--textSec); font-weight: 700; }
.s-num {
  background: var(--surfaceAlt);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--cyan);
  font-weight: 700;
}
.s-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); }
.s-wins { font-size: 11px; color: var(--textMuted); margin-top: 2px; }
.s-pts { font-size: 15px; font-weight: 700; color: var(--text); }

/* ── NOTICIAS ───────────────────────────────────────────────────── */
.news-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(26,86,219,0.15);
}
.news-card-media {
  width: 100%;
  background: var(--surfaceAlt);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}
.news-card-img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  display: block;
  background: var(--surfaceAlt);
}
.news-card-media--detail {
  padding: 0;
  margin-bottom: 18px;
  border-radius: 12px;
  overflow: hidden;
}
.news-detail-img {
  width: 100%;
  height: auto;
  max-height: min(90vh, 960px);
  object-fit: contain;
  border-radius: 12px;
  display: block;
  background: var(--surfaceAlt);
}
.news-card-body { padding: 14px; }
.news-card-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.news-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(26,86,219,0.5);
  background: rgba(26,86,219,0.2);
  font-size: 11px;
  font-weight: 700;
  color: var(--lilac);
}
.news-card-date { font-size: 11px; color: var(--textMuted); }
.news-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.news-card-body-text { font-size: 13px; color: var(--textSec); line-height: 1.6; }
.news-read-more {
  font-size: 12px; color: var(--cyan); margin-top: 8px;
  cursor: pointer; font-weight: 600; background: none; border: none;
  padding: 0;
}

/* ── COUNTDOWN BANNER (Noticias) ────────────────────────────────── */
.countdown-banner {
  background: #0A1628;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(26,86,219,0.33);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-title { font-size: 11px; font-weight: 800; color: var(--lilac); letter-spacing: 2px; margin-bottom: 4px; }
.countdown-event { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; text-align: center; }
.countdown-row { display: flex; align-items: center; gap: 2px; }
.count-block { display: flex; flex-direction: column; align-items: center; }
.count-grad {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet), var(--fuchsia));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: #fff;
}
.count-label { font-size: 9px; font-weight: 700; color: var(--textMuted); margin-top: 4px; letter-spacing: 1px; }
.count-sep { font-size: 22px; font-weight: 900; color: var(--violet); padding: 0 4px; margin-bottom: 14px; }

/* ── INSCRIPCION FORM ───────────────────────────────────────────── */
.form-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0 12px;
  border: 1px solid #dce3eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}
.form-section-label {
  font-size: 12px;
  font-weight: 800;
  color: #0d2a4f;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  margin-top: 4px;
  text-transform: uppercase;
}
.insc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}
.insc-edad-hint {
  font-size: 11px;
  color: #5c6b7a;
  line-height: 1.45;
  margin: -6px 0 10px;
  grid-column: 1 / -1;
}
.input-group { margin-bottom: 12px; }
.input-group-full {
  grid-column: 1 / -1;
}
.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1f2d3d;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #cdd7e1;
  color: #102a43;
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: #2f71d6;
  box-shadow: 0 0 0 2px rgba(47, 113, 214, 0.15);
}
.input-group input::placeholder,
.input-group textarea::placeholder { color: #9aa5b1; }
.tutor-declaration-block {
  display: none;
  margin: 0 0 14px;
  padding: 16px 18px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #dce3eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.tutor-declaration-block.is-visible { display: block; }
.tutor-declaration-title {
  font-size: 12px;
  font-weight: 800;
  color: #0d2a4f;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.tutor-declaration-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}
.tutor-declaration-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #6b46c1;
}
.tutor-declaration-text {
  font-size: 12px;
  line-height: 1.55;
  color: #3d4f5f;
}
.tutor-declaration-text a { color: #0284c7; font-weight: 700; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, var(--fuchsia), var(--violet));
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.2s;
  box-shadow: 0 4px 16px rgba(56,189,248,0.25);
  letter-spacing: 0.5px;
}
.btn-submit:hover { opacity: 0.88; }
.disclaimer { font-size: 11px; color: var(--textMuted); text-align: center; line-height: 1.5; padding: 0 8px 20px; }

/* ── TURNOS ADMINISTRACIÓN ─────────────────────────────────────── */
.turno-admin-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.turno-admin-intro {
  font-size: 13px;
  color: var(--textSecondary);
  line-height: 1.5;
  margin: 8px 0 16px;
}
.turno-event-info {
  background: var(--surfaceAlt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text);
}
.turno-event-info span { color: var(--textMuted); font-size: 13px; }
.turno-whatsapp-lock {
  background: var(--surfaceAlt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  margin-bottom: 16px;
  text-align: center;
}
.turno-whatsapp-lock p {
  margin: 0;
  font-size: 13px;
  color: var(--textSecondary);
  line-height: 1.5;
}
#turno-booking-ui.turno-ui-locked {
  pointer-events: none;
  opacity: 0.45;
}
.turno-empty {
  text-align: center;
  color: var(--textMuted);
  font-style: italic;
  padding: 20px 12px;
}
.turno-step-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  margin: 12px 0 8px;
  letter-spacing: 0.3px;
}
.turno-prefill-hint {
  font-size: 11px;
  color: var(--textMuted);
  margin: 0 0 12px;
}
.turno-dias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.turno-dia-btn {
  min-width: 150px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
  color: var(--textSecondary);
  cursor: pointer;
  text-align: left;
}
.turno-dia-btn.selected {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
}
.turno-dia-btn span { display: block; font-size: 12px; font-weight: 700; }
.turno-dia-btn small { font-size: 10px; opacity: 0.85; }
.turno-horarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.turno-hora-btn {
  min-width: 82px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}
.turno-hora-btn small { display: block; font-size: 9px; font-weight: 600; color: var(--textMuted); margin-top: 2px; }
.turno-hora-btn.selected { border-color: var(--fuchsia); background: rgba(217, 70, 239, 0.15); color: var(--fuchsia); }
.turno-hora-btn.taken { opacity: 0.45; cursor: not-allowed; }
.turno-select-day { font-size: 12px; color: var(--textMuted); font-style: italic; }
.btn-turno { margin-top: 4px; }
.turno-ticket { margin-top: 16px; }
.turno-ticket-inner {
  background: linear-gradient(135deg, #162D50, #0F2035);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
}
.turno-ticket-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.turno-ticket-code {
  font-size: 28px;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 2px;
}
.turno-ticket-hint { text-align: center; font-size: 12px; color: var(--lilac); margin: 4px 0 12px; }
.turno-ticket-inner hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 12px 0; }
.turno-ticket-inner p { font-size: 14px; margin: 6px 0; line-height: 1.4; }
.turno-ticket-footer { font-size: 12px; color: rgba(255,255,255,0.65); font-style: italic; margin-top: 12px; }

@media (min-width: 900px) {
  .insc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
}

/* ── REGLAMENTOS ────────────────────────────────────────────────── */
.reg-card {
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #162D50, #0F2035);
  box-shadow: 0 4px 12px rgba(26,86,219,0.1);
}
.reg-card-inner {
  display: flex; align-items: center; padding: 14px; gap: 12px;
}
.reg-icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; border: 1px solid;
}
.reg-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.reg-meta { display: flex; align-items: center; gap: 8px; }
.reg-badge {
  padding: 2px 8px; border-radius: var(--radius-full);
  border: 1px solid; font-size: 10px; font-weight: 700;
}
.reg-version { font-size: 11px; color: var(--textMuted); }
.reg-btn {
  margin-left: auto;
  background: rgba(26,86,219,0.2);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--lilac);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.reg-btn:hover { opacity: 0.8; }
.info-box {
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
  background: linear-gradient(90deg, rgba(26,86,219,0.13), rgba(56,189,248,0.07));
  border: 1px solid rgba(26,86,219,0.2);
  margin-bottom: 24px;
}
.info-box-title { font-size: 14px; font-weight: 700; color: var(--lilac); margin-bottom: 6px; }
.info-box-text { font-size: 13px; color: var(--textSec); line-height: 1.5; }

/* ── CRONOGRAMA ─────────────────────────────────────────────────── */
.horario-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.horario-card:last-child { border-bottom: none; }
.horario-time {
  min-width: 58px; font-size: 13px; font-weight: 700;
  color: var(--cyan); text-align: right;
}
.horario-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); margin-top: 5px; flex-shrink: 0; }
.horario-name { font-size: 14px; font-weight: 600; color: var(--text); }
.horario-cat { font-size: 12px; color: var(--textMuted); margin-top: 2px; }

/* ── TIEMPOS / TRANSMISION / FORMULARIOS ───────────────────────── */
.live-frame {
  width: 100%; min-height: calc(100vh - 200px);
  border: none; background: #000;
}
.live-dot-row { display: flex; align-items: center; gap: 6px; }
.live-dot-inner { width: 8px; height: 8px; border-radius: 50%; background: var(--fuchsia); animation: pulse 1.2s infinite; }
.live-text { font-size: 11px; font-weight: 800; color: var(--fuchsia); letter-spacing: 1px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.empty-page {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; gap: 14px; text-align: center;
}
.empty-page-icon { font-size: 60px; }
.empty-page-title { font-size: 20px; font-weight: 800; color: var(--text); }
.empty-page-sub { font-size: 14px; color: var(--textSec); line-height: 1.5; }

/* ── EVENTO DETALLE ─────────────────────────────────────────────── */
.back-btn {
  background: none; border: none; color: var(--cyan);
  font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 16px 16px 0; display: block;
}
.detalle-header {
  padding: 16px;
  background: linear-gradient(135deg, #162D50, #0A1628);
  border-bottom: 1px solid var(--border);
}
.detalle-badge {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
  border: 1px solid; font-size: 11px; font-weight: 800;
  text-transform: uppercase; margin-bottom: 10px;
}
.detalle-title { font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.detalle-date { font-size: 15px; color: var(--cyan); font-weight: 700; margin-bottom: 14px; }
.detalle-info { display: flex; flex-direction: column; gap: 8px; }
.detalle-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--textSec); }
.btn-maps {
  display: block; width: 100%; margin-top: 20px; padding: 14px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border: none; border-radius: var(--radius-md); color: #fff;
  font-size: 14px; font-weight: 800; text-align: center; cursor: pointer;
  text-decoration: none; transition: opacity 0.2s;
}
.btn-maps:hover { opacity: 0.88; }

/* ── EVENTO DETALLE v2 (espejo de la app React Native) ─────────── */
.ev-hero {
  background: linear-gradient(135deg, var(--violet), var(--fuchsia));
  padding: 40px 20px 60px;
  text-align: center;
  color: #fff;
  position: relative;
}
.ev-hero-icon { color: #fff; margin-bottom: 8px; opacity: 0.95; }
.ev-hero-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.ev-hero-date { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.85); }
.ev-hero-lugar { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 6px; }

.ev-content {
  padding: 20px 16px 0;
  margin-top: -30px;
  position: relative;
}

.ev-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #162D50, #0F2035);
  border: 1px solid var(--border);
  border-left: 5px solid var(--violet);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, opacity 0.15s;
  box-shadow: 0 4px 12px rgba(26,86,219,0.15);
}
.ev-menu-btn:hover:not(:disabled) { transform: translateX(2px); }
.ev-menu-btn.is-disabled,
.ev-menu-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ev-menu-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ev-menu-label {
  flex: 1;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #fff;
}
.ev-menu-chev { color: var(--textMuted); display: inline-flex; }

.ev-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}
.ev-section-title {
  font-size: 11px;
  font-weight: 900;
  color: var(--textSec);
  letter-spacing: 2px;
}
.ev-section-badge {
  background: var(--surfaceAlt);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.ev-inscriptos-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
}
.ev-inscriptos-empty {
  color: var(--textMuted);
  text-align: center;
  padding: 28px 16px;
  font-style: italic;
  font-size: 13px;
}
.ev-insc-cat-group {
  border-top: 1px solid var(--border);
}
.ev-insc-cat-group.is-first { border-top: none; }
.ev-insc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.85);
}
.ev-insc-cat-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--textSec);
}
.ev-insc-cat-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--textMuted);
}
.ev-piloto-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  gap: 10px;
}
.ev-piloto-row:first-child { border-top: none; }
.ev-piloto-num {
  min-width: 48px;
  color: var(--cyan);
  font-weight: 900;
  font-size: 15px;
}
.ev-piloto-info { flex: 1; }
.ev-piloto-nombre { color: #fff; font-size: 15px; font-weight: 700; }
.ev-piloto-cat { color: var(--textSec); font-size: 12px; margin-top: 2px; }

.ev-result-btn {
  width: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #162D50, #0F2035);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, opacity 0.15s;
}
.ev-result-btn:hover:not(:disabled) { transform: translateX(2px); }
.ev-result-btn.is-disabled,
.ev-result-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ev-result-info { flex: 1; }
.ev-result-name { color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.5px; }
.ev-result-status { color: var(--textMuted); font-size: 10px; margin-top: 3px; font-weight: 600; letter-spacing: 0.5px; }

/* ── RESPONSIVE (desktop) ───────────────────────────────────────── */
@media (min-width: 600px) {
  .quick-grid { grid-template-columns: repeat(5, 1fr); }
  .hero-title { font-size: 32px; }
  .podium-pillar { width: 110px; }
}
@media (min-width: 1000px) {
  .hero-title { font-size: 40px; }
  .hero-content { padding: 36px 24px 32px; }
  .quick-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .quick-card { padding: 28px 14px; font-size: 13px; }
  .quick-icon-circle { width: 60px; height: 60px; }
  .page-header { padding: 36px 24px 24px; }
  .page-header-title { font-size: 32px; }
  .page-content { padding: 0 24px; }
  .section { padding: 28px 24px 0; }
}

/* ── Modal consentimiento web ───────────────────────────────────── */
.web-consent-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.web-consent-modal.is-visible { display: flex; }
.web-consent-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.web-consent-header {
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(108,99,255,0.85), rgba(224,64,251,0.55));
}
.web-consent-header h2 { color: #fff; font-size: 20px; margin: 0 0 8px; }
.web-consent-header p { color: rgba(255,255,255,0.85); font-size: 13px; margin: 0; line-height: 1.4; }
.web-consent-body { padding: 20px; font-size: 13px; line-height: 1.5; color: var(--textSec); }
.web-consent-body p { margin: 0 0 12px; }
.web-consent-legal { font-size: 11px; color: var(--textMuted); text-align: center; margin-top: 8px !important; }
.web-consent-legal a { color: var(--cyan); }
.web-consent-actions { padding: 0 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.web-consent-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.web-consent-btn.primary {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #fff;
}
.web-consent-btn.secondary {
  background: transparent;
  color: var(--textMuted);
}
