#header {
    height: 0px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 1000;
    overflow: visible;
    padding-top: 60px;
    pointer-events: none;
}

#header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: -1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    width: 97%;
    height: 88px;
}

.logo {
    font-weight: bold;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.logo-container {
    position: relative;
    display: block;
    height: 80px;
    width: auto;
}

.logo-icon {
    height: 80px;
    width: auto;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1100;
    transition:
        height 0.15s ease,
        filter 0.3s ease;
}

.logo-text-link {
    position: absolute;
    top: 20px;
    left: calc(1.5%);
    z-index: 100;
    pointer-events: auto;
}

.logo-text {
    height: 80px;
    width: auto;
    transition:
        height 0.15s ease,
        filter 0.3s ease;
}

.logo-icon:hover,
.logo-text:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

#header .burger-menu {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    pointer-events: auto;
}

#header .menu-toggle {
    display: none;
}

#header .burger-icon {
    background-color: #d00909;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 41px;
    height: 41px;
    position: relative;
    z-index: 1000;
    transition:
        opacity 0.3s ease,
        filter 0.3s ease;
    opacity: 0.95;
}

#header .burger-icon:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(196, 11, 32, 0.8));
}

#header .burger-icon:hover span {
    background-color: #ffffff;
}

#header .burger-icon:active {
    transform: scale(0.95);
}

#header .burger-icon span {
    width: 25px;
    height: 3px;
    background-color: white;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    transform-origin: center;
}


#header .menu-toggle:checked + .burger-icon span:nth-child(1) {
    transform: translate(0px, 7px) rotate(45deg);
}

#header .menu-toggle:checked + .burger-icon span:nth-child(2) {
    opacity: 0;
}

#header .menu-toggle:checked + .burger-icon span:nth-child(3) {
    transform: translate(0px, -7px) rotate(-45deg);
}

#header .menu-toggle:checked + .burger-icon {
    background-color: rgba(0, 0, 0, 0);
}

#header .burger-icon span a {
    display: none;
}


#header .dropdown-menu {
    position: fixed;
    top: 0;
    right: -30vw;
    width: 30vw;
    height: 100vh;
    background-color: #1f1f1f;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 100px 40px 40px 40px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    align-items: end;
    justify-content: center;
}

#header .dropdown-menu h3 {
    margin: 0px;
    transition: color 0.3s ease;
}

#header .menu-toggle:checked + .burger-icon + .dropdown-menu {
    right: 0;
}

#header .dropdown-menu a {
    color: white;
    text-decoration: none;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    font-size: 18px;
    font-weight: 500;
}

#header .dropdown-menu h3:hover {
    color: #d00909;
}

#header .dropdown-menu a:last-child {
    border-bottom: none;
}

#header .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: 1001;
    display: none;
    cursor: pointer;
}

#header .menu-toggle:checked ~ .menu-overlay {
    display: block;
}


#header .menu-toggle:checked ~ .dropdown-menu {
    z-index: 1002;
}


#header .menu-toggle:checked + .burger-icon {
    z-index: 1003;
}


#header.scrolled {
    height: 62px;
    padding-top: 0;
    padding-bottom: 0;
}

#header.scrolled .logo-container {
    height: 56px;
}

#header.scrolled .logo-icon {
    height: 56px;
}

.logo-text-link.scrolled {
    top: 3px;
}

.logo-text-link.scrolled .logo-text {
    height: 56px;
}

@media (max-width: 1024px) {
    #header .dropdown-menu {
        right: -40vw;
        width: 40vw;
    }

@media (max-width: 768px) {
    #header {
        padding-top: 20px;
    }

    .logo-text-link {
        top: -10px;
        left: -5px;
    }

    #header .dropdown-menu {
        right: -100vw;
        width: 100vw;
        align-items: center;
        padding: 120px 40px 40px 40px;
    }

    #header .dropdown-menu a {
        text-align: center;
        width: 100%;
        font-size: 24px;
        padding: 25px 0;
    }

    #header .dropdown-menu h3 {
        font-size: 2rem;
    }

    #header .logo-icon {
        top:10px;
        left: -10px;
    }

    #header .burger-icon {
        top: 10px;
    }
}

/* Landscape mobile devices - use mobile header positioning */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #header {
        padding-top: 20px !important;
    }

    .logo-text-link {
        top: -10px !important;
        left: -5px !important;
    }

    #header .logo-icon {
        top: 10px !important;
        left: -10px !important;
    }

    #header .burger-icon {
        top: 10px !important;
    }

    #header .dropdown-menu h3 {
        font-size: 1.3rem;
    }

    #header .dropdown-menu {
        right: -30vw;
        width: 30vw;
    }
}
