/**
 * Noble Site Header Styles
 * 
 * Premium Header für Noble Atlas mit Mega-Menü (Desktop) und Drawer (Mobile)
 * Noble Atlas CI: Dark Emerald + Gold, dezente Marmor-Textur
 * 
 * @package Noble_Site_Header
 * @since 1.0.0
 */

/* ==========================================
   Design Tokens (Noble Atlas CI)
   ========================================== */
:root {
    --noble-emerald-dark: #01221c;
    --noble-gold: #dbc16d;
    --noble-whitegold: #ecd292;
    --noble-ivory: #f8f5f0;
    --noble-moss: #1c3c2c;
    
    --noble-font-heading: 'Playfair Display', serif;
    --noble-font-body: 'Lato', sans-serif;
    
    --noble-transition-fast: 150ms ease;
    --noble-transition-normal: 200ms ease-out;
    --noble-transition-slow: 300ms ease-out;
    
    /* 8px Grid System */
    --noble-space-xs: 4px;
    --noble-space-sm: 8px;
    --noble-space-md: 16px;
    --noble-space-lg: 24px;
    --noble-space-xl: 32px;
    --noble-space-2xl: 48px;
    --noble-space-3xl: 64px;
    
    /* Typography Scale */
    --noble-text-xs: 12px;
    --noble-text-sm: 13px;
    --noble-text-base: 14px;
    --noble-text-md: 15px;
    --noble-text-lg: 16px;
    --noble-text-xl: 18px;
    --noble-text-2xl: 20px;
    --noble-text-3xl: 24px;
    
    /* Letter Spacing */
    --noble-tracking-tight: -0.01em;
    --noble-tracking-normal: 0;
    --noble-tracking-wide: 0.02em;
    --noble-tracking-wider: 0.05em;
    
    /* Shadows */
    --noble-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --noble-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --noble-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --noble-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
    --noble-shadow-gold: 0 0 20px rgba(219, 193, 109, 0.15);
}

/* ==========================================
   Base Header Styles
   ========================================== */
#noble-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483000;
    height: 88px;
    background-color: var(--noble-emerald-dark);
    /* Dezente Marmorstruktur (sehr subtil) */
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.008) 0%, rgba(255, 255, 255, 0.02) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.008) 2px,
            rgba(255, 255, 255, 0.008) 4px
        );
    box-shadow: var(--noble-shadow-md);
    backdrop-filter: blur(8px);
    transition: all var(--noble-transition-normal);
    border-bottom: 1px solid rgba(219, 193, 109, 0.08);
}

#noble-site-header.noble-header-scrolled {
    box-shadow: var(--noble-shadow-lg);
    border-bottom-color: rgba(219, 193, 109, 0.12);
}

/* ==========================================
   Desktop Header
   ========================================== */
