/* Site footer — dark forest green desk */
.footer-section.sf-footer {
    --sf-ink: #f4f7f4;
    --sf-muted: rgba(244, 247, 244, 0.82);
    --sf-gold: #c4a46a;
    --sf-serif: Georgia, Cambria, "Times New Roman", serif;
    --sf-sans: Arial, Helvetica, sans-serif;
    position: relative;
    isolation: isolate;
    margin-top: auto;
    padding: 0;
    color: var(--sf-ink);
    background-color: #053327;
    background-image:
        linear-gradient(180deg, rgba(3, 28, 22, 0.55), rgba(2, 18, 15, 0.72)),
        var(--sf-bg-image, none);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: var(--sf-sans);
}

.footer-section.sf-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 48% 42% at 88% 18%, rgba(47, 120, 78, 0.28), transparent 70%),
        linear-gradient(90deg, rgba(2, 20, 16, 0.25), transparent 28%, transparent 72%, rgba(2, 20, 16, 0.2));
}

.footer-section.sf-footer .sf-inner,
.footer-section.sf-footer .sf-bar {
    position: relative;
    z-index: 1;
}

.footer-section.sf-footer .sf-inner {
    width: min(100% - 2.5rem, 1280px);
    margin: 0 auto;
    padding: 3.5rem 0 2.75rem;
}

.footer-section.sf-footer .sf-grid {
    display: grid;
    grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(130px, 0.78fr)) minmax(300px, 1.25fr);
    gap: 1.75rem 1.5rem;
    align-items: start;
}

.footer-section.sf-footer .sf-brand,
.footer-section.sf-footer .sf-col,
.footer-section.sf-footer .sf-aside {
    min-width: 0;
}

.footer-section.sf-footer .sf-col + .sf-col,
.footer-section.sf-footer .sf-aside {
    border-left: 1px solid rgba(196, 164, 106, 0.22);
    padding-left: 1.35rem;
}

.footer-section.sf-footer .sf-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    background: rgba(255, 248, 239, 0.96);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.footer-section.sf-footer .sf-logo img {
    display: block;
    height: 42px;
    width: auto;
    max-width: min(210px, 100%);
}

.footer-section.sf-footer .sf-brand-copy {
    margin: 1.05rem 0 1.15rem;
    max-width: 34ch;
    color: var(--sf-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.footer-section.sf-footer .sf-pillars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-section.sf-footer .sf-pillars li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-align: center;
    color: rgba(244, 247, 244, 0.92);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
}

.footer-section.sf-footer .sf-pillar-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--sf-gold);
    border-radius: 50%;
    color: #fff8ee;
    background: rgba(8, 40, 30, 0.4);
    font-size: 0.95rem;
}

.footer-section.sf-footer .sf-heading {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
}

.footer-section.sf-footer .sf-heading::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin-top: 0.5rem;
    border-radius: 99px;
    background: var(--sf-gold);
}

.footer-section.sf-footer .sf-heading--serif {
    font-family: var(--sf-serif);
    font-size: 1.4rem;
    font-weight: 500;
}

.footer-section.sf-footer .sf-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section.sf-footer .sf-links li + li {
    margin-top: 0.48rem;
}

