/* ============================================================
   TrovaTreno.it — Futuristic Station Theme
   Design: dark ambient + neon accents + high readability
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
    --primary: #00b4ff;
    --primary-dark: #0090cc;
    --primary-light: rgba(0,180,255,0.08);
    --primary-glow: rgba(0,180,255,0.15);
    --secondary: #ffb800;
    --ok: #00e676;
    --ok-bg: rgba(0,230,118,0.1);
    --warn: #ffab00;
    --warn-bg: rgba(255,171,0,0.1);
    --danger: #ff3d57;
    --danger-bg: rgba(255,61,87,0.1);
    --text: #eaf0f6;
    --text-muted: #8899aa;
    --bg: #0a0e17;
    --bg-white: #0f1522;
    --bg-card: #131a2b;
    --bg-elevated: #182035;
    --border: #1e2a40;
    --border-light: #1a2438;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(0,180,255,0.08);
    --font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
    --max-w: 1200px;
    --transition: 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: var(--text); }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-white); }
.section-cta { background: linear-gradient(135deg, #002244 0%, #001133 100%); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pt-0 { padding-top: 1rem; }
.mt-05 { margin-top: 0.5rem; }
.mt-025 { margin-top: 0.25rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.text-center, .center { text-align: center; }
.block { display: block; }
.rounded { border-radius: var(--radius-sm); }
.opacity-60 { opacity: 0.6; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-split { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; }
.grid-content-sidebar { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-content-sidebar { grid-template-columns: 1fr; }
    .grid-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .section { padding: 2rem 0; }
}

/* ── Typography ────────────────────────────────────────── */
.page-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.page-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-top: 0.5rem; }
.section-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: #fff; }
.section-desc { color: var(--text-muted); margin-top: 0.25rem; }
.subsection-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; color: #fff; }
.sidebar-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; color: #fff; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-white { color: #fff; }
.text-white-muted { color: rgba(255,255,255,0.6); }
.text-white-hint { color: rgba(255,255,255,0.35); font-size: 0.8rem; margin-top: 0.75rem; }
.text-sm { font-size: 0.8rem; }
.text-gradient { background: linear-gradient(135deg, var(--primary), var(--ok)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.font-bold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0.02em; }
.link-primary { color: var(--primary); font-weight: 500; font-size: 0.85rem; }
.link-primary:hover { text-decoration: underline; text-shadow: 0 0 8px rgba(0,180,255,0.3); }
.border-top { border-top: 1px solid var(--border); }

/* ── Navbar ────────────────────────────────────────────── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10,14,23,0.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); transition: box-shadow var(--transition); }
.nav-scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.nav-logo { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), #0070cc); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(0,180,255,0.2); }
.nav-brand-text { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.nav-links { display: flex; gap: 0.15rem; }
.nav-link { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); transition: all var(--transition); }
.nav-link:hover, .nav-active { color: var(--primary); background: var(--primary-light); }
.nav-toggle { display: none; padding: 0.5rem; background: none; border: none; cursor: pointer; color: var(--text); }

@media (max-width: 900px) {
    .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0.75rem 1.25rem; box-shadow: var(--shadow-lg); }
    .nav-links.nav-open { display: flex; }
    .nav-link { padding: 0.7rem 0.5rem; }
    .nav-toggle { display: block; }
}

/* ── Hero ──────────────────────────────────────────────── */
.hero { padding: 6.5rem 0 3rem; background: var(--bg); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(0,180,255,0.06) 0%, transparent 60%); }
.hero::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.hero-content { text-align: center; margin-bottom: 2rem; position: relative; }
.hero-title { font-family: var(--font-display); font-size: 2.8rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1rem; color: #fff; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 540px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--primary-light); color: var(--primary); font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.9rem; border-radius: 99px; margin-bottom: 1rem; border: 1px solid rgba(0,180,255,0.15); }
.hero-search { max-width: 900px; margin: 0 auto; position: relative; }
.hero-quicklinks { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.quicklink { font-size: 0.78rem; padding: 0.35rem 0.9rem; border-radius: 99px; border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-card); transition: all var(--transition); }
.quicklink:hover { color: var(--primary); border-color: var(--primary); box-shadow: 0 0 10px rgba(0,180,255,0.1); }

@media (max-width: 768px) { .hero-title { font-size: 2rem; } .hero { padding: 5rem 0 2rem; } }

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb { padding: 1rem 0; font-size: 0.82rem; color: var(--text-muted); margin-top: 60px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-body { padding: 1.25rem; }
.card-elevated { box-shadow: var(--shadow-lg); border-color: var(--border); background: var(--bg-elevated); }
.card-hover { transition: all var(--transition); }
.card-hover:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); border-color: rgba(0,180,255,0.3); }
.card-accent { border-left: 3px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; }
.card-cta { background: linear-gradient(135deg, #001a33, #002244); color: #fff; border-color: rgba(0,180,255,0.2); }
.card-stat { text-align: center; }
.stat-big { font-size: 1.5rem; font-weight: 700; display: block; color: #fff; }
.card-strike { border-left: 4px solid transparent; }
.border-danger { border-left-color: var(--danger) !important; }
.border-warn { border-left-color: var(--warn) !important; }

/* ── Badges ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 99px; line-height: 1.4; letter-spacing: 0.02em; text-transform: uppercase; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(0,230,118,0.2); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(255,171,0,0.2); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255,61,87,0.2); }
.badge-muted { background: rgba(136,153,170,0.1); color: var(--text-muted); border: 1px solid var(--border); }
.badge-primary { background: var(--primary); color: #000; font-weight: 700; }
.badge-italo { background: #8b1a2b; color: #fff; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; animation: pulse 2s ease-in-out infinite; box-shadow: 0 0 6px var(--ok); }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:0.4} }

/* ── Buttons ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font-weight: 600; font-size: 0.88rem; padding: 0.6rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn-primary { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 700; }
.btn-primary:hover { background: #33c4ff; box-shadow: 0 0 16px rgba(0,180,255,0.3); }
.btn-secondary { background: var(--secondary); color: #000; font-weight: 700; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: var(--primary-light); color: var(--primary); border: none; }
.btn-ghost:hover { background: var(--primary); color: #000; }
.btn-glass { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.15); }
.btn-glass:hover { background: rgba(255,255,255,0.12); }
.btn-sm { font-size: 0.8rem; padding: 0.4rem 0.9rem; }
.btn-block { width: 100%; }
.btn-search { white-space: nowrap; height: 48px; }

/* ── Search form ───────────────────────────────────────── */
.search-tabs { display: flex; gap: 0.25rem; background: var(--bg); padding: 0.25rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; border: 1px solid var(--border); }
.search-tab { flex: 1; padding: 0.5rem; font-size: 0.82rem; font-weight: 500; text-align: center; border: none; background: none; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); transition: all var(--transition); }
.search-tab.active { background: var(--primary); color: #000; font-weight: 600; box-shadow: 0 0 10px rgba(0,180,255,0.2); }
.search-panel { display: none; }
.search-panel.active { display: block; }
.search-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.search-field { display: flex; flex-direction: column; }
.search-field label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }
.search-field input, .search-field select { height: 48px; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; background: var(--bg); color: var(--text); transition: border-color var(--transition); }
.search-field input:focus, .search-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,180,255,0.1); }
.search-field select option { background: var(--bg-card); color: var(--text); }
.flex-1 { flex: 1; min-width: 150px; }
.w-date { width: 160px; }
.w-pax { width: 140px; }
.w-tipo { width: 140px; }
.btn-swap { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); margin-bottom: 4px; transition: all var(--transition); }
.btn-swap:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.search-compact .search-row { gap: 0.5rem; }

