/*
 * Mobile Header Styles
 *
 * This file contains the styles for the mobile-specific header
 * and the slide-out navigation menu.
 */

/* Hide the mobile header by default on larger screens */
.mobile-header {
    display: none;
}

/* Media query for mobile devices (max-width: 992px) */
@media (max-width: 992px) {

    /* Hide the main desktop header to prevent conflicts */
    .main-header {
        display: none !important;
    }

    /* Display and style the mobile header */
    .mobile-header {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 5000;
        background: transparent;
        padding: 15px 0;
    }

    .mobile-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }

    .mobile-header .logo-image {
        height: 50px;
        filter: brightness(0) invert(1); /* Makes the logo white */
    }

    /* Hamburger button styling */
    .mobile-header .dropdown-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        gap: 6px;
        position: relative;
        z-index: 1200; /* Ensure it's above the overlay */
    }

    .mobile-header .dropdown-toggle span {
        background-color: #ffffff !important; /* White hamburger icon */
        display: block;
        width: 30px;
        height: 3px;
        border-radius: 2px;
        transition: all 0.25s ease;
    }

    /* When menu is open, hamburger icon should be dark */
    .mobile-header .dropdown-toggle[aria-expanded="true"] span {
        background-color: #333;
    }
    
    /* Animation for the hamburger icon when the menu is open */
    .mobile-header .dropdown-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-header .dropdown-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .mobile-header .dropdown-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Slide-out Menu Styles */
    .dropdown-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100%;
        background-color: #ffffff; /* Solid White Background */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1100;
        overflow-y: auto;
        display: block;
        padding-top: 80px;
    }

    .dropdown-menu.is-open {
        transform: translateX(0);
    }

    /* Overlay for when the menu is open */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
    }

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

    /* Body class to prevent scrolling when menu is open */
    body.mobile-nav-open {
        overflow: hidden;
    }
}