/* ==================== AUSKLAPPBARE NAVIGATION ==================== */
.navigation-container {
    background: white;
    border-radius: 12px;
    margin: 16px auto;
    max-width: 800px;
    width: 95%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.navigation-header {
    background: #0f67b1;
    color: white;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.navigation-title {
    font-size: 16px;
}

.navigation-count {
    font-size: 14px;
    opacity: 0.9;
}

.navigation-arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.navigation-content {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    transition: max-height 0.5s ease;
    overflow: hidden;
}

.category-item {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: #e3f2fd;
}

.category-icon-nav {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.category-text {
    display: flex;
    flex-direction: column;
}

.category-name-nav {
    font-size: 15px;
    font-weight: 600;
}

.category-count-nav {
    font-size: 13px;
    color: #666;
}

/* Desktop: Teilansicht (ca. 2 Zeilen) */
@media (min-width: 769px) {
    .navigation-content {
        max-height: 170px;
        overflow: hidden;
    }
    .navigation-content.open {
        max-height: none;
        overflow: visible;
    }
}

/* Mobile: komplett zugeklappt */
@media (max-width: 768px) {
    .navigation-content {
        max-height: 0;
        padding: 0 16px;
        overflow: hidden;
    }
    .navigation-content.open {
        max-height: 1000px;
        padding: 16px;
    }
    .navigation-arrow.rotated {
        transform: rotate(180deg);
    }
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .category-item {
        padding: 12px 8px;
    }
    .category-icon-nav {
        width: 40px;
        height: 40px;
    }
}
.hidden {
    display: none;
}
#expand-button {
    background-color: #028ce9;
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}
html {
    height: 100%;
}
body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: #3d93dc;
    font-family: Arial, sans-serif;
}
.content-wrap {
    flex: 1;
}
.expired-messages .message-container {
    position: relative;
}
.expired-messages .message-container::before {
    content: "Abgelaufen";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
}
.expired-messages .message-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(128, 128, 128, 0.4);
    z-index: 0;
}
.label-container {
    background-color: white;
    border-radius: 5px;
    padding: 2px 4px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
a {
    text-decoration: none;
    color: #3d93dc;
    position: relative;
    transition: color 0.3s;
}
a:hover {
    color: #0099ff;
}
a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #0099ff;
    transform-origin: bottom right;
    transition: transform 0.25s;
}
a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
#consent-button, #load-more {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}
.form-container {
    background-color: white;
    border-radius: 10px;
    margin: 20px auto;
    padding: 10px;
    width: 90%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
.footer {
    width: 100%;
    background-color: #ffffff;
    padding: 20px 0;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-item {
    flex: 1;
    padding: 10px;
    text-align: center;
}
@media (max-width: 768px) {
    .footer-item {
        width: 100%;
    }
}
.autobahn-container {
    position: relative;
    display: inline-block;
    text-align: center;
}
.autobahn-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -116%);
    color: white;
    font-weight: bold;
}
.autobahn-image {
    width: 80%;
}
#consent-text {
    position: absolute;
    width: 80%;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    text-align: center;
    background-color: white;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
#myBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #0f67b1;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
}
#myBtn:hover {
    background-color: #04aa6d;
}
#map {
    height: 400px;
    width: 100%;
    margin: 0;
}
h1, h2.category-heading {
    text-align: center;
    color: #FFFFFF;
    padding: 10px;
}

/* ==================== MELDUNGSBOXEN ==================== */
.message-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 16px auto;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    max-width: 800px;
    width: 95%;
}
@media (min-width: 768px) {
    .message-container {
        width: 80%;
    }
}
.incident-container {
    padding: 60px 16px 16px 16px; /* Platz oben für Schilder */
    position: relative;
    min-height: 100px;
}
.message-container th {
    background: #f5f5f5;
    font-size: 16px;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #3d93dc;
    color: #333;
}
.message-container td {
    padding: 10px 14px;
    font-size: 14.5px;
    color: #444;
    border-bottom: 1px solid #eee;
}
.message-container tr:last-child td {
    border-bottom: none;
}

