.site-footer {
    position: relative;
    margin-top: auto;
    padding: 24px 0 22px;
    border-top: 1px solid rgba(43, 122, 91, 0.10);
    background: var(--footer-bg);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(43, 122, 91, 0.28), rgba(196, 163, 90, 0.2), transparent);
}

.footer-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    justify-content: center;
    align-items: stretch;
}

.footer-shell > * {
    min-width: 0;
}
.footer-shell--centered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
}


.footer-shell--centered .footer-brand-block {
    grid-column: 1 / -1;
    max-width: 100%;
    align-items: center;
    text-align: center;
}

.footer-shell--centered > * {
    justify-self: center;
    width: 100%;
    max-width: 100%;
}

.footer-shell--centered .footer-brand {
    margin-inline: auto;
}

.footer-shell--centered .footer-description {
    margin-inline: auto;
    max-width: 60ch;
}

.footer-shell--centered .footer-contact-row {
    justify-content: center;
}

.footer-shell--centered .footer-card--legal {
    align-items: center;
    text-align: center;
}

.footer-shell--centered .footer-card--meta {
    align-items: center;
    text-align: center;
}

.footer-shell--centered .footer-meta-head {
    justify-content: center;
}

.footer-brand-block,
.footer-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(43, 122, 91, 0.12);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.52)),
        var(--bg-secondary);
    box-shadow: 0 24px 52px rgba(15, 26, 22, 0.10);
    backdrop-filter: blur(12px);
}

.footer-brand-block,
.footer-card,
.footer-partner-chip,
.footer-social-link {
    transition:
        transform .2s var(--ease-standard),
        border-color .18s ease,
        box-shadow .2s var(--ease-standard);
}

.footer-brand-block {
    position: relative;
    overflow: hidden;
    align-items: center;
    text-align: center;
}

.footer-brand-block::before {
    content: "";
    position: absolute;
    inset: auto -70px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(43, 122, 91, 0.06), transparent 68%);
    pointer-events: none;
}

.footer-brand-block > * {
    position: relative;
    z-index: 1;
}

body[data-theme="2"] .footer-brand-block,
body[data-theme="2"] .footer-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        var(--bg-secondary);
}

.footer-brand-block:hover,
.footer-card:hover {
    transform: translateY(-2px);
    border-color: rgba(43, 122, 91, 0.2);
    box-shadow: 0 24px 50px rgba(15, 26, 22, 0.12);
}

.footer-card-head,
.footer-meta-group,
.footer-partner-copy {
    display: grid;
    gap: 10px;
}

.footer-brand {
    width: fit-content;
    margin-inline: auto;
}

.footer-description,
.footer-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.72;
}

.footer-description {
    max-width: 54ch;
    margin-inline: auto;
    text-align: center;
}

.footer-description--small {
    max-width: 46ch;
}

.footer-brand-social {
    margin-top: auto;
    width: 100%;
    justify-items: center;
    text-align: center;
}

.footer-contact-row,
.footer-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-contact-row {
    width: 100%;
    justify-content: center;
}

.footer-contact-link {
    color: var(--color-primary);
    font-weight: 800;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
    color: var(--text-primary);
    transform: translateX(3px);
}

.footer-card h3,
.footer-card-head h3 {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    font-size: 1.16rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.footer-meta-title {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-meta-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.footer-meta-caption {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.footer-card--legal {
    justify-content: flex-start;
    gap: 12px;
    align-items: center;
    text-align: center;
}

.footer-card--legal .footer-card-head {
    width: 100%;
    justify-items: center;
    text-align: center;
    gap: 8px;
}

.footer-legal-action {
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    padding-inline: 18px;
    white-space: normal;
    justify-content: center;
    margin-inline: auto;
    margin-top: auto;
}

.footer-card--subscribe {
    align-items: center;
    text-align: center;
}

.footer-card--subscribe .footer-card-head {
    justify-items: center;
    text-align: center;
}

.footer-subscribe-form {
    display: grid;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.footer-subscribe-input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(43, 122, 91, 0.14);
    border-radius: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.footer-subscribe-input:focus {
    border-color: rgba(43, 122, 91, 0.34);
    box-shadow: 0 0 0 4px rgba(43, 122, 91, 0.1);
}

.footer-subscribe-button {
    width: 100%;
    min-height: 48px;
}

.footer-subscribe-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.footer-card--meta {
    gap: 18px;
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    border-color: rgba(43, 122, 91, 0.08);
}

.footer-card--meta,
.footer-card--legal,
.footer-brand-block {
    min-height: 100%;
}

.footer-card--meta::before {
    content: "";
    position: absolute;
    inset: auto auto -90px -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(196, 163, 90, 0.08), transparent 70%);
    pointer-events: none;
}

.footer-card--meta > * {
    position: relative;
    z-index: 1;
}

.footer-partner-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.footer-partner-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 68px;
    padding: 12px 13px;
    border: 1px solid rgba(43, 122, 91, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.54)),
        var(--bg-secondary);
    box-shadow: 0 12px 24px rgba(15, 26, 22, 0.07);
}

.footer-partner-chip,
.footer-social-link {
    width: 100%;
}

body[data-theme="2"] .footer-partner-chip {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        var(--bg-secondary);
}

.footer-partner-chip:hover,
.footer-partner-chip:focus-within {
    transform: translateY(-2px);
    border-color: rgba(43, 122, 91, 0.22);
}

.footer-partner-chip--link {
    cursor: pointer;
}

.footer-partner-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(43, 122, 91, 0.14), rgba(43, 122, 91, 0.08));
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
}

.footer-partner-copy {
    min-width: 0;
    gap: 4px;
}

