/**
 * ALLUMATIK INDIA PVT. LTD. - Responsive Overrides
 * This file guarantees proper responsiveness across all pages from desktop to mobile.
 */

/* ==========================================================================
   MAX-WIDTH: 1199px (Tablets Landscape & Smaller Laptops)
   ========================================================================== */
@media (max-width: 1199px) {
    .statement {
        grid-template-columns: 20% 45% 35%;
        gap: 24px;
    }
    .footerGrid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr !important;
        gap: 28px;
    }
    .homeHeroGrid,
    .innerHeroGrid {
        grid-template-columns: 48% 52%;
        gap: 24px;
    }
    .custom-model-grid,
    .familyGrid,
    .modelGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .engineeringSplit {
        grid-template-columns: 50% 50%;
    }
}

/* ==========================================================================
   MAX-WIDTH: 1100px (Header Collapse Fix)
   ========================================================================== */
@media (max-width: 1100px) {
    .headerCta .ctaLabel {
        display: none !important;
    }
    .headerCta {
        padding: 12px 14px !important;
    }
    .siteHeader-right {
        gap: 12px !important;
    }
}

/* ==========================================================================
   MAX-WIDTH: 991px (Tablets Portrait)
   ========================================================================== */
@media (max-width: 991px) {
    /* Header CTA hidden on mobile/tablet */
    .headerCta {
        display: none !important;
    }
    .siteHeader-right {
        padding-left: 0 !important;
        gap: 0 !important;
        border: none !important;
    }
    .siteHeader-right::before {
        display: none !important;
    }

    /* Hero Sections: Stack them */
    .homeHeroGrid,
    .innerHeroGrid {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .homeCopy, .innerHeroGrid > div:first-child {
        padding-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .homeCopy > p, .innerHeroGrid p {
        margin: 0 auto;
    }
    .heroActions {
        justify-content: center;
        width: 100%;
    }
    .heroMachine {
        margin-top: 40px;
    }
    .heroMachine img {
        margin: 0 auto;
    }

    /* Layout Sections */
    .statement {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px;
    }

    .engineeringSplit {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column;
    }
    .engineeringImage {
        width: 100%;
        min-height: 350px;
    }
    .engineeringCopy {
        width: 100%;
        padding: 50px 30px !important;
    }

    .applicationPreview {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    .applicationPreview > div:first-child { width: 100%; }
    .applicationPreview > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .productIntro {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* ── FOOTER (tablet 2-col) ── */
    .footerGrid {
        grid-template-columns: 1fr 1fr !important;
        gap: 36px 28px !important;
    }
    .footerIdentity {
        grid-column: 1 / -1;
    }
    .footerLead h2 {
        font-size: clamp(28px, 7vw, 42px) !important;
    }
    .legal {
        flex-direction: column;
        gap: 8px !important;
        text-align: center;
        align-items: center;
    }
    .legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px !important;
    }

    /* Contact Page */
    .contactGrid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    .contactGrid aside {
        position: static !important;
        margin-top: 20px;
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid var(--line);
        padding-top: 40px;
    }
}

/* ==========================================================================
   MAX-WIDTH: 767px (Large Phones)
   ========================================================================== */
@media (max-width: 767px) {
    /* Global */
    .shell {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
    }
    .siteHeader {
        width: 100% !important;
        border-radius: 0 !important;
        padding-inline: 16px !important;
    }
    .headerCta {
        display: none !important;
    }

    /* Typography */
    .homeCopy h1, .innerHero h1 {
        font-size: clamp(30px, 8vw, 40px) !important;
    }
    .sectionNo {
        font-size: 10px;
        margin-bottom: 15px;
    }
    h2 {
        font-size: clamp(24px, 6vw, 32px) !important;
    }

    /* Grids */
    .custom-model-grid,
    .familyGrid,
    .modelGrid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Products Filter Bar */
    .filterBar-inner form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .filterBar-inner form > div { width: 100%; }

    /* ── FOOTER (mobile single col, left-aligned) ── */
    .footerGrid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: left;
    }
    .footerIdentity {
        grid-column: auto !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .footerIdentity p {
        margin: 0;
        max-width: 320px;
    }
    .footerLogo {
        margin-left: 0;
        margin-right: 0;
    }
    .social-icons {
        justify-content: flex-start;
    }
    .footerGrid > div {
        align-items: flex-start !important;
        text-align: left !important;
    }
    .footerGrid b::after {
        left: 0 !important;
        transform: none;
    }
    .footer-contact-info {
        align-items: flex-start;
    }
    .footerLead {
        padding: 60px 20px !important;
    }
    .footerLead h2 {
        font-size: clamp(26px, 8vw, 38px) !important;
    }
    .footerLead .amberButton {
        width: auto;
        justify-content: flex-start;
    }
    .legal {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: left;
        align-items: flex-start;
    }
    .legal-links {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px !important;
    }

    /* AmberBand */
    .amberBand .shell {
        display: flex !important;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ==========================================================================
   MAX-WIDTH: 576px (Small Phones)
   ========================================================================== */
@media (max-width: 576px) {
    /* Hero Buttons */
    .amberButton {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .heroActions {
        flex-direction: column;
        width: 100%;
        gap: 16px !important;
    }
    .heroActions > a { width: 100%; }

    /* Footer extra tighten */
    .footerGrid {
        gap: 24px !important;
    }
    .footerGrid > div {
        align-items: flex-start !important;
        text-align: left !important;
    }
    .legal {
        padding-bottom: 32px !important;
    }

    /* Product Details Spec Table */
    .specTable > div {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
        padding: 16px 0;
    }
    .specTable > div > span,
    .specTable > div > strong,
    .specTable > div > small {
        width: 100% !important;
        text-align: left !important;
    }

    .machineLabel {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        bottom: 10px;
        left: 10px;
    }
}
