/* ══════════════════════════════════════════════════════════════════════
   НУЖНЫДЕНЬГИ — FOOTER
   Глубокий графитовый низ страницы, платиновая типографика,
   изумрудные хайрлайны-акценты. Разметка: includes/footer.php
   (footer > .container > .trust-section / .footer / .footer-bottom).
   Токены — из design-system.css.
   ══════════════════════════════════════════════════════════════════════ */

footer {
    position: relative;
    z-index: 1000;
    margin-top: 64px;
    padding-top: 54px;
    background:
        radial-gradient(900px 340px at 4% -10%, rgba(18,148,106,.24), transparent 64%),
        linear-gradient(180deg, var(--nd-graphite-900) 0%, var(--nd-graphite-950) 55%, #111817 100%);
    color: rgba(243,247,245,.72);
    border-top: 1px solid rgba(243,247,245,.10);
}

footer h4 { color: var(--nd-text-invert); }

footer p {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    color: rgba(243,247,245,.72);
}

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

/* ── ДОВЕРИТЕЛЬНЫЕ БЛОКИ ── */
.trust-section {
    padding-bottom: 34px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(243,247,245,.10);
}

.trust-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.trust-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: var(--nd-r-md);
    background: rgba(243,247,245,.06);
    border: 1px solid rgba(243,247,245,.14);
    color: var(--nd-accent-on-dark);
}

.trust-item h4 {
    margin: 0 0 5px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -.005em;
    color: var(--nd-text-invert);
}
.trust-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(243,247,245,.62);
}

/* ── ОСНОВНАЯ СЕТКА ФУТЕРА ── */
.footer {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 38px;
    padding-bottom: 38px;
}

.footer h4 {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nd-text-invert);
}
.footer > div:first-child h4 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: none;
    padding-bottom: 14px;
}
.footer > div:first-child h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: var(--nd-accent-on-dark);
}

.footer li { margin-bottom: 10px; }

.footer li a {
    display: inline-block;
    font-size: 14.5px;
    color: rgba(243,247,245,.72);
    text-decoration: none;
    transition: color var(--nd-t) var(--nd-ease), transform var(--nd-t) var(--nd-ease);
}
.footer li a:hover { color: var(--nd-accent-on-dark); transform: translateX(3px); }

.footer-contact p { font-size: 14px; color: rgba(243,247,245,.72); }

/* Блок «О сервисе …» */
.ekapusta-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(243,247,245,.10);
}
.ekapusta-info h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(243,247,245,.86);
}
.ekapusta-info p {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(243,247,245,.60);
}
.ekapusta-info .payment-methods { gap: 8px; }
.ekapusta-info .payment-icon {
    height: 28px;
    padding: 3px 8px;
    background: rgba(243,247,245,.94);
    border-radius: 6px;
    opacity: .78;
    filter: none;
}
.ekapusta-info .payment-icon:hover { opacity: 1; }

/* ── НИЖНЯЯ ПОЛОСА ── */
.footer-bottom {
    margin: 0 calc(var(--nd-gutter) * -1);
    padding: 22px var(--nd-gutter);
    background: rgba(6,13,12,.55);
    border-top: 1px solid rgba(243,247,245,.10);
}
.footer-bottom-content { text-align: left; }

.footer-bottom .copyright {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nd-text-invert);
}

.footer-bottom .disclaimer {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(243,247,245,.52);
    overflow-wrap: anywhere;
}

.footer-bottom .recaptcha-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(243,247,245,.44);
}
.footer-bottom .recaptcha-note a {
    color: rgba(243,247,245,.68);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-bottom .recaptcha-note a:hover { color: var(--nd-accent-on-dark); }

/* ══════════════════════════════════════════════════════════════════════
   КАСТОМНЫЙ ФУТЕР (includes/custom_footer.html)
   Разметка: footer.site-footer > .container > .footer-grid
             (.footer-brand + .footer-col × 3) > .footer-bottom

   Специфика: design-system.css грузится ПОСЛЕДНИМ и правит
   `.container p / li / h4` тёмным цветом (--nd-text, --nd-text-secondary) —
   на графитовом фоне это даёт «серую массу». Здесь возвращаем
   platinum-иерархию: заголовок → ссылка → второстепенный текст.
   ══════════════════════════════════════════════════════════════════════ */

.site-footer { padding-top: 58px; }

/* ── 1. Цветовая иерархия (специфика 0-2-1 > .container h4/p/li) ── */
.site-footer .footer-grid h4 { color: var(--nd-text-invert); }
.site-footer .footer-grid p  { color: rgba(243,247,245,.72); }
.site-footer .footer-grid li { color: rgba(243,247,245,.86); }

/* ── 2. Сетка колонок ── */
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 34px 44px;
    padding-bottom: 38px;
}

