/* ========= GRUNDEINSTELLUNGEN & VARIABLEN ========= */
:root {
    --primary-color: #789436;
    --background-color: #f8f9fa;
    --card-background: #fffaf0; /* weniger gelb, dezenter Creme-Ton */
    --text-color: #333333;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --font-heading: 'Alex Brush', cursive;
    --font-body: 'Noto Sans', sans-serif;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========= LAYOUT CONTAINER ========= */
.page-container {
    max-width: auto;
    margin: 0 auto;
    background-color: var(--card-background);
    padding-bottom: 80px; /* Platz für die fixe Fußzeile */
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.content {
    padding: 1.5rem;
}

/* ========= SPEZIAL: WILLKOMMENS-SEITE ========= */
.welcome-page {
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://placehold.co/600x1200/AACC99/FFFFFF?text=Hintergrund');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 400;
}

.welcome-subtitle {
    font-size: 1rem;
}

/* Logo: halbtransparenter weißer Hintergrund → warme Creme */
.logo {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 250, 240, 0.8); /* entspricht #fffaf0, weniger gelb */
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-color);
}


/* ========= KOPFZEILE (Header) ========= */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Angepasst */
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--primary-color);
    /* Zentrierung, wenn Buttons unsichtbar wären */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.icon-btn:hover {
    background-color: #f0f0f0;
}
.icon-btn i {
    width: 24px;
    height: 24px;
}
.back-link {
    position: relative;
    z-index: 2;
}
.menu-toggle {
    position: relative;
    z-index: 2;
}


/* ========= SEITENLEISTE (Sidebar) ========= */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Startet außerhalb des Bildschirms */
    width: 280px;
    height: 100%;
    background-color: var(--card-background);
    z-index: 200;
    transition: left 0.3s ease-in-out;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.sidebar.open {
    left: 0; /* Fährt ins Bild */
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}
.sidebar-nav a {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s;
}
.sidebar-nav a:hover {
    background-color: #f0f0f0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ========= FUSSZEILE (Footer Navigation) ========= */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 100;
    width: 100%; /* Volle Breite erzwingen */
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    gap: 4px;
    transition: color 0.2s ease-in-out;
}

.nav-link i {
    width: 24px;
    height: 24px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active img {
    filter: invert(59%) sepia(13%) saturate(1565%) hue-rotate(41deg) brightness(93%) contrast(86%);
}

/* ========= KOMPONENTEN / BLÖCKE ========= */

/* ----- Titel & Texte ----- */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

p {
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Neuer Hinweis / Haftungsausschluss (klein, grau, kursiv) */
.disclaimer {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.75rem; /* kleines, dezentes Format */
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

/* ----- Button ----- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ----- Listen-Karte (Farm list) ----- */
.list-card {
    display: flex;
    align-items: center;
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    gap: 1rem;
    text-decoration: none; /* Entfernt die blaue Unterstreichung */
    color: var(--text-color); /* Nutzt die Standard-Textfarbe */
    border: 2px solid transparent; /* Für Hover-Effekt */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.list-card:hover {
    border-color: var(--primary-color); /* Rahmen in Primärfarbe beim Hover */
    box-shadow: 0 6px 15px rgba(120, 148, 54, 0.15); /* Leichter grüner Schatten */
    color: var(--primary-color); /* Textfarbe beim Hover */
}

.list-card h3,
.list-card p {
    color: var(--text-color); /* Überschriften und Text in Standardfarbe */
}

.list-card:visited,
.list-card:active {
    color: var(--primary-color); /* Optional: besuchte/aktive Links in Primärfarbe */
}

.list-card-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.list-card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.list-card-content p {
    margin: 0;
    font-size: 0.9rem;
}


/* ----- Info-Block (Transport) ----- */
.info-block {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}
.info-block:last-child {
    border-bottom: none;
}
.info-block-icon {
    color: var(--primary-color);
}
.info-block-icon i {
    width: 24px;
    height: 24px;
}
.info-block-content h3 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.info-block-content p {
    margin: 0;
    font-size: 0.9rem;
}


/* ----- Formular-Felder (Feedback) ----- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(120, 148, 54, 0.2);
}

/* ----- Stile für die Komponenten-Baukasten-Seite ----- */
.component-body {
    background-color: var(--card-background);
}
.component-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}
.component-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}
.component-section h2 {
    margin-bottom: 1.5rem;
}
pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9rem;
}

/* ========= NORMAL GESTALTETE BILDER ========= */
.styled-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    /* Optional: dezenter Rahmen */
    transition: box-shadow 0.2s, transform 0.2s;
}
.styled-image:hover {
    box-shadow: 0 8px 24px rgba(120, 148, 54, 0.18);
    transform: scale(1.03);
}

