/* ==========================================================
   SITE FOOTER v2 — one layout source for every width.
   Loads after every other stylesheet (functions.php, priority
   1002) so the older footer rules in layout/responsive/mobile/
   tablet/desktop.css cannot pull the columns apart.

   Phone   (<768):    tagline band · brand · Platform | Community
                      · ShivBodh Trust + newsletter · bottom row
   Tablet  (768-1199): tagline band · brand row · 3 link columns
   Desktop (>=1200):  tagline band · brand + 3 link columns
   ========================================================== */

/* ---------- Brand tagline (also usable outside the footer) ---------- */
.sp-tagline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    text-align: center;
}

.sp-tagline__sa {
    font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", "Mangal", serif;
    font-size: clamp(1.3rem, 1rem + 1.4vw, 1.95rem);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: #ffd59a;
    overflow-wrap: normal;
    word-break: keep-all;
}

.sp-tagline__roman {
    font-family: var(--font-display, Georgia, serif);
    font-style: italic;
    font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.08rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.sp-tagline__meaning {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.58);
    max-width: 62ch;
}

/* ---------- Footer shell ---------- */
body .site-footer.site-footer--v2 {
    margin-top: var(--space-16, 4rem);
}

body .site-footer--v2 .site-footer__inner {
    max-width: var(--container-2xl, 1400px);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 1.5rem;
}

/* Tagline band */
body .site-footer--v2 .site-footer__motto {
    position: relative;
    padding: 0 0 2.25rem;
    margin: 0 0 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body .site-footer--v2 .site-footer__motto::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: min(220px, 50%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--saffron-500, #ff9933), transparent);
}

/* ---------- Grid ---------- */
body .site-footer--v2 .site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem 3rem;
    align-items: start;
    padding: 0 0 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body .site-footer--v2 .site-footer__grid>* {
    min-width: 0;
}

/* Brand */
body .site-footer--v2 .site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 380px;
}

body .site-footer--v2 .site-footer__brand-row {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    align-self: flex-start;
    text-decoration: none;
}

body .site-footer--v2 .site-footer__logo {
    width: 40px;
    height: 40px;
}

body .site-footer--v2 .site-footer__title {
    font-size: 1.5rem;
    line-height: 1.2;
}

body .site-footer--v2 .site-footer__tagline {
    max-width: none;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
}

body .site-footer--v2 .site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.25rem 0 0;
}

body .site-footer--v2 .site-footer__social-link {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

body .site-footer--v2 .site-footer__social-link--x:hover {
    background: #000;
    border-color: rgba(255, 255, 255, 0.4);
}

body .site-footer--v2 .site-footer__social-link--wa:hover {
    background: #25d366;
    border-color: #25d366;
}

/* Columns */
body .site-footer--v2 .site-footer__col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 20px;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    line-height: 20px;
    white-space: nowrap;
}

/* Kit icons arrive as <svg> or <img>; give both the same box so titles line up */
body .site-footer--v2 .site-footer__col-title>.sp-icon,
body .site-footer--v2 .site-footer__col-title>svg,
body .site-footer--v2 .site-footer__col-title>img {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
}

body .site-footer--v2 .site-footer__col-title .sp-icon__img,
body .site-footer--v2 .site-footer__col-title .sp-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

body .site-footer--v2 .site-footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

body .site-footer--v2 .site-footer__list li {
    margin: 0;
}

body .site-footer--v2 .site-footer__list a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.35;
    transition: color var(--transition-fast, 0.15s ease), transform var(--transition-fast, 0.15s ease);
}

body .site-footer--v2 .site-footer__list a:hover,
body .site-footer--v2 .site-footer__list a:focus-visible {
    padding-left: 0;
    transform: translateX(3px);
}

/* Newsletter */
body .site-footer--v2 .site-footer__newsletter {
    margin-top: 1.5rem;
    container-type: inline-size;
}

body .site-footer--v2 .site-footer__newsletter-title {
    margin: 0 0 0.6rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

body .site-footer--v2 .site-footer__newsletter-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    margin: 0;
}

