/* ══════════════════════════════════════
   Premium Mobile Navigation
   ══════════════════════════════════════ */

/* Desktop defaults (Hide mobile UI) */
.mobile-nav-header,
.close-menu-btn,
.mobile-nav-overlay,
.mobile-menu-social {
    display: none;
}

#vaikom-custom-header .top-bar-right {
    display: flex;
}

/* Mobile Overrides */
@media (max-width: 768px) {
    #vaikom-custom-header .top-bar {
        display: none !important;
    }

    #vaikom-custom-header .top-bar-right {
        display: none !important;
    }

    /* Push content down because of fixed headers */
    body {
        padding-top: 88px; /* Ticker (38) + Nav (50) */
    }

    /* Keep Ticker sticky/fixed at the very top */
    .ticker-bar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 10000;
    }

    /* Hide the default desktop wrapper styles on mobile */
    .main-navigation {
        padding: 0;
        margin: 0;
        display: block; 
    }
    
    /* Show the compact top bar below the ticker */
    .mobile-nav-header {
        position: fixed;
        top: 38px; /* Right beneath the 38px ticker */
        left: 0;
        width: 100%;
        z-index: 9998;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        background: #C0211B; /* Requested Color */
        height: 50px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    /* Quick Links Container */
    .mobile-quick-links {
        display: flex;
        align-items: center;
        gap: 15px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex: 1; /* Take up available space */
        padding-right: 15px;
    }
    
    .mobile-quick-links::-webkit-scrollbar { display: none; }
    
    .mobile-quick-links a {
        color: #ffffff;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
    }
    
    /* Hamburger Button */
    .hamburger-btn {
        background: rgba(0,0,0,0.1); /* Slight dark background to stand out safely */
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 5px 10px;
        border-radius: 4px;
        flex-shrink: 0;
        height: 36px;
    }
    
    .mobile-nav-title {
        font-weight: 700;
        font-size: 13px;
        color: #ffffff;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .hamburger-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .hamburger-btn .bar {
        display: block;
        width: 20px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    /* Mobile Menu Drawer Structure & Spacing */
    .main-navigation-content#mobile-nav-content {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        max-height: 100vh;
        background: #ffffff;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        z-index: 10001;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        box-sizing: border-box;
    }

    .mobile-menu-social {
        display: block;
        padding: 40px 25px 25px;
        text-align: center;
        background: #fdfdfd;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 15px;
    }

    .social-label {
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: #9b9b9b;
        letter-spacing: 0.15em;
        margin-bottom: 15px;
    }

    .social-links-drawer {
        display: flex;
        justify-content: center;
        gap: 25px;
    }

    .drawer-social-btn {
        font-size: 1.8rem;
        color: #333;
        transition: transform 0.2s, color 0.2s;
    }

    .drawer-social-btn:hover {
        color: #C0211B;
    }

    .mobile-only-action {
        display: block !important;
        padding: 10px 25px 25px !important;
        margin-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-menu-submit-btn {
        display: block;
        background: linear-gradient(135deg, #d84315, #ff9800);
        color: #ffffff !important;
        padding: 12px 20px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    .mobile-menu-submit-btn i {
        margin-right: 8px;
    }
    
    /* When opened (Body class) */
    .nav-open .main-navigation-content#mobile-nav-content {
        right: 0;
    }
    
    /* Close Button inside the menu */
    .close-menu-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        font-size: 38px;
        line-height: 1;
        color: #111;
        cursor: pointer;
        transition: color 0.2s;
    }
    
    .close-menu-btn:hover {
        color: #C0211B;
    }
    
    /* Overlay Background */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 10000; /* Also very high */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    /* Show overlay when menu is open */
    .nav-open .mobile-nav-overlay {
        opacity: 1;
        visibility: visible;
        display: block;
    }
    
    /* Clean up the Ghost internal ul.nav for mobile Drawer */
    .main-navigation-content#mobile-nav-content .nav {
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .main-navigation-content#mobile-nav-content .nav li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation-content#mobile-nav-content .nav li a {
        display: block;
        padding: 15px 25px;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
    }
    
    .main-navigation-content#mobile-nav-content .nav li.nav-current a,
    .main-navigation-content#mobile-nav-content .nav li a:hover {
        background: #fdf2f2;
        color: #C0211B;
        border-left: 4px solid #C0211B;
        padding-left: 21px; /* Offset the border */
    }
}
