/* ==========================================================================
   Theme Footer
   ========================================================================== */

.site-footer {
    background: linear-gradient(180deg, var(--fd-footer-bg-start) 0%, var(--fd-footer-bg-end) 100%);
    color: var(--fd-footer-text);
    font-family: var(--fd-font-family-sans);
    padding: 52px 0 36px;
    font-size: 0.9rem;
    border-top: 1px solid var(--fd-footer-border);
    clear: both;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
    display: block;
    visibility: visible;
    position: relative;
    isolation: isolate;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 248, 255, 0.36), transparent);
    opacity: 0.62;
    pointer-events: none;
    z-index: 0;
}

.site-footer .fd-container {
    max-width: 100%;
    padding-left: 5%;
    padding-right: 5%;
    position: relative;
    z-index: 1;
}

.site-info .copyright-bar,
.footer-bar-container {
    display: none;
}

.fd-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.82fr) minmax(190px, 0.95fr) minmax(160px, 0.82fr);
    gap: 34px;
    width: 100%;
}

@media (max-width: 1040px) and (min-width: 769px) {
    .fd-footer-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.9fr) minmax(190px, 1fr);
    }

    .fd-footer-col--community {
        grid-column: 2 / 4;
    }
}

.fd-footer-col {
    min-width: 0;
}

.fd-footer-brand {
    padding-right: 20px;
}

.fd-footer-logo {
    font-family: var(--fd-font-family-sans);
    color: var(--fd-footer-link-hover);
    font-size: clamp(1.32rem, 2vw, 1.72rem);
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 12px;
    line-height: 1.45;
    text-shadow: 0 8px 18px rgba(8, 12, 20, 0.24);
}

