/*---*\
Page Footer
Sitewide footer with brand, link column, locations, hours, tagline, and legal bar.

KEY FEATURES:
- Single column on mobile, split layout on tablet, three columns on desktop
- Tagline is hidden on mobile; from tablet up it spans the viewport and rests on the legal bar
- Tagline uses text-box cap trimming where supported, with margin offsets as the fallback
- Back to Top uses the existing control in global.js

IMPLEMENTATION NOTES:
- Colors and type sizes come from custom-properties.css
- The Contact Us control uses the global .btn styles
\*---*/

.page-footer {
    margin-top: auto;
    border-top: 8px solid var(--color-primary);
    background-color: var(--color-tertiary-dark);
    color: var(--color-text-inverse);
    z-index: 5;
}

.page-footer__top {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 32px;
}

.page-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-footer__logo {
    display: inline-block;
    line-height: 0;
    margin: 0 auto;
}

.page-footer__logo img {
    display: block;
    width: 340px;
    max-width: 100%;
    height: auto;
}

.page-footer__social {
    display: flex;
    gap: 25.51px;
    margin: 20px auto 0;
    padding: 0;
    list-style: none;
}

.page-footer__social-link {
    color: var(--color-text-inverse);
    font-size: 36px;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-footer__social-link:hover,
.page-footer__social-link:focus-visible {
    color: var(--color-link-inverse-hover);
}

.page-footer__col--links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

h2.page-footer__heading {
    margin: 0 0 16px;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: var(--font-size-subheading);
    font-weight: var(--font-weight-heading);
    letter-spacing: var(--letter-spacing-subheading);
    line-height: var(--line-height-heading);
    text-transform: uppercase;
}

.page-footer__menu,
.page-footer__legal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-footer__legal a {
    font-size: 16px;
}

.page-footer__menu a,
.page-footer__legal a,
.page-footer__location-address a,
.page-footer__location-phone a,
.page-footer__back-to-top {
    color: var(--color-text-inverse);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-footer__menu a:hover,
.page-footer__menu a:focus-visible,
.page-footer__legal a:hover,
.page-footer__legal a:focus-visible,
.page-footer__location-address a:hover,
.page-footer__location-address a:focus-visible,
.page-footer__location-phone a:hover,
.page-footer__location-phone a:focus-visible,
.page-footer__back-to-top:hover,
.page-footer__back-to-top:focus-visible {
    color: var(--color-link-inverse-hover);
    text-decoration: underline;
    text-decoration-color: var(--color-link-inverse-underline);
}

.page-footer__legal li {
    margin-top: 0 !important;
}

.page-footer__cta {
    margin-top: 24px;
}

.page-footer__locations {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-footer__location {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

h3.page-footer__location-name {
    margin: 0;
    color: var(--color-text-inverse);
    font-family: var(--font-heading);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-button);
    line-height: var(--line-height-heading);
}

.page-footer__location-address,
.page-footer__location-phone,
.page-footer__copyright {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

.page-footer__location-address .icon-location,
.page-footer__location-phone .icon-phone {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--color-secondary);
    font-size: 19px;
}

 .page-footer__location-phone .icon-phone {
    font-size: 21px;
 }

.page-footer__hours {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: var(--radius-card);
    background-color: var(--color-surface-off-white);
    color: var(--color-heading);
}

.page-footer__hours .icon-hours {
    flex-shrink: 0;
    color: var(--color-heading);
    font-size: 25px;
}

.page-footer__hours-label {
    font-weight: var(--font-weight-button);
}

.page-footer__tagline {
    display: none;
}

.page-footer__bottom {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
    text-align: center;
}

.page-footer__bottom::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    background-color: var(--color-tertiary);
    transform: translateX(-50%);
}

.page-footer__copyright {
    display: block;
    font-size: 16px;
}

.page-footer__back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.page-footer__back-to-top .icon-chevron-double-up {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-small);
    background-color: var(--color-secondary);
    background-image: var(--gradient-secondary);
    color: var(--color-secondary-contrast);
    font-size: 20px;
    text-decoration: none;
}

.page-footer__hours .page-footer__hours-label {
    font-weight: 900;
}

.page-footer__hours .page-footer__hours-text br {
    display: none;
}

.page-footer__hours-text p {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .page-footer__top {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        padding-top: 56px;
    }

    .page-footer__brand,
    .page-footer__col--links {
        flex: 1 1 42%;
    }

    .page-footer__col--locations {
        flex: 1 1 100%;
    }

    .page-footer__locations {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .page-footer__location {
        flex: 1 1 28%;
    }

    .page-footer__hours {
        flex: 1 1 100%;
    }

    .page-footer__tagline {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        width: 100vw;
        margin: 0 0 -7px 0;
        overflow: hidden;
        color: var(--color-footer-tagline);
        font-family: var(--font-heading);
        font-size: min(2.88vw, 55.314px);
        font-weight: var(--font-weight-heading);
        letter-spacing: 0.12em;
        line-height: 1.2;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .page-footer__tagline-word {
        display: inline-flex;
        align-items: center;
    }

    .page-footer__tagline-word + .page-footer__tagline-word::before {
        content: "";
        width: 0.3125em;
        height: 0.3125em;
        margin: 0 0.28em 0 0.16em;
        border-radius: 50%;
        background-color: currentColor;
    }

    .page-footer__bottom {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-footer__legal {
        flex-direction: row;
        gap: 24px;
    }

    .page-footer__back-to-top {
        flex-basis: 100%;
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .page-footer__top {
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 88px;
        padding-top: 63px;
        padding-bottom: 52px;
    }

    .page-footer__brand {
        flex: 340 340 0;
        min-width: 0;
    }

    .page-footer__logo img {
        width: 340px;
    }

    .page-footer__social {
        align-self: center;
        margin-top: 32px;
    }

    .page-footer__col--links {
        flex: 243 243 0;
        min-width: 0;
    }

    .page-footer__col--locations {
        flex: 505 505 0;
        min-width: 0;
    }

    .page-footer__col h2.page-footer__heading {
        margin-bottom: 32px;
    }

    .page-footer__menu {
        gap: 16px;
    }

    .page-footer__cta {
        margin-top: 32px;
    }

    .page-footer__cta:hover {
        color: var(--color-primary-contrast);
    }    

    .page-footer__location {
        gap: 10px;
    }

    /* 2D placement of the hours card in the fourth cell */
    .page-footer__locations {
        display: grid;
        grid-template-columns: 254fr 219fr;
        gap: 32px;
    }

    .page-footer__location,
    .page-footer__hours {
        flex: none;
    }

    .page-footer__hours {
        flex-wrap: wrap;
        align-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 15px;
    }

    .page-footer__hours-text {
        flex: 1 0 100%;
    }

    .page-footer__hours .page-footer__hours-text br {
        display: block;
    }

    .page-footer__bottom {
        flex-wrap: nowrap;
        justify-content: flex-start;
        text-align: left;
    }

    .page-footer__back-to-top {
        flex-basis: auto;
        margin-left: auto;
    }

    .page-footer__tagline {
        margin-bottom: -12px;
    }    
}

@supports (text-box: trim-both cap alphabetic) {
    .page-footer__tagline {
        margin-top: 0;
        /* margin-bottom: -12px; */
        text-box: trim-both cap alphabetic;
    }
}

/* .page-footer__chat {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
}

.page-footer a.page-footer__chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(90.14deg, var(--color-secondary) 0.13%, var(--color-secondary-dark) 99.9%);
    color: var(--color-white);
    text-decoration: none;
    transition: filter 0.2s ease;
}

.page-footer a.page-footer__chat-button:hover,
.page-footer a.page-footer__chat-button:focus-visible {
    color: var(--color-white);
    text-decoration: none;
    text-shadow: none;
    filter: brightness(0.92);
}

.page-footer__chat-button .icon-chat {
    color: var(--color-secondary-contrast);
    font-size: 41px;
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .page-footer__chat-button,
    .page-footer__social-link,
    .page-footer__menu a,
    .page-footer__legal a,
    .page-footer__location-address a,
    .page-footer__location-phone a,
    .page-footer__back-to-top {
        transition: none;
    }
} */