@media (max-width: 768px) {
    .search-row { flex-direction: column; }
    .w-date, .w-pax, .w-tipo, .flex-1 { width: 100%; min-width: 100%; }
    .btn-swap { align-self: center; }
}

/* ── Stats bar ─────────────────────────────────────────── */
.stats-bar { padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { display: flex; align-items: center; gap: 0.75rem; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0,180,255,0.15); }
.stat-value { font-size: 1.35rem; font-weight: 700; display: block; line-height: 1.2; color: #fff; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }

/* ── Table ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: 0.85rem; }
.table th { text-align: left; padding: 0.65rem 1rem; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: var(--bg); }
.table td { padding: 0.7rem 1rem; border-top: 1px solid var(--border); }
.table tr:hover { background: rgba(0,180,255,0.03); }
.row-struck td { opacity: 0.4; text-decoration: line-through; }

/* ── Board (station display) ───────────────────────────── */
.board-card { overflow: hidden; border: 1px solid rgba(0,180,255,0.15); }
.board-header { background: linear-gradient(135deg, #0a1628, #0d1f3c); color: var(--primary); font-family: var(--font-mono); font-size: 0.78rem; padding: 0.7rem 1rem; display: flex; justify-content: space-between; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid rgba(0,180,255,0.15); }
.board-tabs { display: flex; gap: 0.5rem; }
.board-tab { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.25rem; font-size: 0.88rem; font-weight: 500; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-card); text-decoration: none; transition: all var(--transition); }
.board-tab:hover { border-color: var(--primary); color: var(--primary); }
.board-tab.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 600; box-shadow: 0 0 12px rgba(0,180,255,0.2); }

/* ── Routes ────────────────────────────────────────────── */
.route-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; font-size: 1rem; }
.route-arrow { color: var(--primary); font-weight: 500; }
.route-details { display: flex; flex-direction: column; gap: 0.6rem; }
.route-detail { display: flex; justify-content: space-between; font-size: 0.85rem; }
.tratta-header { margin-bottom: 1.5rem; margin-top: 60px; }
.tratta-badges { display: flex; gap: 0.4rem; margin: 0.5rem 0; }
.station-header { display: flex; gap: 1rem; align-items: flex-start; margin-top: 60px; margin-bottom: 2rem; }
.station-icon-big { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #0070cc); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 20px rgba(0,180,255,0.15); }
.station-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Stops timeline ────────────────────────────────────── */
.stops-timeline { padding-left: 1.25rem; }
.stop-item { position: relative; padding-bottom: 1.25rem; padding-left: 0.5rem; }
.stop-item:last-child { padding-bottom: 0; }
.stop-dot { position: absolute; left: -1.1rem; top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-card); }
.stop-dot-active { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 6px rgba(0,180,255,0.4); }
.stop-line { position: absolute; left: -0.7rem; top: 0.85rem; bottom: -0.4rem; width: 2px; background: var(--border); }

