/* Site footer */

.site-footer {
    padding-block: var(--space-16) max(var(--space-6), env(safe-area-inset-bottom));
    background: var(--color-dark-background);
    color: var(--color-text);
    border-block-start: 1px solid var(--color-border);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
    gap: var(--space-12);
}

.site-footer__brand > a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-footer__brand img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.site-footer__brand p {
    margin-block-start: var(--space-4);
    color: var(--color-text-secondary);
}

.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-6);
}

.site-footer__columns div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

.site-footer__columns h2 {
    margin-block-end: var(--space-2);
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: var(--font-weight-extrabold);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-ui);
}

.site-footer__columns a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    text-decoration: none;
}

.site-footer__columns a:hover {
    color: var(--color-mint);
}

/*
 * Featured badge carousel styles intentionally use unique dml-featured-badges
 * class names. This prevents the site's older footer-badge-carousel rules from
 * interfering. A compact critical copy also lives in footer.php so cache/stale
 * CSS cannot collapse the carousel again.
 */
.dml-featured-badges {
    box-sizing: border-box;
    width: min(1248px, calc(100% - 32px));
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.dml-featured-badges__viewport {
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-inline: contain;
}

.dml-featured-badges__viewport::-webkit-scrollbar {
    display: none;
}

.dml-featured-badges__track {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: max-content;
    min-width: 100%;
    padding: 4px 2px;
}

.dml-featured-badges.is-scrollable .dml-featured-badges__track {
    justify-content: flex-start;
}

.dml-featured-badges__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    opacity: 0.88;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dml-featured-badges__item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.dml-featured-badges__item img {
    display: block;
    height: 54px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.dml-featured-badges__arrow {
    box-sizing: border-box;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--color-text, #eef4f6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.dml-featured-badges__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dml-featured-badges__arrow:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.075);
    border-color: var(--color-mint, #45f2c4);
    color: var(--color-mint, #45f2c4);
}

.dml-featured-badges__arrow:disabled {
    opacity: 0.28;
    cursor: default;
}

.dml-featured-badges__arrow:focus-visible {
    outline: 2px solid var(--color-mint, #45f2c4);
    outline-offset: 2px;
}

.site-footer__bottom {
    margin-block-start: var(--space-12);
    padding-block-start: var(--space-6);
    gap: var(--space-4);
    border-block-start: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.site-footer__bottom .footer-copy {
    justify-self: start;
}

.site-footer__bottom .footer-note {
    justify-self: end;
    text-align: right;
}

@media (max-width: 72rem) {
    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 56rem) {
    .site-footer__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: var(--space-8);
    }
}

@media (max-width: 48rem) {
    .dml-featured-badges {
        width: min(100% - 24px, 1248px);
        gap: 10px;
        margin-top: 22px;
    }

    .dml-featured-badges__arrow {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .dml-featured-badges__track {
        gap: 14px;
    }

    .dml-featured-badges__item img {
        height: 46px;
        max-width: 190px;
    }
}

@media (max-width: 42rem) {
    .site-footer__columns {
        grid-template-columns: 1fr;
    }

    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
    }

    .site-footer__bottom .footer-copy,
    .site-footer__bottom .footer-note {
        justify-self: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dml-featured-badges__viewport {
        scroll-behavior: auto;
    }

    .dml-featured-badges__item,
    .dml-featured-badges__arrow {
        transition: none;
    }
}