/* ========= LIGHTBOX FÜR BILDER ========= */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    background: var(--card-background);
    border: 2px solid var(--primary-color);
}
.lightbox-overlay:after {
    content: "✕";
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
}
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    background: var(--card-background);
    border: 2px solid var(--primary-color);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
    opacity: 1;
}
.lightbox-overlay:after {
    content: "✕";
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
    transition: opacity 0.3s;
}

/* ===== Galerie-Design ===== */
.image-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2em;
}
.gallery-nav-btn {
    background: none;
    border: none;
    padding: 0.5em;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-nav-btn:hover {
    background: #f0f0f0;
}
.gallery-nav-btn img {
    width: 28px;
    height: 28px;
}
.gallery-images {
    width: 80vw;
    max-width: 400px;
    height: 300px; /* Feste Höhe für den Container */
    position: relative; /* Wichtig für die Positionierung der Bilder */
    display: flex;
    justify-content: center;
    align-items: center;
}
.gallery-thumb {
    position: absolute; /* Bilder übereinander legen */
    width: 100%;
    height: 100%; /* Höhe an Container anpassen */
    object-fit: cover; /* Geändert von 'contain' zu 'cover' */
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    cursor: pointer;
    background: var(--card-background);
    border: 1px solid #eee;
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
    opacity: 0; /* Standardmässig unsichtbar */
    pointer-events: none; /* Nicht klickbar, wenn unsichtbar */
}

.gallery-thumb.active {
    opacity: 1; /* Aktives Bild sichtbar machen */
    pointer-events: auto; /* Klickbar machen */
}

/* Alte Klassen werden nicht mehr benötigt */
/* Die leeren Regeln für .gallery-thumb.hide-left, .gallery-thumb.hide-right, .gallery-thumb.show wurden entfernt */


/* ===== Lightbox-Design ===== */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: var(--card-background);
    border: 1px solid #eee;
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}
.lightbox-nav-btn:hover {
    background: #f0f0f0;
}
.lightbox-nav-btn img {
    width: 28px;
    height: 28px;
}
#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }

/* ========= BILD MIT MARKERN ========= */
.image-map-container {
    position: relative; /* Wichtig: Macht diesen Container zum Bezugspunkt */
    width: 100%;
    max-width: 1200px; /* Maximale Breite des Bildes, nach Bedarf anpassen */
    margin: 2rem auto; /* Zentriert den Container und gibt ihm etwas Abstand */
    border-radius: var(--border-radius); /* Verwendet deinen Border-Radius für einen einheitlichen Look */
    overflow: hidden; /* Stellt sicher, dass das Bild die abgerundeten Ecken beachtet */
}

.image-map-container .background-image {
    width: 100%;
    height: auto;
    display: block; /* Verhindert kleine Lücken unter dem Bild */
}

.image-marker {
    position: absolute; /* Positioniert den Marker relativ zum Container */
    width: 40px;  /* Grösse des klickbaren Bereichs/Icons anpassen */
    height: 40px; /* Grösse des klickbaren Bereichs/Icons anpassen */
    
    /* Wichtig: Verschiebt den Mittelpunkt des Markers auf die exakte Koordinate */
    transform: translate(-50%, -50%); 
    
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    
    /* Ein Schatten, der gut mit transparenten SVGs funktioniert */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); 
}

.image-marker:hover {
    transform: translate(-50%, -50%) scale(1.15); /* Vergrössert den Marker bei Hover */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.image-marker img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ----- Titel & Überschrift in Bild-Text-Reihe ----- */
.img-title-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.img-title-row .list-card-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.img-title-row h2 {
    margin: 0;
}

/* ===== Tabs ===== */
.tabs-container {
    margin: 2rem 0;
}
.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    gap: 2rem;
    position: relative;
}
.tab-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    padding: 0.75rem 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    outline: none;
}
.tab-btn.active {
    color: var(--primary-color);
}
.tab-btn.active::after {
    content: "";
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
    transition: width 0.2s;
}
.tabs-content {
    padding: 1.5rem 0 0 0;
}
.tabs-panel {
    display: none;
}
.tabs-panel.active {
    display: block;
}

/* ===== GRÜNE PUNKTE LISTE ===== */
.green-bullet-list {
    list-style: none;
    padding-left: 0.5rem; /* weiter rechts, ca. unter Tablinie */
    margin-bottom: 2rem;
}
.green-bullet-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-light);
}
.green-bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.7em;
    height: 0.7em;
    background: var(--primary-color); /* jetzt wirklich grün */
    border-radius: 50%;
    display: inline-block;
    transform: translateY(-50%);
}

