/* =========================================================
   GEO-ENGINEERING — UNIFIED FOOTER
   Единый футер для главной, направлений и проектов.
========================================================= */

.footer {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 400px;
    min-height: 400px;
    margin: 0;
    padding: 0;

    background-color: rgba(0, 0, 0, .25);
    background-image: url("../images/footer-bg.webp?v=3");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: multiply;

    border: none;
    border-radius: 0;
    box-shadow: none;

    overflow: hidden;

    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* На главной и внутренних страницах фон футера одинаковый. */
.footer::before {
    display: none;
}

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

.footer-content {
    position: relative;
    z-index: 1;

    width: min(1400px, 100%);
    min-height: 285px;

    margin: 0 auto;
    padding: 55px 40px 45px;

    display: grid;
    grid-template-columns: 1.25fr 0.8fr 0.8fr;
    column-gap: 70px;
    align-items: center;

    transform: translateY(40px);
}

/* =========================================================
   BRAND
========================================================= */

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

.footer-logo {
    display: block;
    width: auto;
    height: clamp(36px, 3.3654vw + 1.54px, 50px);
    margin-bottom: 20px;
    object-fit: contain;
    transform: scaleY(1.1);
}

.footer-brand p {
    margin: 0;
    max-width: 300px;

    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

/* =========================================================
   NAVIGATION
========================================================= */

.footer-nav {
    display: flex;
    flex-direction: column;

    padding-left: 35px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-nav h3 {
    margin: 0 0 20px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.footer-nav a {
    width: fit-content;
    margin-bottom: 11px;

    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;

    transition: color .25s ease, transform .25s ease;
}

.footer-nav a:hover {
    color: #167BFF;
    transform: translateX(3px);
}

/* =========================================================
   VISUAL
========================================================= */

.footer-visual {
    position: relative;
    min-height: 180px;

    padding-left: 35px;

    display: flex;
    align-items: center;

    border-left: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.footer-visual-content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
}

.footer-visual-content span,
.footer-visual-content strong {
    display: block;
    font-size: 21px;
    line-height: 1.05;
    letter-spacing: 2px;
}

.footer-visual-content span {
    color: #FFFFFF;
    font-weight: 700;
}

.footer-visual-content strong {
    color: #167BFF;
    font-weight: 700;
}

.footer-accent-line {
    width: 38px;
    height: 2px;
    margin-top: 20px;
    background: #167BFF;
    box-shadow: 0 0 12px rgba(22, 123, 255, 0.7);
}

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

.footer-bottom {
    position: relative;
    z-index: 1;

    /* Линия и copyright начинаются ровно с внутреннего края контента футера */
    /* Ровно по внутренней ширине footer-content: 40px отступ
       с каждой стороны от контейнера 1400px. */
    width: min(1320px, calc(100% - 80px));
    min-height: 65px;

    margin: 0 auto;
    padding: 20px 0 28px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    display: flex;
    align-items: center;

    transform: translateY(40px);
}

.footer-bottom p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .15px;
    transform: none;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
    .footer {
        height: auto;
        min-height: 360px;
    }

    .footer-content {
        width: calc(100% - 40px);
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 45px 0 35px;
    }

    .footer-visual {
        display: none;
    }

    .footer-nav {
        padding-left: 25px;
    }

    .footer-bottom {
        width: calc(100% - 40px);
        padding-left: 0;
        padding-right: 0;
    }
}

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

@media (max-width: 600px) {
    .footer {
        min-height: auto;
    }

    .footer-content {
        width: calc(100% - 40px);
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 40px 0 30px;
        transform: none;
    }

    .footer-nav {
        padding-left: 0;
        border-left: none;
    }

    .footer-logo {
        width: auto;
        height: 40px;
    }

    .footer-bottom {
        width: calc(100% - 40px);
        padding: 18px 0 25px;
        transform: none;
    }

    .footer-bottom p {
        font-size: 13px;
    }
}


/* =========================================================
   FINAL INTERNAL-PAGE NORMALIZATION
   Футер направлений и проектов использует ту же геометрию,
   что и футер главной страницы. Линия copyright совпадает
   с внутренней шириной содержимого.
========================================================= */
@media (min-width: 901px) {
    .service-page .footer,
    .project + .footer,
    body:not(.home) .footer {
        height: 400px;
        min-height: 400px;
        margin-top: 0;
        background-color: rgba(0, 0, 0, .25);
        background-image: url("../images/footer-bg.webp?v=3");
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        background-blend-mode: multiply;
        border-radius: 0;
        overflow: hidden;
        font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    }

    .service-page .footer-content,
    .project + .footer .footer-content,
    body:not(.home) .footer-content {
        width: min(1400px, 100%);
        min-height: 285px;
        margin: 0 auto;
        padding: 55px 40px 45px;
        transform: translateY(40px);
        box-sizing: border-box;
    }

    .service-page .footer-bottom,
    .project + .footer .footer-bottom,
    body:not(.home) .footer-bottom {
        width: min(1320px, calc(100% - 80px));
        min-height: 65px;
        margin: 0 auto;
        padding: 20px 0 28px;
        box-sizing: border-box;
        transform: translateY(40px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .service-page .footer-bottom p,
    .project + .footer .footer-bottom p,
    body:not(.home) .footer-bottom p {
        margin: 0;
        transform: none;
        color: #ffffff;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.4;
        letter-spacing: .15px;
    }
}


/* =========================================================
   COPYRIGHT LINE ALIGNMENT — FINAL
   Линия строго совпадает с внутренними границами контента:
   слева — с началом блока логотипа, справа — с концом
   визуального блока. Это правило применяется одинаково
   к главной, направлениям и проектам.
========================================================= */
@media (min-width: 901px) {
    .footer-bottom {
        width: min(1320px, calc(100% - 80px)) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 900px) {
    .footer-bottom {
        width: calc(100% - 40px) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}
