/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    border-top: 1px solid #e0e0e0;
}

.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    max-width: 100%;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    padding: 5px;
    transition: all 0.3s ease;
    font-size: 10px;
    font-weight: 600;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: #2490EB;
    text-decoration: none;
}

.mobile-nav-item i {
    font-size: 22px;
    margin-bottom: 3px;
}

.mobile-nav-item.whatsapp {
    background: #25D366;
    color: #fff;
    margin: 0 3px;
    border-radius: 8px;
    padding: 8px 5px;
}

.mobile-nav-item.whatsapp:hover {
    background: #1DA851;
    color: #fff;
}

.mobile-nav-item.call-us {
    color: #2490EB;
}

.mobile-nav-item.menu-icon {
    color: #2490EB;
}

/* Mobile Header Container - Single fixed container for header + location bar */
.mobile-header-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile Header with White Background */
.mobile-top-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-top-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    flex-wrap: nowrap;
    max-width: 100%;
}

.mobile-logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mobile-logo-section img {
    height: 55px;
    width: auto !important;
    max-width: 200px !important;
}

.mobile-right-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mobile-phone-numbers-styled {
    display: flex;
    flex-direction: column !important;
    gap: 4px;
    align-items: flex-end;
}

.mobile-phone-box {
    border: 2px solid #2490EB;
    border-radius: 4px;
    padding: 4px 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 200px;
}

.mobile-phone-box span {
    font-size: 15px !important;
    color: #2490EB !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    display: inline !important;
}

.mobile-phone-box a {
    color: #2490EB !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    display: inline !important;
}

.mobile-phone-box a:hover {
    color: #2490EB;
}

