/* --- CSS VARIABLEN & RESET --- */
:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #64748b;
    
    --primary-blue: #1b2a49; /* Ein satter Navy-Ton, passend zum Logo */
    --accent-green: #2ecc71;
    
    --status-green: #27ae60;
    --status-yellow: #f39c12;
    --status-red: #c0392b;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --radius: 12px;
    --transition: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 20px 0 40px 0;
}

.logo-placeholder {
    font-weight: 800;
    font-size: 24px;
    color: var(--primary-blue);
    letter-spacing: -1px;
    border: 2px dashed #cbd5e1;
    padding: 10px 20px;
    display: inline-block;
    border-radius: var(--radius);
}

/* --- DASHBOARD --- */
.status-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .status-overview {
        grid-template-columns: repeat(3, 1fr);
    }
}

.status-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 5px solid transparent;
    cursor: pointer;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.ferry-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.ferry-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-message {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-active { border-left-color: var(--status-green); }
.status-active .status-dot { background-color: var(--status-green); color: var(--status-green); }

.status-pause { border-left-color: var(--status-yellow); }
.status-pause .status-dot { background-color: var(--status-yellow); color: var(--status-yellow); }

.status-offline { border-left-color: var(--status-red); }
.status-offline .status-dot { background-color: var(--status-red); color: var(--status-red); }

/* --- TABS --- */
.details-section {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    padding: 15px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
    border-top: 1px solid #f1f5f9;
    
    /* NEU: Schiebt die Leiste standardmäßig aus dem Bild */
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* NEU: Diese Klasse wird per JavaScript hinzugefügt, wenn man scrollt */
.tab-bar.show {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .tab-bar {
        position: static;
        box-shadow: none;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 0 20px 0;
        border-top: none;
        transform: translateY(0); /* Auf dem PC immer einblenden */
    }
}

.tab-button {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .tab-button:hover {
        background-color: #f1f5f9;
    }
}

.tab-button.active {
    color: var(--bg-card);
    background-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* --- AKKORDEONS & TABELLEN --- */
details {
    margin-bottom: 10px;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
}

summary {
    padding: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--primary-blue);
    transition: var(--transition);
}

details[open] summary::after {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 15px 15px 15px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.price-table td {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.price-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
}

/* --- ADRESSE & ACTION GRID (Route & Anruf) --- */
.location-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Teilt den Platz in zwei gleich große Spalten */
    gap: 10px;
    margin-bottom: 25px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

/* Der primäre Route-Button (Blau) */
.route-btn {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(38, 34, 68, 0.2); /* Angepasst an das neue Logo-Blau */
}

.route-btn:hover {
    background-color: #1a1730; /* Noch einen Tick dunkler beim Hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(38, 34, 68, 0.3);
}

.route-btn:visited {
    color: #ffffff;
}

/* Der sekundäre Anruf-Button (Hellgrau) */
.call-btn {
    background-color: #f1f5f9;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.call-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

/* Fallback für inaktive Buttons (z.B. fehlende Nummer) */
.call-btn.disabled {
    opacity: 0.5;
    pointer-events: none; /* Macht den Button nicht anklickbar */
    color: var(--text-muted);
}

/* --- HEADER & LOGO --- */
.main-header {
    display: flex; /* Setzt Logo und Text nebeneinander */
    align-items: center;
    justify-content: center;
    gap: 15px; /* Abstand zwischen Logo und Text */
    padding: 20px 0 35px 0;
}

.site-logo {
    height: 55px; /* Perfekte Größe, damit die Wellen gut sichtbar bleiben */
    width: auto;
    flex-shrink: 0; /* Verhindert, dass das Logo gequetscht wird */
}
.site-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.site-title span {
    font-weight: 500; /* Der zweite Teil des Namens wird etwas dünner */
    color: var(--text-muted);
    font-size: 0.95rem;
}
/* Desktop Bonus: Hier haben wir Platz, also darf es wachsen */
@media (min-width: 768px) {
    .main-header {
        padding: 30px 0 40px 0;
    }
    .site-logo {
        height: 70px; /* Auf großen Bildschirmen wirkt ein winziges Logo oft verloren */
    }
}

/* --- FOOTER (Rechtliches) --- */
.site-footer {
    text-align: center;
    padding: 40px 0 20px 0;
    margin-top: 30px;
    border-top: 1px dashed #cbd5e1; /* Eine sehr weiche, unaufdringliche Trennlinie */
}

.legal-links {
    margin-bottom: 12px;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 5px; /* Etwas unsichtbares Padding für den dicken Daumen auf dem Touchscreen */
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--primary-blue);
}

.separator {
    color: #cbd5e1;
    margin: 0 5px;
    font-size: 0.8rem;
}

.copyright {
    color: #94a3b8; /* Noch etwas blasser als der normale Text */
    font-size: 0.75rem;
    line-height: 1.6;
}

.dev-signature {
    opacity: 0.7;
}

/* --- HEADER ANPASSUNG FÜR DIE GLOCKE --- */
.main-header {
    position: relative; /* Wichtig, damit die Glocke sich am Header orientiert */
}

.news-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%); /* Zentriert die Glocke exakt vertikal */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--primary-blue);
    transition: var(--transition);
}