.footer-partner-copy strong {
    font-size: 0.94rem;
    font-weight: 800;
}

.footer-partner-copy span,
.footer-partner-copy a {
    color: var(--text-secondary);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
    white-space: normal;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(43, 122, 91, 0.10);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.64)),
        var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 12px 24px rgba(15, 26, 22, 0.08);
}

.footer-social-list--brand {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: auto;
    max-width: 100%;
    padding: 10px 12px;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(114, 122, 132, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 10px 24px rgba(15, 26, 22, 0.04);
    backdrop-filter: blur(10px);
}

.footer-social-list--brand .footer-social-link {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    flex: 0 0 auto;
    border-radius: 14px;
    border-color: rgba(114, 122, 132, 0.22);
    background: rgba(255, 255, 255, 0.98);
    color: rgba(58, 66, 76, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 8px 18px rgba(15, 26, 22, 0.05);
}

body[data-theme="2"] .footer-social-link {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        var(--bg-secondary);
}

body[data-theme="2"] .footer-social-list--brand {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.006)),
        rgba(7, 12, 16, 0.42);
    border-color: rgba(76, 94, 106, 0.26);
    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.2);
}

body[data-theme="2"] .footer-social-list--brand .footer-social-link {
    background:
        linear-gradient(180deg, rgba(26, 33, 41, 0.96), rgba(18, 24, 31, 0.96)),
        rgba(18, 24, 31, 0.96);
    border-color: rgba(64, 76, 88, 0.14);
    color: rgba(232, 238, 244, 0.9);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
    color: var(--color-primary);
    border-color: rgba(43, 122, 91, 0.22);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 18px 34px rgba(15, 26, 22, 0.12);
}

.footer-social-list--brand .footer-social-link:hover,
.footer-social-list--brand .footer-social-link:focus-visible {
    border-color: rgba(98, 107, 118, 0.34);
    background: rgba(255, 255, 255, 1);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 12px 24px rgba(15, 26, 22, 0.07);
}

body[data-theme="2"] .footer-social-list--brand .footer-social-link:hover,
body[data-theme="2"] .footer-social-list--brand .footer-social-link:focus-visible {
    border-color: rgba(104, 120, 133, 0.24);
    background:
        linear-gradient(180deg, rgba(30, 38, 47, 0.98), rgba(22, 29, 37, 0.98)),
        rgba(22, 29, 37, 0.98);
    color: rgba(245, 248, 251, 0.96);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(43, 122, 91, 0.12);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.footer-bottom::before {
    content: none;
}

.footer-bottom span {
    position: relative;
    padding-inline: 0;
}

.footer-bottom span::before,
.footer-bottom span::after {
    content: none;
}

@media (max-width: 1100px) {
    .footer-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand-block {
        grid-column: 1 / -1;
    }

    .footer-shell--centered {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-card--legal {
        align-items: center;
        text-align: center;
    }

    .footer-legal-action {
        max-width: 320px;
    }

    .footer-shell--centered > * {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .site-footer {
        margin-top: 28px;
        padding-top: 20px;
    }

    .footer-shell,
    .footer-shell--centered {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-brand-block,
    .footer-card {
        gap: 12px;
        padding: 16px;
        border-radius: 20px;
    }

    .footer-brand-block {
        align-items: center;
        text-align: center;
    }

    .footer-brand {
        margin-inline: auto;
    }

    .footer-shell--centered .footer-brand-block,
    .footer-shell--centered .footer-card {
        text-align: center;
        align-items: center;
    }

    .footer-shell--centered .footer-brand,
    .footer-shell--centered .footer-contact-row {
        margin-inline: auto;
        justify-content: center;
    }

    .footer-legal-action {
        width: 100%;
        min-width: 0;
        white-space: normal;
        max-width: none;
    }

    .footer-partner-list {
        grid-template-columns: 1fr;
    }

    .footer-brand-social {
        justify-items: center;
    }

    .footer-bottom span::before,
    .footer-bottom span::after {
        display: none;
    }
}

/* Final footer normalization */
.site-body .site-footer {
    margin-top: 24px;
    padding-top: 18px;
}

.site-body .footer-shell {
    gap: 14px;
}

.site-body .footer-brand-block,
.site-body .footer-card {
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
}

.site-body .footer-bottom {
    margin-top: 14px;
    padding-top: 12px;
}

.site-body .footer-shell--centered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
}

.site-body .footer-shell--centered .footer-brand-block {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
}

.site-body .footer-shell--centered .footer-brand {
    margin-inline: auto;
}

.site-body .footer-shell--centered .footer-description,
.site-body .footer-shell--centered .footer-contact-row {
    justify-content: center;
    margin-inline: auto;
}

.site-body .footer-shell--centered .footer-card--legal,
.site-body .footer-shell--centered .footer-card--meta {
    align-items: center;
    text-align: center;
}

@media (max-width: 720px) {
    .site-body .site-footer {
        margin-top: 20px;
        padding-top: 16px;
    }

    .site-body .footer-shell {
        gap: 10px;
    }

    .site-body .footer-brand-block,
    .site-body .footer-card {
        padding: 15px;
        border-radius: 18px;
    }
}

/* Footer card grid normalization */
.site-footer .footer-shell {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 360px));
    justify-content: center;
    align-items: stretch;
    gap: 14px;
}

.site-footer .footer-shell > * {
    width: 100%;
    min-width: 0;
    max-width: 360px;
    justify-self: center;
}

.site-footer .footer-brand-block,
.site-footer .footer-card {
    height: 100%;
}

@media (max-width: 720px) {
    .site-footer .footer-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .site-footer .footer-shell > * {
        max-width: none;
    }
}
