/* =========================================================
   STONE GALLERIA
   Footer layout adjustments

   Desktop:
   - Compact footer bottom
   - Align legal information
   - Shared legal/social closing row

   Mobile:
   - Compact vertical spacing
   - Separate logo from CTA buttons
   - Hide redundant company-description paragraph
   - Wrap legal links safely
   ========================================================= */


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    /* Overall footer depth */
    .footer {
        padding-top: 28px !important;
        padding-bottom: 18px !important;
    }


    /* -----------------------------------------------------
       Logo + CTA section
       ----------------------------------------------------- */

    .footer .top-footer {
        padding-top: 0;
        padding-bottom: 10px;
        row-gap: 20px;
    }

    /* Keep logo box clean and give CTA section breathing room */
    .footer__top-block.brxe-div {
        flex-direction: column;
        row-gap: 0;
        margin: 0;
    }

    .footer__top-block > a {
        display: inline-block;
        width: fit-content;
        line-height: 0;
    }

    .footer .top-footer img {
        display: block;
        width: auto;
        max-width: 85px;
        height: auto;
        margin: 0;
    }

    /* CTA buttons */
    .footer__buttons.brxe-div {
        display: flex;
        flex-direction: column;
        width: 100%;
        column-gap: 0;
        row-gap: 10px;
        margin: 0;
    }

    .top-footer .footer__buttons a {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .top-footer .button_blue_contact,
    .top-footer .button_transparent {
        height: 50px;
        padding-top: 11px;
        padding-bottom: 11px;
    }


    /* -----------------------------------------------------
       Main navigation
       ----------------------------------------------------- */

    .middle-footer.mt-4 {
        margin-top: 8px !important;
    }

    .middle-footer {
        row-gap: 12px;
    }

    .middle-footer h4 {
        margin-bottom: 7px;
    }

    .middle-footer ul {
        margin-bottom: 6px;
    }

    .middle-footer ul li {
        padding-bottom: 5px;
    }

    /* Google reviews card */
    .footer__reviews {
        margin-top: 8px !important;
    }


    /* -----------------------------------------------------
       Lower footer
       ----------------------------------------------------- */

    .footer__table-links.brxe-div {
        row-gap: 12px;
    }

    .footer__address-link.brxe-text-link {
        margin-top: 6px;
        line-height: 22px;
    }

    .footer__hours.brxe-text-basic {
        margin-top: 10px;
    }

    .button_footer.brxe-text-link {
        min-height: 48px;
    }

    /* About / Blog / Contact */
    .footer__links.brxe-div {
        margin-top: 14px;
        margin-bottom: 12px;
        column-gap: 22px;
    }


    /*
     * Redundant descriptive copy.
     * Keep on desktop, hide only on mobile.
     */
    .footer__info-text.brxe-text-basic {
        display: none !important;
    }


    /* Newsletter */
    .footer .signup-header {
        font-size: 16px;
        line-height: 22px;
    }

    .footer .signup-container.mt-2 {
        margin-top: 6px !important;
    }

    .footer .signup-container.mb-4 {
        margin-bottom: 12px !important;
    }

    .footer .signup-container input,
    .footer .signup-container button {
        min-height: 50px;
    }


    /* LLP / GST information */
    .footer-legal-info {
        min-height: 0;
        margin-top: 8px;
        margin-bottom: 6px;
        line-height: 20px;
    }


    /* -----------------------------------------------------
       Closing legal + social row
       ----------------------------------------------------- */

    .footer__closing-row {
        margin-top: 8px;
    }

    .footer__closing-legal,
    .footer__closing-social {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    /* Prevent copyright/legal row escaping screen */
    .footer__closing-row .footer__bottom-links.brxe-div {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap !important;
        white-space: normal !important;
        column-gap: 6px;
        row-gap: 4px;
        overflow-wrap: anywhere;
        margin: 0;
    }

    .footer__closing-row .footer__bottom-text,
    .footer__closing-row .footer__bottom-link.brxe-text-link {
        min-width: 0;
        height: auto !important;
        white-space: normal !important;
    }

    /* Social icons */
    .footer__closing-row .footer__media.brxe-div {
        justify-content: flex-start;
        margin-top: 8px;
        margin-bottom: 0;
        padding-left: 0;
    }
}


/* =========================================================
   TABLET + DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    /* Reduce unnecessary footer depth */
    .footer {
        padding-bottom: 20px !important;
    }

    .footer__table-item.brxe-div,
    .footer__table-links.brxe-div {
        height: 100%;
        justify-content: flex-start;
    }

    .footer__links.brxe-div,
    .footer__info-text.brxe-text-basic {
        margin-bottom: 24px;
    }

    .footer__table-links.brxe-div {
        row-gap: 20px;
    }

    /* Company registration information */
    .footer-legal-info {
        display: flex;
        align-items: center;
        min-height: 64px;
        margin-top: 15px;
        margin-bottom: 8px;
    }


    /* Shared final row */
    .footer__closing-row {
        width: 100%;
        margin-top: 18px;
        align-items: center;
    }

    .footer__closing-legal,
    .footer__closing-social {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .footer__closing-legal {
        justify-content: flex-start;
    }

    .footer__closing-social {
        justify-content: flex-end;
    }

    .footer__closing-row .footer__bottom-links.brxe-div {
        margin: 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer__closing-row .footer__media.brxe-div {
        margin: 0;
        padding: 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .footer__closing-row .footer__media-item {
        height: 44px;
        display: flex;
        align-items: center;
    }

    .footer__closing-row .footer__media-link.brxe-text-link {
        height: 44px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

    /* Keep closing legal navigation on one line */
    .footer__closing-row .footer__bottom-links.brxe-div {
        flex-wrap: nowrap;
        white-space: nowrap;
        column-gap: 8px;
    }

    .footer__closing-row #brxe-hhkghy,
    .footer__closing-row .footer__bottom-text,
    .footer__closing-row .footer__bottom-link.brxe-text-link {
        font-size: 13px;
        line-height: 20px;
        letter-spacing: -0.15px;
        white-space: nowrap;
    }
}


/* =========================================================
   FOOTER BRAND TAGLINE
   ========================================================= */

.footer__tagline {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: 0.25px;
    max-width: 220px;
}

/* Desktop: logo + tagline side-by-side */
@media (min-width: 768px) {

    .footer__top-block.brxe-div {
        flex-direction: row;
        align-items: center;
        column-gap: 22px;
        row-gap: 0;
    }

    .footer__tagline {
        position: relative;
        padding-left: 18px;
    }

    .footer__tagline::before {
        content: "";
        position: absolute;
        left: 0;
        top: 2px;
        bottom: 2px;
        width: 2px;
        background: #8b6f4e;
    }
}

/* Mobile: logo + tagline as one brand lockup */
@media (max-width: 767.98px) {

    .footer__top-block.brxe-div {
        flex-direction: row;
        align-items: center;
        column-gap: 14px;
        row-gap: 0;
        width: 100%;
    }

    .footer__top-block > a {
        flex: 0 0 auto;
    }

    .footer .top-footer img {
        width: auto;
        max-width: 78px;
        height: auto;
        margin: 0;
    }

    .footer__tagline {
        position: relative;
        margin: 0;
        padding-left: 14px;
        max-width: 210px;
        color: #ffffff;
        font-size: 15px;
        line-height: 20px;
        font-weight: 600;
        letter-spacing: 0.2px;
    }

    .footer__tagline::before {
        content: "";
        position: absolute;
        left: 0;
        top: 2px;
        bottom: 2px;
        width: 2px;
        background: #8b6f4e;
    }
}
