/* Shared public footer: a compact, purposeful layout from tablet to phone. */
.public-footer {
    background: #ffffff;
    border-top: 1px solid #dbe6f3;
}

.public-footer-grid {
    gap: clamp(1.5rem, 3vw, 2.5rem);
    grid-template-columns: minmax(15rem, 1.45fr) repeat(3, minmax(9rem, .7fr));
}

.public-footer-brand p {
    margin: .9rem 0;
    max-width: 26rem;
}

.public-footer-column,
.public-footer-contact {
    gap: .48rem;
}

.public-footer-column strong,
.public-footer-contact strong {
    letter-spacing: 0;
}

.public-footer-bottom {
    margin-top: 1.75rem;
}

/* At tablet widths, keep every footer group visible and balanced instead of
   leaving Contact alone beneath two columns. */
@media (min-width: 576px) and (max-width: 1359.98px) {
    .public-footer-grid {
        column-gap: clamp(1.25rem, 3vw, 2rem);
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 1.85rem;
    }

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

    .public-footer-brand p {
        max-width: 34rem;
    }

    .public-footer-contact {
        grid-column: auto;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .public-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-footer-contact {
        border-top: 1px solid #dbe6f3;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem 1rem;
        grid-column: 1 / -1;
        padding-top: 1rem;
    }

    .public-footer-contact strong {
        flex-basis: 100%;
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .public-footer {
        background: #ffffff;
        overflow: clip;
    }

    .public-footer-mobile-disclosure > summary {
        min-height: 4.25rem;
    }

    .public-footer-mobile-disclosure-content {
        min-width: 0;
        padding-bottom: 1.25rem;
        padding-top: 1rem;
        width: 100%;
    }

    /* A phone footer is an accordion, never a squeezed desktop grid. */
    .public-footer-grid {
        gap: 0;
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        width: 100%;
    }

    .public-footer-brand,
    .public-footer-column,
    .public-footer-contact {
        grid-column: auto;
        min-width: 0;
        width: 100%;
    }

    .public-footer-brand {
        padding-bottom: 1rem;
    }

    .public-footer-brand p {
        font-size: .9rem;
        line-height: 1.5;
        margin: 0 0 .9rem;
    }

    .public-footer-actions {
        flex-direction: row;
    }

    .public-footer-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }

    .public-footer-contact {
        border-top: 1px solid #dbe6f3;
        gap: .42rem;
        padding-top: 1rem;
    }

    .public-footer-contact :is(a, span, strong),
    .public-footer-mobile-summary-brand > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .public-footer-bottom {
        gap: .35rem;
        margin-top: 1.1rem;
        padding-top: .85rem;
    }

    .public-footer-bottom span {
        font-size: .78rem;
    }
}

@media (max-width: 359.98px) {
    .public-footer-actions {
        flex-direction: column;
    }

    .public-footer-actions .btn {
        width: 100%;
    }
}