/* ===== SCHÖNER ÖFFNUNGSZEITEN-BLOCK ===== */
.opening-hours-block {
    display: none;
}

/* Öffnungszeiten kompakt im Willkommens-Block */
.opening-hours-inline {
    width: 100%;
    margin: 0.5rem 0 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: center;
}
.opening-hours-inline .opening-hours-row {
    /* Deutlicher Kasten: sanfter Verlauf und durchgehender Rahmen (vollständig um das Element)
       + flex-Layout, damit Icon links neben dem Text bleibt */
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: nowrap; /* verhindert, dass Icon über dem Text sitzt */
    background: linear-gradient(180deg, rgba(255,250,240,0.98), rgba(255,255,255,0.96));
    border-radius: 10px;
    padding: 0.6rem 1rem;
    box-shadow: 0 8px 20px rgba(120,148,54,0.06);
    border: 2px solid var(--primary-color);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.opening-hours-inline .opening-hours-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(120,148,54,0.09);
    border-color: color-mix(in srgb, var(--primary-color) 80%, #000 20%); /* dezente Intensivierung */
}

/* Icon-Größe / Verhalten innerhalb der Zeilen (sorgt dafür, dass Icons nicht skalieren/umfließen) */
.opening-hours-inline .opening-hours-row .list-card-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    /* kleiner Abstand rechts: bereits durch gap vorhanden, aber für alte Browser zusätzlich */
    margin-right: 0.35rem;
}

/* Datum und Uhrzeit: Datum dunkel, Uhrzeit in Primärfarbe */
.opening-hours-inline .opening-date {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.1rem;
}
.opening-hours-inline .opening-time {
    font-size: 1rem;
    color: var(--primary-color) !important; /* wichtig, damit es nicht von Body-Farben überschrieben wird */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.1rem;
    font-weight: 700;
}
.opening-hours-inline .opening-time .list-card-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    /* optional: falls SVGs schwarz sind und du sie einfärben willst, behalte/ändere den Filter */
    filter: invert(39%) sepia(17%) saturate(1052%) hue-rotate(41deg) brightness(93%) contrast(86%);
}

/* Ende: Styles für Öffnungszeiten */
/* ===== SCHÖNER WILLKOMMENS-BLOCK ===== */
.welcome-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-background); /* Kein Farbverlauf mehr */
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(120,148,54,0.07);
    padding: 1.5rem 1rem 1.2rem 1rem; /* Weniger Abstand oben/unten */
    margin: 1rem auto 1rem auto;      /* Weniger Abstand zum nächsten Block */
    max-width: 600px;
    text-align: center;
}
.welcome-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.2rem;
    /* Kein Kreis, kein Hintergrund, kein Rahmen */
    border-radius: 0;
    background: none;
    box-shadow: none;
    border: none;
}
.welcome-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.welcome-text {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ========= INSTALLATION HINWEIS ========= */
.install-banner {
    background: var(--card-background);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(120,148,54,0.06);
    padding: 1rem 1rem 0.9rem 1rem;
    margin: 1rem auto;
    max-width: 700px;
}
.install-banner h3 {
    margin-bottom: 0.4rem;
    color: var(--primary-color);
    font-weight: 700;
}
.install-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}
.install-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
}
.opening-hours-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    margin-bottom: 0.5rem;
}
.opening-hours-link:last-child {
    margin-bottom: 0;
}
.opening-hours-link .opening-hours-row {
    /* übernimmt Hover-Effekt vom Row-Element */
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.opening-hours-link:hover .opening-hours-row {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(120,148,54,0.09);
    border-color: color-mix(in srgb, var(--primary-color) 80%, #000 20%);
}

/* ===== Fahrplantabelle & Tabs (Wipperliese) ===== */
.timetable-block {
    margin: 1rem 0 2rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,250,240,0.98));
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.timetable-tabs { gap: 0.5rem; margin: 0.5rem 0 1rem 0; }
.timetable-tabs .tab-btn {
    padding: 0.5rem 0.9rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-light);
}
.timetable-tabs .tab-btn.active {
    background: linear-gradient(180deg, rgba(120,148,54,0.08), rgba(120,148,54,0.03));
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
}

.timetable-table {
    width: 100%;
    min-width: 680px; /* bei Bedarf anpassen */
    border-collapse: collapse;
    table-layout: fixed; /* sorgt für reproduzierbare Spaltenbreiten */
}
.timetable-table thead th {
    text-align: left;
    padding: 0.55rem;
    font-weight: 800;
    color: #444;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.6);
}
.timetable-table tbody td {
    padding: 0.5rem;
    border-bottom: 1px dashed #eee;
    color: var(--text-color);
}
.timetable-table tbody tr:hover td {
    background: rgba(120,148,54,0.03);
}

