header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #FDF2DE;
    transition: transform 0.3s ease;
}

header.header-hidden {
    transform: translateY(-100%);
}

.main-navigation {
    display:flex;
    flex-direction: row;
    width:100%;
    justify-content:space-between;
    align-items: center;
    padding: 20px 80px;
    height:100px;
    position:relative;
}

.nav {
    display:flex;
    flex-direction: row;
    gap:40px;
    font-weight:700;
    font-size:18px;
}

.soutenir-button {
    padding:1px 6px 3px 6px;
    background-color:#FB2C36;
    color:white;
    border-radius:5px;
    font-weight:700;
    display:flex;
    flex-direction: row;
    gap:5px;
    align-items:center;
    transition:0.3s ease transform;
}

.soutenir-button:hover {
    transform: scale(1.1);
}

.site-logo .logo {
    height:60px;
    position:absolute;
    left:50%;
    top:20px;
    transform:translateX(-50%);
    transition: transform 0.3s ease;
}

.site-logo:hover .logo {
    transform: translateX(-50%) scale(1.2);
}

/* Menu items with submenu */
.menu-item {
    position: relative;
}

.menu-item > a {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.menu-item > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #282323;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.menu-item > a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.menu-item > a:not(:hover)::after {
    transform-origin: right;
}

.menu-item .chevron {
    transition: transform 0.3s ease;
}

.menu-item:hover .chevron {
    transform: rotate(180deg);
}

/* Submenu dropdown */
.submenu {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FDF2DE;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding:10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.menu-item:hover .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li {
    padding: 0;
    width:100%;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    color: #282323;
    font-weight: 700;
    font-size: 16px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    border-radius:10px;
}

.submenu li a:hover {
    background-color: #ffffff;
}

/* Intro animation overlay */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FDF2DE;
    z-index: 9999;
}

/* Logo animation state */
.site-logo .logo.intro-animating {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 200px !important;
    height: 200px !important;
    z-index: 10000 !important;
    overflow: visible !important;
}

/* ===== BURGER MENU - Hidden on desktop ===== */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #282323;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger animation when open */
.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== MOBILE MENU OVERLAY - Hidden by default ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FDF2DE;
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-item {
    position: relative;
    width: 100%;
}

.mobile-menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 0;
    background-color: rgba(40, 35, 35, 0.1);
    transition: width 0.4s ease-out;
}

.mobile-menu.active .mobile-menu-item::after {
    width: 100%;
}

.mobile-menu.active .mobile-menu-item:nth-child(1)::after { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu-item:nth-child(2)::after { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-item:nth-child(3)::after { transition-delay: 0.5s; }
.mobile-menu.active .mobile-menu-item:nth-child(4)::after { transition-delay: 0.7s; }
.mobile-menu.active .mobile-menu-item:nth-child(5)::after { transition-delay: 0.9s; }
.mobile-menu.active .mobile-menu-item:nth-child(6)::after { transition-delay: 1.1s; }

.mobile-menu-item > a {
    display: block;
    padding: 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #282323;
}

.mobile-menu-item.has-submenu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mobile-menu-item.has-submenu > a {
    flex: 1;
}

.mobile-submenu-toggle {
    background: none;
    border: none;
    padding: 20px;
    cursor: pointer;
}

.mobile-submenu-toggle .chevron {
    transition: transform 0.3s ease;
}

.mobile-menu-item.submenu-open .mobile-submenu-toggle .chevron {
    transform: rotate(180deg);
}

.mobile-submenu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu-item.submenu-open .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu li a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #282323;
}

.mobile-soutenir {
    margin-top: 30px;
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 18px;
}

/* ===== RESPONSIVE - Mobile < 1200px ===== */
@media (max-width: 1199px) {
    .main-navigation {
        padding: 20px;
        height: 80px;
    }

    /* Hide desktop nav */
    .nav-left,
    .nav-right {
        display: none;
    }

    /* Show burger menu */
    .burger-menu {
        display: flex;
    }

    /* Show mobile menu */
    .mobile-menu {
        display: block;
    }

    /* Reposition logo */
    .site-logo {
        position: static;
        order: -1;
    }

    .site-logo .logo {
        position: static;
        transform: none;
        height: 50px;
    }

    .site-logo:hover .logo {
        transform: scale(1.1);
    }
}

/* Body lock when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}