.noble-header-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .noble-header-desktop {
        display: block;
    }
    
    .noble-header-mobile {
        display: none;
    }
    
    .noble-header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 var(--noble-space-3xl);
        height: 88px;
    }
    
    /* Logo */
    .noble-header-logo {
        flex-shrink: 0;
        padding-right: var(--noble-space-xl);
    }
    
    .noble-header-logo a {
        display: block;
        transition: opacity var(--noble-transition-fast);
    }
    
    .noble-header-logo a:hover {
        opacity: 0.85;
    }
    
    .noble-header-logo img {
        max-height: 44px;
        width: auto;
        height: auto;
        display: block;
        transition: transform var(--noble-transition-fast);
    }
    
    /* Navigation */
    .noble-header-nav {
        flex: 1;
        display: flex;
        justify-content: center;
        margin: 0 var(--noble-space-2xl);
    }
    
    .noble-nav-list {
        display: flex;
        align-items: center;
        gap: var(--noble-space-2xl);
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .noble-nav-item {
        position: relative;
    }
    
    .noble-nav-link {
        font-family: var(--noble-font-heading);
        font-size: var(--noble-text-lg);
        font-weight: 500;
        letter-spacing: var(--noble-tracking-tight);
        color: var(--noble-ivory);
        text-decoration: none;
        padding: var(--noble-space-sm) 0;
        display: block;
        transition: color var(--noble-transition-fast);
        position: relative;
        line-height: 1.4;
    }
    
    .noble-nav-link:hover,
    .noble-nav-link:focus {
        color: var(--noble-gold);
        outline: none;
    }
    
    .noble-nav-link:focus-visible {
        outline: 2px solid var(--noble-gold);
        outline-offset: var(--noble-space-xs);
        border-radius: 2px;
    }
    
    .noble-nav-item.active .noble-nav-link {
        color: var(--noble-gold);
    }
    
    /* Keine Umrandung für aktive Mega-Menu-Items */
    .noble-nav-item-mega.active .noble-nav-link::after {
        display: none;
    }
    
    .noble-nav-item.active:not(.noble-nav-item-mega) .noble-nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1.5px;
        background: linear-gradient(90deg, transparent, var(--noble-gold) 20%, var(--noble-gold) 80%, transparent);
        opacity: 0.9;
    }
    
    /* Keine Focus-Outline für Mega-Menu-Items beim Öffnen */
    .noble-nav-item-mega .noble-nav-link:focus,
    .noble-nav-item-mega .noble-nav-link:focus-visible {
        outline: none !important;
    }
    
    /* Dropdown Menu */
    .noble-nav-item-dropdown {
        position: relative;
    }
    
    .noble-dropdown-menu {
        position: absolute;
        top: calc(100% + var(--noble-space-sm));
        left: 0;
        background-color: var(--noble-moss);
        border: 1px solid rgba(219, 193, 109, 0.15);
        border-radius: 8px;
        padding: var(--noble-space-sm) 0;
        min-width: 220px;
        list-style: none;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity var(--noble-transition-normal), 
                    visibility var(--noble-transition-normal),
                    transform var(--noble-transition-normal);
        z-index: 2147483201;
        box-shadow: var(--noble-shadow-lg);
        backdrop-filter: blur(12px);
    }
    
    .noble-nav-item-dropdown:hover .noble-dropdown-menu,
    .noble-nav-item-dropdown:focus-within .noble-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .noble-dropdown-link {
        display: block;
        padding: var(--noble-space-sm) var(--noble-space-lg);
        color: var(--noble-ivory);
        text-decoration: none;
        font-family: var(--noble-font-body);
        font-size: var(--noble-text-base);
        letter-spacing: var(--noble-tracking-normal);
        line-height: 1.5;
        transition: all var(--noble-transition-fast);
    }
    
    .noble-dropdown-link:hover,
    .noble-dropdown-link:focus {
        background-color: rgba(219, 193, 109, 0.08);
        color: var(--noble-gold);
        padding-left: var(--noble-space-xl);
        outline: none;
    }
    
    .noble-dropdown-link:focus-visible {
        outline: 2px solid var(--noble-gold);
        outline-offset: -2px;
    }
    
    /* CTA Buttons */
    .noble-header-cta {
        display: flex;
        align-items: center;
        gap: var(--noble-space-md);
        flex-shrink: 0;
        padding-left: var(--noble-space-xl);
    }
    
    .noble-cta-button {
        display: inline-block;
        padding: var(--noble-space-sm) var(--noble-space-lg);
        background-color: var(--noble-gold);
        color: var(--noble-emerald-dark);
        font-family: var(--noble-font-body);
        font-size: var(--noble-text-base);
        font-weight: 600;
        letter-spacing: var(--noble-tracking-wide);
        text-decoration: none;
        border-radius: 6px;
        transition: all var(--noble-transition-fast);
        border: none;
        cursor: pointer;
        line-height: 1.4;
        white-space: nowrap;
        box-shadow: var(--noble-shadow-sm);
    }
    
    .noble-cta-button:hover,
    .noble-cta-button:focus {
        background-color: var(--noble-whitegold);
        color: var(--noble-ivory);
        transform: translateY(-1px);
        box-shadow: var(--noble-shadow-md), var(--noble-shadow-gold);
        outline: none;
    }
    
    .noble-cta-button:focus-visible {
        outline: 2px solid var(--noble-gold);
        outline-offset: 2px;
    }
    
    .noble-cta-link {
        color: var(--noble-ivory);
        font-family: var(--noble-font-body);
        font-size: var(--noble-text-base);
        letter-spacing: var(--noble-tracking-normal);
        text-decoration: none;
        transition: color var(--noble-transition-fast);
        line-height: 1.4;
        white-space: nowrap;
    }
    
    .noble-cta-link:hover,
    .noble-cta-link:focus {
        color: var(--noble-gold);
        outline: none;
    }
    
    .noble-cta-link:focus-visible {
        outline: 2px solid var(--noble-gold);
        outline-offset: var(--noble-space-xs);
        border-radius: 2px;
    }
}

