/* ===== MOBILE OPTIMIZATION ===== */

/* Mobile Navigation Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        padding: 80px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        color: var(--text);
    }

    .nav-toggle {
        display: flex;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .container {
        padding: 0 30px;
    }

    /* Hero */
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-3d {
        order: -1;
        height: 400px;
    }

    /* About Cards */
    .about-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .container {
        padding: 0 20px;
    }

    /* Typography */
    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-3d {
        height: 300px;
    }

    /* Nav */
    .nav {
        padding: 15px 0;
    }

    .nav-inner {
        padding: 0 20px;
    }

    .nav-logo {
        font-size: 1.5rem;
    }

    .nav-cta {
        display: none;
    }

    /* About */
    .about-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-card {
        padding: 30px 25px;
    }

    /* Stats */
    .stats {
        padding: 60px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Solutions */
    .solutions-list {
        gap: 20px;
    }

    /* Gallery */
    .gallery {
        padding: 80px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item {
        height: 250px;
    }

    /* Why Section */
    .why-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .why-card {
        padding: 30px 25px;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 30px 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-top {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    .footer-col {
        text-align: center;
    }

    /* Buttons */
    .btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    /* Marquee */
    .marquee-content span {
        font-size: 1rem;
    }

    .marquee-content {
        gap: 40px;
        padding-right: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px;
    }

    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-3d {
        height: 250px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .gallery-item {
        height: 200px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-3d {
        height: 250px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .btn:hover,
    .nav-link:hover,
    .gallery-item:hover,
    .about-card:hover,
    .why-card:hover {
        transform: none;
    }

    /* Larger touch targets */
    .btn,
    .nav-link,
    .nav-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    /* Disable custom cursor on touch */
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}