/* Responsive Breakpoints & Mobile Enhancements */
@media(max-width:1024px){
    .grid-4{grid-template-columns:repeat(2,1fr)}
    .footer-grid{grid-template-columns:repeat(2,1fr)}
    .ai-grid,.product-hero,.service-hero,.sandbox-container{grid-template-columns:1fr}
    .hero-stats{gap:24px}
    .stats-grid{grid-template-columns:repeat(2,1fr)}
}

/* Mobile Bottom Navigation Bar (Global styles, hidden on desktop) */
.mobile-bottom-nav {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding: 6px 12px 8px 12px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    gap: 4px;
    flex: 1;
}

.mobile-bottom-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active {
    color: #818cf8; /* var(--primary) fallback */
}

.mobile-bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.15);
    color: #818cf8;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

@media(max-width:768px){
    /* Body safety padding for bottom nav */
    body {
        padding-bottom: 74px !important;
    }

    /* Mobile Drawer Menu styles (Left-aligned) */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        right: auto;
        width: 300px;
        height: 100vh;
        background: rgba(3, 7, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 90px 24px 32px 24px;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        gap: 16px;
        z-index: 1000;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
    }
    .nav-menu.active {
        left: 0;
        right: auto;
    }
    .nav-menu li {
        width: 100%;
    }
    .nav-menu .nav-link {
        font-size: 1.05rem;
        font-weight: 700;
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.04);
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
        color: var(--text-secondary);
    }
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(99, 102, 241, 0.1);
        border-color: rgba(99, 102, 241, 0.2);
        color: var(--primary);
    }

    /* Left-aligned Navbar components */
    .nav-toggle {
        display: flex;
        order: 1;
    }
    .nav-logo {
        order: 2;
        margin-right: auto;
        margin-left: 12px;
    }
    .nav-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .nav-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    .nav-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Accordion Dropdown Menu for Mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(0, 0, 0, 0.2);
        margin-top: 8px;
        padding: 8px 16px;
        border-radius: var(--radius);
        display: none;
        width: 100%;
    }
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
    .dropdown-menu a {
        font-size: 0.95rem;
        font-weight: 600;
        padding: 10px 0;
        color: var(--text-secondary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        display: block;
    }
    .dropdown-menu a:last-child {
        border-bottom: none;
    }
    .dropdown-menu a:hover {
        color: var(--primary);
    }

    /* Responsive Grids */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-newsletter {
        flex-direction: column;
        text-align: center;
    }
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    .newsletter-form input {
        min-width: auto;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-cta {
        flex-direction: column;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    .hero-stat {
        flex: 1;
        min-width: 80px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .contact-form {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 0;
    }
    .page-banner {
        padding: 120px 0 60px;
    }
    .career-card {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    /* Glass card padding adjustment for smaller viewports */
    .glass-card {
        padding: 24px 20px;
    }

    /* Interactive Computer Vision Sandbox responsiveness */
    .sandbox-viewscreen {
        min-height: 260px;
    }

    /* Enable Mobile Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
        bottom: 0;
    }

    /* Shift floating action buttons up so they don't cover bottom nav */
    .back-to-top {
        bottom: 148px !important;
    }
    .whatsapp-float {
        bottom: 80px !important;
    }
}

@media(max-width:480px){
    .container{padding:0 16px}
    .stats-grid{grid-template-columns:1fr 1fr}
    .stat-item .stat-number{font-size:1.8rem}
    .hero-stats{justify-content:center}
    h1{font-size:1.8rem}
    h2{font-size:1.5rem}
}
