/* Base Mobile Styles - Mobile First */

/* Footer Logo Mobile Styles */
@media (max-width: 767.98px) {
    .footer-brand-logo {
        width: 55px;
        margin-bottom: 0.75rem;
        margin-left: auto;
        margin-right: auto;
        filter: grayscale(100%) brightness(1.2);
    }
}

/* These are default styles that will apply to all screen sizes unless overridden */
/* Container */
.container {
    padding-right: 15px;
    padding-left: 15px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Navbar Styles */
@media (max-width: 767.98px) {
    .navbar {
        padding: 0.25rem 1rem;
        min-height: var(--header-height);
        display: flex;
        align-items: center;
    }

    .navbar-brand {
        padding: 0.25rem 0;
        display: flex;
        align-items: center;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
        transform: translateZ(0);
    }
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    margin-right: 0;
}

.navbar > .container {
    padding-right: 15px;
    padding-left: 15px;
}

    /* Video Container Mobile Styles */
@media (max-width: 767.98px) {
    /* Hide native controls on mobile */
    #enterprise-solutions .video-container video::-webkit-media-controls {
        display: none !important;
    }
    #enterprise-solutions .video-container video::-webkit-media-controls-enclosure {
        display: none !important;
    }

    #enterprise-solutions {
        padding: 2rem 0;
    }
    
    #enterprise-solutions .video-wrapper {
        width: 100%;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #enterprise-solutions h2,
    #enterprise-solutions p,
    #enterprise-solutions .lead {
        color: inherit;
    }
    
    #enterprise-solutions .video-container {
        max-width: 767.98px;
        width: 100%;
        line-height: 0;
        position: relative;
        display: block;
        background: #000;
    }

    #enterprise-solutions .video-container video {
        width: 100%;
        height: auto;
        display: block;
        background: #000;
    }

    .custom-video-controls {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.85);
        padding: 10px 15px;
        display: flex;
        align-items: center;
        gap: 15px;
        z-index: 1000;
    }

    .custom-video-controls button {
        background: transparent;
        border: none;
        color: #fff;
        padding: 8px;
        cursor: pointer;
    }

    .play-pause-btn,
    .volume-btn,
    .fullscreen-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .video-progress {
        flex: 1;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        cursor: pointer;
        border-radius: 2px;
        position: relative;
    }

    .progress-bar {
        height: 100%;
        background: #0d6efd;
        border-radius: 2px;
    }

    .progress-handle {
        display: none;
    }

    .time-display {
        color: #fff;
        font-size: 14px;
        margin: 0 10px;
    }

    .volume-control {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .volume-slider {
        width: 60px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        position: relative;
    }

    .volume-bar {
        height: 100%;
        background: #fff;
        border-radius: 2px;
    }

    /* Hide custom controls on desktop */
    @media (min-width: 768px) {
        .custom-video-controls {
            display: none;
        }
    }
}

#enterprise-solutions .video-container video {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
}

.custom-video-controls {
    position: relative;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transition: opacity 0.3s;
}

.custom-video-controls.hidden {
    opacity: 0;
}

.play-pause-btn,
.volume-btn,
.fullscreen-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.play-pause-btn:hover,
.volume-btn:hover,
.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    touch-action: none;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #0d6efd;
    border-radius: 2px;
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #0d6efd;
    border-radius: 50%;
    transform: translateY(-50%);
    display: none;
}

.video-progress:active .progress-handle {
    display: block;
}

.time-display {
    color: white;
    font-size: 14px;
    min-width: 85px;
    text-align: center;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    touch-action: none;
}

.volume-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #0d6efd;
    border-radius: 2px;
    width: 100%;
}

@media (max-width: 480px) {
    .volume-slider {
        display: none;
    }
}