.footer-section.sf-footer .sf-links a {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.42rem;
    color: rgba(244, 247, 244, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
    transition: color 0.15s ease, transform 0.15s ease;
}

.footer-section.sf-footer .sf-links a span[aria-hidden] {
    color: var(--sf-gold);
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 700;
    flex: none;
    margin-top: 0.05em;
}

.footer-section.sf-footer .sf-links a:hover,
.footer-section.sf-footer .sf-links a[aria-current="page"] {
    color: #fff;
    transform: translateX(2px);
}

/* Stay Updated + Need Help */
.footer-section.sf-footer .sf-aside-copy {
    margin: 0 0 0.95rem;
    color: var(--sf-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-section.sf-footer .sf-subscribe {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    width: 100%;
    margin: 0 0 1.15rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.footer-section.sf-footer .sf-subscribe-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 48px;
    padding: 0 1rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.footer-section.sf-footer .sf-subscribe-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.1rem;
    color: #6b7a72;
    font-size: 0.95rem;
}

.footer-section.sf-footer .sf-subscribe input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #173028;
    font-size: 0.92rem;
    line-height: 1.3;
    padding: 0.75rem 0;
}

.footer-section.sf-footer .sf-subscribe input::placeholder {
    color: #8a978f;
    opacity: 1;
}

.footer-section.sf-footer .sf-subscribe button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 46px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #3a9a5c, #1f6b3d);
    color: #fff !important;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(20, 70, 40, 0.28);
}

.footer-section.sf-footer .sf-subscribe button:hover {
    background: linear-gradient(135deg, #44a968, #248049);
    color: #fff !important;
}

.footer-section.sf-footer .sf-help {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.2rem;
    border: 1px solid rgba(196, 164, 106, 0.34);
    border-radius: 14px;
    background: rgba(3, 24, 19, 0.72);
    backdrop-filter: blur(4px);
}

.footer-section.sf-footer .sf-help-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.footer-section.sf-footer .sf-help-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(196, 164, 106, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.footer-section.sf-footer .sf-help-head strong {
    margin: 0;
    color: var(--sf-gold);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
}

.footer-section.sf-footer .sf-help-copy {
    margin: 0;
    color: var(--sf-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.footer-section.sf-footer a.sf-help-mail,
.footer-section.sf-footer .sf-help-mail {
    display: inline-flex;
    color: #fff8ee !important;
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 248, 238, 0.4);
    padding-bottom: 1px;
    background: none;
}

.footer-section.sf-footer a.sf-help-mail:hover,
.footer-section.sf-footer .sf-help-mail:hover {
    color: var(--sf-gold) !important;
    border-bottom-color: var(--sf-gold);
}

.footer-section.sf-footer .sf-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    margin-top: 0.1rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.footer-section.sf-footer .sf-help-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff !important;
}

/* Bottom bar */
.footer-section.sf-footer .sf-bar {
    background: #020b09;
    border-top: 1px solid rgba(196, 164, 106, 0.14);
}

/* Phone: the bar is fixed, so the page itself must not leave a cream strip under the footer. */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 0 !important;
    }

    body:has(.mobile-bottom-nav:not(.is-scroll-hidden)) .footer-section.sf-footer .sf-bar {
        padding-bottom: max(88px, calc(74px + env(safe-area-inset-bottom, 0px)));
    }
}

/* Materials / courses tablet icon strip still needs clearance */
@media (min-width: 768px) and (max-width: 991.98px) {
    body:has(.mobile-icon-nav):not(:has(.mobile-bottom-nav)) {
        padding-bottom: max(86px, calc(70px + env(safe-area-inset-bottom, 0px))) !important;
    }

    body:has(.mobile-icon-nav):not(:has(.mobile-bottom-nav)) .footer-section.sf-footer {
        box-shadow: none;
    }
}

.footer-section.sf-footer .sf-bar-inner {
    width: min(100% - 2.5rem, 1280px);
    margin: 0 auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 0;
}

.footer-section.sf-footer .sf-copy {
    margin: 0;
    color: rgba(244, 247, 244, 0.78);
    font-size: 0.84rem;
}

.footer-section.sf-footer .sf-legal {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    color: rgba(244, 247, 244, 0.55);
    font-size: 0.84rem;
}

.footer-section.sf-footer .sf-legal a {
    color: rgba(244, 247, 244, 0.88);
    text-decoration: none;
}

.footer-section.sf-footer .sf-legal a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-section.sf-footer .sf-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section.sf-footer .sf-social-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.footer-section.sf-footer .sf-social-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    color: #fff !important;
}

.footer-section.sf-footer .sf-social-fb { background: #1877f2; }
.footer-section.sf-footer .sf-social-ig {
    background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af 78%, #515bd4);
}
.footer-section.sf-footer .sf-social-in { background: #0a66c2; }
.footer-section.sf-footer .sf-social-yt { background: #ff0000; }

.footer-section.sf-footer .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Flush footer to viewport bottom on tablet — no cream gap below .sf-bar */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer-section.sf-footer {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .footer-section.sf-footer .sf-bar {
        margin-bottom: 0;
    }
}

@media (max-width: 1100px) {
    .footer-section.sf-footer .sf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem 1.5rem;
    }

    .footer-section.sf-footer .sf-brand {
        grid-column: 1 / -1;
    }

    .footer-section.sf-footer .sf-aside {
        grid-column: 1 / -1;
        border-left: 0;
        padding-left: 0;
        padding-top: 0.4rem;
        border-top: 1px solid rgba(196, 164, 106, 0.18);
    }

    .footer-section.sf-footer .sf-col + .sf-col {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 767px) {
    .footer-section.sf-footer {
        display: block;
        padding-bottom: 0.25rem;
    }

    .footer-section.sf-footer .sf-inner {
        width: min(100% - 1.5rem, 680px);
        padding: 2.2rem 0 1.6rem;
    }

    .footer-section.sf-footer .sf-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .footer-section.sf-footer .sf-pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .footer-section.sf-footer .sf-pillars li {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 0.55rem;
        font-size: 0.78rem;
    }

    .footer-section.sf-footer .sf-bar-inner {
        width: min(100% - 1.5rem, 680px);
        justify-content: center;
        text-align: center;
    }

    .footer-section.sf-footer .sf-legal,
    .footer-section.sf-footer .sf-social {
        justify-content: center;
        width: 100%;
    }
}
