/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    position: relative;
    background: var(--graphite-dark);
    overflow: hidden;
}

.footer__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: bottom left;
    background-repeat: no-repeat;
}

/* ---- Main grid ---- */

.footer__main {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.footer__grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

/* ---- Column base ---- */

.footer__col {
    width: 223px;
}

.footer__col--brand {
    width: 304px;
}

.footer__col--contacts {
    width: 282px;
}

.footer__col-title {
    color: var(--white);
    margin-bottom: 20px;
}

/* ---- Brand column ---- */

.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 33px ;
    width: 100%;
    height: auto;
}

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

.footer__logo-icon {
    flex-shrink: 0;
}


.footer__desc {
    color: var(--white);
    line-height: 1.6;
}

.footer__divider {
    width: 198px;
    height: 3px;
    background: var(--primary);
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer__divider::after {
    display: block;
    content: '';
    height: 3px;
    width: 57px;
    background-color: var(--mint-light);
}

.footer__tagline {
    color: var(--white);
    line-height: 1.5;
    font-weight: 500;
}

/* ---- Nav lists (Каталог & Компания) ---- */

.footer__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__nav-item {
    position: relative;
}

.footer__nav-link::before {
    display: block;
    position: absolute;
    content: '';
    top: calc(100%);
    width: calc(100% - 24px);
    height: 1px;
    background-color: var(--primary);
    z-index: 10;
}

.footer__nav-link::after {
    display: block;
    position: absolute;
    content: '';
    top: calc(100%);
    right: 24px;
    width: 57px;
    height: 1px;
    background-color: var(--mint-light);
    z-index: 10;
}


.footer__nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    color: var(--white);
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s;
    position: relative;
}


.footer__nav-link:hover {
    color: var(--primary);
}

.footer__nav-link svg {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.7;
    transition: opacity 0.2s;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.footer__nav-link:hover svg {
    opacity: 1;
}

.footer__nav-item--active .footer__nav-link {
    color: var(--primary);
}

/* ---- Contacts column ---- */

.footer__contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    color: var(--white);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
}

.footer__address {
    align-items: flex-start;
}

.footer__contact-row:last-child {
    margin-bottom: 0;
}

a.footer__contact-row:hover {
    color: var(--primary);
}

.footer__contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--mint-light);
    color: var(--primary);
    flex-shrink: 0;
}

/* ---- Messengers ---- */

.footer__messengers {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.footer__messenger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

/* ---- Bottom bar ---- */

.footer__bottom {
    position: relative;
    z-index: 2;
}

.footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid var(--mint-light);
}

.footer__copyright,
.footer__bottom-link {
    color: var(--graphite-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer__bottom-link:hover {
    color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1280px) {
    .footer__col--brand {
        width: 240px;
    }
}

@media (max-width: 1080px) {
    .footer__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer__col--brand {
        grid-row: 2;
    }

    .footer__col {
        width: 100%;
    }

    .footer__main {
        padding: 48px 0;
    }
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__col--brand {
        grid-column: auto;
    }

    .footer__main {
        padding: 40px 0;
    }

    .footer__bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .footer__col--brand {
        grid-row: 1;
        max-width: 304px;
    }

    .footer__nav-link::before {
        display: block;
        position: absolute;
        content: '';
        top: calc(100%);
        width: 198px;
        height: 1px;
        background-color: var(--primary);
        z-index: 10;
    }

    .footer__nav-link::after {
        display: block;
        position: absolute;
        content: '';
        top: calc(100%);
        right: initial;
        left: calc(198px - 57px);
        width: 57px;
        height: 1px;
        background-color: var(--mint-light);
        z-index: 10;
    }

    .footer__divider {
        margin: 20px 0;
    }
}
