/* 
  ALGETE FIESTAS 2026 — TEMA CLARO ACCESIBLE
  Para todos los públicos: legible, intuitivo, limpio.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  /* Paleta clara */
  --bg-page:    #f5f4f0;
  --bg-white:   #ffffff;
  --bg-subtle:  #f0ede8;
  --bg-hover:   #ece9e3;

  /* Acento: azul marino elegante */
  --accent:        #1a4a8a;
  --accent-light:  rgba(26, 74, 138, 0.10);
  --accent-border: rgba(26, 74, 138, 0.25);

  /* Acento secundario: verde oliva para La Ruta */
  --ruta-color:        #5a7a3a;
  --ruta-light:        rgba(90, 122, 58, 0.10);
  --ruta-border:       rgba(90, 122, 58, 0.28);

  /* Texto */
  --text-1: #1a1a18;
  --text-2: #5c5b56;
  --text-3: #9b9990;

  /* Bordes */
  --border:       rgba(0, 0, 0, 0.09);
  --border-med:   rgba(0, 0, 0, 0.15);

  /* Geometría */
  --radius-s:    8px;
  --radius-m:    14px;
  --radius-l:    20px;
  --radius-pill: 9999px;

  --shadow-s: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-m: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-l: 0 8px 28px rgba(0,0,0,0.12);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ──────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--bg-page);
  color: var(--text-1);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body.app-shell {
  min-height: 100dvh;
  padding-top: 62px;
  padding-bottom: 80px;
  background: var(--bg-page);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── TOP APP BAR ─────────────────────────────── */
.top-app-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-s);
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
}

.brand-badge { display: flex; align-items: center; gap: 0.65rem; }

.app-shield { height: 32px; width: auto; }

.app-titles { display: flex; flex-direction: column; gap: 0.05rem; }

.app-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.2px;
  line-height: 1;
}

.app-tagline {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-m);
  background: var(--bg-subtle);
  border: 1px solid var(--border-med);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-1);
  display: block;
}

.icon-btn:hover, .icon-btn.active {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.icon-btn.active svg {
  stroke: var(--accent);
}

/* ── SEARCH DRAWER ───────────────────────────── */
.search-drawer {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem 0.65rem;
  animation: fadeSlideDown 0.2s var(--ease);
}

.search-input-wrap { position: relative; }

.search-input-wrap svg {
  position: absolute; left: 0.8rem; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-3);
}

.search-input-wrap input {
  width: 100%;
  padding: 0.75rem 2.2rem 0.75rem 2.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-m);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-input-wrap input::placeholder { color: var(--text-3); }
.search-input-wrap input:focus { border-color: var(--accent); background: #fff; }

.clear-btn {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: var(--text-3); border: none;
  color: #fff; width: 22px; height: 22px;
  border-radius: 50%; font-size: 0.72rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ── MINI COUNTDOWN (TOP BAR) ────────────────── */
.countdown-mini {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  cursor: default;
  white-space: nowrap;
}

.cd-mini-icon {
  font-size: 0.78rem;
  opacity: 0.7;
}

.cd-mini-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* ── HERO BANNER ─────────────────────────────── */
.hero-banner {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0 1rem;
}

.hero-inner {
  display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 0.75rem;
}

.hero-dates-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  font-size: 0.82rem; font-weight: 700; color: var(--accent);
}

.status-dot {
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }

.hero-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.15;
}

/* ── COUNTDOWN ───────────────────────────────── */
.compact-countdown {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-l);
  padding: 0.85rem 1.5rem;
  box-shadow: var(--shadow-s);
}

.cd-label {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-3); letter-spacing: 0.4px; text-transform: uppercase;
}

.cd-timer { display: flex; align-items: center; gap: 0.35rem; }

.cd-digit-box {
  background: var(--bg-white);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.7rem;
  min-width: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  box-shadow: var(--shadow-s);
}

.cd-digit-box span {
  font-family: var(--font-sans);
  font-size: 1.4rem; font-weight: 800;
  color: var(--accent); line-height: 1; letter-spacing: -1px;
}

.cd-digit-box small {
  font-size: 0.6rem; font-weight: 700;
  color: var(--text-3); letter-spacing: 0.4px;
}