/* ==========================================
   Mega Menu
   ========================================== */
.noble-mega-menu-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, 
        rgba(1, 34, 28, 0.98) 0%, 
        rgba(10, 58, 48, 0.95) 50%, 
        rgba(28, 60, 44, 0.98) 100%);
    border-top: 1px solid rgba(219, 193, 109, 0.2);
    box-shadow: var(--noble-shadow-xl);
    z-index: 2147483100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--noble-transition-normal),
                visibility var(--noble-transition-normal),
                transform var(--noble-transition-normal);
    pointer-events: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.noble-mega-menu-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(219, 193, 109, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 210, 146, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.noble-mega-menu-overlay > * {
    position: relative;
    z-index: 1;
}

.noble-mega-menu-overlay.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.noble-mega-panel {
    display: none;
    padding: var(--noble-space-3xl) 0;
}

.noble-mega-panel.active {
    display: block;
}

.noble-mega-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--noble-space-3xl);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--noble-space-3xl);
    align-items: start;
}

.noble-mega-column {
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-md);
}

.noble-mega-title {
    font-family: var(--noble-font-heading);
    font-size: var(--noble-text-xl);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-tight);
    color: var(--noble-gold);
    margin: 0 0 var(--noble-space-md) 0;
    line-height: 1.3;
}

.noble-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-sm);
}

.noble-mega-link {
    color: var(--noble-ivory);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-base);
    letter-spacing: var(--noble-tracking-normal);
    text-decoration: none;
    padding: var(--noble-space-xs) 0;
    display: block;
    line-height: 1.5;
    transition: all var(--noble-transition-fast);
}

.noble-mega-link:hover,
.noble-mega-link:focus {
    color: var(--noble-gold);
    padding-left: var(--noble-space-sm);
    outline: none;
}

.noble-mega-link:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: var(--noble-space-xs);
    border-radius: 2px;
}

.noble-mega-link-item.active .noble-mega-link {
    color: var(--noble-gold);
    font-weight: 600;
    padding-left: var(--noble-space-sm);
    position: relative;
}

.noble-mega-link-item.active .noble-mega-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--noble-gold) 0%, var(--noble-gold-light) 100%);
    border-radius: 2px;
}

.noble-dropdown-item.active .noble-dropdown-link {
    color: var(--noble-gold);
    font-weight: 600;
}

.noble-mega-teaser {
    background: linear-gradient(135deg, rgba(219, 193, 109, 0.08) 0%, rgba(236, 210, 146, 0.04) 100%);
    border: 1px solid rgba(219, 193, 109, 0.15);
    border-radius: 12px;
    padding: var(--noble-space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-md);
    backdrop-filter: blur(8px);
}

.noble-mega-teaser-title {
    font-family: var(--noble-font-heading);
    font-size: var(--noble-text-3xl);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-tight);
    color: var(--noble-gold);
    margin: 0;
    line-height: 1.2;
}

.noble-mega-teaser-text {
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-base);
    letter-spacing: var(--noble-tracking-normal);
    color: var(--noble-ivory);
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
}

.noble-mega-teaser-button {
    display: inline-block;
    padding: var(--noble-space-sm) var(--noble-space-lg);
    background-color: var(--noble-gold);
    color: var(--noble-emerald-dark);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-base);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-wide);
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--noble-transition-fast);
    align-self: flex-start;
    margin-top: var(--noble-space-xs);
    line-height: 1.4;
    box-shadow: var(--noble-shadow-sm);
}

