/* Mobile Header Fix - Ensures full visibility on all mobile devices */
/* This file provides additional mobile-specific fixes for the header/navigation */

/* Force proper display on all mobile devices */
@media (max-width: 991.98px) {
    /* Ensure header is always visible and properly positioned */
    .main-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        position: relative !important;
        z-index: 1000 !important;
        overflow: visible !important;
    }

    /* Navbar container - proper flex layout */
    .main-header .navbar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0.75rem 0 !important;
        min-height: 60px !important;
    }

    .main-header .container {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Container full width */
    .main-header .container {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Logo/Brand - Always visible */
    .navbar-brand {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        color: #1a202c !important;
        text-decoration: none !important;
        padding: 0.5rem 0 !important;
        margin-right: auto !important;
        flex-shrink: 0 !important;
        z-index: 1001 !important;
    }

    .logo-img {
        display: block !important;
        visibility: visible !important;
        max-height: 32px !important;
        width: auto !important;
        height: auto !important;
    }

    .brand-text {
        display: inline-block !important;
        visibility: visible !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
    }

    /* Mobile actions container */
    .d-lg-none {
        display: flex !important;
        visibility: visible !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        z-index: 1001 !important;
    }

    /* Mobile login button */
    .mobile-login-btn {
        display: inline-flex !important;
        visibility: visible !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        min-height: 40px !important;
        min-width: 60px !important;
        white-space: nowrap !important;
        background: white !important;
        color: #667eea !important;
        border: 2px solid #667eea !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }

    .mobile-login-btn:hover {
        background: #667eea !important;
        color: white !important;
    }

    /* Hamburger menu button - Always visible */
    .navbar-toggler {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        font-size: 1.25rem !important;
        border: 2px solid #667eea !important;
        border-radius: 8px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        background: white !important;
        color: #667eea !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        z-index: 1001 !important;
    }

    .navbar-toggler:hover,
    .navbar-toggler:focus,
    .navbar-toggler:active {
        background: #667eea !important;
        color: white !important;
        border-color: #667eea !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25) !important;
    }

    .navbar-toggler-icon {
        display: block !important;
        visibility: visible !important;
        width: 24px !important;
        height: 24px !important;
        background-size: 100% !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }

    /* Mobile menu dropdown */
    .navbar-collapse {
        display: none !important;
        width: 100% !important;
        flex-basis: 100% !important;
        flex-grow: 1 !important;
        margin-top: 0.5rem !important;
        background: white !important;
        border-radius: 0 0 16px 16px !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
        padding: 1.5rem !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        z-index: 999 !important;
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Navigation links */
    .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .navbar-nav .nav-item {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.25rem !important;
    }

    .navbar-nav .nav-link {
        display: flex !important;
        visibility: visible !important;
        align-items: center !important;
        padding: 1rem 1.25rem !important;
        margin: 0.25rem 0 !important;
        border-radius: 12px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        min-height: 48px !important;
        color: #1a202c !important;
        background: rgba(102, 126, 234, 0.05) !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        width: 100% !important;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:focus {
        background: rgba(102, 126, 234, 0.1) !important;
        color: #667eea !important;
        transform: translateX(5px) !important;
    }

    /* Buttons in mobile menu */
    .navbar-nav .btn,
    .navbar-nav .btn-primary {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
        margin-top: 0.5rem !important;
    }

    /* Dropdowns in mobile menu */
    .navbar-nav .dropdown-menu {
        display: block !important;
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        padding: 0.5rem !important;
        background: rgba(102, 126, 234, 0.05) !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    .navbar-nav .dropdown-item {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.875rem 1rem !important;
        margin: 0.25rem 0 !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
        color: #1a202c !important;
        text-decoration: none !important;
    }

    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:active {
        background: rgba(102, 126, 234, 0.15) !important;
        color: #667eea !important;
    }

    /* Ensure icons are visible */
    .navbar-nav i,
    .navbar-nav .fas,
    .navbar-nav .far,
    .navbar-nav .fab {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Extra small devices (360px - 430px) */
@media (max-width: 430px) {
    .main-header .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
    }

    .logo-img {
        max-height: 28px !important;
    }

    .brand-text {
        font-size: 1.1rem !important;
    }

    .mobile-login-btn {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 36px !important;
        min-width: 50px !important;
    }

    .navbar-toggler {
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0.4rem !important;
    }

    .navbar-collapse {
        padding: 1rem !important;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
    }
}

/* Ensure proper z-index stacking */
.main-header {
    position: relative;
    z-index: 1000;
}

.navbar-brand,
.navbar-toggler,
.mobile-login-btn {
    position: relative;
    z-index: 1001;
}

.navbar-collapse {
    position: relative;
    z-index: 999;
}

