/**
 * Responsive Enhancements for Mobile Header
 * Additional responsive styles for better mobile experience
 */

/* Hide desktop header on mobile */
@media (max-width: 991px) {
    #careerfy-header {
        display: none !important;
    }
    
    .careerfy-mobilehder-strip {
        display: block !important;
    }
    
    /* Adjust body padding for mobile header */
    body {
        padding-top: 60px;
    }
    
    /* Ensure content is not hidden behind fixed header */
    .careerfy-main-content,
    .jobsearch-main-content {
        margin-top: 0;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .careerfy-mobilehder-strip {
        min-height: 56px;
    }
    
    .mobile-hder-topcon {
        padding: 8px 12px;
    }
    
    .mobile-logocon a img {
        max-height: 32px;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .mobile-hdr-custombtn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .careerfy-mobile-hdr-sidebar {
        width: 260px;
        left: -260px;
    }
    
    body {
        padding-top: 56px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .careerfy-mobilehder-strip {
        min-height: 60px;
    }
    
    .mobile-hder-topcon {
        padding: 10px 16px;
    }
    
    .mobile-logocon a img {
        max-height: 36px;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .careerfy-mobilehder-strip {
        min-height: 64px;
    }
    
    .mobile-hder-topcon {
        padding: 12px 20px;
    }
    
    .mobile-logocon a img {
        max-height: 40px;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .careerfy-mobile-hdr-sidebar {
        width: 320px;
        left: -320px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .careerfy-mobilehder-strip {
        display: none !important;
    }
    
    #careerfy-header {
        display: block !important;
    }
    
    body {
        padding-top: 0;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 991px) and (orientation: landscape) {
    .careerfy-mobilehder-strip {
        min-height: 50px;
    }
    
    .mobile-hder-topcon {
        padding: 8px 16px;
    }
    
    .mobile-logocon a img {
        max-height: 32px;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    body {
        padding-top: 50px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mobile-logocon a img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .careerfy-mobilehdr-sidebar,
    .careerfy-mobile-overlay,
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a,
    .careerfy-mobile-navbar > li {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles */
@media print {
    .careerfy-mobilehder-strip,
    .careerfy-mobile-hdr-sidebar,
    .careerfy-mobile-overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}

/* Focus styles for better accessibility */
@media (max-width: 991px) {
    .mobile-navigation-togglebtn:focus,
    .mobile-right-btnscon a:focus,
    .mobile-hdr-custombtn:focus,
    .careerfy-mobile-navbar a:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a,
    .mobile-hdr-custombtn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .careerfy-mobile-navbar > li > a {
        min-height: 48px;
        padding: 16px 20px;
    }
}

/* Dark mode responsive adjustments */
@media (prefers-color-scheme: dark) and (max-width: 991px) {
    .careerfy-mobilehder-strip {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a {
        background: #2d2d2d;
        border-color: #444;
        color: #e9ecef;
    }
    
    .mobile-navigation-togglebtn:hover,
    .mobile-right-btnscon a:hover {
        background: #3d3d3d;
        color: #ffffff;
    }
}

/* Container adjustments for mobile */
@media (max-width: 991px) {
    .container,
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .row > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Ensure proper z-index stacking */
@media (max-width: 991px) {
    .careerfy-mobilehder-strip {
        z-index: 9999;
    }
    
    .careerfy-mobile-hdr-sidebar {
        z-index: 10000;
    }
    
    .careerfy-mobile-overlay {
        z-index: 9999;
    }
    
    /* Ensure other fixed elements don't interfere */
    .careerfy-sticky-header {
        z-index: 9998;
    }
}

