/**
 * NovaTech Data Solutions LLC
 * Mobile-First Responsive Stylesheet (Native App Feel)
 */

/* Hide mobile-specific navigation elements on desktop views by default */
.mobile-nav-bar,
.mobile-slide-overlay,
.mobile-menu-drawer {
    display: none;
}

@media (max-width: 991px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .about-snapshot-image img { height: 380px; }

    /* Hide desktop nav and enable hamburger drawer on tablets & mobile screens */
    .desktop-nav {
        display: none !important; /* Hide standard top nav bar */
    }
    
    .hamburger-btn {
        display: flex !important;
        background: transparent;
        border: none;
        color: var(--white);
        cursor: pointer;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger-btn .svg-icon {
        width: 28px;
        height: 28px;
    }
    
    .logo img,
    .header-logo-img {
        height: 36px !important;
        max-width: 180px;
        object-fit: contain;
        object-position: left center;
    }
}

@media (max-width: 767px) {
    /* Base Mobile Layout Settings */
    .section-padding { padding: 60px 0; }
    .section-header h2 { font-size: 28px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 30px; }
    
    /* Touch target padding overrides */
    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 15px;
        min-height: 48px;
    }
    
    /* Table conversions to dynamic card stacks */
    .table-container {
        background: transparent;
        box-shadow: none;
    }
    
    .turnaround-table, 
    .turnaround-table thead, 
    .turnaround-table tbody, 
    .turnaround-table th, 
    .turnaround-table td, 
    .turnaround-table tr { 
        display: block; 
    }
    
    .turnaround-table thead {
        display: none; /* Hide standard desktop th row */
    }
    
    .turnaround-table tr {
        background: var(--white);
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-soft);
        border: 1px solid rgba(10, 22, 40, 0.05);
    }
    
    .turnaround-table td {
        padding: 8px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        display: flex;
        justify-content: space-between;
        font-size: 14px;
    }
    
    .turnaround-table td:last-child {
        border-bottom: none;
    }
    
    .turnaround-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
    }
    
    .turnaround-table td.time-cell {
        font-weight: 700;
        color: var(--accent);
    }

    /* Hide desktop headers and add top margin for fixed header */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom)); /* Leave room for floating bottom nav */
    }
    
    /* Mobile header overrides (inherited from tablet breakpoint media query) */

    /* 2x2 Grid Conversion for Stats Counter */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px 12px;
    }
    
    .stat-number {
        font-size: 30px;
    }
    
    .stat-title {
        font-size: 11px;
    }

    /* Snap Carousel Horizontal Scroll for Services Grid */
    .services-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 10px 4px 20px 4px;
        margin-bottom: 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .services-grid::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }
    
    .service-card {
        min-width: 270px;
        max-width: 290px;
        scroll-snap-align: start;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* Feature Items why list to 2-columns */
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 16px;
    }
    
    .why-card {
        text-align: center;
    }
    
    .why-icon-box {
        margin: 0 auto 12px auto;
    }

    /* Hero section font sizing */
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 15px;
    }
    
    .hero-ctas {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-badges-row {
        gap: 12px 20px;
    }

    /* Testimonial slider card pad */
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .quote-icon {
        left: 20px;
        font-size: 40px;
    }
    
    .review-text {
        font-size: 14px;
    }

    /* Two Columns Snapshot Grids to single row stack */
    .about-snapshot-image img {
        height: 300px;
    }
    
    .check-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-card {
        padding: 24px 16px;
    }

    /* Footer structure standard stacks */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-col h3, .footer-col h4 {
        margin-bottom: 16px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Floating WhatsApp sits ABOVE the bottom mobile nav */
    .whatsapp-float {
        bottom: 84px;
        right: 18px;
        width: 50px;
        height: 50px;
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    }
    
    .whatsapp-float .svg-icon {
        width: 26px;
        height: 26px;
    }

    /* ==========================================================================
       18. PERSISTENT MOBILE BOTTOM NAVIGATION BAR
       ========================================================================== */
    .mobile-nav-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 -4px 20px rgba(10, 22, 40, 0.08);
        border-top: 1px solid rgba(10, 22, 40, 0.05);
        border-radius: 16px 16px 0 0;
        z-index: 998;
        justify-content: space-around;
        align-items: center;
        padding-top: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 10px;
        position: relative;
        padding: 4px 0;
        width: 20%;
        transition: var(--transition);
        cursor: pointer;
    }
    
    .mobile-nav-item .svg-icon {
        width: 22px;
        height: 22px;
        margin-bottom: 3px;
        color: var(--text-muted);
        transition: var(--transition);
    }
    
    .mobile-nav-item.active {
        color: var(--accent);
    }
    
    .mobile-nav-item.active .svg-icon {
        color: var(--accent);
        transform: translateY(-2px);
    }
    
    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        top: -6px;
        width: 14px;
        height: 3px;
        background-color: var(--accent);
        border-radius: 4px;
    }
}

