/* =========================================
   MEDIA QUERIES (Mobile UI/UX Fixes)
   ========================================= */

/* Tablets and below (max-width: 991px) */
@media (max-width: 991px) {
    
    /* 1. HEADER LAYOUT (Flexbox) */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 20px;
        padding-right: 20px;
        height: 70px;
        position: relative;
    }

    /* Force Logo to Absolute Center */
    .site-logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* Perfect Center */
        max-height: 45px;
        z-index: 5;
    }

    /* 2. MOBILE DRAWER (Hidden by default) */
    .mobile-menu-drawer {
        position: fixed; 
        top: 0; 
        left: -320px; /* Hidden Off-Screen */
        width: 300px; 
        height: 100vh;
        background: #ffffff;
        z-index: 10000;
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        display: flex; 
        flex-direction: column;
    }

    /* Active Class (Added by JS to show menu) */
    .mobile-menu-drawer.active {
        left: 0 !important;
    }

    /* Backdrop */
    .mobile-menu-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 9999;
        display: none;
        backdrop-filter: blur(2px);
    }
    .mobile-menu-overlay.active { display: block; }

    /* 3. DRAWER CONTENT */
    .drawer-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 20px; border-bottom: 1px solid #eee; background: #f8f9fa;
    }
    .drawer-title { font-weight: bold; color: var(--primary-color); }
    .drawer-close { background: none; border: none; font-size: 1.5rem; }

    /* Links */
    .mobile-nav-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
    .mobile-nav-list li { border-bottom: 1px solid #f0f0f0; position: relative; }
    .mobile-nav-list a {
        display: block; padding: 15px 20px;
        color: #333; text-decoration: none; font-weight: 600;
    }

    /* Submenu Arrow */
    .mobile-dropdown-toggle {
        position: absolute; right: 0; top: 0;
        width: 50px; height: 50px;
        display: flex; align-items: center; justify-content: center;
    }

    /* Hide Bootstrap Default Collapse */
    .navbar-collapse { display: none !important; }
}