/* Hervorhebung der nächsten Abfahrt */
.timetable-table td.next-departure {
    background: linear-gradient(90deg, rgba(120,148,54,0.12), rgba(120,148,54,0.06));
    border-left: 4px solid var(--primary-color);
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(120,148,54,0.06);
}

/* kleine Hilfstexte */
.timetable-block .disclaimer {
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

/* --- Responsive: bessere Darstellung der Fahrplantabelle auf kleinen Bildschirmen --- */
/* Ersetzt die vorherige block/inline-block-Lösung durch einen scrollbaren Wrapper + sticky-Kolumnen */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* sanftes Scrolling auf iOS */
    border-radius: 8px;
}

/* Mindestbreite verhindert zu enge Zellen, auf großen Bildschirmen bleibt alles wie gehabt */
.timetable-table {
    width: 100%;
    min-width: 680px; /* bei Bedarf anpassen */
    border-collapse: collapse;
    table-layout: fixed; /* sorgt für reproduzierbare Spaltenbreiten */
}

/* feste Breiten für erste Spalten, damit sticky funktioniert */
.timetable-table th:nth-child(1),
.timetable-table td:nth-child(1) {
    width: 56px;
}
.timetable-table th:nth-child(2),
.timetable-table td:nth-child(2) {
    width: 240px;
}

/* Sticky-Spalten nur bei schmalen Viewports aktivieren */
@media (max-width: 700px) {
    /* Hintergrund für sticky Zellen, damit Lesbarkeit erhalten bleibt */
    .timetable-table th,
    .timetable-table td {
        background: rgba(255,255,255,0.95);
    }

    /* erste Spalte (km) sticky ganz links */
    .timetable-table th:nth-child(1),
    .timetable-table td:nth-child(1) {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 4;
        box-shadow: 2px 0 6px rgba(0,0,0,0.05);
    }

    /* zweite Spalte (Haltepunkt) sticky rechts neben der ersten */
    .timetable-table th:nth-child(2),
    .timetable-table td:nth-child(2) {
        position: -webkit-sticky;
        position: sticky;
        left: 56px; /* muss der Breite der ersten Spalte entsprechen */
        z-index: 3;
        box-shadow: 2px 0 6px rgba(0,0,0,0.04);
    }

    /* kleine optische Anpassung für Zellen bei Hover / Fokus */
    .timetable-table tbody td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Entfernte/ersetzte alte Media-Query:
@media (max-width: 700px) {
    .timetable-table { display: block; overflow-x: auto; white-space: nowrap; }
    .timetable-table thead, .timetable-table tbody, .timetable-table th, .timetable-table td, .timetable-table tr { display: inline-block; vertical-align: top; }
    .timetable-table thead { width: 100%; }
    .timetable-table tbody { width: 100%; }
} 
*/
/* ------------------ Stacked / Card View für Fahrplan (mobil) ------------------ */
/* Wenn .table-responsive.stacked gesetzt ist, Tabelle unbedingt ausblenden */
.table-responsive.stacked .timetable-table {
    display: none !important;
}

.timetable-cards {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.timetable-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,250,240,0.99));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.03);
}

.timetable-card .tc-meta {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin-bottom: 0.6rem;
}
.timetable-card .tc-km {
    font-weight: 800;
    color: var(--primary-color);
    min-width: 48px;
}
.timetable-card .tc-stop {
    font-weight: 700;
    color: var(--text-color);
    flex: 1;
}
.timetable-card .tc-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Zeiten: horizontal scrollbar falls viele Spalten vorhanden */
.timetable-card .tc-times {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}
.timetable-card .time {
    min-width: 72px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    flex: 0 0 auto;
}
.timetable-card .time .time-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
}
.timetable-card .time .time-value {
    display: block;
    font-weight: 800;
    color: var(--text-color);
    margin-top: 0.15rem;
}

/* Hervorhebung der nächsten Abfahrt in Karten */
.timetable-card .time.next-departure {
    background: linear-gradient(90deg, rgba(120,148,54,0.12), rgba(120,148,54,0.06));
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 800;
}

/* Sicherstellen, dass die Kartenansicht nur mobil genutzt wird */
@media (min-width: 701px) {
    .table-responsive .timetable-cards { display: none !important; }
    /* defensive styles placeholder removed to avoid empty ruleset */
}