body .site-footer--v2 .site-footer__newsletter-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    margin: 0;
}

body .site-footer--v2 .site-footer__newsletter-btn {
    flex: 0 0 auto;
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 1.1rem;
}

@container (max-width: 259px) {
    body .site-footer--v2 .site-footer__newsletter-form {
        flex-direction: column;
    }

    body .site-footer--v2 .site-footer__newsletter-btn {
        width: 100%;
    }
}

body .site-footer--v2 .site-footer__newsletter-status {
    margin: 0.6rem 0 0;
    font-size: 0.875rem;
    color: #9be7b0;
}

/* Bottom row — right padding keeps text clear of the scroll-top button */
body .site-footer--v2 .site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 1.25rem 88px 0 0;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* Wide screens: the fixed scroll-top button sits outside the 1400px column */
@media (min-width: 1560px) {
    body .site-footer--v2 .site-footer__bottom {
        padding-right: 0;
    }
}

body .site-footer--v2 .site-footer__bottom p {
    margin: 0;
}

body .site-footer--v2 .site-footer__credit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 0.4rem;
}

/* Touch screens: 40px link rows instead of gap + min-height stacking */
@media (pointer: coarse) {
    body .site-footer--v2 .site-footer__list {
        gap: 0;
    }

    body .site-footer--v2 .site-footer__list a {
        min-height: 40px;
    }
}

/* ---------- Tablet & small laptop ---------- */
@media (max-width: 1199px) {
    body .site-footer--v2 .site-footer__inner {
        padding: 3rem 1.5rem 1.5rem;
    }

    body .site-footer--v2 .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.25rem 2rem;
    }

    body .site-footer--v2 .site-footer__brand {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo social"
            "text social";
        align-items: center;
        gap: 0.75rem 2rem;
        max-width: none;
        padding-bottom: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    body .site-footer--v2 .site-footer__brand-row {
        grid-area: logo;
    }

    body .site-footer--v2 .site-footer__tagline {
        grid-area: text;
        max-width: 64ch;
    }

    body .site-footer--v2 .site-footer__social {
        grid-area: social;
        justify-content: flex-end;
        margin: 0;
    }

    body .site-footer--v2 .site-footer__bottom {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 1.25rem 0 0;
        text-align: center;
    }

    body .site-footer--v2 .site-footer__credit {
        justify-content: center;
    }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
    body .site-footer.site-footer--v2 {
        margin-top: var(--space-12, 3rem);
    }

    body .site-footer--v2 .site-footer__inner {
        padding: 2.5rem 1rem 1.25rem;
    }

    body .site-footer--v2 .site-footer__motto {
        padding-bottom: 1.75rem;
        margin-bottom: 2rem;
    }

    body .site-footer--v2 .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1rem;
        padding-bottom: 2rem;
    }

    body .site-footer--v2 .site-footer__brand {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "logo"
            "text"
            "social";
        gap: 0.85rem;
        padding-bottom: 1.75rem;
    }

    body .site-footer--v2 .site-footer__social {
        justify-content: flex-start;
    }

    body .site-footer--v2 .site-footer__col--trust {
        grid-column: 1 / -1;
    }

    /* Trust links sit in one wrapping row on phones */
    body .site-footer--v2 .site-footer__col--trust .site-footer__list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 1.25rem;
    }

    body .site-footer--v2 .site-footer__bottom {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 1.25rem 0 72px;
        text-align: center;
    }

    body .site-footer--v2 .site-footer__credit {
        justify-content: center;
    }

    body .site-footer--v2 .site-footer__credit-sep {
        display: none;
    }

    body .site-footer--v2 .site-footer__credit>span {
        flex: 0 0 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    body .site-footer--v2 .site-footer__list a,
    body .site-footer--v2 .site-footer__social-link {
        transition: none;
    }

    body .site-footer--v2 .site-footer__list a:hover {
        transform: none;
    }
}