/* ── Footer: парящий блок под ширину homepage-v1 ──────────── */
/* ===== Footer v1 (только для homepage-v1) ===== */
.fv1 {
    background: transparent;
    margin-bottom: min(2.0833vw, 20px);
}
.fv1__wrap {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--text-main-color);
    border-radius: min(2.0833vw, 20px);
    padding: min(3.125vw, 30px) min(5vw, 48px) 0;
    box-sizing: border-box;
    color: var(--color-white);
    overflow: hidden;
}
/* Top: brand + nav */
.fv1__top {
    display: flex;
    gap: min(3.3333vw, 32px);
    padding-bottom: min(3.125vw, 30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    align-items: flex-start;
}
/* Brand column */
.fv1__brand {
    flex: 0 0 auto;
    width: min(22.9167vw, 220px);
}
.fv1__logo {
    display: block;
    margin-bottom: min(1.5625vw, 15px);
    padding-bottom: min(0.8333vw, 8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.fv1__logo img {
    width: 100%;
    display: block;
    filter: brightness(0) invert(1);
}
.fv1__company {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    margin-bottom: min(1.25vw, 12px);
}
.fv1__contacts {
    display: flex;
    flex-direction: column;
    gap: min(0.625vw, 6px);
    margin-bottom: min(1.5625vw, 15px);
    font-size: 9px;
}
.fv1__contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 1.45;
}
.fv1__contact-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.fv1__phone {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color var(--transition-speed);
}
.fv1__phone:hover {
    color: var(--color-white);
}
.fv1__socials {
    margin-top: min(1.5625vw, 15px);
}
.fv1__socials-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    line-height: 1.4;
}
.fv1__social-icons {
    display: flex;
    gap: 8px;
}
.fv1__social-icons a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity var(--transition-speed);
    background-color: var(--sp-cost-accent);
}
.fv1__social-icons a:hover {
    opacity: 0.8;
}
.fv1__social-icons a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* Nav columns */
.fv1__nav {
    flex: 1 1 0;
    display: flex;
    justify-content: space-between;
    gap: min(4.1667vw, 40px);
    min-width: 0;
    padding-top: 2px;
}
.fv1__nav-col {
    flex: 0 1 auto;
    min-width: 0;
}
.fv1__nav-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.03em;
    margin-bottom: min(0.9375vw, 9px);
    color: var(--color-white);
    white-space: nowrap;
}
.fv1__links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fv1__links li {
    display: flex;
    align-items: flex-start;
    margin-bottom: min(0.625vw, 6px);
}
.fv1__links li a {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition-speed);
}
.fv1__links li a:hover {
    color: var(--color-white);
}
/* Колонка «Преимущества» — список с галочками */
.fv1__links--check li {
    gap: 7px;
    align-items: flex-start;
}
.fv1__check {
    flex-shrink: 0;
    margin-top: 3px;
}
.fv1__check path {
    fill: var(--main-color);
}
.fv1__links--check span {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}
/* Bottom bar */
.fv1__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: min(1.3021vw, 12.5px) 0 min(1.3021vw, 12.5px);
    gap: 16px;
}
.fv1__bottom-item {
    font-size: 10px;
    color: var(--color-white);
    white-space: nowrap;
}
.fv1__bottom-item--center {
    text-align: center;
}
.fv1__bottom-item--right {
    text-align: right;
}
.fv1__bottom-item .footer-pdf-link {
    cursor: pointer;
    color: var(--main-color);
    text-decoration: none;
    transition: opacity var(--transition-speed);
}
.fv1__bottom-item .footer-pdf-link:hover {
    opacity: 0.8;
}
/* Mobile */
@media (max-width: 768px) {
    .fv1 {
        margin-top: 0;
        margin-bottom: 0;
    }
    .fv1__wrap {
        border-radius: 5vw;
        padding: 7.5vw 6vw 0;
        width: 75vw;
        margin: 0 auto;
    }
    .fv1__top {
        flex-direction: column;
        align-items: center;
        gap: 7.5vw;
        padding-bottom: 7.5vw;
    }
    .fv1__brand {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .fv1__logo {
        margin-bottom: 3.75vw;
        padding-bottom: 3.75vw;
    }
    .fv1__logo img {
        max-width: 40vw;
        width: 40vw;
    }
    .fv1__company {
        max-width: 65vw;
    }
    .fv1__contacts {
        align-items: center;
    }
    .fv1__contact-row {
        justify-content: center;
        font-size: 13px;
    }
    .fv1__socials {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .fv1__socials-label {
        font-size: 14px;
        text-align: center;
    }
    .fv1__social-icons a {
        width: 8vw;
        height: 8vw;
    }
    .fv1__nav {
        flex-direction: column;
        gap: 5.5vw;
        width: 100%;
        align-items: center;
    }
    .fv1__nav-col {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .fv1__nav-title {
        font-size: 14px;
        text-align: center;
        white-space: normal;
    }
    .fv1__links li {
        justify-content: center;
    }
    .fv1__links li a {
        font-size: 13px;
        text-align: center;
    }
    .fv1__links--check li {
        justify-content: center;
    }
    .fv1__links--check span {
        font-size: 13px;
    }
    .fv1__bottom {
        flex-direction: column;
        align-items: center;
        padding: 5vw 0 7.5vw;
        gap: 2.5vw;
    }
    .fv1__bottom-item {
        white-space: normal;
        text-align: center;
        font-size: 11px;
    }
}

/* ==============================================
   FOOTER SOCIAL BLOCK
   Migrated from the retired v0 header-nav.css (the old header that used these
   classes is gone). footer.php's social links still render with .header__social
   / .social-links, so these base rules must stay; per-context overrides live
   inline in footer.php.
   ============================================== */
.header__social {
    width: 16.7604166667vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 1vw;
}
.header__social p {
    font-size: 1vw;
    line-height: .9895833333vw;
    letter-spacing: .03em;
    margin-bottom: .78125vw;
    position: relative;
}
.social-links {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-links a {
    width: 2.2916666667vw;
    height: 2.2916666667vw;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--main-color);
    margin: 0 .2604166667vw;
    transition: var(--transition-speed);
}
.social-links a:hover {
    transform: scale(1.2);
}
.social-links a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==============================================
   PDF MODAL + footer PDF links
   Moved out of the inline <style> block that footer.php used to ship on every
   page (v0→v1 cleanup). The modal markup/JS still live in footer.php; the v1
   footer (.fv1) renders the .footer-pdf-link triggers globally.
   ============================================== */
.footer-pdf-link {
    cursor: pointer;
    transition: opacity 0.2s;
}
.footer-pdf-link:hover {
    opacity: 0.8;
}

.pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}
.pdf-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.pdf-modal {
    background: var(--color-white);
    border-radius: 1vw;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-speed) ease;
}
.pdf-modal-overlay.active .pdf-modal {
    transform: scale(1);
}
.pdf-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1vw 1.5vw;
    background: linear-gradient(135deg, var(--color-sage) 0%, #8da175 100%);
    color: var(--color-white);
}
.pdf-modal__title {
    font-size: 1.1vw;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.pdf-modal__actions {
    display: flex;
    gap: 0.8vw;
}
.pdf-modal__btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-white);
    padding: 0.5vw 1vw;
    border-radius: 0.4vw;
    font-size: 0.85vw;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4vw;
    transition: background var(--transition-speed);
    text-decoration: none;
}
.pdf-modal__btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--color-white);
}
.pdf-modal__btn svg {
    width: 1vw;
    height: 1vw;
    fill: currentColor;
}
.pdf-modal__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-white);
    width: 2.5vw;
    height: 2.5vw;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    font-size: 1.5vw;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
}
.pdf-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}
.pdf-modal__content {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.pdf-modal__content iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.pdf-modal__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}
.pdf-modal__loader-spinner {
    width: 3vw;
    height: 3vw;
    min-width: 40px;
    min-height: 40px;
    border: 3px solid #E5E9F0;
    border-top-color: var(--color-sage);
    border-radius: 50%;
    animation: pdfModalSpin 1s linear infinite;
    margin: 0 auto 1vw;
}
@keyframes pdfModalSpin {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 768px) {
    .pdf-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    .pdf-modal__header {
        padding: 15px 20px;
    }
    .pdf-modal__title {
        font-size: 14px;
    }
    .pdf-modal__btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    .pdf-modal__btn svg {
        width: 14px;
        height: 14px;
    }
    .pdf-modal__close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Keep the fixed messenger bar from covering footer content on mobile */
@media (max-width: 767px) {
    footer {
        padding-bottom: 80px !important;
    }
}
