/**
 * INGO Website — Responsive Styles
 * Breakpoints: 1440, 1240, 1100, 992, 768, 480, 375, 320
 */

/* ==========================================================================
   Large Desktop tweaks (below 1240)
   ========================================================================== */
@media (max-width: 1240px) {
    .industries-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-32);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .why-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-32) 0;
    }

    .why-item:nth-child(3)::after,
    .why-item:nth-child(6)::after {
        display: none;
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Nav collapse / large tablet: max-width 1100px
   Prevents header overflow around 1024px
   ========================================================================== */
@media (max-width: 1100px) {
    :root {
        --header-height: 72px;
        --container-padding: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }

    .desktop-quote-btn {
        display: none;
    }

    .mobile-quote-btn {
        display: inline-flex;
        width: calc(100% - 48px);
        margin: var(--space-16) 24px 32px;
        justify-content: center;
    }

    .primary-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding-top: calc(var(--header-height) + 8px);
        box-shadow: -4px 0 24px rgba(7, 27, 58, 0.15);
        transform: translateX(100%);
        transition: transform var(--transition);
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .primary-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 var(--space-8);
    }

    .nav-link {
        padding: 14px 20px;
        font-size: 0.9375rem;
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-link.active::after {
        left: 20px;
        right: auto;
        width: 24px;
        bottom: 10px;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Tablet: max-width 992px
   ========================================================================== */
@media (max-width: 992px) {
    :root {
        --section-padding-y: 56px;
        --header-height: 72px;
        --container-padding: 20px;
    }

    /* Hero */
    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-media {
        position: relative;
        width: 100%;
        height: 320px;
        order: -1;
    }

    .hero-overlay {
        background: linear-gradient(
            180deg,
            transparent 0%,
            rgba(7, 27, 58, 0.4) 40%,
            var(--color-navy) 100%
        );
        height: 100%;
        top: auto;
        bottom: 0;
    }

    .hero-content {
        max-width: 100%;
        padding: 40px 0 48px;
    }

    .hero-stats-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 16px 0;
    }

    .stat-item {
        padding: 16px 20px;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(201, 150, 26, 0.3);
    }

    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(201, 150, 26, 0.3);
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-32);
    }

    .about-image {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }

    /* Services — 2 columns */
    .services-grid,
    .services-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Industries — 3 */
    .industries-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Process — wrap */
    .process-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-24);
        overflow: visible;
    }

    .process-arrow {
        display: none;
    }

    .process-step {
        flex: 0 0 calc(33.333% - 16px);
        max-width: 160px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    /* Founder */
    .founder-grid {
        grid-template-columns: 1fr;
        gap: var(--space-48);
    }

    .founder-block {
        grid-template-columns: 160px 1fr;
        max-width: 600px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-32);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    /* Inner pages */
    .two-col,
    .mission-vision,
    .contact-page-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-services {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-form {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mobile: max-width 768px
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --section-padding-y: 40px;
        --container-padding: 16px;
        --header-height: 64px;
    }

    body {
        font-size: 15px;
    }

    .logo-img {
        height: 40px;
    }

    .hero {
        min-height: auto;
    }

    .hero-media {
        height: 260px;
    }

    .hero-title {
        font-size: 1.625rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        white-space: normal;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-8);
    }

    .brand-logos {
        gap: var(--space-24);
        justify-content: center;
    }

    .about-benefits {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .services-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-16);
    }

    .service-card {
        min-height: 150px;
        padding: var(--space-24) var(--space-12);
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-12);
    }

    .industry-card {
        aspect-ratio: 4 / 3;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-24) 0;
    }

    .why-item:not(:last-child)::after {
        display: none;
    }

    .why-item {
        padding: var(--space-16);
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
        overflow: visible;
    }

    .process-step {
        flex: none;
        width: 100%;
        max-width: 280px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .founder-block {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .founder-image {
        max-width: 220px;
        margin: 0 auto;
    }

    .contact-form-card {
        padding: var(--space-24);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact-list li {
        justify-content: center;
        text-align: left;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
    }

    .related-services {
        grid-template-columns: 1fr;
    }

    .page-banner {
        padding: 48px 0 40px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }

    .btn {
        white-space: normal;
    }
}

/* ==========================================================================
   Small Mobile: max-width 480px / 375px / 320px
   ========================================================================== */
@media (max-width: 480px) {
    :root {
        --container-padding: 14px;
        --section-padding-y: 36px;
    }

    body {
        font-size: 15px;
    }

    .services-grid,
    .services-grid-3 {
        grid-template-columns: 1fr;
    }

    .industries-grid {
        grid-template-columns: 1fr 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .hero-stats-inner {
        grid-template-columns: 1fr 1fr;
    }

    .stat-number {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .btn {
        padding: 12px 20px;
        min-height: 44px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .nav-link,
    .faq-question,
    .form-control {
        min-height: 44px;
    }
}

@media (max-width: 375px) {
    :root {
        --container-padding: 12px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-media {
        height: 220px;
    }

    .primary-nav {
        width: min(300px, 92vw);
    }
}

@media (max-width: 320px) {
    :root {
        --container-padding: 10px;
        --section-padding-y: 32px;
    }

    body {
        font-size: 14px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .industries-grid {
        grid-template-columns: 1fr;
    }

    .stat-item:nth-child(odd) {
        border-right: none;
    }

    .hero-stats-inner {
        grid-template-columns: 1fr;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2),
    .stat-item:nth-child(3) {
        border-bottom: 1px solid rgba(201, 150, 26, 0.3);
    }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .site-header,
    .back-to-top,
    .mobile-menu-toggle,
    .nav-overlay {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
