/* Footer styles */
footer,
.site-footer {
    border-top: 1px solid var(--hr-color);
    font-size: 0.95rem;
}

/* Apply the same colour to all hr elements */
hr {
    border: none;
    border-top: 1px solid var(--hr-color);
    background: transparent;
    height: 0;
    margin: 1rem 0;
}

/* Footer styles added to display footer items in a horizontal row */
.site-footer {
    /* match header/container sizing */
    max-width: 1200px;
    width: 90vw;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.95rem;
    color: var(--muted);
}

.site-footer__left {
    flex: 0 0 auto;
}

.site-footer__links {
    display: flex;
    gap: 28px; /* match .nav-list spacing */
    flex: 0 1 auto;
    align-items: flex-start;
}

.site-footer__links a {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* top area grid */
.site-footer__top {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
    padding-bottom: 18px;
}

.site-footer__brand .footer-name {
    font-family: var(--header-font);
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 6px 0;
}

.site-footer__brand .footer-title {
    color: var(--accent);
    margin: 0 0 6px 0;
    font-weight: 700;
}

.site-footer__brand .footer-location {
    color: var(--muted);
    margin: 0;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-list .footer-item a {
    color: var(--muted);
    text-decoration: none;
}

.footer-list .footer-item a:hover {
    color: var(--accent);
}

.site-footer__connect .footer-item {
    /* ensure icon and text are vertically aligned */
    display: block;
}

.site-footer__connect a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    text-decoration: none;
}

.site-footer__connect .footer-link-text {
    margin: 0; /* reset previous spacing, gap handles spacing */
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer__right a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 18px;
}

.site-footer__right a:hover {
    color: var(--accent);
}

.site-footer__connect > h4, .site-footer__explore > h4
{
    margin: 0 0 1rem 0;
}

/* match nav-link spacing and weight from header */
.site-footer .nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
}

.site-footer .nav-link i {
    font-size: 1.15rem;
    vertical-align: middle;
}

/* match header nav-link styles */
.site-footer .nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
}

.site-footer .nav-link:hover {
    color: var(--accent);
}

/* accessible hidden text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 800px) {
    .site-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* center the copyright and place it above the icons on small screens */
    .site-footer__left {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .site-footer__links {
        order: 2;
        justify-content: center;
    }
}
