.site-footer {
    width: 100%;
    background: #fff;
    color: #1f1f1f;
    padding: 3.2rem 4rem 1.2rem;
}

.footer-ad-top {
    max-width: 1300px;
    margin: 0 auto 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.footer-ad-top>* {
    max-width: 100%;
}

.footer-ad-top img,
.footer-ad-top iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

.footer-main {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 1.15rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

.footer-logo {
    display: inline-flex;
    max-width: 170px;
}

.footer-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.footer-brand-text {
    margin: 0;
    max-width: 360px;
    line-height: 1.6;
    font-size: 0.98rem;
    color: #3a3a3a;
}

.footer-phone {
    display: inline-flex;
    text-decoration: none;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    letter-spacing: 0.01em;
    transition: filter 0.2s ease;
    margin-top: 0.35rem;
}

.footer-phone:hover,
.footer-phone:focus-visible {
    filter: brightness(1.1);
}

.footer-contact-row {
    display: inline-grid;
    justify-items: start;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.footer-contact-row .footer-phone {
    margin-top: 0;
}

.footer-address {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.96rem;
    line-height: 1.4;
    font-weight: 700;
    color: #2f2f2f;
}

.footer-address__icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    background: var(--primary);
    -webkit-mask-image: url('../vector/coverage-bg.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('../vector/coverage-bg.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    line-height: 1;
    font-size: 0;
}

.footer-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111;
    padding-top: 0.35rem;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
}

.footer-links a {
    text-decoration: none;
    color: #2b2b2b;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--primary);
}

.footer-col--ad {
    gap: 0;
    align-items: flex-start;
    justify-content: flex-start;
}

.footer-col--partners {
    grid-column: 1 / -1;
    padding-top: 1.1rem;
    margin-top: 0.25rem;
}

.footer-links--row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-ad-square {
    width: 100%;
    max-width: 500px;
    max-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    line-height: 0;
}

.footer-ad-square>* {
    max-width: 100%;
    max-height: 500px;
}

.footer-ad-square img,
.footer-ad-square iframe {
    display: block;
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    font-size: 0.88rem;
    color: #525252;
    flex-wrap: wrap;
}

.footer-bottom__left,
.footer-bottom__right {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.footer-bottom a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .site-footer {
        padding: 2.7rem 1.4rem 1.1rem;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

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

    .footer-col--ad {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 2.5rem 1rem 1.1rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .footer-links--row {
        gap: 0.85rem 1rem;
    }

    .footer-ad-top {
        margin-bottom: 0.9rem;
    }

    .footer-contact-row {
        align-items: flex-start;
        gap: 0.45rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