/* Hero Section */
    .hero-section {
        /* padding handled in critical.css */
        text-align: center;
        min-height: calc(100vh - var(--header-height));
     
        display: grid;
        place-items: center;
        padding: 2rem 0;
        position: relative;
        overflow: hidden;
    }

    .hero-image-container {
        margin-top: 1rem;
        padding: 0 1rem;
    }

    .hero-image {
        max-height: 400px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .hero-title {
        font-size: 2rem;
        margin-top: 1.5rem;
        line-height: 1.2;
        min-height: 2.4em; /* Reserve space for two lines */
    }
    #home{
        min-height: 90vh;
    }
    h2{
        text-align: center;
    }
    .faq-category h3 {
        margin-top: 1rem;
    }
    .d-flex {
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important; /* Adjust gap if needed *
    }
    .text-orange  {
        font-size: 2rem;
        line-height: 1.2;
        min-height: 2.4em; /* Reserve space for two lines */
    }
    .analysis-item ,  .analysis-item p, .contact-card , .contact-card p{
        text-align: center !important;
    }
    .hero-section .lead {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column !important;
    }

    /* Cards */
    .service-card,
    .project-card,
    .testimonial-card,
    .sme-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        min-height: 200px;
        display: flex;
        flex-direction: column;
    }

    .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Image containers */
    .img-container {
        aspect-ratio: 16/9;
        background: var(--light-bg);
        margin-bottom: 1rem;
        overflow: hidden;
        position: relative;
    }

    .img-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Navigation */
    .navbar {
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        outline: none !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
    }
    
    .navbar-toggler:focus,
    .navbar-toggler:active {
        outline: none !important;
        box-shadow: none !important;
    }

    .navbar-toggler:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        height: 35px;
    }

/* Mobile styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        visibility: hidden;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1050;
        padding: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        display: none;
        flex-direction: column;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        pointer-events: none;
        will-change: transform;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

    .navbar-collapse.show {
        visibility: visible;
        transform: translateX(0);
        transition: transform 0.3s ease-in-out, visibility 0s linear 0s;
        pointer-events: auto;
    }

    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0.75rem 1.25rem;
        border-bottom: 1px solid #eee;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 1;
        margin-bottom: 0.5rem;
    }

    .navbar-nav {
        padding: 0.5rem 1.25rem;
        margin: 0;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.75rem 0;
        color: #333;
        border-bottom: 1px solid #eee;
        transition: color 0.2s ease;
        display: block;
        text-decoration: none;
        font-weight: 400;
        letter-spacing: 0.2px;
    }

    .nav-link:hover {
        color: #007bff;
        background-color: rgba(0, 123, 255, 0.05);
        padding-left: 0.5rem;
    }

    .nav-link:active {
        background-color: rgba(0, 123, 255, 0.1);
    }

    .nav-link.audit-highlight {
        color: #007bff;
        font-weight: 500;
    }

    .mobile-close-btn {
        background: none;
        border: none;
        padding: 0.75rem;
        cursor: pointer;
        color: #333;
        font-size: 1.25rem;
        line-height: 1;
        transition: transform 0.2s ease, color 0.2s ease;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .mobile-close-btn:hover {
        background-color: rgba(0,0,0,0.05);
    }

    .mobile-close-btn:active {
        background-color: rgba(0,0,0,0.1);
    }

    .navbar-collapse.show {
        visibility: visible;
        transform: translateX(0);
        transition: transform 0.3s ease-in-out, visibility 0s linear 0s;
        pointer-events: auto;
        display: block;
    }

    .navbar-collapse.show .mobile-close-btn {
        display: block;
    }

    @media (min-width: 992px) {
        .navbar-collapse {
            display: flex !important;
            position: static;
            width: auto;
            height: auto;
            background: none;
            padding: 0;
            overflow: visible;
            transform: none;
            visibility: visible;
            pointer-events: auto;
            box-shadow: none;
        }

        .navbar-nav {
            padding-top: 3rem;
        }

        .nav-item {
            margin: 0.5rem 0;
        }

        .nav-link {
            padding: 0.75rem 1rem;
            font-size: 1.1rem;
            border-radius: 8px;
            transition: background-color 0.2s ease;
        }

        .nav-link:hover {
            background-color: rgba(13, 110, 253, 0.1);
        }

        .breadcrumb-nav .breadcrumb-item {
            font-size: 0.8rem;
        }

        /* Roadmap Chat Interface */
        .roadmap-chat-interface {
            width: 100%;
            margin: 1rem 0;
            border-radius: 10px;
        }
    }

    .mobile-close-btn:hover {
        transform: rotate(90deg);
        background-color: rgba(0, 0, 0, 0.05);
    }

    .mobile-close-btn:active {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .mobile-close-btn i {
        display: block;
        width: 24px;
        height: 24px;
        line-height: 24px;
        text-align: center;
    }

    /* Floating Breadcrumb */
    .breadcrumb-nav {
        right: 10px;
        bottom: 80px;
        padding: 4px 12px;
        min-width: 140px;
        max-width: calc(100vw - 80px);
        font-size: 0.8rem;
    }