.cd-colon {
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-3); margin-bottom: 1rem;
}

/* ── SEGMENTED CONTROL (DÍAS) ────────────────── */
.segmented-control-wrapper {
  position: sticky; top: 60px; z-index: 800;
  background: rgba(245, 244, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.5rem 0 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  transition: top 0.2s var(--ease);
}

body.search-open .segmented-control-wrapper {
  top: 118px;
}

.segmented-control {
  display: flex;
  background: var(--bg-white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.25rem;
  box-shadow: var(--shadow-s);
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.segmented-control::-webkit-scrollbar { display: none; }

.segment-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.segment-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-1);
}

.segment-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(26, 74, 138, 0.28);
}

/* ── CATEGORY CHIPS ──────────────────────────── */
.category-strip { margin-bottom: 1.25rem; }

.chip-scroll {
  display: flex; gap: 0.4rem;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.chip-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
  white-space: nowrap;
  padding: 0.45rem 1rem;
  background: var(--bg-white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-s);
}

.cat-chip:hover { background: var(--bg-subtle); color: var(--text-1); }

.cat-chip.active {
  background: var(--accent);
  color: #fff; border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(192,57,43,0.25);
}

/* ── DAY GROUPS ──────────────────────────────── */
.day-group { margin-bottom: 2rem; scroll-margin-top: 140px; }

.day-header-sticky {
  display: flex; align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.day-title-pill {
  font-size: 1.05rem; font-weight: 800; color: var(--text-1);
}

.cards-stack { display: flex; flex-direction: column; gap: 0.6rem; }

/* ── EVENT CARDS ─────────────────────────────── */
.event-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1rem;
  box-shadow: var(--shadow-s);
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}

.event-card:hover {
  box-shadow: var(--shadow-m);
  border-color: var(--border-med);
}

.featured-event {
  border-color: var(--accent-border);
  background: linear-gradient(to right, var(--accent-light) 0%, var(--bg-white) 45%);
}

