/**
 * Header Block Styles - Exact copy van origineel
 */

/* Header */
.header {
    height: 90px;
    /* Slightly taller for breathing room */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #FAFBF7;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}

.header.scrolled {
    background: #fff;
    /* Match Hero Background Tint */
    height: 72px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Ensure full width */
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.logo img {
    height: 48px;
}

/* Nav & Mega Menu */
.nav-links {
    display: flex;
    gap: var(--space-8);
    height: 100%;
    align-items: center;
    z-index: 1001;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-brand-green);
}

/* Header UI Elements Visibility Defaults (Desktop) */
.header-right-mobile {
    display: none;
    /* Hidden on desktop */
}

.desktop-contact-btn {
    display: inline-flex;
    /* Visible on desktop */
}

.mobile-menu-toggle {
    display: none;
}

/* Mobile Navigation Overlay (New Implementation) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9999;
    /* Above everything */
    display: flex;
    flex-direction: column;
    padding: var(--space-8) var(--space-6);
    /* More padding */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    /* Smooth easeOut */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-12);
    /* Push content down more */
    flex-shrink: 0;
}

.mobile-logo img {
    height: 48px;
    /* Bigger logo */
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    /* Bigger close icon */
    color: var(--color-text-dark);
    cursor: pointer;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-menu-close:active {
    transform: scale(0.9);
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Start from top with spacing, looks cleaner than center */
    padding-top: var(--space-8);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.mobile-nav-item {
    font-size: 2rem;
    /* Much larger */
    font-weight: 800;
    /* Bold corporate feel */
    color: var(--color-text-dark);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Clean font styles */
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mobile-nav-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-nav-item a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.mobile-nav-item a:hover {
    color: var(--color-brand-green);
}

/* Submenu in Mobile Overlay */
.mobile-submenu {
    display: none;
    margin-top: var(--space-6);
    padding-left: var(--space-2);
    /* Removed border, kept simple indentation */
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-grey);
}

.mobile-submenu.open {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    animation: fadeInUp 0.4s ease forwards;
}

.mobile-submenu a {
    padding: var(--space-1) 0;
    display: block;
}

.mobile-menu-footer {
    margin-top: auto;
    /* Push to very bottom */
    padding-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-align: center;
    font-weight: 500;
}

/* Header Adjustments */
@media (max-width: 960px) {
    .nav-links {
        display: none !important;
    }

    .desktop-contact-btn {
        display: none !important;
    }

    .header-right-mobile {
        display: flex !important;
        gap: var(--space-4);
        align-items: center;
    }

    /* Force Row Layout */
    .header-inner {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    .logo {
        flex-shrink: 0;
        margin-right: auto;
    }

    .logo img {
        height: 40px;
    }

    /* Visible Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        font-size: 1.5rem;
        color: var(--color-text-dark);
        cursor: pointer;
        height: 40px;
        width: 40px;
        padding: 0;
    }
}

/* Dropdown Logic */
.nav-item {
    position: relative;
}

.mega-menu,
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border-radius: var(--space-2);
    z-index: 999;
}

/* Mega Menu specific (assortiment) */
.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: 110px;
    /* Topbar + Header height approx */
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.mega-column h4 {
    color: var(--color-brand-green);
    margin-bottom: var(--space-3);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mega-column a {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-grey);
}

.mega-column a:hover {
    color: var(--color-text-dark);
    text-decoration: underline;
}

/* Normal Dropdown */
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    min-width: 200px;
    padding: var(--space-4);
}

.dropdown-menu a {
    display: block;
    padding: var(--space-2) 0;
    color: var(--color-text-grey);
}

/* Legacy compatibility */
.eicom-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #FAFBF7;
    transition: all 0.3s ease;
}

.eicom-header.scrolled {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.eicom-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.eicom-header .header-logo img {
    height: 48px;
}

.eicom-header .nav-menu {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

.eicom-header .nav-menu a {
    font-weight: 500;
    color: var(--color-text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.eicom-header .nav-menu a:hover {
    color: var(--color-brand-green);
}