.mobile-menu-toggle {
    color: #2490EB;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Mobile Location Bar at Top (below logo) */
.mobile-location-top {
    background: #14467B;
    color: #fff;
    text-align: center;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
}

.mobile-location-top i {
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.mobile-location-top span {
    margin: 0 10px;
    color: #fff;
    font-weight: 400;
}

/* Mobile Menu Sidebar */
.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu-sidebar.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #2490EB;
    color: #fff;
}

.mobile-menu-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu-list > li > a:hover {
    background: #f5f5f5;
    color: #2490EB;
}

.mobile-menu-list > li > a.btn {
    background: #2490EB;
    color: #fff;
    margin: 15px 20px;
    padding: 12px 20px;
    border-radius: 5px;
    text-align: center;
    justify-content: center;
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 1000px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mobile-submenu li a:hover {
    background: #fff;
    color: #2490EB;
    padding-left: 45px;
}

.mobile-menu-dropdown > a i {
    transition: transform 0.3s ease;
}

.mobile-menu-dropdown.active > a i {
    transform: rotate(180deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Show on mobile only */
@media only screen and (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    .mobile-header-container {
        display: block;
    }
    
    /* Hide floating WhatsApp icon on mobile */
    .cp-widget-button {
        display: none !important;
    }
    
    /* Add padding to body to prevent content from being hidden behind nav */
    body {
        padding-bottom: 65px;
        margin-top: 100px;
    }
    
    /* Hide desktop header on mobile */
    .header-wrap {
        display: none !important;
    }
    
    
    
    /* Make service section appear at top */
    .service-wrap-mobile {
        margin-top: 115px !important;
        padding-top: 20px !important;
    }
    
    /* Hide hero section on mobile */
    .hero-wrap {
        margin-top: 0 !important;
    }
    
    /* Optimize service cards for mobile grid */
    .service-modern-card {
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }
    
    .service-modern-card:active {
        transform: scale(0.98);
    }
    
    .service-modern-card img {
        border-radius: 12px 12px 0 0;
        object-fit: cover;
        height: 160px;
        width: 100%;
    }
    
    .service-modern-card h5 {
        font-size: 16px !important;
        padding: 10px 10px 5px !important;
        line-height: 1.3;
    }
    
    .service-modern-card p {
        font-size: 13px !important;
        padding: 0px 10px 10px !important;
        line-height: 1.4;
    }
    
    /* Service grid layout - 2 columns on mobile */
    .service-wrap-mobile .row {
        margin: 0 -5px;
    }
    
    .service-wrap-mobile .col-lg-3 {
        padding: 0 5px !important;
        margin-bottom: 10px;
    }
    
    /* Compact section title on mobile */
    .service-wrap-mobile .section-title {
        margin-bottom: 20px !important;
    }
    
    .service-wrap-mobile .section-title h2 {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }
    
    .service-wrap-mobile .section-title p {
        font-size: 14px !important;
        margin-bottom: 0 !important;
    }
    
    /* Counter section optimization */
    .counter-wrap {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
    
    /* Hide old mobile elements */
    .mobile-phone-numbers {
        display: none !important;
    }
    
    .mobile-location-bar {
        display: none !important;
    }
    
    /* Content adjustments */
    .content-wrapper {
        margin-top: 29px !important;
    }
    
    /* About and other sections - show on mobile */
    .about-wrap.style1 {
        display: block;
    }
    
    /* Show only service section prominently */
    .service-wrap-mobile {
        background: #f5f5f5 !important;
        padding-top: 15px !important;
    }
}

/* Initial state - hide on all screens */
.mobile-location-bar {
    display: none;
}

/* Small screens - adjust for better fit */
@media only screen and (max-width: 420px) {
    .mobile-phone-box {
        min-width: 170px !important;
        padding: 3px 6px !important;
        gap: 8px !important;
    }
    
    .mobile-phone-box span,
    .mobile-phone-box a {
        font-size: 13px !important;
    }
    
    .mobile-logo-section img {
        height: 50px !important;
        max-width: 180px !important;
    }
    
    .service-wrap-mobile {
        margin-top: 110px !important;
    }
}

/* Very small screens - make phone boxes more compact */
@media only screen and (max-width: 380px) {
    .mobile-logo-section img {
        height: 55px !important;
        max-width: 200px !important;
    }
    
    .mobile-phone-box {
        padding: 2px 4px !important;
        min-width: 145px !important;
        gap: 6px !important;
    }
    
    .mobile-phone-box span {
        font-size: 11px !important;
    }
    
    .mobile-phone-box a {
        font-size: 11px !important;
    }
    
    .mobile-right-section {
        gap: 6px;
    }
    
    .mobile-phone-numbers-styled {
        gap: 3px;
    }
    
    .mobile-menu-toggle {
        font-size: 24px;
    }
    
    .mobile-location-top {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    .mobile-location-top i {
        font-size: 14px !important;
        margin-right: 6px !important;
    }
    
    .service-wrap-mobile {
        margin-top: 95px !important;
    }
    
    .mobile-top-header-inner {
        padding: 8px 10px !important;
    }
}

/* Tablet and above - hide mobile nav */
@media only screen and (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .mobile-header-container {
        display: none !important;
    }
    
    .mobile-menu-sidebar {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
        
    }
}

/* DARK THEME - CORRECT SELECTOR (html.theme-dark not body.dark) */
html.theme-dark .mobile-header-container {
    box-shadow: 0 2px 10px rgba(255,255,255,0.1) !important;
}

html.theme-dark .mobile-top-header {
    background: #1a1a1a !important;
    border-bottom: 1px solid #333 !important;
}

html.theme-dark .mobile-top-header-inner {
    background: #1a1a1a !important;
}

html.theme-dark .mobile-phone-box {
    border-color: #2490EB !important;
    background: #1a1a1a !important;
}

html.theme-dark .mobile-phone-box span {
    color: #2490EB !important;
}

html.theme-dark .mobile-phone-box a {
    color: #2490EB !important;
}

html.theme-dark .mobile-location-top {
    background: #1a1a1a !important;
    color: #fff !important;
}

html.theme-dark .mobile-bottom-nav {
    background: #1a1a1a !important;
    border-top: 1px solid #333 !important;
}

html.theme-dark .mobile-nav-item {
    color: #aaa !important;
}

html.theme-dark .mobile-nav-item.whatsapp {
    background: #25D366 !important;
    color: #fff !important;
}

html.theme-dark .mobile-nav-item.call-us {
    color: #2490EB !important;
}

html.theme-dark .mobile-nav-item.menu-icon {
    color: #2490EB !important;
}

html.theme-dark .mobile-menu-sidebar {
    background: #1a1a1a !important;
}

html.theme-dark .mobile-menu-header {
    background: #2490EB !important;
}

html.theme-dark .mobile-menu-list > li {
    border-bottom: 1px solid #333 !important;
}

html.theme-dark .mobile-menu-list > li > a {
    color: #fff !important;
}

html.theme-dark .mobile-menu-list > li > a:hover {
    background: #2a2a2a !important;
    color: #2490EB !important;
}

html.theme-dark .mobile-submenu {
    background: #2a2a2a !important;
}

html.theme-dark .mobile-submenu li {
    border-bottom: 1px solid #333 !important;
}

html.theme-dark .mobile-submenu li a {
    color: #ccc !important;
}

html.theme-dark .mobile-submenu li a:hover {
    background: #333 !important;
    color: #2490EB !important;
}

html.theme-dark .mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}
