/* Responsive Styles */

@media (max-width: 1025px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .about-section {
        padding: 140px 40px;
    }

    .partners-content {
        padding-right: 0;
        margin-left: 0;
    }

    .nav-menu ul {
        gap: 30px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    /* Global Resets */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    .section {
        overflow: hidden;
        /* Contain overflow per section */
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 80px;
    }

    .section-title-left {
        font-size: 1.5rem;
        /* Align to center */
        text-align: center;
    }

    /* Disable Sticky Parallax on Mobile */
    .hero-section,
    .about-section,
    .why-us-section,
    .clients-section,
    .partners-section,
    .footer-section {
        position: relative !important;
        top: auto !important;
        z-index: auto !important;
    }

    /* Navbar */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-black);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav-menu a {
        font-size: 1.5rem;
    }

    /* Hero Section */

    .hero-title {
        font-size: 1.5rem;
        width: 100%;
    }

    /* About Section */
    .about-section {
        padding: 140px 20px;
    }

    .about-container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .about-title {
        font-size: 1.5rem;
    }

    .about-text {
        font-size: 1.2rem;
        text-align: justify;
    }

    .about-image-wrapper {
        max-width: 400px;
        /* Limit width for better appearance */
        width: 100%;
        margin: 0 auto;
        padding-left: 0;
    }

    .about-contrast-bg {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        border-radius: 20px;
        /* Keep border radius */
    }

    .about-content {
        width: 100%;
        padding: 0;
    }

    /* Metrics Section */
    .metrics-section {
        overflow: visible;
        padding: 0;
    }

    .metrics-container {
        top: 0;
        margin-top: 0;
        position: relative;
    }

    .metrics-card {
        padding: 30px;
        gap: 30px;
        width: 100%;
        /* Full width */
        max-width: 100%;
        margin: 0;
        /* Reset margin */
    }

    .metric-divider {
        height: 2px;
    }

    .metric-number {
        font-size: 2rem;
    }

    /* Why Us Section */
    .why-us-section {
        padding-top: 160px;
    }

    .card-title {
        font-size: 0.8rem;
    }

    .card-text {
        font-size: 0.65rem;
    }

    .partners-visuals {
        width: auto;
        justify-content: center;
    }

    /* Partners Section */
    
    .partners-content {
        padding-right: 0;
        margin-left: 0;
    }

    .partners-text {
        padding-right: 0;
        text-align: justify;
    }

    /* .partners-grid {
        align-items: center;
    } */

    /* Footer Section */
    .footer-section {
        min-height: auto;
        padding: 60px 20px;
        justify-content: flex-start;
    }

    .footer-title {
        font-size: 2rem;
    }

    .footer-cta {
        margin-left: 0;
        align-self: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        margin-top: 40px;
    }

    .footer-copyright {
        position: static;
        margin-top: 40px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.2rem;
    }

    .hero-content {
        margin-left: 0;
    }

    .about-image-mask {
        border-radius: 10px;
        box-shadow: -5px -5px 0px 0px rgb(222 210 66)
    }

    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-title {
        font-size: 1.5rem;
    }

    .why-us-card {
        border-radius: 10px;
    }

    .partners-container {
        flex-direction: column;
        gap: 40px;
    }

    /* Mobile animation for partners section */
    .partners-section {
        padding: 60px 0;
        overflow: hidden; 
    }

    .partners-visuals {
        display: flex;
        justify-content: center;
        margin-top: 40px;
        width: 100%;
        perspective: 1000px;
    }

    .partners-grid {
        display: flex; 
        flex-direction: row; /* CRITICAL: Override column direction */
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px; /* Tighter gap for bubble effect */
        max-width: 90%; /* Use slightly more width on mobile */
        margin: 0 auto;
    }

    /* Flatten the rows for mobile */
    .partner-row {
        display: contents; 
    }

    .partner-item {
        width: 44px; /* Good touch size */
        height: 44px;
        border-radius: 50%;
        /* Initial state for scroll animation */
        opacity: 0;
        transform: scale(0); /* Start tiny */
        transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy pop */
        box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Add depth */
    }

    /* Creative "Organic" Offsets using nth-child to break the grid */
    .partner-item:nth-child(odd) {
        margin-top: 20px; /* Shift every other item down to create honeycomb-ish mesh */
    }

    .partner-item:nth-child(3n) {
        width: 38px; /* Vary sizes slightly for organic feel */
        height: 38px;
    }
    
    .partner-item:nth-child(7n) {
        width: 30px; /* Small bubbles */
        height: 30px;
        margin-top: -10px; /* Shift up */
    }

    /* Active state when class is added by JS */
    .partner-item.visible {
        opacity: var(--opacity);
        transform: scale(1);
        /* Re-apply margins in transform context if needed, but standard flow handles margins */
    }
    
    /* Hover effect on mobile (tap) */
    .partner-item:active {
        transform: scale(1.2);
        z-index: 10;
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

@media (max-width: 399px) {
    .why-us-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.8rem;
    }

    .footer-title {
        font-size: 1rem;
    }
}