.noble-mega-teaser-button:hover,
.noble-mega-teaser-button:focus {
    background-color: var(--noble-whitegold);
    transform: translateY(-1px);
    box-shadow: var(--noble-shadow-md);
    outline: none;
}

.noble-mega-teaser-button:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

/* ==========================================
   Mobile Header
   ========================================== */
.noble-header-mobile {
    display: block;
}

@media (min-width: 1024px) {
    .noble-header-mobile {
        display: none;
    }
}

.noble-header-mobile .noble-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--noble-space-lg);
    height: 64px;
}

.noble-header-mobile .noble-header-logo img {
    max-height: 36px;
    width: auto;
    height: auto;
    display: block;
}

.noble-header-mobile-actions {
    display: flex;
    align-items: center;
    gap: var(--noble-space-md);
}

.noble-mobile-cta {
    padding: var(--noble-space-sm) var(--noble-space-md);
    background-color: var(--noble-gold);
    color: var(--noble-emerald-dark);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-sm);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-wide);
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--noble-transition-fast);
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: var(--noble-shadow-sm);
}

.noble-mobile-cta:hover,
.noble-mobile-cta:focus {
    background-color: var(--noble-whitegold);
    transform: translateY(-1px);
    box-shadow: var(--noble-shadow-md);
    outline: none;
}

.noble-mobile-cta:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

/* Burger Button */
.noble-burger {
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-xs);
    background: none;
    border: none;
    padding: var(--noble-space-sm);
    cursor: pointer;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    transition: all var(--noble-transition-fast);
    border-radius: 4px;
}

.noble-burger:hover {
    background-color: rgba(219, 193, 109, 0.08);
}

.noble-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--noble-ivory);
    transition: all var(--noble-transition-fast);
    border-radius: 1px;
}

.noble-burger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.noble-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.noble-burger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.noble-burger:hover,
.noble-burger:focus {
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

/* ==========================================
   Drawer Menu
   ========================================== */
.noble-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85vw;
    max-width: 400px;
    background-color: var(--noble-emerald-dark);
    z-index: 2147483200;
    transform: translateX(100%);
    transition: transform var(--noble-transition-slow);
    overflow-y: auto;
}

.noble-drawer[aria-hidden="false"] {
    transform: translateX(0);
}

.noble-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2147483100;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--noble-transition-slow), visibility var(--noble-transition-slow);
    pointer-events: none;
}

body.noble-drawer-open .noble-drawer-overlay {
    pointer-events: auto;
}

body.noble-drawer-open .noble-drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.noble-drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.noble-drawer-header {
    display: flex;
    justify-content: flex-end;
    padding: var(--noble-space-md) var(--noble-space-lg);
    border-bottom: 1px solid rgba(219, 193, 109, 0.12);
}

.noble-drawer-close {
    background: none;
    border: none;
    color: var(--noble-ivory);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--noble-transition-fast);
}

.noble-drawer-close:hover,
.noble-drawer-close:focus {
    color: var(--noble-gold);
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

.noble-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--noble-space-lg);
}

.noble-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-md);
    margin-bottom: var(--noble-space-xl);
    padding-bottom: var(--noble-space-lg);
    border-bottom: 1px solid rgba(219, 193, 109, 0.12);
}

.noble-drawer-cta-primary {
    padding: var(--noble-space-md) var(--noble-space-lg);
    background-color: var(--noble-gold);
    color: var(--noble-emerald-dark);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-md);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-wide);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all var(--noble-transition-fast);
    line-height: 1.4;
    box-shadow: var(--noble-shadow-sm);
}

.noble-drawer-cta-primary:hover,
.noble-drawer-cta-primary:focus {
    background-color: var(--noble-whitegold);
    transform: translateY(-1px);
    box-shadow: var(--noble-shadow-md);
    outline: none;
}

.noble-drawer-cta-primary:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

