/* Mobile Responsive Styles */

/* Side Drawer Navigation for Mobile */
@media (max-width: 991.98px) {
    
    /* Hide default Bootstrap collapse */
    .navbar-collapse {
        display: none !important;
    }
    
    /* Mobile Navbar */
    .navbar {
        padding: 10px 15px !important;
        background: var(--bs-white) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        min-height: 70px !important;
    }
    
    /* Logo and text on the left */
    .navbar-brand {
        display: flex !important;
        align-items: center !important;
        flex: 1 !important;
        margin-right: 10px !important;
        padding: 0 !important;
    }
    
    .navbar-brand img {
        max-height: 45px !important;
        margin-right: 10px !important;
    }
    
    .navbar-brand h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    /* Hamburger menu on the far RIGHT side */
    .navbar-toggler {
        margin-left: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        padding: 8px 10px !important;
        border: none !important;
    }
    
    .navbar-toggler .fa-bars {
        font-size: 24px !important;
        color: var(--bs-primary) !important;
    }
    
    /* Hamburger Menu Button - Move to right */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
        position: relative;
    }
    
    .mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background: var(--bs-primary);
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }
    
    /* Side Drawer */
    .mobile-side-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bs-white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        z-index: 10000;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        padding-top: 20px;
    }
    
    .mobile-side-drawer.active {
        right: 0;
    }
    
    /* Drawer Overlay */
    .mobile-drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Drawer Header */
    .mobile-drawer-header {
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .mobile-drawer-header img {
        max-height: 60px;
        margin-bottom: 10px;
    }
    
    .mobile-drawer-header h6 {
        font-size: 13px;
        color: var(--bs-primary);
        text-align: center;
        margin: 0;
        font-weight: 600;
    }
    
    /* Drawer Menu */
    .mobile-drawer-menu {
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .mobile-drawer-menu li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-drawer-menu li a {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: var(--bs-dark);
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s;
    }
    
    .mobile-drawer-menu li a i {
        margin-right: 12px;
        color: var(--bs-primary);
        width: 20px;
        text-align: center;
    }
    
    .mobile-drawer-menu li a:hover,
    .mobile-drawer-menu li a.active {
        background: var(--bs-light);
        color: var(--bs-primary);
        padding-left: 25px;
    }
    
    /* Dropdown in Drawer */
    .mobile-drawer-dropdown {
        position: relative;
    }
    
    .mobile-drawer-dropdown > a {
        position: relative;
    }
    
    .mobile-drawer-dropdown > a::after {
        content: "\f107";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        position: absolute;
        right: 20px;
        transition: transform 0.3s;
    }
    
    .mobile-drawer-dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .mobile-drawer-submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #f8f9fa;
    }
    
    .mobile-drawer-dropdown.active .mobile-drawer-submenu {
        max-height: 300px;
    }
    
    .mobile-drawer-submenu li a {
        padding-left: 50px;
        font-size: 14px;
    }
    
    /* Drawer Footer */
    .mobile-drawer-footer {
        padding: 20px;
        border-top: 1px solid #e0e0e0;
        margin-top: 20px;
    }
    
    .mobile-drawer-footer .contact-item {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
        font-size: 13px;
    }
    
    .mobile-drawer-footer .contact-item i {
        color: var(--bs-primary);
        margin-right: 10px;
        width: 20px;
    }
    
    /* Mobile Topbar - Hide on mobile */
    .topbar {
        display: none !important;
    }
    
    /* Mobile Hero Carousel */
    .header-carousel .header-carousel-item,
    .header-carousel .header-carousel-item img {
        height: 400px !important;
    }
    
    .header-carousel .carousel-caption {
        padding-top: 60px !important;
    }
    
    .header-carousel .carousel-caption h1 {
        font-size: 24px !important;
    }
    
    .header-carousel .carousel-caption h4 {
        font-size: 16px !important;
    }
    
    .header-carousel .carousel-caption p {
        font-size: 14px !important;
    }
    
    .header-carousel .carousel-caption .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    /* Fix carousel navigation buttons on mobile - prevent overlap with content */
    .header-carousel .owl-nav .owl-prev,
    .header-carousel .owl-nav .owl-next {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        bottom: 15px !important;
        z-index: 10 !important;
    }
    
    .header-carousel .owl-nav .owl-prev {
        left: 15px !important;
        margin-left: 0 !important;
        transform: none !important;
    }
    
    .header-carousel .owl-nav .owl-next {
        left: 70px !important;
        transform: none !important;
    }
    
    /* Ensure carousel caption buttons don't overlap with nav buttons */
    .header-carousel .carousel-caption .d-flex {
        margin-bottom: 70px !important;
    }
    
    /* Mobile Stats Counter */
    .stats-counter .stats-item h2 {
        font-size: 32px !important;
    }
    
    .stats-counter .stats-item p {
        font-size: 13px !important;
    }
    
    /* Mobile About Section */
    .about-images .about-img-box {
        margin-bottom: 15px;
    }
    
    .about-images .position-absolute {
        position: relative !important;
        margin: 20px auto 0 !important;
        display: inline-block;
    }
    
    /* Mobile Services */
    .service-item {
        margin-bottom: 20px;
    }
    
    /* Mobile Safety & Compliance Section */
    .safety-compliance {
        padding: 3rem 0 !important;
    }
    
    /* Mobile 3D Badges */
    .badge-3d {
        height: 180px !important;
        margin-bottom: 20px;
    }
    
    .badge-front,
    .badge-back {
        padding: 15px !important;
    }
    
    .badge-front i {
        font-size: 2.5rem !important;
        margin-bottom: 10px !important;
    }
    
    .badge-front h5 {
        font-size: 1rem !important;
    }
    
    .badge-back p {
        font-size: 0.9rem !important;
    }
    
    /* Mobile Timeline */
    .timeline-container {
        margin: 30px 0 !important;
    }
    
    .timeline {
        padding: 20px 0 !important;
        padding-left: 0 !important;
    }
    
    .timeline::before {
        left: 30px !important;
    }
    
    .timeline-item {
        width: 100% !important;
        left: 0 !important;
        text-align: left !important;
        padding: 15px 20px 15px 70px !important;
    }
    
    .timeline-item::before {
        left: 70px !important;
        top: -25px !important;
        font-size: 1rem !important;
    }
    
    .timeline-dot {
        left: 20px !important;
        right: auto !important;
        width: 16px !important;
        height: 16px !important;
        top: 25px !important;
    }
    
    .timeline-content {
        padding: 15px !important;
    }
    
    .timeline-content::before {
        display: none !important;
    }
    
    .timeline-content h5 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .timeline-content p {
        font-size: 0.9rem !important;
    }
    
    /* Mobile Compliance Stats */
    .compliance-stat {
        padding: 20px !important;
        margin-bottom: 20px;
    }
    
    .compliance-stat i {
        font-size: 2rem !important;
    }
    
    .compliance-stat h2 {
        font-size: 2rem !important;
    }
    
    .compliance-stat p {
        font-size: 0.9rem !important;
    }
    
    /* Mobile FAQ */
    .faq-accordion .accordion-button {
        font-size: 14px;
        padding: 12px;
    }
    
    /* Mobile Clients */
    .client-card {
        margin-bottom: 15px;
    }
    
    /* Mobile Team */
    .team-item {
        margin-bottom: 30px;
    }
    
    /* Fix team image overlapping on mobile */
    .team .team-item .team-img {
        margin-top: 0 !important;
        transform: translateY(0) !important;
        margin-bottom: 0 !important;
        width: 200px !important;
        height: 200px !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .team-item .team-img img {
        width: 100%;
        height: 100%;
        display: block;
    }
    
    .team-item .team-title {
        padding: 20px 15px !important;
    }
    
    .team-item .team-title h4 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .team-item .team-title p {
        font-size: 0.9rem;
    }
    
    /* Ensure team section heading is visible */
    .team .text-center {
        margin-bottom: 30px !important;
        padding: 0 15px;
    }
    
    .team .text-center h4 {
        font-size: 1.2rem !important;
    }
    
    .team .text-center h1 {
        font-size: 1.8rem !important;
    }
    
    /* Fix team item padding on mobile */
    .team .team-item {
        padding: 20px 15px !important;
    }
    
    /* Mobile Footer */
    .footer .footer-item {
        margin-bottom: 30px;
    }
    
    /* Mobile Floating Bubbles - Adjust position */
    .floating-bubbles-container {
        bottom: 20px;
        right: 15px;
        gap: 12px;
    }
    
    .whatsapp-bubble,
    .email-bubble {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-bubble i {
        font-size: 24px;
    }
    
    .email-bubble i {
        font-size: 22px;
    }
    
    /* Mobile Modal */
    .whatsapp-modal {
        width: calc(100vw - 30px);
        right: 15px;
        bottom: 90px;
    }
    
    .email-menu {
        width: 260px;
        right: 15px;
        bottom: 90px;
    }
    
    /* Mobile Typography */
    h1.display-5 {
        font-size: 28px !important;
    }
    
    h1.display-4 {
        font-size: 32px !important;
    }
    
    .display-3 {
        font-size: 36px !important;
    }
    
    /* Mobile Spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .pb-5 {
        padding-bottom: 3rem !important;
    }
    
    /* Mobile Container */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tablet Responsive (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .header-carousel .header-carousel-item,
    .header-carousel .header-carousel-item img {
        height: 500px !important;
    }
    
    .header-carousel .carousel-caption h1 {
        font-size: 32px !important;
    }
    
    h1.display-5 {
        font-size: 32px !important;
    }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .navbar-brand h2 {
        font-size: 20px !important;
    }
    
    .navbar-brand img {
        max-height: 40px !important;
    }
    
    .header-carousel .header-carousel-item,
    .header-carousel .header-carousel-item img {
        height: 350px !important;
    }
    
    .header-carousel .carousel-caption h1 {
        font-size: 20px !important;
    }
    
    .header-carousel .carousel-caption h4 {
        font-size: 14px !important;
    }
    
    .header-carousel .carousel-caption p {
        font-size: 12px !important;
        display: none;
    }
    
    .stats-counter .col-md-6 {
        margin-bottom: 20px;
    }
    
    h1.display-5 {
        font-size: 24px !important;
    }
    
    .btn-lg {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    /* Small mobile - Safety & Compliance */
    .badge-3d {
        height: 160px !important;
    }
    
    .badge-front i {
        font-size: 2rem !important;
    }
    
    .badge-front h5 {
        font-size: 0.9rem !important;
    }
    
    .timeline-item {
        padding: 10px 15px 10px 60px !important;
    }
    
    .timeline::before {
        left: 25px !important;
    }
    
    .timeline-dot {
        left: 17px !important;
        width: 14px !important;
        height: 14px !important;
    }
    
    .timeline-item::before {
        left: 60px !important;
        font-size: 0.9rem !important;
    }
    
    .compliance-stat h2 {
        font-size: 1.8rem !important;
    }
    
    /* Small mobile - Team */
    .team .team-item .team-img {
        width: 180px !important;
        height: 180px !important;
    }
    
    .team-item .team-title h4 {
        font-size: 1rem !important;
    }
    
    .team-item .team-title p {
        font-size: 0.85rem !important;
    }
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}