/* ── 3. Бренд-колонка ── */
.footer-brand h4 {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 14px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--nd-text-invert);
}
.footer-brand h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: var(--nd-accent-on-dark);
    opacity: .85;
}
.footer-brand p {
    margin: 0;
    max-width: 54ch;
    font-size: 14.5px;
    line-height: 1.75;
    color: rgba(243,247,245,.72);
}

/* ── 4. Заголовки колонок ── */
.footer-col h4 {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--nd-text-invert);
    border-bottom: 1px solid rgba(243,247,245,.12);
}

/* ── 5. Ссылки ── */
.footer-col li { margin: 0 0 4px; }
.footer-col li a {
    display: inline-block;
    padding: 5px 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(243,247,245,.86);
    text-decoration: none;
    transition: color var(--nd-t) var(--nd-ease), transform var(--nd-t) var(--nd-ease);
}
.footer-col li a:hover,
.footer-col li a:focus-visible {
    color: var(--nd-accent-on-dark);
    transform: translateX(3px);
}

/* ── 6. Граница между колонками и служебной частью ── */
.site-footer .footer-bottom {
    margin-inline: calc(var(--nd-gutter) * -1);
    padding: 26px var(--nd-gutter) 30px;
    background: rgba(6,13,12,.55);
    border-top: 1px solid rgba(243,247,245,.14);
}

/* ── 7. Служебная часть: вторичная, но читаемая ── */
.site-footer .footer-bottom .copyright {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    color: rgba(243,247,245,.92);
}
.site-footer .footer-bottom .disclaimer {
    margin: 0 0 10px;
    max-width: 120ch;
    font-size: 13px;
    line-height: 1.75;
    color: rgba(243,247,245,.64);
}
.site-footer .footer-bottom .recaptcha-note {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: rgba(243,247,245,.58);
}
.site-footer .footer-bottom .recaptcha-note a {
    color: rgba(243,247,245,.80);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.site-footer .footer-bottom .recaptcha-note a:hover { color: var(--nd-accent-on-dark); }

/* ── 8. Адаптив кастомного футера ── */
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px 34px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: 72ch; }
}

@media (max-width: 768px) {
    .site-footer { padding-top: 40px; }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
        padding-bottom: 30px;
    }
    .footer-brand { grid-column: auto; }
    .footer-brand h4 { font-size: 18px; }
    .footer-brand p { font-size: 14.5px; line-height: 1.7; }

    .footer-col h4 { margin-bottom: 12px; padding-bottom: 10px; }
    .footer-col li { margin-bottom: 2px; }
    .footer-col li a { padding: 9px 0; font-size: 15px; }

    .site-footer .footer-bottom { padding: 22px var(--nd-gutter) 26px; }
    .site-footer .footer-bottom .disclaimer { font-size: 13px; line-height: 1.65; }
    .site-footer .footer-bottom .recaptcha-note { font-size: 12.5px; line-height: 1.6; }
}

@media (max-width: 560px) {
    /* .container здесь padding 16px — иначе отрицательный margin даёт overflow */
    .site-footer .footer-bottom {
        margin-inline: -16px;
        padding-inline: 16px;
    }
}

/* ── АДАПТИВ ── */
@media (min-width: 769px) and (max-width: 992px) {
    .footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
    .footer > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    footer { margin-top: 48px; padding-top: 36px; }

    .trust-section {
        padding-bottom: 26px;
        margin-bottom: 26px;
    }
    .trust-container { grid-template-columns: 1fr; gap: 18px; }

    .footer { grid-template-columns: 1fr; gap: 26px; padding-bottom: 28px; }

    .footer-bottom { padding: 20px var(--nd-gutter); }
    .footer-bottom .disclaimer { font-size: 12px; line-height: 1.6; }
}