/* ── Punctuality bars ──────────────────────────────────── */
.pct-row { margin-bottom: 0.9rem; }
.pct-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.35rem; }
.pct-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.pct-bar-sm { height: 5px; }
.pct-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }
.fill-ok { background: var(--ok); box-shadow: 0 0 8px rgba(0,230,118,0.3); }
.fill-warn { background: var(--warn); box-shadow: 0 0 8px rgba(255,171,0,0.3); }
.fill-danger { background: var(--danger); box-shadow: 0 0 8px rgba(255,61,87,0.3); }

/* ── Strikes ───────────────────────────────────────────── */
.strike-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.strike-info { flex: 1; }
.strike-date { font-size: 1rem; color: #fff; }
.strike-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-item { margin-bottom: 0.5rem; }
.faq-question { cursor: pointer; font-size: 0.9rem; color: var(--text); }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { color: var(--primary); }
.faq-answer { font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.75rem; line-height: 1.6; }

/* ── Station/connection cards ──────────────────────────── */
.station-row { display: flex; align-items: center; gap: 0.9rem; }
.station-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); border: 1px solid rgba(0,180,255,0.15); }
.card-station:hover .station-icon { background: var(--primary); color: #000; box-shadow: 0 0 12px rgba(0,180,255,0.3); }
.station-info { flex: 1; min-width: 0; }
.station-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.station-info .text-muted { font-size: 0.8rem; display: block; }
.connection-row { display: flex; align-items: center; justify-content: space-between; }
.connection-row > div { display: flex; flex-direction: column; }
.connection-row .text-muted { font-size: 0.8rem; }

/* ── Services list ─────────────────────────────────────── */
.services-list { display: flex; flex-direction: column; gap: 0.6rem; }
.service-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; }

