/* ==============================================
   1. DESKTOP BASIS & HEADER
   ============================================== */
.blog-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 80px;
    text-shadow: #000 0.05em 0.05em 0.05em;
    position: relative;
}

.blog-header .navbar-collapse { background: #fff; }
.blog-header .nav { margin-top: 0; }

/* ==============================================
   2. ARCHIV DROPDOWN (ZENTRIERUNG & HOVER-FIX)
   ============================================== */

/* Ermöglicht Zentrierung am Viewport */
@media (min-width: 992px) {
    .archive-dropdown { position: static !important; }
}

.archive-dropdown .dropdown-menu {
    width: 1200px;
    max-width: 98vw;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;

    /* Horizontale Zentrierung auf der Seite */
    position: fixed;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 80px; 
}

/* Unsichtbare Brücke: Hält das Menü beim Bewegen der Maus offen */
@media (min-width: 992px) {
    .archive-dropdown.open > a::before,
    .archive-dropdown.show > a::before {
        content: '';
        position: absolute;
        bottom: -30px;
        left: 0;
        width: 100%;
        height: 35px;
        background: transparent;
        z-index: 1;
    }
}

/* Dreieck unter dem Link */
.archive-dropdown.open > a::after,
.archive-dropdown.show > a::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 12px solid #253340; 
    z-index: 1002;
}

/* ==============================================
   3. ARCHIV INHALT (GRID & ITEMS)
   ============================================== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.archive-year { margin-bottom: 20px; }

.archive-year-title {
    color: #ec6952;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ec6952;
}

.archive-item {
    display: block;
    padding: 8px 12px;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.archive-item:hover {
    background: #fafafa;
    color: #ec6952;
    transform: translateX(5px);
}

.menu-badge {
    display: inline-block;
    background: #ec6952;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 8px;
    min-width: 30px;
    text-align: center;
}

/* ==============================================
   4. MOBILE KORREKTUREN (BIS 991PX)
   ============================================== */
@media (max-width: 991px) {
    .blog-header .navbar-collapse {
        background-color: #253340 !important;
        max-height: 60vh;
        overflow-y: auto;
    }

    .archive-dropdown .dropdown-menu {
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        position: relative;
        background-color: #1a2a3a !important; /* GEÄNDERT: Dunkleres Blau statt schwarz */
        padding: 10px !important;
        max-height: 40vh; /* GEÄNDERT: Begrenzte Höhe */
        overflow-y: auto; /* GEÄNDERT: Scrollbar für Archiv-Inhalt */
        top: 0;
        border: 1px solid #e5e5e5 !important; 
    }
    
    .archive-dropdown.open > a::after,
    .archive-dropdown.show > a::after { display: none; }

    .navbar-default .navbar-nav > li > a,
    .archive-item {
        color: #fff !important;
        text-shadow: none !important;
        padding: 12px 15px !important;
        border-bottom: 1px solid #eee;
    }

    .archive-grid { display: block; }
    .archive-column { width: 100%; margin-bottom: 20px; }
}

/* ==============================================
   5. HAMBURGER MENÜ (ANIMATION)
   ============================================== */
.navbar-toggle {
    border: none !important;
    background: transparent !important;
}

.navbar-toggle .icon-bar {
    background-color: #000 !important;
    transition: all 0.3s ease-in-out;
    width: 22px;
    height: 2px;
}

.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }

/* Scharnier-Effekt beim Öffnen */
.navbar-toggle:not(.collapsed) .icon-bar:nth-child(2) { opacity: 0 !important; }

.navbar-toggle:not(.collapsed) .icon-bar:nth-child(3) {
    transform: translateY(4px) rotate(-45deg);
    transform-origin: left center;
}

.navbar-toggle:not(.collapsed) .icon-bar:nth-child(4) {
    transform: translateY(0);
    opacity: 1 !important;
}

/* ================================================
   6. SPEZIELLE LAYOUT-HACKS 
   -  weisser Text-Bereiches in Bannergrafik ziehen
   ================================================ */
.caption.bg-inverse { margin-bottom: -110px; }

@media (max-width: 767px) {
    .caption.bg-inverse { margin-bottom: -100px !important; }
}