/* Mobile Fixed Header Styles - Visible on mobile and tablet devices */

/* Hide on desktop - only show on mobile and tablet */
@media only screen and (min-width: 1200px) {
    .mobile-fixed-header {
        display: none !important;
    }
}

/* Extra small mobile devices */
@media only screen and (max-width: 480px) {
    .mobile-nav-list {
        justify-content: space-between;
        gap: 0px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .mobile-nav-list::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-nav-item {
        margin: 0;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-nav-link {
        font-size: 9px;
        padding: 4px 3px;
        min-width: 35px;
        white-space: nowrap;
    }
    
    .mobile-header-logo img {
        height: 24px;
        max-width: 80px;
    }
    
    /* Ensure menu toggle is visible on extra small screens */
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-header-outer-box {
        padding: 4px 0;
        min-height: 45px;
    }
    
    .mobile-header-nav {
        margin: 0 4px 0 0;
    }
    
    .mobile-header-logo {
        margin-right: 4px;
    }
    
}

/* Mobile Fixed Header Container - Following system theme */
.mobile-fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 500ms ease;
    -moz-transition: all 500ms ease;
    -webkit-transition: all 500ms ease;
    -ms-transition: all 500ms ease;
    -o-transition: all 500ms ease;
    display: block;
    padding: 0 15px; /* Add horizontal padding for better mobile spacing */
}

.mobile-header-outer-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    min-height: 70px;
}

/* Logo Styles - Following system theme */
.mobile-header-logo {
    position: relative;
    flex-shrink: 0;
    margin-right: 6px;
}

.mobile-header-logo a {
    display: block;
    transition: all 300ms ease;
}

.mobile-header-logo a:hover {
    transform: scale(1.05);
}

.mobile-header-logo img {
    height: 30px;
    width: auto;
    max-width: 100px;
    transition: all 300ms ease;
}

/* Navigation Styles - Following system theme */
.mobile-header-nav {
    flex: 1;
    margin: 0 8px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-header-nav::-webkit-scrollbar {
    display: none;
}

.mobile-nav-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    gap: 2px;
}