.news-btn svg {
    width: 24px;
    height: 24px;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 10px;
    height: 10px;
    background-color: var(--status-red);
    border-radius: 50%;
    border: 2px solid var(--bg-body); /* Nimmt die Hintergrundfarbe an, wirkt ausgestanzt */
}

/* --- NEWS MODAL (Bottom Sheet / Pop-up) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(38, 34, 68, 0.4); /* Das Logo-Blau, leicht transparent */
    z-index: 1000;
    display: flex;
    align-items: flex-end; /* Mobile: Sitzt am unteren Bildschirmrand */
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0; /* Oben stark abgerundet */
    padding: 25px;
    transform: translateY(100%); /* Schiebt es anfangs aus dem Bild */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0); /* Fährt sanft hoch */
}

/* Desktop-Anpassung: Mittiges Pop-up statt Bottom-Sheet */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center; 
    }
    .modal-content {
        border-radius: var(--radius);
        transform: scale(0.9);
    }
    .modal-overlay.active .modal-content {
        transform: scale(1);
    }
}

/* News Inhalt Styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.close-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-btn:hover {
    background: #e2e8f0;
    color: var(--status-red);
}

.news-item {
    margin-bottom: 25px;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-item h4 {
    margin: 5px 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.news-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* NEU: Styling für das Platzhalter-Icon in der Preistabelle */
.price-item-icon {
    height: 1.2em; /* Skaliert das Icon passend zur Texthöhe */
    width: auto; /* Breite passt sich automatisch an */
    margin-right: 8px; /* Kleiner Abstand zum Text */
    vertical-align: middle; /* Richtet das Icon mittig zum Text aus */
    display: inline-block; /* Verhält sich wie Text */
}

/* 1. Spalte: Icon */
.icon-col {
    width: 1%; /* Zwingt die Spalte, sich exakt um das Icon zu legen */
    white-space: nowrap; /* Verhindert ungewolltes Verhalten der Spalte */
    padding-right: 6px !important; /* Sehr kleiner Abstand zum Text - passe die Zahl nach Belieben an */
}


/* --- PREISTABELLE: 3 SPALTEN LAYOUT --- */
.price-table td {
    vertical-align: middle; 
    padding: 10px 0; 
}

/* 1. Spalte: Icon */
.icon-col {
    width: 1%; 
    white-space: nowrap; 
    padding-right: 6px !important; 
}

.price-item-icon {
    height: 1.4em; 
    width: auto;
    display: block; 
}

/* 2. Spalte: Text */
.text-col {
    line-height: 1.3; 
    padding-right: 15px !important; 
}

/* 3. Spalte: Preis */
.price-table td:last-child {
    white-space: nowrap !important; /* WICHTIG: Kein Umbruch beim Preis! */
    width: 1%; 
    text-align: right;
    font-weight: 600;
}