/**
 * Подвал сайта — стили дочерней темы (redesign Zoobiznes).
 *
 * Подключается из functions.php (zoobiznes_header_assets) ПОСЛЕ стилей темы.
 * Все правила ограничены областью подвала (.zb-footer / .zb-footer-container),
 * чтобы не влиять на остальной сайт.
 *
 * Токены взяты из макета Figma (node 2128:45616).
 */

.zb-footer {
    --zbf-bg:            #111111;
    --zbf-cream:         #fefaee;
    --zbf-green:         #00a152;
    --zbf-green-link:    #059b77;
    --zbf-label:         #656565;
    --zbf-muted:         #858585;
    --zbf-social-text:   #d7d7d7;
    --zbf-social-border: #616161;
    --zbf-input-border:  #656565;
    --zbf-divider:       #2b2b2b;
}

/* ==========================================================================
   Базовый контейнер подвала
   ========================================================================== */
.zb-footer.site-footer {
    background: var(--zbf-bg);
    color: var(--zbf-cream);
    border: 0;
    box-shadow: none;
}

.zb-footer .zb-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 40px 40px;
    box-sizing: border-box;
}

.zb-footer a {
    text-decoration: none;
}

/* ==========================================================================
   Верх: бренд + подписка
   ========================================================================== */
.zb-footer .zb-footer-top {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

/* Левая половина (логотип + описание) */
.zb-footer .zb-footer-brand {
    flex: 1 1 0;
    min-width: 0;
}

.zb-footer .zb-footer-logo {
    display: inline-block;
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--zbf-cream);
    white-space: nowrap;
}

.zb-footer .zb-footer-logo__dot {
    color: var(--zbf-green);
}

.zb-footer .zb-footer-desc {
    margin: 20px 0 0;
    max-width: 320px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.35;
    color: var(--zbf-muted);
}

/* Правая половина (подписка) */
.zb-footer .zb-footer-subscribe {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    flex: 1 1 0;
    min-width: 0;
}

/* Обёртка формы: строка ввода + чекбокс согласия друг под другом */
.zb-footer .zb-subscribe {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 570px;
}

.zb-footer .zb-subscribe-form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    border: 1px solid var(--zbf-input-border);
    border-radius: 8px;
    box-sizing: border-box;
}

/* Чекбокс согласия */
.zb-footer .zb-subscribe-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.4;
    color: var(--zbf-muted);
}

.zb-footer .zb-consent-input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--zbf-green);
    cursor: pointer;
}

.zb-footer .zb-subscribe-consent a {
    color: var(--zbf-green-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.zb-footer .zb-subscribe-consent a:hover {
    color: var(--zbf-green);
}

.zb-footer .zb-subscribe-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 24px;
    border: 0;
    background: transparent;
    color: var(--zbf-cream);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.02em;
    outline: none;
    box-shadow: none;
}

.zb-footer .zb-subscribe-input::placeholder {
    color: var(--zbf-label);
    opacity: 1;
}

.zb-footer .zb-subscribe-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin: -1px;
    padding: 0 40px;
    border: 0;
    border-radius: 8px;
    background: var(--zbf-green);
    color: var(--zbf-cream);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease;
}

.zb-footer .zb-subscribe-btn:hover {
    background: #008a46;
}

.zb-footer .zb-subscribe-btn:disabled,
.zb-footer .zb-subscribe-btn.is-loading {
    opacity: 0.7;
    cursor: default;
}

/* Honeypot — скрытое поле-ловушка (не видно людям, но доступно ботам) */
.zb-footer .zb-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Сообщение после отправки формы подписки */
.zb-footer .zb-subscribe-message {
    min-height: 1em;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.35;
    color: var(--zbf-muted);
}

.zb-footer .zb-subscribe-message.is-success {
    color: #37c871;
}

.zb-footer .zb-subscribe-message.is-error {
    color: #ff6b6b;
}