/* ── Tips list ─────────────────────────────────────────── */
.tips-list { display: flex; flex-direction: column; gap: 0.6rem; }
.tips-list li { position: relative; padding-left: 1.5rem; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.tips-list li::before { content: '\2713'; position: absolute; left: 0; color: var(--ok); font-weight: 600; }

/* ── Offers ────────────────────────────────────────────── */
.offer-title { font-size: 1.1rem; font-weight: 600; margin: 0.5rem 0 0.25rem; color: #fff; }
.bg-red-50 { background: rgba(255,61,87,0.06); border-color: rgba(255,61,87,0.2); }
.bg-amber-50 { background: rgba(255,184,0,0.06); border-color: rgba(255,184,0,0.2); }
.bg-blue-50 { background: rgba(0,180,255,0.06); border-color: rgba(0,180,255,0.2); }
.bg-green-50 { background: rgba(0,230,118,0.06); border-color: rgba(0,230,118,0.2); }

/* ── CTA / Newsletter ──────────────────────────────────── */
.newsletter-form { display: flex; gap: 0.5rem; max-width: 440px; margin: 0 auto; }
.input-newsletter { flex: 1; height: 48px; padding: 0 1rem; border-radius: var(--radius-sm); border: 1px solid rgba(0,180,255,0.2); background: rgba(0,180,255,0.05); color: #fff; font-size: 0.95rem; }
.input-newsletter::placeholder { color: var(--text-muted); }
.input-dark { width: 100%; height: 40px; padding: 0 0.75rem; border-radius: var(--radius-sm); border: 1px solid rgba(0,180,255,0.2); background: rgba(0,180,255,0.05); color: #fff; }
.input-dark::placeholder { color: var(--text-muted); }
.alert-signup { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.alert-form { display: flex; gap: 0.5rem; flex: 1; min-width: 280px; }
.alert-form input { flex: 1; height: 40px; padding: 0 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
@media (max-width: 640px) { .newsletter-form { flex-direction: column; } .alert-signup { flex-direction: column; align-items: stretch; } }

/* ── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; background: var(--bg-white); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; line-height: 1.5; }
.footer-heading { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.78rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1rem; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--primary); }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }

/* ── Sortable tables ───────────────────────────────────── */
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; transition: color var(--transition); }
.th-sort:hover { color: var(--primary); }
.sort-icon { font-size: 0.7rem; opacity: 0.4; margin-left: 0.2rem; }
.th-sort.sort-asc .sort-icon,
.th-sort.sort-desc .sort-icon { opacity: 1; color: var(--primary); }

/* ── Filter bar ────────────────────────────────────────── */
.filters-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.filter-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-right: 0.25rem; }
.filter-chip { font-size: 0.76rem; font-weight: 500; padding: 0.3rem 0.75rem; border-radius: 99px; border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-card); transition: all var(--transition); text-decoration: none; }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 600; }

/* ── Card active state ─────────────────────────────────── */
.card-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,180,255,0.15), var(--shadow-glow); }