.mobile-nav-item {
    position: relative;
    margin: 0;
    -webkit-transition: all 300ms ease;
    -moz-transition: all 300ms ease;
    -ms-transition: all 300ms ease;
    -o-transition: all 300ms ease;
    transition: all 300ms ease;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.mobile-nav-link {
    position: relative;
    display: block;
    text-align: center;
    font-size: 10px;
    line-height: 16px;
    padding: 4px 6px;
    font-weight: 600;
    font-family: var(--title-font);
    opacity: 1;
    color: var(--logo-blue);
    z-index: 1;
    text-transform: capitalize;
    text-decoration: none;
    border-radius: 4px;
    -webkit-transition: all 500ms ease;
    -moz-transition: all 500ms ease;
    -ms-transition: all 500ms ease;
    -o-transition: all 500ms ease;
    transition: all 500ms ease;
    min-width: 40px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-link:hover {
    color: var(--theme-color);
    transform: translateY(-1px);
}

.mobile-nav-link:active {
    color: var(--logo-blue);
}

/* Mobile Menu Toggle - Following system theme */
.mobile-menu-toggle {
    flex-shrink: 0;
}

.mobile-nav-toggler {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    -webkit-transition: all 300ms ease;
    -moz-transition: all 300ms ease;
    -ms-transition: all 300ms ease;
    -o-transition: all 300ms ease;
    transition: all 300ms ease;
}

.mobile-nav-toggler .icon-bar {
    position: relative;
    height: 2px;
    width: 20px;
    display: block;
    margin-bottom: 4px;
    background-color: var(--title-color);
    -webkit-transition: all 300ms ease;
    -moz-transition: all 300ms ease;
    -ms-transition: all 300ms ease;
    -o-transition: all 300ms ease;
    transition: all 300ms ease;
}

.mobile-nav-toggler .icon-bar:last-child {
    margin-bottom: 0px;
}

.mobile-nav-toggler:hover .icon-bar {
    background-color: var(--theme-color);
}

.mobile-nav-toggler:hover {
    transform: scale(1.1);
}

/* Ensure mobile menu toggle is always visible when user is authenticated */
.mobile-fixed-header .mobile-menu-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force visibility of mobile menu toggle on all screen sizes when authenticated */
@media only screen and (max-width: 1199px) {
    .mobile-fixed-header .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-fixed-header .mobile-nav-toggler {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Add minimal top padding to body when mobile header is present */
@media only screen and (max-width: 1199px) {
    body {
        padding-top: 0px;
    }
    
    /* Ensure main header doesn't interfere */
    .main-header {
        position: relative !important;
    }
    
    .main-header.fixed-header {
        position: relative !important;
    }
    
    /* Ensure mobile header has proper z-index */
    .mobile-fixed-header {
        z-index: 9999 !important;
    }
    
    /* Make sure banner starts right after mobile header */
    .banner-style-four {
        margin-top: 0 !important;
    }
}

/* Tablet screens adjustments (768px - 1199px) - Same as mobile */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
    /* Use exact same styling as mobile for consistency */
    .mobile-header-outer-box {
        padding: 15px 0;
        min-height: 70px;
    }
    
    .mobile-header-logo img {
        height: 45px;
        width: auto;
        max-width: 160px;
    }
    
    .mobile-nav-link {
        font-size: 14px;
        line-height: 20px;
        padding: 8px 12px;
        min-width: 60px;
    }
    
    .mobile-nav-item {
        margin: 0 6px;
    }
    
    .mobile-nav-toggler {
        width: 30px;
        height: 30px;
    }
    
    .mobile-nav-toggler .icon-bar {
        width: 20px;
        margin-bottom: 4px;
    }
    
    .mobile-header-nav {
        margin: 0 15px 0 0;
    }
    
    /* Use same banner styling as mobile */
    .banner-style-four {
        padding: 40px 0px 0px 0px !important;
        min-height: 400px !important;
    }
    
    .banner-style-four .outer-container {
        padding: 20px 15px !important;
    }
    
    .banner-style-four .inner-box {
        padding-top: 20px !important;
        min-height: 300px !important;
    }
}

/* Small mobile screens adjustments */
@media only screen and (max-width: 480px) {
    .mobile-header-outer-box {
        padding: 12px 0;
        min-height: 60px;
    }
    
    .mobile-header-nav {
        margin: 0 10px 0 0;
    }
    
    .mobile-nav-item {
        margin: 0 3px;
    }
    
    .mobile-nav-link {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .mobile-nav-toggler {
        width: 28px;
        height: 28px;
    }
    
    .mobile-nav-toggler .icon-bar {
        width: 18px;
        margin-bottom: 3px;
    }
    
    .mobile-header-logo {
        margin-right: 15px;
    }
    
    .mobile-header-logo img {
        height: 38px;
        max-width: 140px;
    }
    
    body {
        padding-top: 0px;
    }
    
    /* Keep mobile banner styling on small screens - minimal spacing */
    .banner-style-four {
        padding: 80px 0px 0px 0px !important;
    }
    
    .banner-style-four .outer-container {
        padding: 0px 20px !important;
    }
    
    /* Hide mobile banner logo since we now have it in the fixed header */
    .mobile-banner-logo {
        display: none !important;
    }
}

/* Extremely small screens */
@media only screen and (max-width: 320px) {
    .mobile-header-nav {
        margin: 0 2px 0 0;
    }
    
    .mobile-nav-item {
        margin: 0;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-nav-link {
        font-size: 7px;
        padding: 2px 1px;
        min-width: 25px;
    }
    
    .mobile-nav-toggler {
        width: 18px;
        height: 18px;
    }
    
    .mobile-nav-toggler .icon-bar {
        width: 8px;
        margin-bottom: 1px;
    }
    
    .mobile-header-logo {
        margin-right: 2px;
    }
    
    .mobile-header-logo img {
        height: 18px;
        max-width: 60px;
    }
    
    /* Ensure menu toggle is visible on extremely small screens */
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-header-outer-box {
        padding: 2px 0;
        min-height: 35px;
    }
    
    body {
        padding-top: 0px;
    }
    
    
    /* Keep mobile banner styling on extremely small screens - minimal spacing */
    .banner-style-four {
        padding: 55px 0px 0px 0px !important;
    }
    
    .banner-style-four .outer-container {
        padding: 0px 10px !important;
    }
    
    /* Hide mobile banner logo since we now have it in the fixed header */
    .mobile-banner-logo {
        display: none !important;
    }
}

/* Very small screens */
@media only screen and (max-width: 360px) {
    .mobile-header-nav {
        margin: 0 3px 0 0;
    }
    
    .mobile-nav-item {
        margin: 0;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-nav-link {
        font-size: 8px;
        padding: 3px 2px;
        min-width: 30px;
    }
    
    .mobile-nav-toggler {
        width: 20px;
        height: 20px;
    }
    
    .mobile-nav-toggler .icon-bar {
        width: 10px;
        margin-bottom: 1px;
    }
    
    .mobile-header-logo {
        margin-right: 3px;
    }
    
    .mobile-header-logo img {
        height: 20px;
        max-width: 70px;
    }
    
    /* Ensure menu toggle is visible on very small screens */
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-header-outer-box {
        padding: 3px 0;
        min-height: 40px;
    }
    
    body {
        padding-top: 0px;
    }
    
    
    /* Keep mobile banner styling on very small screens - minimal spacing */
    .banner-style-four {
        padding: 60px 0px 0px 0px !important;
    }
    
    .banner-style-four .outer-container {
        padding: 0px 15px !important;
    }
    
    /* Hide mobile banner logo since we now have it in the fixed header */
    .mobile-banner-logo {
        display: none !important;
    }
}

/* Mobile banner spacing adjustments - Made to match desktop exactly */
@media only screen and (max-width: 767px) {
    /* Hide header-upper on mobile to save space */
    .header-upper {
        display: none !important;
    }
    
    /* Adjust main header positioning */
    .main-header {
        position: relative !important;
    }
    
    /* Adjust banner padding to account for mobile header - minimal spacing */
    .banner-style-four {
        padding: 100px 0px 0px 0px !important;
    }
    
    /* Keep desktop layout and styling - just adjust container padding for mobile */
    .banner-style-four .outer-container {
        padding: 0px 30px !important;
    }
    
    /* Hide mobile banner logo since we now have it in the fixed header */
    .mobile-banner-logo {
        display: none !important;
    }
}