.noble-drawer-cta-secondary {
    padding: var(--noble-space-sm) var(--noble-space-lg);
    color: var(--noble-ivory);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-base);
    letter-spacing: var(--noble-tracking-normal);
    text-decoration: none;
    text-align: center;
    border: 1px solid rgba(219, 193, 109, 0.25);
    border-radius: 6px;
    transition: all var(--noble-transition-fast);
    line-height: 1.4;
}

.noble-drawer-cta-secondary:hover,
.noble-drawer-cta-secondary:focus {
    border-color: var(--noble-gold);
    color: var(--noble-gold);
    background-color: rgba(219, 193, 109, 0.05);
    outline: none;
}

.noble-drawer-cta-secondary:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

/* Accordion */
.noble-drawer-accordion {
    border-bottom: 1px solid rgba(219, 193, 109, 0.08);
}

.noble-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--noble-space-md) 0;
    background: none;
    border: none;
    color: var(--noble-ivory);
    font-family: var(--noble-font-heading);
    font-size: var(--noble-text-lg);
    font-weight: 500;
    letter-spacing: var(--noble-tracking-tight);
    text-align: left;
    cursor: pointer;
    transition: color var(--noble-transition-fast);
    line-height: 1.4;
}

.noble-accordion-trigger:hover,
.noble-accordion-trigger:focus {
    color: var(--noble-gold);
    outline: 2px solid var(--noble-gold);
    outline-offset: 2px;
}

.noble-accordion-icon {
    transition: transform var(--noble-transition-fast);
    flex-shrink: 0;
}

.noble-accordion-trigger[aria-expanded="true"] .noble-accordion-icon {
    transform: rotate(180deg);
}

.noble-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--noble-transition-slow);
}

.noble-accordion-panel[aria-hidden="false"] {
    max-height: 2000px;
}

.noble-drawer-column {
    margin-bottom: var(--noble-space-lg);
}

.noble-drawer-column-title {
    font-family: var(--noble-font-heading);
    font-size: var(--noble-text-base);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-tight);
    color: var(--noble-gold);
    margin: 0 0 var(--noble-space-md) 0;
    line-height: 1.3;
}

.noble-drawer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--noble-space-sm);
}

.noble-drawer-link {
    color: var(--noble-ivory);
    font-family: var(--noble-font-body);
    font-size: var(--noble-text-base);
    letter-spacing: var(--noble-tracking-normal);
    text-decoration: none;
    padding: var(--noble-space-sm) 0;
    display: block;
    line-height: 1.5;
    transition: all var(--noble-transition-fast);
}

.noble-drawer-link:hover,
.noble-drawer-link:focus {
    color: var(--noble-gold);
    padding-left: var(--noble-space-sm);
    outline: none;
}

.noble-drawer-link:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: var(--noble-space-xs);
    border-radius: 2px;
}

/* ==========================================
   Body Scroll Lock (when drawer is open)
   ========================================== */
body.noble-drawer-open {
    overflow: hidden;
}

/* Drawer muss immer über dem Page-Content liegen */
body.noble-drawer-open #page-container {
    position: relative;
    z-index: 0;
}

/* ==========================================
   Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .noble-mega-panel,
    .noble-drawer,
    .noble-header,
    .noble-dropdown-menu,
    .noble-accordion-panel {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================
   Tablet Adjustments
   ========================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .noble-header-container {
        padding: 0 var(--noble-space-2xl);
    }
    
    .noble-nav-list {
        gap: var(--noble-space-xl);
    }
    
    .noble-mega-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--noble-space-2xl);
        padding: 0 var(--noble-space-2xl);
    }
    
    .noble-mega-teaser {
        grid-column: 1 / -1;
    }
}

/* ==========================================
   Focus Styles (A11y)
   ========================================== */
*:focus-visible {
    outline: 2px solid var(--noble-gold);
    outline-offset: var(--noble-space-xs);
    border-radius: 2px;
}

/* ==========================================
   Body Padding (Content starts below header)
   ========================================== */
/* Desktop: Header is 88px tall */
body.noble-custom-header-active {
    padding-top: 0;
}

