/* ============================================================
06. START: FOOTER
============================================================ */

/* ---------- FOOTER MAIN ---------- */

footer {
    background: var(--white);
    color: var(--text);
    padding: 40px 0 24px;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--accent);
}


/* ---------- FOOTER TOP ---------- */

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand {
    text-align: center;
}

.footer-logo-link {
    display: inline-block;
}

.footer-logo-link img {
    display: block;
    max-width: 150px;
    height: auto;
    margin: 0 auto 10px;
}

.footer-brand p {
    margin: 0;
}

.footer-brand .btn-callback {
    margin-top: 15px;
}

.footer-contacts h4,
.footer-links h4,
.footer-map h4,
.footer-apps h4 {
    color: var(--text);
    margin: 0 0 15px;
    font-size: 1.1rem;
}

.footer-contacts p,
.footer-links li,
.footer-map p,
.footer-apps .app-links {
    margin-bottom: 8px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li a {
    color: var(--primary);
}


/* ---------- FOOTER MIDDLE ---------- */

.footer-middle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.footer-apps .app-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-apps .app-links a {
    color: var(--primary);
}


/* ---------- FOOTER BOTTOM ---------- */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}


/* ============================================================
MOBILE
============================================================ */

@media (max-width: 600px) {

    footer {
        padding: 24px 0 18px;
    }

    footer .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }


    /* ---------- ОСНОВНАЯ СЕТКА ---------- */

    .footer-top {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 12px;
    }


    /* ---------- ЛОГОТИП / БРЕНД ---------- */

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

        display: flex;
        flex-direction: column;
        align-items: center;

        padding: 22px 18px;

        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 16px;

        text-align: center;
    }

    .footer-logo-link img {
        width: 140px;
        max-width: 100%;
        height: auto;

        margin: 0 auto 10px;
    }

    .footer-brand p {
        margin: 0;

        font-size: 14px;
        line-height: 1.5;

        color: var(--muted);
    }


    /* ---------- КНОПКА ---------- */

    .footer-brand .btn-callback {
        width: 100%;
        max-width: 280px;

        margin: 16px 0 0;
        padding: 13px 18px;

        border: none;
        border-radius: 10px;

        cursor: pointer;

        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;

        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    .footer-brand .btn-callback:active {
        transform: scale(0.98);
    }


    /* ---------- УСЛУГИ / ИНФОРМАЦИЯ ---------- */

    .footer-links {
        padding: 18px 14px;

        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 14px;

        box-sizing: border-box;
    }

    .footer-links h4 {
        margin: 0 0 12px;

        font-size: 15px;
        line-height: 1.3;
        font-weight: 700;
    }

    .footer-links ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .footer-links li {
        margin: 0;
        padding: 0;
    }

    .footer-links li a {
        display: block;

        font-size: 13px;
        line-height: 1.4;

        color: var(--text);
    }


    /* ---------- КОНТАКТЫ ---------- */

    .footer-contacts {
        grid-column: 1 / -1;

        padding: 20px;

        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 16px;

        box-sizing: border-box;
    }

    .footer-contacts h4 {
        margin: 0 0 14px;

        font-size: 18px;
        line-height: 1.3;
        font-weight: 700;
    }

    .footer-contacts p {
        margin: 0;
        padding: 8px 0;

        border-bottom: 1px solid var(--border);

        font-size: 14px;
        line-height: 1.5;
    }

    .footer-contacts p:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .footer-contacts a {
        font-weight: 600;
    }


    /* ---------- АДРЕС / ПРИЛОЖЕНИЯ ---------- */

    .footer-middle {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;

        margin: 0 0 18px;
        padding: 0;

        border-top: none;
    }

    .footer-map,
    .footer-apps {
        padding: 18px 20px;

        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 16px;

        box-sizing: border-box;
    }

    .footer-map h4,
    .footer-apps h4 {
        margin: 0 0 12px;

        font-size: 16px;
        line-height: 1.3;
        font-weight: 700;
    }

    .footer-map p {
        margin: 0;
    }

    .footer-map a {
        display: inline-flex;
        align-items: center;

        font-size: 14px;
        font-weight: 600;
    }


    /* ---------- ПРИЛОЖЕНИЯ ---------- */

    .footer-apps .app-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;

        margin: 0;
    }

    .footer-apps .app-links a {
        display: flex;
        align-items: center;
        justify-content: center;

        min-height: 40px;
        padding: 8px 5px;

        border: 1px solid var(--border);
        border-radius: 8px;

        background: var(--white);

        box-sizing: border-box;

        text-align: center;

        font-size: 12px;
        line-height: 1.25;
        font-weight: 600;

        color: var(--text);
    }


    /* ---------- COPYRIGHT ---------- */

    .footer-bottom {
        display: block;

        padding-top: 16px;

        border-top: 1px solid var(--border);

        text-align: center;
    }

    .footer-copyright p {
        margin: 0;

        font-size: 11px;
        line-height: 1.5;

        color: var(--muted);
    }

}


/* ---------- ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ ---------- */

@media (max-width: 380px) {

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-brand,
    .footer-contacts {
        grid-column: auto;
    }

    .footer-apps .app-links {
        grid-template-columns: 1fr;
    }

}

/* ============================================================
END: FOOTER
============================================================ */