/* ===== MOBILE HEADER & NAVIGATION ===== */
/* Only visible on mobile and tablet devices */

/* Hide mobile header and menu on desktop */
.mobile-header,
.mobile-menu {
    display: none;
}

/* Mobile header styles for tablets and phones */
@media (max-width: 1024px) {
    /* Show mobile header and hide desktop nav */
    .mobile-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: linear-gradient(90deg, #c9a16d 0%, #8b6f47 100%); /* Warm gold-brown gradient */
        backdrop-filter: blur(15px);
        border-bottom: 2px solid #8b6f47;
        z-index: 1001;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 12px 0 rgba(139,111,71,0.10);
    }
    
    /* Hide desktop navigation */
    .header .nav-links {
        display: none;
    }
    
    .header .header-cta {
        display: none;
    }
    
    /* Mobile header content */
    .mobile-header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        max-width: 100%;
    }
    
    /* Mobile logo */
    .mobile-header .logo {
        height: 40px;
        width: auto;
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
    }
    
    .mobile-header .logo img {
        height: 40px;
        width: auto;
        max-height: 40px;
        object-fit: contain;
    }
    
    .mobile-header .logo:hover {
        transform: scale(1.05);
    }
    
    /* Hamburger menu button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(201, 161, 109, 0.1);
    }
    
    /* Hamburger lines */
    .hamburger-line {
        width: 24px;
        height: 2px;
        background: var(--deep-charcoal);
        margin: 3px 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
        transform-origin: center;
    }
    
    /* Hamburger animation when menu is open */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Mobile Menu Overlay */
@media (max-width: 1024px) {
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, 
            rgba(50, 34, 34, 0.97) 0%,
            rgba(139, 111, 71, 0.95) 100%);
        backdrop-filter: blur(20px);
        z-index: 1002;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        direction: rtl;
        transform: translateY(-20px);
    }
    
    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Mobile menu content */
    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        padding: 100px 24px 80px;
        text-align: center;
    }
    
    /* Mobile menu navigation */
    .mobile-menu-nav {
        width: 100%;
        max-width: 400px;
    }
    
    .mobile-menu-links {
        list-style: none;
        padding: 0;
        margin: 0 0 50px 0;
    }
    
    .mobile-menu-links li {
        margin-bottom: 32px;
        transform: translateY(30px);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Staggered animation for menu items */
    .mobile-menu.active .mobile-menu-links li:nth-child(1) { transition-delay: 0.1s; transform: translateY(0); opacity: 1; }
    .mobile-menu.active .mobile-menu-links li:nth-child(2) { transition-delay: 0.15s; transform: translateY(0); opacity: 1; }
    .mobile-menu.active .mobile-menu-links li:nth-child(3) { transition-delay: 0.2s; transform: translateY(0); opacity: 1; }
    .mobile-menu.active .mobile-menu-links li:nth-child(4) { transition-delay: 0.25s; transform: translateY(0); opacity: 1; }
    .mobile-menu.active .mobile-menu-links li:nth-child(5) { transition-delay: 0.3s; transform: translateY(0); opacity: 1; }
    .mobile-menu.active .mobile-menu-links li:nth-child(6) { transition-delay: 0.35s; transform: translateY(0); opacity: 1; }
    
    .mobile-menu-links a {
        color: var(--white);
        font-size: 1.375rem;
        font-weight: 600;
        text-decoration: none;
        font-family: var(--font-body);
        transition: all 0.3s ease;
        display: block;
        padding: 12px 20px;
        border-radius: 12px;
        position: relative;
        overflow: hidden;
    }
    
    .mobile-menu-links a::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: -1;
    }
    
    .mobile-menu-links a:hover::before {
        transform: translateX(0);
    }
    
    .mobile-menu-links a:hover {
        color: var(--primary-gold);
        transform: translateY(-2px);
    }
    
    /* Mobile menu CTA */
    .mobile-menu-cta {
        margin-top: 40px;
        transform: translateY(30px);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        transition-delay: 0.4s;
    }
    
    .mobile-menu.active .mobile-menu-cta {
        transform: translateY(0);
        opacity: 1;
    }
    
    .mobile-menu-cta .cta-primary {
        background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
        color: var(--white);
        font-size: 1.125rem;
        font-weight: 700;
        padding: 18px 36px;
        border-radius: 50px;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 8px 30px rgba(201, 161, 109, 0.4);
        font-family: var(--font-body);
        border: 2px solid transparent;
    }
    
    .mobile-menu-cta .cta-primary:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 12px 40px rgba(201, 161, 109, 0.6);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    /* Close button */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        left: 20px; /* Changed from right to left for RTL layout */
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 50%;
        color: var(--white);
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }
}

/* Tablet specific adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .mobile-header-content {
        padding: 18px 32px;
    }
    
    .mobile-header .logo {
        height: 45px;
    }
    
    .mobile-header .logo img {
        height: 45px;
        max-height: 45px;
    }
    
    .mobile-menu-links a {
        font-size: 1.5rem;
    }
}

/* Phone specific adjustments */
@media (max-width: 768px) {
    .mobile-header-content {
        padding: 14px 16px;
    }
    
    .mobile-header .logo {
        height: 36px;
    }
    
    .mobile-header .logo img {
        height: 40px;
        max-height: 40px;
        margin-top: 10px;
        cursor: pointer;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }
    
    .hamburger-line {
        width: 20px;
    }
    
    .mobile-menu-content {
        padding: 80px 20px 60px;
    }
    
    .mobile-menu-links a {
        font-size: 1.25rem;
        padding: 10px 16px;
    }
    
    .mobile-menu-cta .cta-primary {
        font-size: 1rem;
        padding: 16px 32px;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    height: 100vh;
}

/* Hide skip link and floating elements when mobile menu is open */
body.mobile-menu-open .skip-link,
body.mobile-menu-open .floating-cta {
    top: -100px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-20px) !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-links li,
    .mobile-menu-cta,
    .hamburger-line,
    .mobile-menu-toggle {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-header {
        background: var(--white);
        border-bottom: 2px solid var(--deep-charcoal);
    }
    
    .hamburger-line {
        background: var(--deep-charcoal);
    }
    
    .mobile-menu {
        background: var(--deep-charcoal);
    }
}