@media (max-width: 991px) {
    /* ==========================================================================
       19. LEFT-TO-RIGHT GLASS DRAWER SLIDE MENU
       ========================================================================== */
    .mobile-slide-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(10, 22, 40, 0.6);
        z-index: 1001;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        backdrop-filter: blur(4px);
    }
    
    .mobile-slide-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-menu-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 82%;
        max-width: 320px;
        height: 100%;
        background: rgba(10, 22, 40, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 30px 24px;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
    }
    
    .mobile-menu-drawer.open {
        transform: translateX(0);
    }
    
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
    }
    
    .drawer-logo a {
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 18px;
        color: var(--white);
    }
    
    .drawer-logo img,
    .drawer-logo-img {
        height: 44px;
        width: auto;
        max-width: 200px;
        object-fit: contain;
        object-position: left center;
    }
    
    .drawer-close-btn {
        background: transparent;
        border: none;
        color: var(--white);
        cursor: pointer;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .drawer-close-btn .svg-icon {
        width: 24px;
        height: 24px;
    }
    
    .drawer-body {
        flex-grow: 1;
        overflow-y: auto;
    }
    
    .drawer-nav {
        list-style: none;
    }
    
    .drawer-nav > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .drawer-nav > li > a, .drawer-menu-trigger {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        color: var(--white);
        font-family: var(--font-heading);
        font-weight: 600;
        font-size: 16px;
        width: 100%;
        background: transparent;
        border: none;
        text-align: left;
        cursor: pointer;
    }
    
    .drawer-menu-trigger .svg-icon {
        width: 16px;
        height: 16px;
        transition: transform 0.3s;
    }
    
    .drawer-menu-trigger.expanded .svg-icon {
        transform: rotate(90deg);
    }
    
    .drawer-submenu {
        list-style: none;
        padding-left: 15px;
        display: none;
        background-color: rgba(255,255,255,0.02);
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .drawer-submenu a {
        display: block;
        padding: 10px 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 14px;
    }
    
    .drawer-submenu a:hover {
        color: var(--white);
    }
    
    .drawer-footer {
        padding-top: 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .drawer-socials {
        display: flex;
        gap: 16px;
    }
    
    .drawer-tagline {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.4);
    }
}

/* ==========================================================================
   PREMIUM MOBILE CONTACT RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media (max-width: 767px) {
    .contact-interactive-panel {
        padding: 28px 18px !important;
        border-radius: 16px !important;
    }
    
    .contact-tabs-wrapper {
        border-radius: 50px !important;
        padding: 4px !important;
        margin-bottom: 30px !important;
        max-width: 100% !important;
    }
    
    .contact-tab-trigger {
        padding: 12px 14px !important;
        font-size: 12px !important;
        gap: 6px !important;
    }
    
    .contact-tab-trigger svg {
        width: 15px !important;
        height: 15px !important;
    }
    
    .interactive-field-group {
        margin-bottom: 18px !important;
    }
    
    .interactive-field-group .interactive-input {
        padding: 14px 14px 10px 14px !important;
        font-size: 13.5px !important;
    }
    
    .interactive-field-group .interactive-label {
        left: 14px !important;
        top: 13px !important;
        font-size: 13.5px !important;
    }
    
    .interactive-field-group.focused .interactive-label,
    .interactive-field-group.has-value .interactive-label {
        top: -8px !important;
        left: 10px !important;
        font-size: 10px !important;
    }
    
    .drag-drop-zone {
        padding: 24px 14px !important;
    }
    
    .drag-drop-zone .upload-icon-box svg {
        width: 38px !important;
        height: 38px !important;
    }
    
    .drag-drop-zone h5 {
        font-size: 13.5px !important;
    }
    
    .drag-drop-zone p {
        font-size: 11.5px !important;
    }
    
    .corporate-info-glass {
        padding: 18px !important;
        gap: 14px !important;
    }
    
    .corporate-icon-wrapper {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
    }
    
    .corporate-details-box .corporate-link {
        font-size: 14px !important;
    }
    
    .contact-security-card {
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }
}

/* Premium Sandbox Terminal Responsive Adapters */
@media (max-width: 767px) {
    .sandbox-terminal-window {
        min-height: auto;
        margin-top: 25px;
    }
    
    .terminal-body {
        grid-template-columns: 1fr;
    }
    
    .terminal-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 15px;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    
    .terminal-sidebar::-webkit-scrollbar {
        display: none;
    }
    
    .terminal-sidebar h4 {
        display: none; /* Hide sidebar heading on mobile */
    }
    
    .terminal-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }
    
    .terminal-console-pane {
        padding: 16px;
        font-size: 12px;
        min-height: 260px;
        max-height: 350px;
    }
}