.fd-footer-desc {
    font-family: var(--fd-font-family-sans);
    color: var(--fd-footer-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

.fd-footer-copyright {
    font-family: var(--fd-font-family-sans);
    font-size: 0.85rem;
    color: var(--fd-footer-muted);
    line-height: 1.6;
}

.fd-footer-title {
    color: var(--fd-nav-text);
    font-family: var(--fd-font-family-sans);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.fd-footer-title::after {
    content: "";
    display: block;
    width: 24px;
    height: 1px;
    background: rgba(245, 248, 255, 0.36);
    margin-top: 8px;
}

.fd-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fd-footer-links li {
    margin-bottom: 10px;
}

.fd-footer-links a,
.fd-footer-links button {
    color: var(--fd-footer-link);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--fd-font-family-sans);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    line-height: 1.35;
    padding: 2px 0;
}

.fd-footer-links button {
    width: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.fd-footer-links a:focus-visible,
.fd-footer-links button:focus-visible {
    outline: 2px solid var(--fd-footer-link-hover);
    outline-offset: 3px;
    border-radius: 8px;
}

.fd-footer-icon {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    opacity: 0.5;
    color: currentColor;
    stroke-width: 1.75;
    transition: all 0.25s ease;
}

.fd-footer-links a:hover,
.fd-footer-links button:hover {
    color: var(--fd-footer-link-hover);
    transform: translateX(3px);
}

.fd-footer-links a:hover .fd-footer-icon,
.fd-footer-links button:hover .fd-footer-icon {
    opacity: 1;
    transform: scale(1.1);
    color: var(--fd-footer-link-hover);
}

.fd-footer-link--primary {
    width: fit-content;
    margin: 2px 0 4px;
    padding: 8px 11px !important;
    border: 1px solid rgba(187, 211, 232, 0.42);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fd-footer-link-hover) !important;
    font-weight: 700;
}

.fd-footer-link--primary:hover,
.fd-footer-link--primary:focus-visible {
    border-color: rgba(245, 248, 255, 0.72);
    background: rgba(255, 255, 255, 0.14);
}

.fd-footer-external-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: .58;
}

.fd-footer-ad-majorem {
    margin: 0;
    font-style: italic;
    font-family: var(--fd-font-family-sans);
    color: rgba(245, 248, 255, 0.42);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fd-footer-preferred-source {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin-top: 34px;
    padding: 24px 28px;
    border: 1px solid rgba(245, 248, 255, 0.17);
    border-radius: 18px;
    background: linear-gradient(112deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    text-align: left;
}

.fd-footer-preferred-source__copy {
    min-width: 0;
}

.fd-footer-preferred-source__eyebrow {
    margin: 0 0 8px;
    color: var(--fd-footer-link-hover);
    font-family: var(--fd-font-family-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.fd-footer-preferred-source__title {
    margin: 0;
    color: var(--fd-footer-link-hover);
    font-family: var(--fd-font-family-sans);
    font-size: clamp(1.02rem, 1.45vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.5;
}

.fd-footer-preferred-source__description {
    max-width: 62ch;
    margin: 6px 0 0;
    color: var(--fd-footer-text);
    font-family: var(--fd-font-family-sans);
    font-size: 0.82rem;
    line-height: 1.7;
}

.fd-footer-preferred-source__link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 19px;
    border: 1px solid #526b57;
    border-radius: 999px;
    background: #4e6351;
    color: #fff !important;
    font-family: var(--fd-font-family-sans);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.fd-footer-preferred-source__link:hover {
    transform: translateY(-1px);
    border-color: #405244;
    background: #405244;
    color: #fff !important;
}

.fd-footer-preferred-source__link:focus-visible {
    outline: 2px solid var(--fd-footer-link-hover);
    outline-offset: 4px;
}

.fd-footer-preferred-source__arrow {
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 180ms ease;
}

.fd-footer-preferred-source__link:hover .fd-footer-preferred-source__arrow {
    transform: translateX(3px);
}

body.fd-home-editorial-active .fd-footer-preferred-source {
    border-color: var(--fdql-line);
    background: linear-gradient(112deg, #fff 0%, var(--fdql-soft) 100%);
}

body.fd-home-editorial-active .fd-footer-preferred-source__eyebrow {
    color: var(--fdql-moss-dark);
    font-family: var(--fdql-sans);
}

body.fd-home-editorial-active .fd-footer-preferred-source__title {
    color: var(--fdql-ink);
    font-family: var(--fdql-sans);
}

body.fd-home-editorial-active .fd-footer-preferred-source__description {
    color: var(--fdql-muted);
    font-family: var(--fdql-sans);
}

body.fd-home-editorial-active .fd-footer-preferred-source__link {
    border-color: var(--fdql-moss-dark);
    background: var(--fdql-moss-dark);
    color: #fff !important;
    font-family: var(--fdql-sans);
}

body.fd-home-editorial-active .fd-footer-preferred-source__link:hover {
    border-color: #344438;
    background: #344438;
}

.fd-footer-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(245, 248, 255, 0.12);
}

.fd-footer-legal__policy {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.fd-footer-legal__policy a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--fd-footer-muted);
    font-size: .8rem;
    line-height: 1.4;
    text-decoration: none;
}

.fd-footer-legal__policy a:hover,
.fd-footer-legal__policy a:focus-visible {
    color: var(--fd-footer-link-hover);
    text-decoration: underline;
    text-underline-offset: .16em;
}

.fd-footer-legal__policy .fd-footer-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    opacity: .68;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 36px 0 34px;
        text-align: center;
    }

    .fd-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .fd-footer-brand {
        padding-right: 0;
    }

    .fd-footer-logo {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
        margin-bottom: 10px;
    }

    .fd-footer-desc {
        margin-bottom: 18px;
    }

    .fd-footer-preferred-source {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
        margin-top: 28px;
        padding: 21px 20px;
    }

    .fd-footer-preferred-source__title {
        font-size: 1.02rem;
    }

    .fd-footer-preferred-source__link {
        width: 100%;
        min-height: 50px;
        justify-content: space-between;
        padding-inline: 17px;
        white-space: normal;
        text-align: left;
    }

    .fd-footer-title::after {
        margin: 8px auto 0;
    }

    .fd-footer-links a {
        justify-content: center;
        min-height: 38px;
    }

    .fd-footer-links button {
        justify-content: center;
        min-height: 38px;
    }

    .fd-footer-link--primary {
        margin-right: auto;
        margin-left: auto;
    }

    .fd-footer-legal {
        flex-direction: column;
        gap: 14px;
        margin-top: 26px;
        text-align: center;
    }

    .fd-footer-legal__policy {
        justify-content: center;
    }
}