/* ── Misc / Dark mode utilities ────────────────────────── */
.bg-muted { background: var(--bg-white); }
::selection { background: rgba(0,180,255,0.3); color: #fff; }
input::placeholder { color: var(--text-muted); }

/* ── Light Theme ───────────────────────────────────────── */
[data-theme="light"] {
    --primary: #0066cc;
    --primary-dark: #004d99;
    --primary-light: rgba(0,102,204,0.08);
    --primary-glow: rgba(0,102,204,0.12);
    --secondary: #e6a817;
    --ok: #1a9e6f;
    --ok-bg: rgba(26,158,111,0.08);
    --warn: #d4880e;
    --warn-bg: rgba(212,136,14,0.08);
    --danger: #c53030;
    --danger-bg: rgba(197,48,48,0.08);
    --text: #1a1f2b;
    --text-muted: #6b7280;
    --bg: #f5f7fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f9fafb;
    --border: #dfe3ea;
    --border-light: #edf0f5;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 40px rgba(0,50,100,0.08);
    --shadow-glow: 0 4px 16px rgba(0,102,204,0.1);
}

/* ── Navbar ── */
[data-theme="light"] .navbar { background: rgba(255,255,255,0.92); border-bottom-color: #dfe3ea; }
[data-theme="light"] .nav-scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
[data-theme="light"] .nav-brand-text { color: #1a1f2b; }
[data-theme="light"] .nav-link { color: #4b5563; }
[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-active { color: #0066cc; }
[data-theme="light"] .nav-logo { box-shadow: none; }
[data-theme="light"] .nav-toggle { color: #1a1f2b; }

/* ── Hero ── */
[data-theme="light"] .hero::before { background: radial-gradient(ellipse at 50% 0%, rgba(0,102,204,0.06) 0%, transparent 60%); }
[data-theme="light"] .hero-title { color: #1a1f2b; }
[data-theme="light"] .hero-badge { background: rgba(0,102,204,0.08); border-color: rgba(0,102,204,0.15); }
[data-theme="light"] .quicklink { background: #fff; color: #4b5563; border-color: #dfe3ea; }
[data-theme="light"] .quicklink:hover { color: #0066cc; border-color: #0066cc; box-shadow: 0 0 10px rgba(0,102,204,0.08); }

/* ── Typography — all hardcoded #fff text ── */
[data-theme="light"] .page-title, [data-theme="light"] .section-title,
[data-theme="light"] .subsection-title, [data-theme="light"] .sidebar-title,
[data-theme="light"] .offer-title, [data-theme="light"] .station-info strong,
[data-theme="light"] .strike-date { color: #1a1f2b; }
[data-theme="light"] .stat-big, [data-theme="light"] .stat-value { color: #1a1f2b; }
[data-theme="light"] .text-white { color: #1a1f2b; }
[data-theme="light"] .text-white-muted { color: #6b7280; }
[data-theme="light"] .text-white-hint { color: #9ca3af; }

/* ── Cards ── */
[data-theme="light"] .card { background: #fff; border-color: #dfe3ea; }
[data-theme="light"] .card-hover:hover { box-shadow: 0 4px 16px rgba(0,102,204,0.1); border-color: rgba(0,102,204,0.3); }
[data-theme="light"] .card-cta { background: linear-gradient(135deg, #0066cc, #004d99); color: #fff; }
[data-theme="light"] .card-cta .text-white, [data-theme="light"] .card-cta .stat-big,
[data-theme="light"] .card-cta .page-title, [data-theme="light"] .card-cta .section-title { color: #fff; }

/* ── Badges ── */
[data-theme="light"] .badge-ok { background: rgba(26,158,111,0.1); color: #1a9e6f; border-color: rgba(26,158,111,0.2); }
[data-theme="light"] .badge-warn { background: rgba(212,136,14,0.1); color: #d4880e; border-color: rgba(212,136,14,0.2); }
[data-theme="light"] .badge-danger { background: rgba(197,48,48,0.1); color: #c53030; border-color: rgba(197,48,48,0.2); }
[data-theme="light"] .badge-muted { background: #f3f4f6; color: #6b7280; border-color: #dfe3ea; }
[data-theme="light"] .badge-primary { background: var(--primary); color: #fff; }

/* ── Filters & Chips ── */
[data-theme="light"] .filter-chip { background: #fff; color: #4b5563; border-color: #dfe3ea; }
[data-theme="light"] .filter-chip:hover { border-color: #0066cc; color: #0066cc; }
[data-theme="light"] .filter-chip.active { background: var(--primary); color: #fff; }

/* ── Board tabs ── */
[data-theme="light"] .board-header { background: #1e293b; color: #94a3b8; }
[data-theme="light"] .board-card { border-color: #dfe3ea; }
[data-theme="light"] .board-tab { background: #fff; color: #4b5563; }
[data-theme="light"] .board-tab.active { background: var(--primary); color: #fff; }

/* ── Buttons ── */
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 4px 12px rgba(0,102,204,0.3); }
[data-theme="light"] .btn-outline { color: #1a1f2b; border-color: #dfe3ea; }
[data-theme="light"] .btn-outline:hover { border-color: #0066cc; color: #0066cc; }
[data-theme="light"] .btn-ghost { background: rgba(0,102,204,0.08); color: #0066cc; }
[data-theme="light"] .btn-ghost:hover { background: #0066cc; color: #fff; }
[data-theme="light"] .btn-glass { background: rgba(0,0,0,0.04); color: #1a1f2b; border-color: #dfe3ea; }
[data-theme="light"] .btn-glass:hover { background: rgba(0,0,0,0.08); }
[data-theme="light"] .btn-swap { background: #fff; border-color: #dfe3ea; color: #6b7280; }
[data-theme="light"] .btn-swap:hover { background: rgba(0,102,204,0.08); color: #0066cc; border-color: #0066cc; }

/* ── Search form ── */
[data-theme="light"] .search-tabs { background: #f5f7fa; border-color: #dfe3ea; }
[data-theme="light"] .search-tab { color: #6b7280; }
[data-theme="light"] .search-tab.active { background: var(--primary); color: #fff; box-shadow: none; }
[data-theme="light"] .search-field input, [data-theme="light"] .search-field select { background: #fff; color: #1a1f2b; border-color: #dfe3ea; }
[data-theme="light"] .search-field input:focus, [data-theme="light"] .search-field select:focus { border-color: #0066cc; box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
[data-theme="light"] .search-field select option { background: #fff; color: #1a1f2b; }

/* ── Table ── */
[data-theme="light"] .table th { background: #f9fafb; color: #6b7280; }
[data-theme="light"] .table td { border-top-color: #edf0f5; color: #1a1f2b; }
[data-theme="light"] .table tr:hover { background: rgba(0,102,204,0.03); }

/* ── Stats bar ── */
[data-theme="light"] .stats-bar { background: #fff; border-color: #dfe3ea; }
[data-theme="light"] .stat-icon { background: rgba(0,102,204,0.08); border-color: rgba(0,102,204,0.12); }

/* ── Stops timeline ── */
[data-theme="light"] .stop-dot { border-color: #dfe3ea; background: #fff; }
[data-theme="light"] .stop-dot-active { border-color: #0066cc; background: #0066cc; box-shadow: 0 0 4px rgba(0,102,204,0.3); }
[data-theme="light"] .stop-line { background: #dfe3ea; }

/* ── Punctuality bars ── */
[data-theme="light"] .pct-bar { background: #f3f4f6; border-color: #dfe3ea; }
[data-theme="light"] .fill-ok { box-shadow: none; }
[data-theme="light"] .fill-warn { box-shadow: none; }
[data-theme="light"] .fill-danger { box-shadow: none; }

/* ── Station cards ── */
[data-theme="light"] .station-icon { background: rgba(0,102,204,0.08); border-color: rgba(0,102,204,0.12); }
[data-theme="light"] .card-station:hover .station-icon { background: #0066cc; color: #fff; box-shadow: 0 0 12px rgba(0,102,204,0.2); }

/* ── Section CTA / Newsletter ── */
[data-theme="light"] .section-cta { background: linear-gradient(135deg, #0066cc, #004d99); }
[data-theme="light"] .section-cta .page-title, [data-theme="light"] .section-cta .section-title,
[data-theme="light"] .section-cta .text-white, [data-theme="light"] .section-cta .text-white-muted,
[data-theme="light"] .section-cta .text-white-hint { color: rgba(255,255,255,0.9); }
[data-theme="light"] .section-cta .page-title, [data-theme="light"] .section-cta .section-title { color: #fff; }
[data-theme="light"] .input-newsletter { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.25); }
[data-theme="light"] .input-dark { background: #fff; color: #1a1f2b; border-color: #dfe3ea; }

/* ── Alert form inputs ── */
[data-theme="light"] .alert-form input { background: #fff; color: #1a1f2b; border-color: #dfe3ea; }

/* ── FAQ ── */
[data-theme="light"] .faq-question { color: #1a1f2b; }
[data-theme="light"] .faq-answer { color: #4b5563; border-top-color: #edf0f5; }

/* ── Offers coloured backgrounds ── */
[data-theme="light"] .bg-red-50 { background: rgba(197,48,48,0.04); border-color: rgba(197,48,48,0.15); }
[data-theme="light"] .bg-amber-50 { background: rgba(212,136,14,0.04); border-color: rgba(212,136,14,0.15); }
[data-theme="light"] .bg-blue-50 { background: rgba(0,102,204,0.04); border-color: rgba(0,102,204,0.15); }
[data-theme="light"] .bg-green-50 { background: rgba(26,158,111,0.04); border-color: rgba(26,158,111,0.15); }

/* ── Footer ── */
[data-theme="light"] .footer { background: #fff; border-top-color: #dfe3ea; }
[data-theme="light"] .footer-heading { color: #0066cc; }
[data-theme="light"] .footer-bottom { border-top-color: #edf0f5; }

/* ── Misc ── */
[data-theme="light"] ::selection { background: rgba(0,102,204,0.2); color: #1a1f2b; }
[data-theme="light"] .bg-muted { background: #f5f7fa; }
[data-theme="light"] .card-active { border-color: #0066cc; box-shadow: 0 0 0 2px rgba(0,102,204,0.12), 0 4px 16px rgba(0,102,204,0.08); }
[data-theme="light"] .route-arrow { color: #0066cc; }
[data-theme="light"] .link-primary { color: #0066cc; }
[data-theme="light"] .link-primary:hover { text-shadow: none; }

/* ── Theme toggle button ───────────────────────────────── */
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all 0.2s ease; margin-left: 0.5rem; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