/* ==========================================================================
   ROI Calculator, SLA Dashboard, and Tech Grid Responsiveness
   ========================================================================== */
@media (max-width: 991px) {
    .roi-sla-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .tech-stack-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .roi-calc-card, .sla-pulse-card {
        padding: 25px 20px !important;
        border-radius: 12px !important;
    }
    
    .roi-results {
        padding: 18px !important;
    }
    
    .roi-results div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        text-align: center;
    }
    
    #calc_savings {
        font-size: 32px !important;
    }
    
    .pulse-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .tech-stack-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .tech-node {
        padding: 20px 15px !important;
    }
    
    .tech-node div[style*="font-size: 32px"] {
        font-size: 26px !important;
        margin-bottom: 8px !important;
    }
    
    .tech-node h4 {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .tech-stack-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================================
   HOMEPAGE UPGRADE — Mobile Responsive Rules
   ========================================================================= */
@media (max-width: 991px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-trust-card {
        display: none; /* Hide trust widget on tablet/mobile to keep hero clean */
    }
    .hero-content {
        text-align: center;
    }
    .hero-badges-row {
        justify-content: center;
    }
    .hero-ctas {
        justify-content: center;
    }
    .compliance-badge-grid {
        gap: 12px;
    }
    .compliance-badge {
        padding: 12px 16px;
    }
}

@media (max-width: 767px) {
    /* Stats cards single column on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    .stat-card {
        padding: 20px 16px;
    }
    .stat-number {
        font-size: 26px !important;
    }

    /* Compliance badges 2-col on mobile */
    .compliance-badge-grid {
        gap: 10px;
    }
    .compliance-badge {
        flex-direction: column;
        text-align: center;
        padding: 14px;
        min-width: 130px;
        flex: 1 1 130px;
    }

    /* Trial benefit list stack */
    .trial-benefit-list {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* Process step numbers */
    .process-step-num {
        width: 58px;
        height: 58px;
        font-size: 22px;
        border-radius: 12px;
    }

    /* Why card numbers center on mobile */
    .why-card-num {
        text-align: center;
    }
    .why-card h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .why-card:hover h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}
