:root {
    --bvg-yellow: #F0D722;
    --bvg-black: #000000;
    --bvg-dark: #333333;
    --font-stack: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body { 
    font-family: var(--font-stack); 
    background: #f2f2f2; 
    margin: 0; 
    color: #000; 
    line-height: 1.4;
}

/* --- HERO BACKGROUND --- */
.hero-background {
    background-color: #333;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; 
    min-height: auto; 
    padding-top: 20px;
    padding-bottom: 100px;
}

/* --- COPYRIGHT BUTTON & POPUP --- */
.copyright-wrapper {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.copyright-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.copyright-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.copyright-popup {
    background: white;
    color: #333;
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    white-space: nowrap;
}

/* --- HEADER --- */
.bvg-main-header {
    background-color: white;
    width: 95%;
    max-width: 1300px;
    border-radius: 8px;
    padding: 15px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 100;
    position: relative;
    overflow: visible; 
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- LOGO (Kreisel + Text) --- */
.brand-logo { 
    text-decoration: none; 
    color: black; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.logo-icon {
    width: 55px; 
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spiral-svg {
    width: 100%;
    height: 100%;
    overflow: visible; 
}

.brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-weight: 900;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--bvg-black);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bvg-dark);
    text-transform: uppercase;
}

/* Mobile Anpassung für das Logo */
@media (max-width: 600px) {
    .brand-title { font-size: 1.1rem; }
    .brand-subtitle { font-size: 0.7rem; }
    .logo-icon { width: 40px; height: 40px; }
}

/* NAV */
.desktop-nav { display: flex; gap: 30px; }
.nav-link {
    text-decoration: none; color: black; font-weight: 700;
    font-size: 1rem; position: relative; padding-bottom: 5px;
}
.nav-link:hover, .nav-link.active { box-shadow: inset 0 -3px 0 0 black; }

/* ICONS */
.header-icons { display: flex; gap: 15px; align-items: center; }
.icon-btn {
    background: none; border: none; font-size: 1.2rem;
    cursor: pointer; color: black; padding: 5px; transition: transform 0.2s;
}
.icon-btn:hover { transform: scale(1.1); }


/* --- HERO STAGE (GELBER KASTEN) --- */
.hero-stage {
    width: 100%;
    max-width: 1300px;
    margin-top: 60px;
    display: flex;
    justify-content: flex-start;
    padding: 0 30px;
    z-index: 50;
}

.yellow-teaser {
    background-color: var(--bvg-yellow);
    padding: 40px;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: var(--bvg-black);
    animation: fadeIn 0.8s ease-out;
}

.teaser-label {
    font-size: 0.9rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 10px; display: block;
}

.yellow-teaser h1 {
    font-size: 2.2rem; font-weight: 900; line-height: 1.1; margin: 0 0 30px 0;
}

.teaser-btn {
    display: inline-block; background-color: white; color: var(--bvg-black);
    text-decoration: none; font-weight: 800; padding: 15px 30px;
    border-radius: 4px; font-size: 1.1rem; transition: transform 0.2s, box-shadow 0.2s;
}
.teaser-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.teaser-btn i { margin-left: 10px; }

/* --- MAIN CONTENT (FAHRPLAN) --- */
.main-content {
    width: 100%;
    max-width: 800px;
    padding: 0 15px;
    margin: 0 auto;
    margin-top: -60px; 
    position: relative;
    z-index: 10;
}

.search-card {
    background: white;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 4px;
}

.hidden { display: none !important; }

/* --- TABS --- */
.search-tabs { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 25px; }
.tab-btn {
    flex: 1; background: none; border: none; padding: 15px;
    font-size: 1rem; font-weight: 700; color: #666; cursor: pointer;
    text-transform: uppercase; border-bottom: 4px solid transparent;
}
.tab-btn.active { border-bottom-color: var(--bvg-yellow); color: black; }

/* --- INPUTS --- */
.routing-container, .form-grid { display: flex; flex-direction: column; gap: 20px; }
.route-inputs { display: flex; flex-direction: column; gap: 15px; }

.route-input-group, .input-wrapper { position: relative; }

/* Container für das Datum */
.input-wrapper.small { 
    background: white; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    border-bottom: 2px solid #ccc; /* Etwas dickerer Boden für Konsistenz */
    position: relative; /* Wichtig für Icon-Positionierung */
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
}

.input-wrapper.small:focus-within {
    border-color: var(--bvg-black);
    border-bottom-color: var(--bvg-black);
}

/* Das Datumsfeld selbst */
.input-wrapper.small input[type="date"] {
    width: 100%;
    border: none;           /* Standard-Rahmen weg */
    background: transparent; 
    padding: 15px 15px 15px 45px; /* 45px links Platz lassen für das Icon */
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 700;       /* Fett, passend zum Rest */
    color: var(--bvg-black);
    outline: none;
    cursor: pointer;
    appearance: none;        /* Browser-Standard-Styling entfernen */
    -webkit-appearance: none; /* Wichtig für iOS */
    min-height: 52px;        /* Gleiche Höhe wie die anderen Inputs */
}

/* Das Icon links (Kalender) */
.input-wrapper.small i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    pointer-events: none; /* Klicks gehen durch auf das Input */
    font-size: 1.1rem;
}

/* Optional: Den browser-eigenen Kalender-Pfeil rechts etwas hübscher machen */
.input-wrapper.small input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    font-size: 1.2rem;
    padding: 5px;
}

