/* ============================================================================
   BLOG-SPEZIFISCHE STYLES
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. BLOG 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. BLOG ARCHIVE DROPDOWN MENU
   ---------------------------------------------------------------------------- */

.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;
}

/* 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. ARCHIVE GRID & CONTENT
   ---------------------------------------------------------------------------- */

.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);
    text-decoration: none;
}

.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. HAMBURGER MENU 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;
}


/* ----------------------------------------------------------------------------
   5. SPEZIELLE LAYOUT-ANPASSUNGEN
   ---------------------------------------------------------------------------- */

/* Weisser Text-Bereich in Bannergrafik hoch ziehen */
.caption.bg-inverse {
    margin-bottom: -110px;
}


/* ============================================================================
   6. MEDIA QUERIES - RESPONSIVE DESIGN
   ============================================================================ */

/* MOBILE ANPASSUNGEN (max-width: 992px) */

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

/* 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;
    }
}

/* MOBILE ANPASSUNGEN (max-width: 991px) */

@media screen and (max-width: 991px) {
    /* Blog Header Mobile */
    .blog-header .navbar-collapse {
        background-color: #253340 !important;
        max-height: 60vh;
        overflow-y: auto;
    }

    /* Archive Dropdown Mobile */
    .archive-dropdown .dropdown-menu {
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        position: relative;
        background-color: #000 !important;
        padding: 10px !important;
        max-height: none;
        top: 0;
        border: 1px solid #e5e5e5 !important;
    }

    /* Dreieck ausblenden auf Mobile */
    .archive-dropdown.open > a::after,
    .archive-dropdown.show > a::after {
        display: none;
    }

    /* Mobile Nav Links & Archive Items */
    .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 Mobile - Spalten zu Zeilen */
    .archive-grid {
        display: block;
    }

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

/* MOBILE ANPASSUNGEN (max-width: 767px) */

@media screen and (max-width: 767px) {
    /* Caption Margin Anpassung */
    .caption.bg-inverse {
        margin-bottom: -100px !important;
    }
}