/* Verzögerung dezent */
.delay-green { background: #e8f5e8; color: #2e7d32; padding: 6px 10px; border-radius: 4px; }
.delay-yellow { background: #fff8e1; color: #ff8f00; padding: 6px 10px; border-radius: 4px; }
.delay-red { background: #ffebee; color: #c62828; padding: 6px 10px; border-radius: 4px; }

/* Warnung dezent */
.warning-message {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
    padding: 10px 14px;
    border-left: 4px solid #c62828;
    border-radius: 4px;
    margin: 8px 0;
}

/* Zeit-Anzeige */
.message-container td strong {
    color: #1976d2;
}
.message-container td[style*="color:#d9534f"],
.message-container td[style*="color:#d32f2f"] {
    color: #d32f2f;
    font-weight: 600;
}

/* ==================== A2-SCHILD (links oben) ==================== */
.bookmark-container {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 10;
}
.bookmark {
    width: 68px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.bookmark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.road-number {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 15px !important;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 11;
}

/* ==================== WARNSCHILD (rechts oben) ==================== */
.icon {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 48px;
    height: 48px;
    z-index: 10;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ==================== EXPAND-BUTTON ==================== */
.expand-button {
    background: #3d93dc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin: 16px auto;
    display: block;
}
.expand-button:hover {
    background: #2d7ab8;
}

/* ==================== MOBILE ANPASSUNGEN ==================== */
@media (max-width: 768px) {
    .message-container {
        margin: 12px 4px;
        width: 96% !important;
    }
    .message-container th {
        font-size: 15px;
        padding: 10px;
    }
    .bookmark {
        width: 60px;
        height: 36px;
    }
    .road-number {
        font-size: 14px !important;
    }
    .icon {
        width: 42px;
        height: 42px;
        top: 14px;
        right: 14px;
    }
    .expand-button {
        font-size: 13px;
        padding: 8px 16px;
    }
    .message-container td {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* ==================== ICON-KLASSEN (unverändert) ==================== */
.icon1 { background-image: url('../../img/unfall.png'); }
.icon2 { background-image: url('../../img/achtung.png'); }
.icon3 { background-image: url('../../img/achtung.png'); }
.icon4 { background-image: url('../../img/achtung.png'); }
.icon5 { background-image: url('../../img/schnee.png'); }
.icon6 { background-image: url('../../img/stau.png'); }
.icon7 { background-image: url('../../img/einengung-rechts.png'); }
.icon8 { background-image: url('../../img/sperrung.png'); }
.icon9 { background-image: url('../../img/baustelle.png'); }
.icon10 { background-image: url('../../img/achtung.png'); }
.icon11 { background-image: url('../../img/achtung.png'); }
.icon14 { background-image: url('../../img/achtung.png'); }
/* ==================== KACHELN-NAVIGATION AUF MELDUNGEN.PHP ==================== */
/* Kacheln-Layout für Meldungen-Navigation */
.meldungen-nav-content {
    padding: 16px;
}

.meldungen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.meldungen-kachel {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.meldungen-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: #e3f2fd;
}

.meldungen-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.meldungen-kachel-text {
    display: flex;
    flex-direction: column;
}

.meldungen-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.meldungen-kachel-count {
    font-size: 13px;
    color: #666;
}

/* Mobile: Kacheln ausklappbar machen */
@media (max-width: 768px) {
    .meldungen-nav-content {
        max-height: 0;
        padding: 0 16px;
        overflow: hidden;
        transition: max-height 0.5s ease, padding 0.5s ease;
    }

    .meldungen-nav-content.open {
        max-height: 800px !important; /* genug für alle Kacheln */
        padding: 16px;
    }

    .meldungen-arrow.rotated {
        transform: rotate(180deg);
    }

    .meldungen-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Kacheln pro Zeile */
        gap: 12px;
    }

    .meldungen-kachel {
        min-height: 90px;
        padding: 12px;
    }

    .meldungen-icon {
        width: 40px;
        height: 40px;
    }
}
}

/* Desktop: immer ausgeklappt, Kacheln */
@media (min-width: 769px) {
    .meldungen-nav-header {
        cursor: default; /* Kein Klick nötig */
    }

    .meldungen-nav-content {
        max-height: none !important;
        padding: 16px;
    }
}
/* ==================== SCHÖNE KACHELN-NAVIGATION ==================== */
.meldungen-nav-container {
    background: white;
    border-radius: 12px;
    margin: 16px auto;
    max-width: 800px;
    width: 95%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.meldungen-nav-header {
    background: #1d71b9;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

.meldungen-header-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px; /* Abstand zwischen Titel und Count */
}

.meldungen-title {
    font-size: 18px;
    font-weight: bold;
}

.meldungen-count {
    font-size: 14px;
    opacity: 0.9;
}

.meldungen-burger {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    display: none; /* Desktop verstecken */
}

/* Mobile: Burger sichtbar + eingeklappt */
@media (max-width: 768px) {
    .meldungen-burger {
        display: block;
    }

    .meldungen-nav-content {
        max-height: 0;
        padding: 0 16px;
        overflow: hidden;
        transition: max-height 0.5s ease, padding 0.5s ease;
    }

    .meldungen-nav-content.open {
        max-height: 800px;
        padding: 16px;
    }

    .meldungen-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .meldungen-kachel {
        min-height: 90px;
        padding: 12px;
    }

    .meldungen-icon {
        width: 40px;
        height: 40px;
    }
}

/* Desktop: immer ausgeklappt, Kacheln */
@media (min-width: 769px) {
    .meldungen-nav-header {
        cursor: default;
    }

    .meldungen-nav-content {
        max-height: none !important;
        padding: 16px;
    }

    .meldungen-burger {
        display: none;
    }
}

/* Restliche Kachel-Styles (falls noch nicht da) */
.meldungen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.meldungen-kachel {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.meldungen-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: #e3f2fd;
}

.meldungen-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.meldungen-kachel-text {
    display: flex;
    flex-direction: column;
}

.meldungen-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.meldungen-count {
    font-size: 13px;
    color: #FFF;
}
.meldungen-count-kachel {
    font-size: 13px;
    color: #000;
}

/* Mobile: Burger sichtbar + eingeklappt */
@media (max-width: 768px) {
    .meldungen-burger {
        display: block;
    }

    .meldungen-nav-content {
        max-height: 0;
        padding: 0 16px;
        overflow: hidden;
        transition: max-height 0.5s ease, padding 0.5s ease;
    }

    .meldungen-nav-content.open {
        max-height: 800px; /* genug Platz für alle Kacheln */
        padding: 16px;
    }

    .meldungen-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Kacheln pro Zeile */
        gap: 12px;
    }

    .meldungen-kachel {
        min-height: 90px;
        padding: 12px;
    }

    .meldungen-icon {
        width: 40px;
        height: 40px;
    }
}

/* Desktop: immer ausgeklappt, Kacheln */
@media (min-width: 769px) {
    .meldungen-nav-header {
        cursor: default; /* Kein Klick nötig */
    }

    .meldungen-nav-content {
        max-height: none !important;
        padding: 16px;
    }

    .meldungen-burger {
        display: none;
    }
}