.input-wrapper.small input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}


/* Text Inputs */
.route-input-group input {
    width: 100%; padding: 15px 15px 15px 45px;
    font-size: 1rem; border: 1px solid #ccc; font-family: var(--font-stack); font-weight: 600;
    box-sizing: border-box; border-radius: 4px;
}
.icon-left { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #666; }

/* Select Inputs */
.input-wrapper { background: #f8f8f8; border-bottom: 3px solid #ccc; transition: border-color 0.2s; }
.input-wrapper:focus-within { border-bottom-color: black; }
.input-wrapper select {
    width: 100%; padding: 15px 15px 15px 45px; background: transparent; border: none;
    font-size: 1rem; font-weight: 600; appearance: none; cursor: pointer; font-family: var(--font-stack);
}
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: black; }
.input-wrapper .arrow { left: auto; right: 15px; font-size: 0.8rem; pointer-events: none; }

.input-group label {
    display: block; font-size: 0.75rem; font-weight: 900;
    color: var(--bvg-dark); margin-bottom: 8px; letter-spacing: 0.5px;
}

.input-wrapper.small { background: white; border: 1px solid #ccc; border-radius: 4px; border-bottom: 1px solid #ccc; }

.swap-btn { align-self: center; background: none; border: none; cursor: pointer; padding: 5px; color: #666; font-size: 1.2rem; }

/* --- BUTTONS --- */
.bvg-button {
    background: var(--bvg-yellow); border: none; padding: 15px; width: 100%;
    font-size: 1.1rem; font-weight: 800; text-transform: uppercase; cursor: pointer;
    transition: background 0.2s; border-radius: 4px;
}
.bvg-button:hover { background-color: #e6ce20; }

/* --- AUTOCOMPLETE --- */
.suggestions-list {
    position: absolute; top: 100%; left: 0; right: 0; background: white;
    border: 1px solid #ccc; list-style: none; margin: 0; padding: 0; z-index: 100;
    max-height: 200px; overflow-y: auto; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.suggestions-list li { padding: 10px 15px; cursor: pointer; border-bottom: 1px solid #eee; }
.suggestions-list li:hover { background: #eee; }

/* --- NÄCHSTE VERBINDUNG (HIGHLIGHT) --- */
#next-trip-container { margin-bottom: 30px; }
#next-trip-container h3 {
    font-family: 'Inter', sans-serif; font-weight: 900; font-size: 1.1rem; 
    text-transform: uppercase; color: var(--bvg-black); margin: 0 0 15px 0; letter-spacing: 0.5px;
}
#next-trip-container h3::before {
    content: ''; display: inline-block; width: 10px; height: 10px;
    background-color: #4CAF50; border-radius: 50%; margin-right: 10px;
}
#next-trip-card .trip-card {
    border-left: 6px solid #4CAF50; 
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* --- ERGEBNISSE --- */
.results-section { margin-top: 30px; }
#result-header { font-weight: 900; font-size: 1.5rem; text-transform: uppercase; margin-bottom: 20px; }

.trip-card {
    background: white; border-left: 6px solid var(--bvg-yellow);
    margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; border-radius: 4px;
}

/* HEADER DER KARTE */
.trip-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 15px 20px;
    gap: 15px;
}

.trip-header > div:first-child {
    display: flex;
    align-items: center;
    flex-shrink: 0; 
    white-space: nowrap; 
}

.trip-time {
    font-size: 1.4rem;
    font-weight: 700;
    margin-right: 10px;
    min-width: 60px; 
    text-align: left;
}

.trip-header > div:last-child {
    text-align: right;
    font-size: 0.9rem;
    line-height: 1.2;
    flex-grow: 1;
    word-break: break-word;
}

.trip-line {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 6px;
    margin-right: 12px; 
    min-width: 55px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background-color: var(--bvg-black);
    color: var(--bvg-yellow);
}

.line-tram { background-color: #E3000B; color: white; }
.line-bus { background-color: #9040A5; color: white; }

.next-badge {
    background-color: #4CAF50; color: white; font-size: 0.7rem; padding: 3px 6px;
    border-radius: 4px; margin-right: 5px; text-transform: uppercase; font-weight: 900;
}

/* Animationen & Live Info */
@keyframes pulse-green { 0%{box-shadow:0 0 0 0 rgba(76,175,80,0.7)} 70%{box-shadow:0 0 0 6px rgba(76,175,80,0)} 100%{box-shadow:0 0 0 0 rgba(76,175,80,0)} }
@keyframes pulse-purple { 0%{box-shadow:0 0 0 0 rgba(144,64,165,0.7)} 70%{box-shadow:0 0 0 6px rgba(144,64,165,0)} 100%{box-shadow:0 0 0 0 rgba(144,64,165,0)} }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.live-info {
    font-size: 0.9rem; font-weight: 700; padding: 3px 8px; border-radius: 4px;
    background-color: #eee; color: #666;
}
.live-info.good { background-color: #e8f5e9; color: #2e7d32; }
.live-info.urgent { background-color: #4CAF50; color: white; animation: pulse-green 1.5s infinite; }
.live-info.now { background-color: #9040A5; color: white; animation: pulse-purple 1s infinite; text-transform: uppercase; }

/* --- TIMELINE (DETAILS) --- */
.trip-details { display: none; border-top: 1px solid #eee; }
.trip-card.open .trip-details { display: block; }

.stop-row {
    display: flex; align-items: stretch; padding: 12px 15px;
    background-color: white; position: relative;
}
.stop-row:nth-child(even) { background-color: #f7f9fa; }

.timeline-col {
    width: 40px; position: relative; display: flex;
    flex-direction: column; align-items: center; margin-right: 10px;
}
.timeline-line {
    position: absolute; top: 0; bottom: 0; width: 2px;
    background-color: #d0d0d0; left: 50%; transform: translateX(-50%); z-index: 1;
}
.stop-row:first-child .timeline-line { top: 50%; }
.stop-row:last-child .timeline-line { bottom: 50%; }

.timeline-point {
    width: 14px; height: 14px; border-radius: 50%;
    border: 3px solid #F0D722; background: white; z-index: 2;
    margin-top: 4px; box-sizing: border-box;
}
.stop-row:last-child .timeline-point { background: #222; border-color: #222; }

.stop-name { flex-grow: 1; font-size: 1rem; color: #333; display: flex; align-items: center; }
.stop-time {
    font-weight: 800; color: #000; font-size: 1rem;
    min-width: 50px; text-align: right; display: flex; align-items: center; justify-content: flex-end;
}
.stop-time.late-night { color: #666; }

/* --- FOOTER --- */
.bvg-footer {
    margin-top: 50px; padding: 40px 20px; background-color: white;
    border-top: 4px solid var(--bvg-yellow); text-align: center;
    color: #666; font-size: 0.9rem; line-height: 1.6;
}
.footer-content { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.footer-row strong { color: var(--bvg-black); font-weight: 700; }

/* MOBILE GENERAL */
@media (max-width: 900px) {
    /* desktop-nav: display: none wurde entfernt, damit Links sichtbar bleiben */
    .bvg-main-header { width: 100%; border-radius: 0; padding: 10px 15px; }
    .hero-stage { padding: 0 15px; justify-content: center; }
    .yellow-teaser { width: 100%; text-align: center; }
    .yellow-teaser h1 { font-size: 1.8rem; }
    .route-inputs { flex-direction: column; align-items: stretch; }
    .swap-btn { transform: rotate(90deg); align-self: center; }
}

/* --- NEWS TICKER --- */
.news-container {
    background-color: var(--bvg-black);
    color: var(--bvg-yellow);
    border-radius: 4px;
    margin-bottom: 20px; 
    display: flex;
    align-items: stretch;
    overflow: hidden;
    height: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.news-title {
    background-color: #E3000B; 
    color: white;
    font-weight: 900;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    background-color: #fafaf7; 
    color: #000;
    display: flex;
    align-items: center;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    position: absolute;
    animation: ticker-slide 20s linear infinite;
    font-weight: 600;
    font-size: 0.95rem;
    padding-left: 100%;
}

@keyframes ticker-slide {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.news-separator {
    color: #E3000B;
    margin: 0 20px;
    font-weight: 900;
}

/* --- TICKET PAGE STYLES --- */
.hero-background.sub-page {
    min-height: 50vh;
    padding-bottom: 40px;
}

.ticket-page {
    margin-top: 0; 
    padding-top: 40px;
    padding-bottom: 60px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-left: 5px solid var(--bvg-yellow);
    padding-left: 15px;
}

.ticket-section {
    margin-bottom: 60px;
}

/* DEUTSCHLANDTICKET BANNER */
.d-ticket-banner {
    background: linear-gradient(135deg, #F0D722 0%, #ffeb3b 100%);
    color: var(--bvg-black);
    padding: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.dt-content h2 {
    font-weight: 900;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}

.dt-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.dt-badge {
    background: var(--bvg-black);
    color: var(--bvg-yellow);
    font-size: 2.5rem;
    font-weight: 900;
    padding: 15px 25px;
    border-radius: 50%;
    transform: rotate(-10deg);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.white-btn {
    background-color: white !important;
    color: black !important;
    width: auto !important;
    display: inline-block;
}

/* TICKET GRID */
.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.ticket-card {
    background: white;
    border: 1px solid #eee;
    border-top: 6px solid var(--bvg-yellow);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.ticket-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.ticket-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--bvg-black);
}

.ticket-body {
    padding: 20px;
    flex-grow: 1;
}

.ticket-features {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
}

.ticket-features li {
    margin-bottom: 8px;
}

.ticket-features i {
    color: #4CAF50;
    margin-right: 8px;
}

.ticket-footer {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

/* Buttons in Cards */
.bvg-button.outline {
    background: transparent;
    border: 2px solid var(--bvg-black);
    color: var(--bvg-black);
}
.bvg-button.outline:hover {
    background: var(--bvg-black);
    color: white;
}

.info-note {
    background: #eef;
    padding: 15px;
    border-radius: 4px;
    color: #335;
    font-size: 0.85rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Mobile Anpassung Ticket Seite */
@media (max-width: 600px) {
    .d-ticket-banner { text-align: center; justify-content: center; }
    .dt-badge { margin-top: 10px; }
}

/* --- TICKET DOWNLOADS --- */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.download-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--bvg-black);
    transition: all 0.2s;
    border-left: 5px solid var(--bvg-black);
}

.download-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
    border-left-color: var(--bvg-yellow);
}

.download-card i {
    font-size: 2rem;
    margin-right: 15px;
    color: #e3000b; 
}

/* --- AUTOMATEN --- */
.machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.machine-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #eee;
}

.machine-item i {
    color: var(--bvg-yellow);
    background: var(--bvg-black);
    padding: 8px;
    border-radius: 50%;
    font-size: 0.9rem;
}

/* --- SHOPS / VORVERKAUF --- */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.shop-card {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-top: 4px solid #ddd;
}

.shop-card.highlight {
    border-top-color: var(--bvg-yellow);
    background-color: #fffdf0;
}

.shop-card h4 {
    margin: 0 0 10px 0;
    font-weight: 800;
}

.shop-card p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #555;
}

.shop-stop {
    margin-top: 10px !important;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    font-weight: 600;
    color: var(--bvg-black) !important;
}

/* --- FIX FÜR DEN HEADER CONTAINER --- */
#global-header-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ------------------------- */
/*  HAMBURGER MENU (MOBILE)  */
/* ------------------------- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 999;
}

.hamburger-btn span {
    width: 28px;
    height: 3px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation für "X" */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* MOBILE NAV */
.mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 75px;
    right: 15px;
    background: white;
    width: 200px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 998;
}

.mobile-nav a {
    padding: 12px 0;
    font-weight: 800;
    text-decoration: none;
    color: black;
    border-bottom: 1px solid #ddd;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* Sichtbarkeit ab mobiler Breite */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
    .hamburger-btn {
        display: flex;
    }
}

/* FOOTER NAVIGATION */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--bvg-black);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.6;
}

/* Mobil etwas schmaler */
@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================================= */
/* NEU: STYLES FÜR DEN VERBESSERTEN ABFAHRTSMONITOR */
/* ========================================================= */

/* 1. Button "Mehr laden" */
.load-more-container {
    text-align: center;
    padding: 25px 0 10px 0;
    animation: fadeIn 0.5s ease-out;
}

.btn-load-more {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px; /* Pill Shape */
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-load-more:hover {
    border-color: var(--bvg-yellow);
    color: black;
    background-color: #fffdf0; /* Ganz helles Gelb */
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.btn-load-more i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.btn-load-more:hover i {
    transform: translateY(3px); /* Pfeil bewegt sich leicht nach unten */
}

/* 2. Wartezeit-Anzeige im Detailbereich */
/* Das haben wir in app.js als Inline-Style eingefügt, 
   aber hier können wir es noch verfeinern, falls nötig. */
.transfer-wait-info {
    font-weight: normal;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 3. Animation für nachgeladene Items */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Hilfsklasse für JS (wird beim Nachladen gesetzt) */
.animate-in {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* 4. Leerer Zustand verschönern */
#no-data-msg {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ccc;
    margin-top: 20px;
}

/* 5. Highlight-Bereich etwas abheben */
#next-trip-card .trip-card {
    border-left: 8px solid #4CAF50; /* Dickerer grüner Rand */
    background: #fff;
    /* Optional: Ein leichter grüner Glow für das Highlight */
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.15); 
}

/* ========================================= */
/* UX-VERBESSERUNG: STATION MONITOR */
/* ========================================= */

/* 1. Haupt-Bereich (Haltestelle) */
.main-search-area {
    margin-bottom: 20px;
}

.main-label {
    font-size: 1.1rem; /* Größer als normale Labels */
    font-weight: 900;
    color: #000;
    margin-bottom: 10px;
    display: block;
}

/* Das Eingabefeld markanter machen */
.route-input-group.main-input input {
    border: 2px solid #000; /* Dickerer schwarzer Rand */
    padding: 18px 15px 18px 45px; /* Etwas höher */
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.route-input-group.main-input input:focus {
    border-color: var(--bvg-yellow);
    box-shadow: 0 4px 15px rgba(240, 215, 34, 0.3);
    outline: none;
}

.icon-right-deco {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    pointer-events: none;
}

/* 2. Filter-Box (Optionaler Look) */
.filter-box {
    background-color: #f4f4f4; /* Ganz leichtes Grau */
    border: 1px dashed #ccc;   /* Gestrichelter Rand signalisiert "Optional" */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.filter-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Nebeneinander */
    gap: 15px;
}

/* Kleinere Inputs für die Filter */
.input-wrapper.small-filter {
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    height: 40px; /* Kompakter */
}

.input-wrapper.small-filter select {
    padding: 0 10px; /* Weniger Padding */
    font-size: 0.9rem;
    font-weight: 500;
    height: 100%;
}

.input-wrapper.small-filter .arrow {
    right: 10px;
    font-size: 0.7rem;
}

/* Mobile Anpassung für die Filter */
@media (max-width: 600px) {
    .filter-grid {
        grid-template-columns: 1fr; /* Untereinander auf Handy */
    }
}

/* ========================================= */
/* GEO-ORTUNG BUTTON */
/* ========================================= */

/* Der Button im Input-Feld */
.geo-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--bvg-black); /* oder #333 */
    font-size: 1.2rem;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
}

.geo-btn:hover {
    color: var(--bvg-yellow);
    background-color: #f0f0f0;
}

.geo-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* Optional: Animation beim Suchen */
.fa-spin-pulse {
    animation: fa-spin 1s infinite steps(8);
}

/* WENN DU ES NUR AUF HANDYS WILLST: */
/* Standardmäßig ausblenden */
.mobile-only {
    display: none;
}

/* Ab 900px (Mobile/Tablet) einblenden */
@media (max-width: 900px) {
    .mobile-only {
        display: block;
    }
    /* Platz im Input schaffen, damit Text nicht unter Button rutscht */
    .route-input-group.main-input input {
        padding-right: 50px; 
    }
}

/* Entferungs-Anzeige im Dropdown */
.geo-dist {
    float: right;
    font-size: 0.8rem;
    color: #888;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* ========================================= */
/* FIX: Zeilenumbruch in Ergebniskarten (Mobil) */
/* ========================================= */

@media (max-width: 600px) {
    
    /* Der Header der Karte wird zur Spalte (untereinander) */
    .trip-header {
        flex-direction: column; 
        align-items: flex-start !important; /* Alles linksbündig */
        gap: 10px;
    }

    /* Der obere Teil (Linie + Zeit + Countdown) */
    .trip-header > div:first-child {
        width: 100%;
        display: flex;
        align-items: center;
        flex-wrap: wrap; /* Falls es auch hier eng wird */
    }

    /* Der untere Teil (Richtung) */
    .trip-header > div:last-child {
        text-align: left !important; /* Erzwingt Linksbündigkeit (überschreibt JS) */
        width: 100%;
        padding-top: 5px;
        border-top: 1px dashed #eee; /* Optische Trennung */
    }
}

/* ========================================= */
/* FIX: Tabs auf Mobilgeräten (Scrollbar + Fade) */
/* ========================================= */

@media (max-width: 600px) {
    
    .search-tabs {
        display: flex;
        flex-wrap: nowrap;           /* Erzwingt eine Zeile */
        overflow-x: auto;            /* Aktiviert horizontales Scrollen */
        -webkit-overflow-scrolling: touch; /* Weiches Scrollen auf iOS */
        
        /* Scrollbalken unsichtbar machen */
        scrollbar-width: none;       /* Firefox */
        
        /* Layout Anpassung: Randlos machen */
        margin: 0 -15px 20px -15px;  /* Zieht die Leiste an den Bildschirmrand */
        padding: 0 15px;             /* Innenabstand für den Text */
        border-bottom: 2px solid #eee; /* Feine Linie unten durchgehend */
        
        /* VISUELLER HINWEIS: Fade-Out Effekt rechts */
        /* Alles wird rechts langsam transparent */
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    /* Scrollbalken für Chrome/Safari/Edge ausblenden */
    .search-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Die Buttons selbst */
    .tab-btn {
        flex: 0 0 auto;              /* Verhindert Schrumpfen */
        white-space: nowrap;         /* Text bricht nicht um */
        padding: 12px 20px;          /* Große Klickfläche */
        font-size: 0.95rem;
        border-bottom-width: 3px;    /* Aktiver Strich etwas dicker */
    }

    /* WICHTIG: Platzhalter am Ende */
    /* Sorgt dafür, dass der letzte Tab nicht unter dem Fade-Effekt verschwindet */
    .search-tabs::after {
        content: "";
        flex: 0 0 30px;              /* 30px unsichtbarer Platz rechts */
        height: 1px;
    }
}

/* ========================================= */
/* FILTER AKKORDEON (Auf/Zu) */
/* ========================================= */

.filter-header {
    cursor: pointer;           /* Zeig, dass es klickbar ist */
    justify-content: space-between; /* Text links, Pfeil rechts */
    user-select: none;         /* Text nicht markierbar beim Klicken */
    transition: color 0.2s;
}

.filter-header:hover {
    color: #000; /* Dunkler beim Drüberfahren */
}

.filter-arrow {
    transition: transform 0.3s ease; /* Weiche Drehung */
}

/* Wenn offen (Klasse wird per JS gesetzt) */
.filter-header.open .filter-arrow {
    transform: rotate(180deg);
}

/* Kleiner Abstand, wenn ausgeklappt */
.filter-grid {
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

/* Status für abgefahrene Verbindungen */
.live-info.gone {
    background-color: #f0f0f0;
    color: #999;
    font-weight: normal;
    border: 1px solid #ddd;
}

/* ========================================= */
/* ATTRIBUT-BADGES: WL, AST, B, BIKE, GL, Z */
/* ========================================= */

.badge-attr {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: #eee;
    color: #333;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Barrierefrei (wheelchair) */
.badge-attr-wl {
    background: #d1ffd8;
    color: #0a7a20;
}

/* Rufbus (pickup/dropoff = 2) */
.badge-attr-ast {
    background: #fee3a3;
    color: #8c5a00;
}

/* Bedarfshalt (pickup/dropoff = 3) */
.badge-attr-b {
    background: #e0e0e0;
    color: #555;
}

/* Fahrradmitnahme (bikes_allowed = 1) */
.badge-attr-bike {
    background: #d8e9ff;
    color: #004a99;
}

/* Gleis / Steig (platform_code) */
.badge-attr-gl {
    background: #000;
    color: #F0D722;
}

/* Tarifzone (zone_id) */
.badge-attr-zone {
    background: #fafafa;
    color: #222;
    border: 1px solid #ccc;
}

.status-banner-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- Sehr unauffälliger Hinweisbanner --- */
.subtle-banner {
    text-decoration: none;
    color: inherit;
}

.subtle-status {
    background: #ffffff;             /* sehr helles Rot */
    color: #b72b2b;                  /* dezentes, nicht zu starkes Rot */
    border: 1px solid #f0d0d0;       /* zurückhaltender Rahmen */
    padding: 6px 10px;               /* sehr kompakt */
    font-size: 0.85rem;              /* kleine Schrift */
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;             /* kleiner Abstand zur Suchkarte */
}

.subtle-status i {
    font-size: 0.9rem;               /* kleines Icon */
    margin-top: 1px;
}

.subtle-status:hover {
    background: #f5dcdc;
    cursor: pointer;
}
