.footer {
    background-color: var(--color-alabaster-gray-400);
    font-family: var(--font-family-body);
    color: var(--color-vintage-grape-800);
}

.footer__main {
    display: grid;
    grid-template-columns: 309px auto 1fr auto;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "map logo        logo        logo"
        "map contact     nav         back-to-top";
    column-gap: 40px;
    row-gap: 48px;
    max-width: var(--contained-width);
    margin: 0 auto;
    padding: 40px;
}

.footer__logo        { grid-area: logo; }
.footer__contact     { grid-area: contact; }
.footer__map         { grid-area: map; }
.footer__nav         { grid-area: nav; }
.footer__back-to-top { grid-area: back-to-top; align-self: start; }

.footer__map-link {
    display: block;
    position: relative;
    width: 309px;
    height: 309px;
    overflow: hidden;
}

.footer__map-image {
    width: 309px;
    height: 309px;
    object-fit: cover;
    display: block;
}

.footer__map-overlay {
    padding: 16px;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #90808033;
    transition: background-color 0.25s ease;
}

.footer__map-link:hover .footer__map-overlay {
    background-color: #3828284D;
}

.footer__map-cta {
    display: inline-flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-alabaster-gray-200);
    background-color: var(--color-vintage-grape-800);
    border-radius: 36px;
    padding: 16px 26px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.footer__map-link:hover .footer__map-cta {
    opacity: 1;
}

.footer__map-cta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
}

.footer__logo-image {
    height: auto;
    display: block;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 200px;
    gap: 32px;
}

.footer__contact-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
}

.footer__contact-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    white-space: pre-line;
}

.footer__nav-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 21px;
    max-width: 300px;
    margin: auto;
}

.footer__nav-link {
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__back-to-top {
    font-family: var(--font-family-body);
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    white-space: nowrap;
    position: relative;
}

.footer__back-to-top .link {
    position: static;
}

.footer__back-to-top .link::after {
    position: absolute;
    left: 0;
    width: 100%;
}

.footer__back-to-top:hover .link::after {
    transform: scaleX(1);
}

.footer__back-to-top svg {
    width: 11px;
    height: 11px;
}

.footer__bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-alabaster-gray-800);
    border-top: 1px solid var(--color-alabaster-gray-200)
}

.silo-foreigners .footer__bottom {
    background-color: var(--color-muted-teal-500);
    color: var(--color-alabaster-gray-100);
}

.silo-housing-communities .footer__bottom {
    background-color: var(--color-wine-plum-500);
    color: var(--color-alabaster-gray-100);
}

.silo-individual-clients .footer__bottom {
    background-color: var(--color-copper-500);
    color: var(--color-alabaster-gray-100);
}

.silo-business-clients .footer__bottom {
    background-color: var(--color-dusk-blue-500);
    color: var(--color-alabaster-gray-100);
}

@media (max-width: 1200px) {
    .footer__main {
        grid-template-columns: 309px 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "map logo"
            "map contact"
            "map nav"
            "map back-to-top";
        row-gap: 32px;
    }

    .footer__nav-list {
        margin: 0;
    }

    .footer__map {
        align-self: start;
    }

}

@media (max-width: 700px) {
    .footer__main {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40px 24px;
        gap: 0;
        text-align: center;
    }

    .footer__logo {
        margin-bottom: 48px;
    }

    .footer__contact {
        max-width: 309px;
        gap: 32px;
        margin-bottom: 32px;
    }

    .footer__map,
    .footer__map-link,
    .footer__map-image {
        width: 100%;
        max-width: 309px;
        margin: auto;
    }

    .footer__map {
        margin-bottom: 48px;
    }

    .footer__nav-list {
        gap: 24px;
    }

    .footer__back-to-top {
        margin: 70px auto 0;
    }

    .footer__back-to-top .link {
        text-decoration: none;
    }

    .footer__back-to-top .link::after {
        display: block;
        transform: scaleX(1);
    }
}
