/* =========================================
   MOBILE RESPONSIVENESS - SixVM
   ========================================= */

/* =========================================
   HAMBURGER BUTTON
   ========================================= */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
    flex-shrink: 0;
    margin-left: auto;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================================
   MOBILE NAV OVERLAY
   ========================================= */
.mobile-nav-overlay {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background: rgba(5, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(64, 128, 255, 0.2);
    display: none;
}

.mobile-nav-overlay.open {
    transform: translateX(0);
}

.mobile-nav-inner {
    padding: 30px 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Nav Links List */
.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.mobile-nav-links > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mobile-nav-links > li > a {
    display: block;
    padding: 16px 5px;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(240, 240, 240, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
    text-decoration: none;
}

.mobile-nav-links > li > a:hover {
    color: #00c8ff;
}

/* Services Accordion Toggle Button */
.mobile-services-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 16px 5px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(240, 240, 240, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: var(--font-main, 'Inter', sans-serif);
}

.mobile-services-toggle i {
    transition: transform 0.3s ease;
    color: #00c8ff;
    font-size: 0.85rem;
}

.mobile-services-toggle.open i {
    transform: rotate(180deg);
}

/* Services Dropdown */
.mobile-services-dropdown {
    display: none;
    padding: 10px 0 20px 15px;
    border-left: 2px solid rgba(64, 128, 255, 0.3);
    margin-left: 5px;
    margin-bottom: 10px;
}

.mobile-services-dropdown.open {
    display: block;
}

.mobile-services-group {
    margin-bottom: 20px;
}

.mobile-services-group:last-child {
    margin-bottom: 0;
}

.mobile-services-group h5 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00c8ff;
    margin-bottom: 10px;
    font-weight: 700;
}

.mobile-services-dropdown a {
    display: block;
    padding: 9px 10px;
    font-size: 0.95rem;
    color: rgba(200, 200, 200, 0.85);
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-services-dropdown a:hover {
    color: #fff;
    background: rgba(64, 128, 255, 0.08);
    padding-left: 16px;
}

/* Mobile Nav CTA Buttons */
.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 30px;
    margin-top: auto;
}

.mobile-nav-actions .btn-call-modern,
.mobile-nav-actions .btn-consult-modern {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 14px 20px !important;
    font-size: 0.9rem !important;
}

/* =========================================
   HEADER RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .hamburger-btn {
        display: flex;
        margin-left: 4px;
    }

    .mobile-nav-overlay {
        display: block;
    }

    header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        gap: 0;
    }

    .logo img {
        height: 40px !important;
    }

    /* Center the two icon buttons between logo and hamburger */
    header .header-actions {
        display: flex !important;
        align-items: center;
        gap: 10px;
        flex: 1;
        justify-content: center;
    }

    /* Shared icon-button base */
    header .btn-call-modern,
    header .btn-consult-modern {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        line-height: 1;
        flex-shrink: 0;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }

    /* Call button — simple */
    header .btn-call-modern {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        box-shadow: none !important;
        gap: 0 !important;
    }
    header .btn-call-modern i {
        font-size: 1rem !important;
        color: #fff !important;
        margin: 0 !important;
        line-height: 1;
    }
    header .btn-call-modern span {
        display: none !important;
    }

    /* Consultation button — simple */
    header .btn-consult-modern {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: none !important;
        position: relative !important;
    }
    header .btn-consult-modern::before {
        content: '\f073';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 1rem;
        color: #fff;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        line-height: 1;
    }
}

/* =========================================
   HERO SECTION
   ========================================= */
@media (max-width: 900px) {
    .hero {
        min-height: 100svh !important;
        min-height: 100vh !important;
        height: auto !important;
        width: 100% !important;
        padding-top: 110px !important;
        padding-bottom: 120px !important;
        overflow-x: hidden !important;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Limit video player height so hero fits on screen */
    .hero-dashboard-interface {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .holographic-player {
        max-height: 260px !important;
        max-width: 100% !important;
    }
    video#hero-main-video {
        height: 260px !important;
        object-fit: cover;
    }
}

/* =========================================
   FOOTER FIX
   ========================================= */
@media (max-width: 900px) {
    footer {
        width: 100% !important;
        padding: 60px 20px 30px !important;
    }

    .footer-brand {
        margin-top: 0 !important;
        align-items: center;
    }

    .footer-content {
        gap: 30px !important;
    }

    .footer-brand p {
        text-align: center;
        margin: 15px auto;
    }
}

/* =========================================
   SECTIONS - OVERFLOW PREVENTION
   ========================================= */
@media (max-width: 900px) {
    section,
    .detail-section,
    .service-section {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }
}

/* =========================================
   PROCESS / STEP CARDS
   ========================================= */
@media (max-width: 768px) {
    .process-grid {
        grid-template-columns: 1fr !important;
    }

    .process-card {
        min-height: unset !important;
        padding: 30px 20px !important;
    }

    .process-number {
        font-size: 4rem !important;
    }
}

/* =========================================
   CONSULTATION FORM
   ========================================= */
@media (max-width: 768px) {
    .booking-widget,
    .booking-form-layout,
    .booking-container,
    .form-layout {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .calendar-container,
    .form-section,
    .booking-sidebar {
        width: 100% !important;
        min-width: unset !important;
    }

    .month-selector {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* =========================================
   SERVICE PAGE GRIDS
   ========================================= */
@media (max-width: 768px) {
    .ops-terminal {
        padding: 15px !important;
    }

    .state-selector-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .terminal-output {
        grid-template-columns: 1fr !important;
        height: 200px !important;
    }
}

@media (max-width: 600px) {
    /* Section headers */
    .section-header h2,
    .detail-section h2 {
        font-size: 1.8rem !important;
    }

    /* General grid collapse */
    .features-grid,
    .benefits-grid,
    .stats-grid,
    .cards-grid,
    .service-grid {
        grid-template-columns: 1fr !important;
    }

    /* Service compact card */
    .service-compact-card {
        max-height: none !important;
    }

    /* Hero h1 */
    .hero h1,
    .hero-text h1 {
        font-size: 2rem !important;
    }

    /* Reduce section padding */
    section {
        padding: 50px 0 !important;
    }

    .detail-section {
        padding: 50px 0 !important;
    }

    /* Container padding */
    .container {
        padding: 0 15px !important;
    }
}

/* =========================================
   TABLET TWEAKS (768px)
   ========================================= */
@media (max-width: 768px) {
    .hero h1,
    .hero-text h1 {
        font-size: 2.4rem;
    }

    /* Two-column grids → single */
    .two-col-grid,
    .split-grid,
    .content-split {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Immersive sections */
    .immersive-content,
    .focus-content {
        flex-direction: column !important;
        gap: 30px !important;
    }
}

/* =========================================
   SMALL MOBILE (480px and below)
   ========================================= */
@media (max-width: 480px) {
    .logo img {
        height: 36px !important;
    }

    .hero h1,
    .hero-text h1 {
        font-size: 1.8rem !important;
    }

    .btn {
        padding: 10px 18px !important;
        font-size: 0.8rem !important;
    }

    .hero-cta {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center;
    }

    .hero-cta .btn {
        width: auto;
        text-align: center;
    }

    /* Stats grid: 2×2 on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
        margin-top: 28px !important;
    }
    .stat-card {
        padding: 24px 12px !important;
        border-radius: 12px !important;
    }
    .stat-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: rgba(255,255,255,0.1) !important;
    }
    .stat-card h3 {
        font-size: 2rem !important;
        text-shadow: none !important;
        color: #fff !important;
    }
    .stat-card span {
        font-size: 1.1rem !important;
        color: #00c8ff !important;
    }
    .stat-card p {
        font-size: 0.7rem !important;
        letter-spacing: 0.05em !important;
    }

    /* Testimonials fix */
    .testimonial-item {
        padding: 0 16px !important;
    }
    .testimonial-quote {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
        line-height: 1.6 !important;
    }
    .testimonial-author h4 {
        font-size: 0.95rem !important;
    }
    .testimonial-author p {
        font-size: 0.8rem !important;
    }
    .testimonial-container {
        padding: 0 !important;
    }

    .section-header h2 {
        font-size: 1.6rem !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
    }

    /* Service ticker cards — fit mobile */
    .service-card {
        min-width: 160px !important;
        max-width: 180px !important;
    }
    .service-card-image {
        height: 80px !important;
    }
    .service-card h3 {
        font-size: 0.85rem !important;
    }
    .service-card p {
        font-size: 0.72rem !important;
    }
    .services-scroll-wrapper {
        margin-top: 20px !important;
    }

    /* Why SixVM page grids */
    .why-grid,
    .value-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer links centered */
    .footer-links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    footer .footer-links {
        text-align: center;
    }

    footer .footer-links a:hover {
        transform: none;
        padding-left: 0;
    }
}

/* ── Chat with Doc button — mobile ───────────────── */
@media (max-width: 900px) {
    #chatbot-widget {
        bottom: 80px;
        right: 16px;
        z-index: 9998;
    }
    .chatbot-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }
    .chatbot-btn .chat-btn-label {
        display: none;
    }
    .chatbot-btn::after {
        display: none;
    }
}
