/* ===========================================================
   INJIGAN ORGANICS — SIGNATURE FOOTER RESPONSIVE
   File: assets/css/footer-responsive-final.css
   Requires footer.php classes beginning with .injf
   Load AFTER assets/css/footer-reference.css
   Desktop (1101px+) remains unchanged.
=========================================================== */

/* Prevent footer grid children from forcing horizontal scroll. */
.injf .injf__grid > *,
.injf .injf__feature-grid > * {
    min-width: 0;
}

.injf .injf__detail span,
.injf .injf__description,
.injf .injf__contact-description {
    overflow-wrap: anywhere;
}

/* -----------------------------------------------------------
   01 — SMALL DESKTOP / LANDSCAPE TABLET (up to 1100px)
   Reorder columns without changing the PHP markup.
----------------------------------------------------------- */
@media (max-width: 1100px) {
    .injf .injf__wrap {
        width: min(calc(100% - 64px), 1120px);
    }

    .injf .injf__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "brand contact"
            "discover help";
        column-gap: clamp(28px, 5vw, 70px);
        row-gap: 42px;
        align-items: start;
        padding-block: 65px 70px;
    }

    .injf .injf__grid > .injf__brand {
        grid-area: brand;
        grid-column: auto;
        grid-row: auto;
    }

    .injf .injf__grid > nav[aria-label="Discover Injigan"] {
        grid-area: discover;
        grid-column: auto;
        grid-row: auto;
    }

    .injf .injf__grid > nav[aria-label="Customer help"] {
        grid-area: help;
        grid-column: auto;
        grid-row: auto;
    }

    .injf .injf__grid > .injf__contact {
        grid-area: contact;
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        max-width: none;
    }
}

