/* Comprehensive Mobile Responsive Fixes */

/* General fixes for all screen sizes */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
}

/* Mobile Navigation Styles */
@media screen and (max-width: 992px) {
    /* Navbar */
    .navbar {
        height: 70px !important;
        padding: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background: #fff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .navbar .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 15px !important;
        height: 100% !important;
    }
    
    /* Logo */
    .logo {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }
    
    .nav-logo {
        height: 45px !important;
        max-width: 150px !important;
    }
    
    /* Mobile menu button */
    .mobile-menu {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        background: #FF7A00 !important;
        color: white !important;
        border-radius: 4px !important;
        cursor: pointer !important;
        border: none !important;
        padding: 0 !important;
        transition: background-color 0.3s ease, transform 0.2s ease !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1001 !important;
    }
    
    .mobile-menu:hover {
        background: #ff8c24 !important;
    }
    
    .mobile-menu:active {
        transform: translateY(-50%) scale(0.95) !important;
    }
    
    .mobile-menu.active {
        background: #e56e00 !important;
    }
    
    .mobile-menu i {
        font-size: 20px !important;
        transition: transform 0.3s ease !important;
    }
    
    .mobile-menu.active i {
        transform: rotate(90deg) !important;
    }
    
    /* Navigation container */
    .nav-container {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: #fff !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        padding: 20px !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
        transform: translateY(-10px) !important;
        display: block !important;
    }
    
    .nav-container.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    
    /* Navigation links */
    .nav-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .nav-links li {
        margin: 0 !important;
        width: 100% !important;
    }
    
    .nav-links a {
        display: block !important;
        padding: 16px !important;
        background: #f8f8f8 !important;
        color: #333 !important;
        text-decoration: none !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        text-align: left !important;
        transition: all 0.3s ease !important;
        width: 100% !important;
        border-left: 3px solid transparent !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    
    .nav-links a:hover,
    .nav-links a:active {
        background: #FF7A00 !important;
        color: white !important;
        border-left-color: #e56e00 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    /* Dropdown menu */
    .dropdown {
        position: relative !important;
    }
    
    .dropdown-toggle {
        cursor: pointer !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        background-color: #f8f8f8 !important;
        border-left: 3px solid #FF7A00 !important;
    }
    
    .dropdown-toggle::after {
        content: 'Sub-menu' !important;
        position: absolute !important;
        right: 45px !important;
        top: 50% !important;
        font-size: 12px !important;
        color: #999 !important;
        transform: translateY(-50%) !important;
    }
    
    .dropdown-toggle i {
        margin-left: 5px !important;
        transition: transform 0.3s ease !important;
        color: #FF7A00 !important;
        font-size: 18px !important;
    }
    
    .dropdown.active .dropdown-toggle {
        background-color: #f0f0f0 !important;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg) !important;
        color: #e56e00 !important;
    }
    
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        display: none !important;
        padding: 10px 0 0 5px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        margin-top: 5px !important;
    }
    
    .dropdown.active .dropdown-menu {
        display: block !important;
    }
    
    .dropdown-item {
        display: block !important;
        padding: 16px 16px 16px 30px !important;
        background: #f0f0f0 !important;
        color: #333 !important;
        text-decoration: none !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        text-align: left !important;
        transition: all 0.3s ease !important;
        margin-bottom: 10px !important;
        border-left: 3px solid #FF7A00 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
        position: relative !important;
    }
    
    .dropdown-item::before {
        content: '•' !important;
        color: #FF7A00 !important;
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 18px !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:active {
        background: #FF7A00 !important;
        color: white !important;
        border-left-color: #e56e00 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
        transform: translateX(3px) !important;
    }
    
    .dropdown-item:hover::before,
    .dropdown-item:active::before {
        color: white !important;
    }
    
    /* Hero section fixes */
    .hero {
        padding-top: 90px !important;
        padding-bottom: 40px !important;
        text-align: center !important;
    }
    
    .hero-content {
        max-width: 100% !important;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }
    
    .hero-buttons {
        justify-content: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }
    
    .hero-image {
        margin-top: 30px !important;
        text-align: center !important;
    }
    
    .hero-image img {
        max-width: 90% !important;
        margin: 0 auto !important;
        border-radius: 10px !important;
    }
    
    /* Section spacing */
    section {
        padding: 40px 0 !important;
    }
    
    /* Container padding */
    .container {
        padding: 0 15px !important;
    }
    
    /* Typography adjustments */
    h2 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    h3 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}

/* Tablet-specific fixes */
@media screen and (min-width: 577px) and (max-width: 992px) {
    .nav-links a {
        min-width: 120px !important;
    }
    
    .dropdown-item {
        min-width: 150px !important;
    }
}

/* Mobile-specific fixes */
@media screen and (max-width: 576px) {
    /* Navbar */
    .navbar {
        height: 60px !important;
    }
    
    .nav-logo {
        height: 40px !important;
    }
    
    .nav-container {
        top: 60px !important;
    }
    
    /* Navigation links */
    .nav-links {
        gap: 6px !important;
    }
    
    .nav-links a {
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-width: 90px !important;
    }
    
    .dropdown-item {
        padding: 8px 12px !important;
        font-size: 13px !important;
        min-width: 100px !important;
    }
    
    /* Hero section */
    .hero {
        padding-top: 80px !important;
    }
    
    .hero-content h1 {
        font-size: 1.7rem !important;
    }
    
    .hero-content p {
        font-size: 0.95rem !important;
    }
    
    /* Typography */
    h2 {
        font-size: 1.6rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    /* Section spacing */
    section {
        padding: 30px 0 !important;
    }
    
    /* Form elements */
    input, select, textarea {
        font-size: 14px !important;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 15px !important;
        font-size: 14px !important;
    }
}

/* Extra small devices */
@media screen and (max-width: 393px) {
    /* Navbar */
    .navbar {
        height: 55px !important;
    }
    
    .nav-logo {
        height: 35px !important;
    }
    
    .mobile-menu {
        width: 35px !important;
        height: 35px !important;
    }
    
    .nav-container {
        top: 55px !important;
        padding: 8px !important;
    }
    
    /* Navigation links */
    .nav-links {
        gap: 5px !important;
    }
    
    .nav-links a {
        padding: 7px 10px !important;
        font-size: 13px !important;
        min-width: 80px !important;
    }
    
    .dropdown-item {
        padding: 7px 10px !important;
        font-size: 12px !important;
        min-width: 90px !important;
    }
    
    /* Hero section */
    .hero {
        padding-top: 70px !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
    }
    
    /* Typography */
    h2 {
        font-size: 1.4rem !important;
    }
    
    h3 {
        font-size: 1.2rem !important;
    }
    
    p {
        font-size: 0.9rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* Form elements */
    .form-group {
        margin-bottom: 10px !important;
    }
    
    /* Footer */
    .footer-content {
        gap: 20px !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Fix for body padding */
body {
    padding-top: 70px !important;
}

@media screen and (max-width: 576px) {
    body {
        padding-top: 60px !important;
    }
}

@media screen and (max-width: 393px) {
    body {
        padding-top: 55px !important;
    }
}

/* Mobile menu overlay styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