.featured-event::before {
  content: '';
  position: absolute; top: 10px; bottom: 10px; left: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.card-time-column {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.55rem 0.4rem;
  text-align: center;
}

.time-text {
  font-family: var(--font-sans);
  font-size: 1.15rem; font-weight: 800;
  color: var(--accent); line-height: 1; letter-spacing: -0.5px;
}

.time-label {
  font-size: 0.6rem; color: var(--text-3);
  font-weight: 700; margin-top: 0.25rem;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.card-main {
  display: flex; flex-direction: column; gap: 0.35rem; justify-content: center;
}

.card-top {
  display: flex; align-items: center; justify-content: space-between;
}

/* Badges */
.badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.3px;
}

.cat-desfile    { background: #e8f4f8; color: #1a6b8a; }
.cat-deporte    { background: #e8f6ee; color: #1a7a4a; }
.cat-pirotecnia { background: #fef3e2; color: #a05c00; }
.cat-musica     { background: #f3eafd; color: #6b2fa0; }
.cat-toros      { background: var(--accent-light); color: var(--accent); }
.cat-infantil   { background: #e8f0fd; color: #1e4fa0; }
.cat-gastronomia{ background: #fdf0e8; color: #9a3f00; }
.cat-religion   { background: #f5edfb; color: #7a2fa0; }
.cat-ruta       { background: #eaf3e6; color: #3d6a25; }
.cat-penas      { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* Tarjetas de Eventos de Peñas (Destacado sutil) */
.event-penas {
  background: linear-gradient(135deg, #ffffff 0%, #fffaf5 50%, #fff7ed 100%);
  border-color: #fdba74;
}

.event-penas::before {
  content: '';
  position: absolute; top: 10px; bottom: 10px; left: 0;
  width: 4px;
  background: linear-gradient(180deg, #f97316, #ea580c);
  border-radius: 0 4px 4px 0;
}

.event-penas .card-time-column {
  background: #fff7ed;
  border-color: #fed7aa;
}

.event-penas .time-text {
  color: #ea580c;
}

.card-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text-1); line-height: 1.3;
}

.card-desc { font-size: 0.88rem; color: var(--text-2); line-height: 1.45; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.location-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: none; border: none;
  color: var(--text-3); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; padding: 0;
  transition: color 0.15s;
}
.location-btn:hover { color: var(--accent); }

.time-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

/* ── LA RUTA — PÁGINA COMPLETA ───────────────── */
.ruta-page {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1rem 0 2rem;
  animation: fadeIn 0.25s ease;
}

/* Hero de La Ruta */
.ruta-hero-card {
  background: var(--bg-white);
  border: 1.5px solid var(--ruta-border);
  border-radius: var(--radius-l);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-m);
}

.ruta-hero-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--ruta-color);
}

.ruta-badge {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  color: var(--ruta-color);
  background: var(--ruta-light);
  border: 1px solid var(--ruta-border);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.ruta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.ruta-subtitle {
  font-size: 0.95rem; color: var(--text-2);
  line-height: 1.6; max-width: 560px; margin: 0 auto;
}

.ruta-hero-actions {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
}

.share-ruta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ruta-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-s);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.share-ruta-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.share-ruta-btn:active {
  transform: translateY(0);
}

/* Sección schedule */
.ruta-section-title {
  font-size: 0.85rem; font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 0.85rem;
}

.ruta-schedule-box {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.35rem;
  box-shadow: var(--shadow-s);
}

/* Timeline — aspecto de lista, NO de botón */
.ruta-timeline { display: flex; flex-direction: column; }

.ruta-time-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.ruta-time-item:last-child { border-bottom: none; }

/* Sin hover, sin cursor pointer — no son clickables */
.ruta-time-item.highlight-item {
  background: none;
}

.ruta-time-badge {
  font-size: 0.85rem; font-weight: 800;
  color: var(--ruta-color);
  white-space: nowrap;
  min-width: 100px;
  padding-top: 0.1rem;
}

.ruta-time-detail h4 {
  font-size: 1rem; font-weight: 700; color: var(--text-1); margin-bottom: 0.2rem;
}

.ruta-time-detail p { font-size: 0.86rem; color: var(--text-2); line-height: 1.45; }

/* Progress bar */
.ruta-progress-track {
  width: 100%; height: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 0.6rem 0 1rem;
}

.ruta-progress-fill {
  height: 100%;
  background: var(--ruta-color);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease);
}

/* Bars section */
.ruta-bars-section {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-l);
  padding: 1.35rem;
  box-shadow: var(--shadow-s);
}

/* ── LIVE RUTA TRACKER CARD ── */
.ruta-live-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: var(--radius-m);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  animation: fadeIn 0.3s ease;
}

.live-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.live-indicator-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #ef4444; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.live-time-now {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.live-bar-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.live-bar-address {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.live-bar-schedule {
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 700;
}

.live-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.live-action-btn-maps {
  background: #ef4444;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.live-action-btn-maps:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.live-action-btn-scroll {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}
.live-action-btn-scroll:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Estado de bar en directo en el listado */
.bar-card.is-live-now {
  background: #fff;
  border: 2px solid #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.28);
  position: relative;
  transform: scale(1.01);
}

.bar-card.is-live-now::after {
  content: '🔴 EN DIRECTO';
  position: absolute;
  top: -9px;
  right: 12px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulseLiveBadge 2s infinite ease-in-out;
}

@keyframes pulseLiveBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bar-card.is-live-now .bar-num {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.bar-card.is-live-now .bar-time {
  color: #ef4444;
  font-weight: 900;
}

.ruta-bars-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.3rem;
}

.ruta-counter-tag {
  font-size: 0.82rem; font-weight: 700;
  color: var(--ruta-color);
  background: var(--ruta-light);
  border: 1px solid var(--ruta-border);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
}

.ruta-bars-sub { font-size: 0.85rem; color: var(--text-3); margin-bottom: 1rem; }

/* Bars grid */
.bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.55rem;
}

.bar-card {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  /* Claramente interactivo: borde visible + sombra suave */
}

.bar-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-med);
  box-shadow: var(--shadow-s);
}

.bar-card.visited {
  background: var(--ruta-light);
  border-color: var(--ruta-border);
}

.bar-num {
  width: 32px; height: 32px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-med);
  border-radius: 50%;
  font-size: 0.85rem; font-weight: 800;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.bar-card.visited .bar-num {
  background: var(--ruta-color);
  border-color: var(--ruta-color);
  color: #fff;
}

.bar-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }

