/* =============================================================
   EMAGAZIN - KOMPLETTES CUSTOM CSS (Web & Mobile)
   ============================================================= */

/* =============================================================
   EMAGAZIN - KOMPLETTES CUSTOM CSS (HEUTE ÜBERARBEITET)
   ============================================================= */

/* --- 1. DESKTOP HEADER (160px Höhe) --- */
#sp-header {
    background-color: #F6C000 !important; /* Hausfarbe Gelb */
    border-bottom: 5px solid #005a84 !important; /* Blaue Linie */
    height: 160px !important;
    display: flex !important;
    align-items: center !important;
}

/* --- 2. DESKTOP HAUPTMENÜ STYLING --- */
.sp-megamenu-parent > li > a, 
.sp-megamenu-parent > li > span {
    font-size: 19px !important;
    font-weight: 400 !important;
    color: #333 !important;
    text-transform: uppercase !important;
    line-height: 160px !important; 
    padding: 0 20px !important;
    transition: color 0.2s ease;
}

/* Hauptmenü Hover (Kein Blau) */
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li:hover > a {
    color: #000 !important;
}

/* --- 3. DESKTOP UNTERMENÜ (Dropdown - fit-content) --- */
.sp-megamenu-parent .sp-dropdown {
    width: fit-content !important;
    min-width: 220px !important;
    max-width: 450px !important;
    background-color: #ffffff !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    border: 1px solid #ddd !important;
    border-top: 4px solid #005a84 !important;
    padding: 0 !important;
    left: auto !important;
    right: 0 !important; /* Rechtsbündig unter dem Hauptpunkt */
    position: absolute !important;
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item {
    border-bottom: 1px solid #f2f2f2 !important;
    display: block !important;
    width: 100% !important;
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a {
    color: #444 !important;
    font-size: 17px !important;
    padding: 14px 30px !important;
    display: block !important;
    white-space: nowrap !important;
    line-height: normal !important;
    transition: all 0.2s ease;
}

/* Untermenü Hover (Gelb) */
.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a:hover {
    background-color: #F6C000 !important;
    color: #000 !important;
    padding-left: 35px !important;
}

/* --- 4. BLOG-BUTTON (Desktop Zentrierung) --- */
.sp-megamenu-parent > li:last-child > a {
    background-color: #445566 !important;
    color: #fff !important;
    line-height: 48px !important;
    height: 48px !important;
    margin-top: 56px !important;
    padding: 0 25px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

/* --- 5. BEGRÜSSUNG (PHP/Sourcerer Modul) --- */
.greeting-wrap {
    padding-top: 40px;
    padding-bottom: 20px;
    clear: both;
    width: 100%;
}

.greeting-title {
    font-size: 28px !important;
    font-weight: 400 !important; /* Kräftige Schrift */
    color: #222 !important;
    border-left: 6px solid #f6c000; /* Gelber eMAGazin-Balken */
    padding-left: 20px;
    margin: 0 !important;
    text-align: left;
}

/* Desktop-Feinjustierung der Begrüßung (100px Einzug) */
@media (min-width: 992px) {
    .greeting-title {
        margin-left: 100px !important;
    }
}

/* --- 6. MOBILE / HAMBURGER MENÜ & MOBILE BEGRÜSSUNG --- */
@media (max-width: 991px) {
    
    /* Header auf Mobile */
    #sp-header {
        height: 90px !important;
    }

    /* Mobile Hauptmenü-Punkte */
    body .offcanvas-menu .offcanvas-inner ul.menu > li > a,
    body .offcanvas-menu .offcanvas-inner ul.menu > li > span {
        font-size: 21px !important;
        font-weight: 500 !important;
        padding: 12px 20px !important;
    }

    /* Mobile Untermenü-Punkte (Kompakt & eingerückt) */
    body .offcanvas-menu .offcanvas-inner ul.menu li ul li a {
        font-size: 18px !important;
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        padding-left: 35px !important;
        color: #555 !important;
        display: block !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        background-color: #fafafa !important;
    }

    /* Mobile Begrüßung (Ohne 100px Einzug) */
    .greeting-title {
        font-size: 22px !important;
        margin-left: 15px !important;
        border-left-width: 5px;
    }
    
    .greeting-wrap {
        padding-top: 20px;
    }
}

#sp-footer {
    min-height: 150px; /* Setzt eine Mindesthöhe von 150 Pixeln */
    padding: 30px 0; /* Innenabstand oben und unten */
}