/* Desktop scrolled: Header is 64px tall */
body.noble-custom-header-active.noble-header-scrolled {
    padding-top: 0;
}

/* Divi: avoid double offset (body + #page-container) */
body.noble-custom-header-active.et_divi_theme,
body.noble-custom-header-active.et_divi_theme.noble-header-scrolled {
    padding-top: 0;
}

/* Divi Page Container - Desktop */
body.noble-custom-header-active #page-container {
    padding-top: 88px !important;
    box-sizing: border-box;
    min-height: calc(100vh - 88px);
}

/* Divi: adjust full-height sections to avoid 100vh + header offset */
body.noble-custom-header-active .et_pb_section.et_pb_fullheight,
body.noble-custom-header-active .et_pb_section.et_pb_section_fullheight {
    min-height: calc(100vh - 88px) !important;
    height: auto !important;
}

/* Divi: prevent nested scroll containers (causes extra scrollbar) */
body.noble-custom-header-active.et_divi_theme #page-container,
body.noble-custom-header-active.et_divi_theme #main-content,
body.noble-custom-header-active.et_divi_theme #et-main-area,
body.noble-custom-header-active.et_divi_theme #et-boc {
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Divi Theme Builder wrappers can create a second scroll container */
body.noble-custom-header-active.et_divi_theme .et-l,
body.noble-custom-header-active.et_divi_theme .et-l--body,
body.noble-custom-header-active.et_divi_theme .et_builder_inner_content,
body.noble-custom-header-active.et_divi_theme .et_pb_section,
body.noble-custom-header-active.et_divi_theme .et_pb_row,
body.noble-custom-header-active.et_divi_theme .et_pb_column {
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

body.noble-custom-header-active.et_divi_theme {
    overflow-y: auto;
}

body.noble-custom-header-active.et_divi_theme #page-container {
    min-height: 0;
}

body.noble-custom-header-active.noble-header-scrolled #page-container {
    padding-top: 88px !important;
}

/* Divi: fixes scrollbar by keeping padding stable on scroll */
body.noble-custom-header-active.et_divi_theme #page-container,
body.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
    padding-top: 88px !important;
}

body.noble-custom-header-active.et_divi_theme #page-container {
    transform: none;
}

body.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
    transform: none;
}

/* Divi Main Content - vermeidet doppeltes Theme-Offset */
body.noble-custom-header-active.et_divi_theme #main-content,
body.noble-custom-header-active.et_divi_theme .et-main-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Mobile: Header is 64px tall */
@media (max-width: 1023px) {
    body.noble-custom-header-active {
        padding-top: 0;
    }
    
    body.noble-custom-header-active.noble-header-scrolled {
        padding-top: 0;
    }

    body.noble-custom-header-active.et_divi_theme,
    body.noble-custom-header-active.et_divi_theme.noble-header-scrolled {
        padding-top: 0;
    }
    
    body.noble-custom-header-active #page-container {
        padding-top: 64px !important;
    }
    
    body.noble-custom-header-active.noble-header-scrolled #page-container {
        padding-top: 64px !important;
    }

    body.noble-custom-header-active.et_divi_theme #page-container,
    body.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
        padding-top: 64px !important;
    }

    body.noble-custom-header-active .et_pb_section.et_pb_fullheight,
    body.noble-custom-header-active .et_pb_section.et_pb_section_fullheight {
        min-height: calc(100vh - 64px) !important;
        height: auto !important;
    }
}

/* WordPress Admin Bar Adjustment - Desktop */
body.admin-bar.noble-custom-header-active {
    padding-top: 0;
}

body.admin-bar.noble-custom-header-active #page-container {
    padding-top: calc(88px + 32px) !important;
    min-height: calc(100vh - 88px - 32px);
}

body.admin-bar.noble-custom-header-active .et_pb_section.et_pb_fullheight,
body.admin-bar.noble-custom-header-active .et_pb_section.et_pb_section_fullheight {
    min-height: calc(100vh - 88px - 32px) !important;
    height: auto !important;
}

body.admin-bar.noble-custom-header-active.noble-header-scrolled {
    padding-top: 0;
}