.bar-time {
  font-size: 0.72rem; font-weight: 700;
  color: var(--ruta-color); letter-spacing: 0.1px;
}

.bar-name {
  font-size: 0.95rem; font-weight: 700; color: var(--text-1); line-height: 1.2;
}

.bar-addr { font-size: 0.74rem; color: var(--text-3); }

.map-link-btn {
  font-size: 0.76rem; color: var(--accent);
  text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.15rem;
  transition: color 0.15s;
}
.map-link-btn:hover { text-decoration: underline; }

.visit-check-btn {
  background: transparent; border: none;
  font-size: 1.4rem;
  opacity: 0.3; cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1;
}
.bar-card.visited .visit-check-btn { opacity: 1; transform: scale(1.1); }

/* ── INFO SECTION ────────────────────────────── */
.info-tab-content {
  padding: 0.75rem 0 2rem;
  animation: fadeIn 0.25s ease;
}

.info-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.info-block-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  box-shadow: var(--shadow-s);
}

.info-icon-circle { font-size: 1.8rem; }
.info-block-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-1); }
.info-block-card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }

.info-tag-box {
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-2);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-s);
}

.info-bullets {
  padding-left: 1.1rem;
  font-size: 0.86rem; color: var(--text-2);
  display: flex; flex-direction: column; gap: 0.3rem;
}

.warning-text { font-size: 0.78rem; color: #b45309; font-weight: 600; }

.emergency-card { border-color: rgba(26,74,138,0.3); }

.emergency-buttons { display: flex; flex-direction: column; gap: 0.45rem; }

.call-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--text-1); text-decoration: none;
  font-size: 0.9rem; font-weight: 600;
  transition: background 0.15s;
}
.call-btn:hover { background: var(--bg-hover); }
.call-btn.emergency-main {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 800;
}

/* ── BOTTOM NAV ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 900; height: 72px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1.5px solid rgba(0, 0, 0, 0.08);
  display: flex; align-items: stretch; justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.09);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  flex: 1;
  background: transparent; border: none;
  color: var(--text-3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
  position: relative;
  padding: 0.35rem 0;
}

.nav-icon {
  width: 23px; height: 23px;
  stroke: currentColor;
  transition: transform 0.2s ease, stroke-width 0.2s ease;
}

.nav-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.bottom-nav-item:hover {
  color: var(--text-1);
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-1px) scale(1.08);
}

.bottom-nav-item.active .nav-label {
  font-weight: 800;
  color: var(--text-1);
}

/* Indicador de pestaña activa superior */
.bottom-nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 22%; right: 22%;
  height: 3px; background: var(--accent);
  border-radius: 0 0 4px 4px;
}

/* Ruta: acento verde */
#nav-item-ruta.active { color: var(--ruta-color); }
#nav-item-ruta.active::before { background: var(--ruta-color); }

/* Deportes: acento naranja/dorado */
#nav-item-sports.active { color: #d97706; }
#nav-item-sports.active::before { background: #d97706; }

/* ── DEPORTES & CAMPEONATOS SECTION ──────────── */
.sports-page {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1rem 0 2rem;
  animation: fadeIn 0.25s ease;
}

.sports-hero-card {
  background: var(--bg-white);
  border: 1.5px solid #fef3c7;
  border-radius: var(--radius-l);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-m);
  position: relative;
  overflow: hidden;
}

.sports-hero-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.sports-hero-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.8rem;
}

.sports-pill {
  font-size: 0.78rem; font-weight: 700;
  color: #b45309; background: #fef3c7;
  padding: 0.3rem 0.85rem; border-radius: var(--radius-pill);
}

.sports-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 400; color: var(--text-1);
  line-height: 1.15; margin-bottom: 0.5rem;
}

.sports-hero-desc {
  font-size: 0.92rem; color: var(--text-2); line-height: 1.5;
}

/* Category Filter dentro de Deportes */
.sports-category-filter {
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding-bottom: 0.5rem; scrollbar-width: none;
}
.sports-category-filter::-webkit-scrollbar { display: none; }

