/* Mobile Navigation */
.site-header {
    display: none !important;
}

.mobile-only {
    display: block !important;
}

/* Variables from new-mobile.css */
:root {
    --mobile-nav-height: 56px;
    --mobile-primary: #0a1128;
    --mobile-secondary: #cba174;
}

/* Mobile Navbar */
.mobile-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-nav-height);
    background-color: rgba(10, 17, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.mobile-navbar.scrolled {
    background-color: rgba(10, 17, 40, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-logo {
    font-family: 'Playfair Display', serif;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    /* Removed absolute positioning for better flex alignment */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10001;
    display: flex;
    align-items: center;
    line-height: 1;
    /* Fix vertical alignment */
}

.mobile-hamburger {
    width: 48px !important;
    /* Reduced from 60px to fit 56px navbar */
    max-width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    /* Reduced from 60px */
    min-height: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    flex-shrink: 0;
    margin: 0 !important;
    /* margin-left: auto !important; Removed to assume flex gap handles it */
    position: relative !important;
    /* Changed from absolute */
    right: auto !important;
    top: auto !important;
    transform: none !important;
    box-shadow: none !important;
}

.mobile-hamburger svg {
    width: 28px;
    height: 28px;
    stroke: var(--mobile-secondary);
    stroke-width: 3;
}

/* Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease-out;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    background-color: rgba(10, 17, 40, 0.95);
    /* Updated background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    transform: translateX(100%);
    transition: transform 300ms ease-out, visibility 0s 300ms;
    display: flex;
    flex-direction: column;
    padding-top: var(--mobile-nav-height);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    box-sizing: border-box;

    /* Enabled scrolling on container */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 300ms ease-out, visibility 0s 0s;
}

.mobile-drawer-nav {
    list-style: none;
    padding: 24px 0;
    margin: 0;
    /* Removed overflow-y: auto from here to use parent scrolling */
    flex: 1;
    min-height: 0;
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

.mobile-drawer-item {
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-drawer-link {
    display: block;
    padding: 18px 24px;
    /* Increased touch target */
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Added border */
}

.mobile-drawer-link:active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--mobile-secondary);
}

.mobile-drawer-sub-menu {
    background-color: rgba(0, 0, 0, 0.2);
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-drawer-item.has-children.open .mobile-drawer-sub-menu {
    display: block !important;
}

.mobile-drawer-sub-link {
    padding-left: 40px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Controls (Lang Switch + Hamburger) */
.mobile-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* Mobile Language Switcher Dropdown - Refined */
.mobile-lang-container {
    position: relative;
    z-index: 99999;
    /* Highest z-index to ensure clickability */
    margin-right: 15px;
    /* Add space between lang switch and hamburger */
    display: flex;
    align-items: center;
}

.mobile-lang-toggle {
    background: transparent !important;
    color: white !important;
    border: none !important;
    /* Removed border as requested */
    padding: 4px 0px !important;
    /* Reduced padding further since no border */
    border-radius: 4px !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 0.95rem !important;
    /* Slightly larger text for readability without border */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px !important;
    width: auto !important;
    white-space: nowrap;
    margin-top: 3px !important;
    /* Move down slightly to align with logo */
}

.mobile-lang-toggle:active {
    background: rgba(255, 255, 255, 0.2) !important;
}

.mobile-lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: -10px;
    /* Align closer to right edge */
    margin-top: 8px;
    background: rgba(10, 17, 40, 0.98);
    /* Less transparent for readability */
    list-style: none;
    padding: 8px 0;
    border-radius: 6px;
    width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100000;
    /* Ensure on top of everything */
}

.mobile-lang-dropdown li {
    display: block;
    margin: 0;
}

.mobile-lang-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
    text-align: left;
}

.mobile-lang-dropdown li a:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--mobile-secondary);
}

.lang-switch:hover,
.lang-switch:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}