body.admin-bar.noble-custom-header-active.noble-header-scrolled #page-container {
    padding-top: calc(88px + 32px) !important;
}

body.admin-bar.noble-custom-header-active.et_divi_theme #page-container,
body.admin-bar.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
    padding-top: calc(88px + 32px) !important;
}

body.admin-bar.noble-custom-header-active.et_divi_theme #page-container {
    transform: none;
}

body.admin-bar.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
    transform: none;
}

/* Divi: admin bar handled by #page-container only */
body.admin-bar.noble-custom-header-active.et_divi_theme,
body.admin-bar.noble-custom-header-active.et_divi_theme.noble-header-scrolled {
    padding-top: 0;
}

/* WordPress Admin Bar Adjustment - Mobile */
@media screen and (max-width: 782px) {
    body.admin-bar.noble-custom-header-active {
        padding-top: 0;
    }
    
    body.admin-bar.noble-custom-header-active #page-container {
        padding-top: calc(64px + 46px) !important;
        min-height: calc(100vh - 64px - 46px);
    }

    body.admin-bar.noble-custom-header-active .et_pb_section.et_pb_fullheight,
    body.admin-bar.noble-custom-header-active .et_pb_section.et_pb_section_fullheight {
        min-height: calc(100vh - 64px - 46px) !important;
        height: auto !important;
    }
    
    body.admin-bar.noble-custom-header-active.noble-header-scrolled {
        padding-top: 0;
    }
    
    body.admin-bar.noble-custom-header-active.noble-header-scrolled #page-container {
        padding-top: calc(64px + 46px) !important;
    }

    body.admin-bar.noble-custom-header-active.et_divi_theme #page-container,
    body.admin-bar.noble-custom-header-active.et_divi_theme.noble-header-scrolled #page-container {
        padding-top: calc(64px + 46px) !important;
    }

    body.admin-bar.noble-custom-header-active.et_divi_theme,
    body.admin-bar.noble-custom-header-active.et_divi_theme.noble-header-scrolled {
        padding-top: 0;
    }
}

/* ==========================================
   Breadcrumbs
   ========================================== */
.noble-breadcrumbs {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 40px 0;
    font-family: var(--noble-font-body);
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
}

/* Sicherstellen, dass Breadcrumbs unter dem Header sind (nicht dahinter) */
body.noble-custom-header-active .noble-breadcrumbs {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 24px;
}

/* Für Divi: Breadcrumbs müssen nach dem Header-Padding kommen */
body.noble-custom-header-active.et_divi_theme .noble-breadcrumbs {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
}

/* Verhindere, dass Breadcrumbs hinter dem Header sind */
#page-container .noble-breadcrumbs,
#main-content .noble-breadcrumbs,
.et_main_area .noble-breadcrumbs {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
}

.noble-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--noble-space-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.noble-breadcrumb-item {
    display: flex;
    align-items: center;
}

.noble-breadcrumb-item a {
    color: var(--noble-ivory) !important;
    text-decoration: none;
    font-size: var(--noble-text-sm);
    letter-spacing: var(--noble-tracking-normal);
    transition: color var(--noble-transition-fast);
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.noble-breadcrumb-item a:hover,
.noble-breadcrumb-item a:focus {
    color: var(--noble-gold);
    opacity: 1;
    outline: none;
}

.noble-breadcrumb-current {
    color: var(--noble-gold) !important;
    font-size: var(--noble-text-sm);
    font-weight: 600;
    letter-spacing: var(--noble-tracking-normal);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.noble-breadcrumb-separator {
    color: var(--noble-gold) !important;
    opacity: 1 !important;
    font-size: var(--noble-text-sm);
    font-weight: 700;
    margin: 0 var(--noble-space-md);
    user-select: none;
    letter-spacing: 0.1em;
    display: inline-block;
    line-height: 1;
}

@media (max-width: 768px) {
    .noble-breadcrumbs {
        padding: 20px 24px 0;
    }
    
    .noble-breadcrumb-item a,
    .noble-breadcrumb-current,
    .noble-breadcrumb-separator {
        font-size: 13px;
    }
}