.sport-cat-chip {
  flex: 0 0 auto;
  padding: 0.45rem 0.9rem;
  background: var(--bg-white);
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 700;
  color: var(--text-2); cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sport-cat-chip.active {
  background: #d97706; color: #fff;
  border-color: #d97706;
}

/* Sports Cards Grid */
.sports-cards-grid {
  display: flex; flex-direction: column; gap: 1rem;
}

.sport-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-m);
  padding: 1.25rem 1.25rem 1.15rem;
  box-shadow: var(--shadow-s);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sport-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}

.sport-card-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.5rem;
}

.sport-badge {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0.25rem 0.6rem;
  border-radius: var(--radius-s);
}

.badge-juegos   { background: #ede9fe; color: #6d28d9; }
.badge-futbol   { background: #e0f2fe; color: #0369a1; }
.badge-raqueta  { background: #ecfdf5; color: #047857; }
.badge-baloncesto{ background: #ffedd5; color: #c2410c; }
.badge-patinaje { background: #fce7f3; color: #be185d; }
.badge-otros    { background: #f1f5f9; color: #475569; }

.sport-date-tag {
  font-size: 0.78rem; font-weight: 700; color: #d97706;
}

.sport-card-title {
  font-size: 1.05rem; font-weight: 800; color: var(--text-1);
  line-height: 1.3; margin: 0;
}

.sport-card-desc {
  font-size: 0.88rem; color: var(--text-2); line-height: 1.45;
  margin: 0;
}

.sport-details {
  display: flex; flex-direction: column; gap: 0.35rem;
  margin-top: 0.25rem; padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem; color: var(--text-2);
}

.sport-detail-row {
  display: flex; align-items: flex-start; gap: 0.45rem;
  line-height: 1.4;
}

.detail-icon { flex-shrink: 0; font-size: 0.9rem; }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state-card {
  text-align: center; padding: 3.5rem 1rem;
  background: var(--bg-white);
  border: 1.5px dashed var(--border-med);
  border-radius: var(--radius-l);
  margin-bottom: 2rem; box-shadow: var(--shadow-s);
}
.empty-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.empty-state-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-1); margin-bottom: 0.3rem; }
.empty-state-card p { font-size: 0.88rem; color: var(--text-2); margin-bottom: 1.25rem; }

.btn-secondary {
  padding: 0.6rem 1.4rem;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-m);
  color: var(--text-1);
  font-family: var(--font-sans); font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg-hover); }

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a18;
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 1100;
  box-shadow: var(--shadow-l);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: toastFadeUp 0.25s var(--ease);
  white-space: nowrap;
}

@keyframes toastFadeUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── FIREWORKS & CELEBRATION ─────────────────── */
.fireworks-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1300;
}

.celebration-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 15, 25, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1350;
  animation: fadeIn 0.25s var(--ease);
}

.celebration-card {
  background: #ffffff;
  border-radius: var(--radius-l);
  padding: 2rem 1.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 3px solid #f1c40f;
  animation: popScale 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popScale {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.celebration-icon {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  animation: bounce 1s infinite alternate ease-in-out;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.celebration-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #1a1a18;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.celebration-subtitle {
  font-size: 0.95rem;
  color: var(--text-2);
  margin-bottom: 0.75rem;
}

.celebration-body {
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

.celebration-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #1a4a8a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-m);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 74, 138, 0.35);
  transition: transform 0.15s, background 0.15s;
}

.celebration-btn:hover {
  background: #133868;
  transform: translateY(-1px);
}

/* ── UTILITIES ───────────────────────────────── */
.hidden { display: none !important; }

@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeSlideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 600px) {
  .segment-btn { flex: 0 0 auto; min-width: 64px; scroll-snap-align: center; }
  .event-card { grid-template-columns: 65px 1fr; gap: 0.8rem; padding: 0.9rem; }
  .time-text { font-size: 1rem; }
  .ruta-time-item { flex-direction: column; gap: 0.3rem; }
  .ruta-time-badge { min-width: auto; }
  .bars-grid { grid-template-columns: 1fr; }
  .cd-digit-box { min-width: 44px; padding: 0.4rem 0.5rem; }
  .cd-digit-box span { font-size: 1.2rem; }
}
