/* ============================================
   MOBILE HAMBURGER NAVIGATION
   ============================================ */

/* Hamburger button - hidden on desktop */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 310;
    position: relative;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation when open */
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav dropdown */
.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: rgba(85, 119, 65, 0.97);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 300;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 24px;
    font-size: 1.3rem;
    font-family: "Brown", "Lucida Grande", Arial, sans-serif;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* RTL support for mobile nav */
html[lang="ar"] .mobile-nav a {
    text-align: right;
    font-family: 'Tajawal', 'Segoe UI Arabic', sans-serif !important;
}

/* Mobile only: show hamburger, hide nav items */
@media screen and (max-width: 767px) {
    .hamburger-btn {
        display: block;
    }

    /* Hide Home, Order Book links */
    header .header-content > a.fixedlogo.mobile-nav-item {
        display: none !important;
    }

    /* Ensure site title is visible and centered on mobile */
    header .header-content > a.logo {
        display: block !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto !important;
        min-width: unset !important;
        margin: 0 !important;
        z-index: 10;
        text-align: center;
    }

    header .header-content > a.logo h4.log {
        margin: 0;
        white-space: nowrap;
        font-size: 1.2rem;
    }

    /* Hide Contact inside contact-btn but keep language switcher */
    header .contact-btn a.mobile-nav-item {
        display: none !important;
    }

    /* Layout: hamburger on one side, lang switch on the other */
    header .header-content {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative;
    }

    header .contact-btn {
        width: auto !important;
    }
}

/* Desktop: ensure mobile nav stays hidden */
@media screen and (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }

    .hamburger-btn {
        display: none !important;
    }
}