/* -----------------------------------------------------------
   02 — TABLET / LARGE MOBILE (up to 820px)
   Center brand, two navigation columns, full-width contact.
----------------------------------------------------------- */
@media (max-width: 820px) {
    .injf .injf__wrap {
        width: min(calc(100% - 44px), 650px);
    }

    /* Collection teaser: editorial centered composition. */
    .injf .injf__feature-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 23px;
        padding-block: 48px 53px;
        text-align: center;
    }

    .injf .injf__feature-copy {
        width: 100%;
        text-align: center;
    }

    .injf .injf__eyebrow {
        margin: 0 auto 15px;
        line-height: 1.7;
        text-align: center;
    }

    .injf .injf__feature h2 {
        max-width: 650px;
        margin-inline: auto;
        font-size: clamp(35px, 6vw, 50px);
        line-height: 1.12;
        letter-spacing: -1.2px;
        text-wrap: balance;
    }

    .injf .injf__feature h2 em {
        margin-top: 5px;
    }

    .injf .injf__feature-action {
        width: 100%;
        max-width: 550px;
        justify-self: center;
        text-align: center;
    }

    .injf .injf__feature-action p {
        margin: 0 auto 20px;
        max-width: 480px;
        line-height: 1.9;
    }

    .injf .injf__shop-btn {
        display: inline-flex;
        justify-content: center;
        min-height: 50px;
        margin-inline: auto;
        padding-inline: 22px;
    }

    /* Footer content: balanced central reading axis. */
    .injf .injf__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "brand brand"
            "discover help"
            "contact contact";
        justify-items: center;
        column-gap: 24px;
        row-gap: 39px;
        padding-block: 56px 65px;
    }

    .injf .injf__brand {
        width: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .injf .injf__logo {
        margin-inline: auto;
    }

    .injf .injf__description {
        max-width: 470px;
        margin: 22px auto 0;
        text-align: center;
    }

    .injf .injf__social-label {
        margin: 24px 0 13px;
        text-align: center;
    }

    .injf .injf__socials {
        justify-content: center;
        align-items: center;
        margin-inline: auto;
    }

    .injf .injf__nav {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .injf .injf__nav h2 {
        margin: 0 0 17px;
        text-align: center;
        line-height: 1.6;
    }

    .injf .injf__nav h2::after {
        content: "";
        display: block;
        width: 26px;
        height: 2px;
        margin: 10px auto 0;
        border-radius: 2px;
        background: #d8a847;
        opacity: .75;
    }

    .injf .injf__nav ul {
        justify-items: center;
        gap: 2px;
        padding: 0;
        text-align: center;
    }

    .injf .injf__nav li {
        width: 100%;
        text-align: center;
    }

    .injf .injf__nav a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 6px 4px;
        line-height: 1.5;
        text-align: center;
    }

    .injf .injf__grid > .injf__contact {
        width: min(100%, 560px);
        max-width: 560px;
        justify-self: center;
        padding: 30px 27px;
        text-align: center;
    }

    .injf .injf__contact-topline {
        left: 50%;
        transform: translateX(-50%);
    }

    .injf .injf__contact-kicker,
    .injf .injf__contact h2,
    .injf .injf__contact-description {
        text-align: center;
    }

    .injf .injf__contact-description {
        max-width: 420px;
        margin-inline: auto;
    }

    .injf .injf__contact-details {
        justify-items: center;
        gap: 13px;
    }

    .injf .injf__detail {
        width: fit-content;
        max-width: 100%;
        justify-content: center;
        align-items: flex-start;
        gap: 10px;
        text-align: center;
    }

    .injf .injf__detail span {
        min-width: 0;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .injf .injf__detail svg {
        margin-top: 3px;
    }

    .injf .injf__contact-button {
        width: min(100%, 315px);
        min-height: 49px;
        justify-content: center;
        gap: 14px;
        margin: 23px auto 0;
    }

    .injf .injf__bottom-inner {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
        padding-block: 24px;
        text-align: center;
    }

    .injf .injf__bottom-links {
        justify-content: center;
        gap: 12px 24px;
        text-align: center;
    }
}

/* -----------------------------------------------------------
   03 — PHONES (up to 560px)
   Carefully balanced 2-column links and stacked sections.
----------------------------------------------------------- */
@media (max-width: 560px) {
    .injf .injf__wrap {
        width: calc(100% - 36px);
        max-width: 480px;
    }

    .injf .injf__feature-grid {
        gap: 19px;
        padding-block: 39px 44px;
    }

    .injf .injf__eyebrow {
        font-size: 9px;
        letter-spacing: 1.45px;
    }

    .injf .injf__eyebrow span {
        padding-inline: 5px;
    }

    .injf .injf__feature h2 {
        font-size: clamp(31px, 8.6vw, 43px);
        line-height: 1.13;
        letter-spacing: -.9px;
    }

    .injf .injf__feature-action p {
        max-width: 350px;
        font-size: 12px;
        line-height: 1.8;
    }

    .injf .injf__shop-btn {
        display: flex;
        width: min(100%, 330px);
        min-height: 51px;
        justify-content: center;
        font-size: 13px;
    }

    .injf .injf__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "brand brand"
            "discover help"
            "contact contact";
        column-gap: 15px;
        row-gap: 37px;
        padding-block: 48px 56px;
    }

    .injf .injf__logo {
        min-height: 0;
        padding: 9px 13px;
    }

    .injf .injf__logo-image {
        max-width: min(200px, 58vw);
        height: auto;
        max-height: 61px;
    }

    .injf .injf__description {
        margin-top: 22px;
        max-width: 320px;
        font-size: 13px;
        line-height: 1.85;
    }

    .injf .injf__social {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 11px;
    }

    .injf .injf__socials {
        gap: 9px;
    }

    .injf .injf__nav h2 {
        font-size: 10px;
        letter-spacing: 1.1px;
    }

    .injf .injf__nav a {
        min-height: 40px;
        font-size: 13px;
        padding-inline: 2px;
    }

    .injf .injf__grid > .injf__contact {
        width: 100%;
        padding: 28px 18px 30px;
        border-radius: 15px;
    }

    .injf .injf__contact h2 {
        font-size: clamp(27px, 7vw, 34px);
    }

    .injf .injf__detail {
        font-size: 12px;
        line-height: 1.65;
    }

    .injf .injf__bottom-inner {
        font-size: 11px;
        line-height: 1.7;
    }
}

/* -----------------------------------------------------------
   04 — VERY SMALL PHONES (up to 360px)
   Stack menu groups only when 2 columns become too narrow.
----------------------------------------------------------- */
@media (max-width: 360px) {
    .injf .injf__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "brand"
            "discover"
            "help"
            "contact";
        row-gap: 28px;
    }

    .injf .injf__nav h2 {
        margin-bottom: 8px;
    }

    .injf .injf__feature h2 {
        font-size: 31px;
    }

    .injf .injf__contact {
        padding-inline: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .injf a,
    .injf svg {
        transition: none !important;
    }
}