/* Соц-сети */
.zb-footer .zb-footer-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.zb-footer .zb-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 0.7px solid var(--zbf-social-border);
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zbf-social-text);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.zb-footer .zb-social:hover {
    border-color: var(--zbf-cream);
    color: var(--zbf-cream);
}

/* ==========================================================================
   Разделитель
   ========================================================================== */
.zb-footer .zb-footer-divider {
    height: 0;
    margin: 36px 0;
    border: 0;
    border-top: 1px solid var(--zbf-divider);
}

/* ==========================================================================
   Колонки ссылок
   ========================================================================== */
.zb-footer .zb-footer-cols {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

/* Левая половина: сегменты (2 подколонки) */
.zb-footer .zb-footer-col--segments {
    flex: 1 1 0;
    min-width: 0;
}

.zb-footer .zb-footer-seg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 40px;
    max-width: 360px;
}

/* Правая половина: Контент / Бизнес / Юридическое.
   Первая колонка (Контент) начинается на той же оси, что и форма подписки выше. */
.zb-footer .zb-footer-cols-right {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 24px;
}

.zb-footer .zb-footer-col {
    min-width: 0;
}

.zb-footer .zb-footer-label {
    margin: 0 0 22px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zbf-label);
}

.zb-footer .zb-footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.zb-footer .zb-footer-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.zb-footer .zb-footer-list a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.15;
    color: var(--zbf-cream);
    transition: color 0.15s ease;
}

.zb-footer .zb-footer-list a:hover {
    color: var(--zbf-green);
}

.zb-footer .zb-footer-col--legal .zb-footer-list a {
    font-weight: 400;
}

/* ==========================================================================
   Низ: автор/копирайт + дисклеймер
   ========================================================================== */
.zb-footer .zb-footer-bottom {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 44px;
}

/* Левая половина (автор + копирайт) */
.zb-footer .zb-footer-bottom-left {
    flex: 1 1 0;
    min-width: 0;
}

.zb-footer .zb-footer-author {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.1;
    color: var(--zbf-cream);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.zb-footer .zb-footer-author:hover {
    color: var(--zbf-green);
}

.zb-footer .zb-footer-copy {
    margin: 20px 0 0;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zbf-muted);
}

/* Правая половина (сноска + дисклеймер) — на одной оси с колонками выше */
.zb-footer .zb-footer-bottom-right {
    flex: 1 1 0;
    min-width: 0;
}

.zb-footer .zb-footer-meta-note {
    margin: 0 0 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 1.3;
    color: var(--zbf-muted);
}

.zb-footer .zb-footer-disclaimer {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 1.5;
    color: var(--zbf-muted);
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 991px) {
    .zb-footer .zb-footer-inner {
        padding: 40px 20px 32px;
    }

    /* На планшете/мобильном половины складываются в столбик */
    .zb-footer .zb-footer-top,
    .zb-footer .zb-footer-cols,
    .zb-footer .zb-footer-bottom {
        flex-direction: column;
        gap: 32px;
        align-items: stretch;
    }

    .zb-footer .zb-footer-brand,
    .zb-footer .zb-footer-subscribe,
    .zb-footer .zb-footer-col--segments,
    .zb-footer .zb-footer-cols-right,
    .zb-footer .zb-footer-bottom-left,
    .zb-footer .zb-footer-bottom-right {
        flex: 0 0 auto;
        width: 100%;
    }

    .zb-footer .zb-footer-desc {
        max-width: none;
    }

    .zb-footer .zb-footer-seg-grid {
        max-width: none;
    }

    .zb-footer .zb-footer-socials {
        justify-content: flex-start;
    }

    .zb-footer .zb-footer-logo {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .zb-footer .zb-footer-cols-right {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .zb-footer .zb-subscribe-btn {
        padding: 0 24px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .zb-footer .zb-footer-seg-grid,
    .zb-footer .zb-footer-cols-right {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }
}
