/* ==========================================
   MOBILE & RESPONSIVE FIXES
   Ensures perfect layout on <992px screens
   ========================================== */

/* 1. Header & Navigation */
@media screen and (max-width: 992px) {
    .nav-toggle {
        display: block !important;
        position: relative;
        z-index: 1001;
        font-size: 1.5rem;
        color: var(--white);
        padding: 10px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        margin: 15px 0;
        opacity: 0;
        transform: translateX(20px);
        transition: 0.3s ease;
    }

    /* Stagger animation for items */
    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.2s;
    }
}

/* 2. Hero Section */
@media screen and (max-width: 992px) {
    .hero {
        padding-top: 120px;
        text-align: center;
    }

    .hero-container {
        flex-direction: column;
        align-items: center;
    }

    .hero-content {
        max-width: 100%;
        z-index: 2;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    /* 3D Scene Background on Mobile */
    #hero3dScene {
        width: 100% !important;
        height: 60% !important;
        top: 10% !important;
        right: 0 !important;
        opacity: 0.4;
        /* Dim it so text is readable */
        z-index: 0;
        pointer-events: none;
    }
}

/* 3. Section Grids (Stacking) */
@media screen and (max-width: 768px) {

    /* General Grid Stacking */
    .features-grid,
    .blog-grid,
    .contact-grid,
    .about-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* Country Showcase - Mobile 1 Col */
    .countries-showcase {
        flex-direction: column;
    }

    .country-card {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Specific Adjustments */
    .trust-badges {
        flex-wrap: wrap;
        justify-content: center;
    }

    .trust-badge {
        flex: 1 1 40%;
        /* 2 per row */
        margin: 5px;
    }
}

/* 4. Contact Form */
@media screen and (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        margin-bottom: 30px;
    }
}

/* 5. Footer resizing */
@media screen and (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand,
    .footer-links,
    .footer-contact {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}