/* === footer.css === */
/* === ПОДВАЛ САЙТА === */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 243, 255, 0.06);
    padding: 44px 0 20px;
    margin-top: 44px;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-brand-top img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    border: 0;
    box-shadow: none;
}
.footer-brand-top h1 {
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-cream), var(--brand-violet), var(--brand-sky));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.5px;
    line-height: 1.1;
    margin: 0;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
    max-width: 300px;
}
.fcol-t {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    margin-bottom: 12px;
    text-shadow: 0 0 4px rgba(0, 243, 255, 0.15);
}
.flinks {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.flink {
    color: var(--text-secondary);
    font-size: 12px;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.flink:hover {
    color: var(--neon-cyan);
    transform: translateX(4px);
}
.footer-bot {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.fcopy {
    color: var(--text-muted);
    font-size: 11px;
}
.fvip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255, 215, 0, 0.04);
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    animation: vg 3s ease infinite;
}

/* === УЛУЧШЕННАЯ АДАПТИВНОСТЬ ПОДВАЛА === */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    .footer-brand p {
        max-width: 100%;
        margin: 0 auto;
    }
.footer-bot {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 12px;
    }
    .footer-brand-top {
        justify-content: center;
    }
    .flink {
        justify-content: center;
        word-break: break-word;
        hyphens: auto;
        max-width: 280px;
        margin: 0 auto;
    }
    .fvip { margin-top: 4px; }
}
/* ==========================================================================
   Светлая тема — футер
   ========================================================================== */

body.light-theme .footer {
  background: #f4f7ff !important;
  border-top: 1px solid rgba(23,24,47,.08) !important;
  color: #17182f !important;
}
body.light-theme .footer a {
  color: #0369a1 !important;
  text-decoration: none;
}
body.light-theme .footer a:hover {
  color: #004a99 !important;
  text-decoration: underline;
}
body.light-theme .footer h1,
body.light-theme .footer h2,
body.light-theme .footer h3,
body.light-theme .footer h4,
body.light-theme .footer .footer__title {
  color: #17182f !important;
}
body.light-theme .footer p,
body.light-theme .footer .footer__text {
  color: rgba(23,24,47,.72) !important;
}

/* .soc-img не используется */

/* Цвет по бренду в светлой теме */
удалено — теперь inline SVG должен быть видим */

/* ==========================================================================
   === TAGLINE: убрать фон, рамку, паддинг ===
   Слоган «Бесплатная доска объявлений по всей России.» должен
   быть простым текстом — без фона, без рамки, без внутренних отступов.
   ========================================================================== */
.logo-tagline,
.footer-brand .logo-tagline,
.footer-brand p.logo-tagline,
p.logo-tagline {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 2px 0 0 !important;
    border-radius: 0 !important;
}
.logo-tagline::before,
.logo-tagline::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* ==========================================================================
   === FLINK UPGRADE: красивые ссылки в подвале ===
   Убираем подчёркивание, добавляем:
   - плавный сдвиг вправо
   - подсветку иконки (цвет + масштаб + поворот)
   - растущую полоску слева
   - блеск пробегающий по тексту
   ========================================================================== */

/* Сбрасываем подчёркивание во всех состояниях */
.flink,
.flink:hover,
.flink:focus,
.flink:visited,
.flink:active,
body.light-theme .flink:hover,
body.light-theme .flink,
body.light-theme .footer .flink:hover {
    text-decoration: none !important;
    border-bottom: 0 !important;
}

/* Контейнер */
.flink {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 12px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
    text-decoration: none;
    transition: color .22s ease, transform .22s ease;
    will-change: transform;
}

/* Полоска-акцент слева */
.flink::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
    border-radius: 2px;
    transform: translateY(-50%);
    transition: height .25s ease, opacity .25s ease;
    opacity: 0;
}

/* Подсветка-волна под ссылкой */
.flink::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent 70%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .32s ease;
    pointer-events: none;
}

/* Иконка */
.flink .icon {
    width: 14px;
    height: 14px;
    color: currentColor;
    flex-shrink: 0;
    transition: transform .25s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)),
                color .2s ease;
}

/* Текст — немного резервируем место и запрещаем переносы слов подряд */
.flink > span,
.flink {
    white-space: nowrap;
}

/* === Hover === */
.flink:hover,
.flink:focus-visible {
    color: var(--neon-cyan);
    transform: translateX(4px);
}
.flink:hover::before,
.flink:focus-visible::before {
    height: 100%;
    opacity: 1;
}
.flink:hover::after,
.flink:focus-visible::after {
    transform: scaleX(1);
}
.flink:hover .icon,
.flink:focus-visible .icon {
    color: var(--neon-cyan);
    transform: scale(1.15) rotate(-8deg);
}

/* Мелкий блеск по тексту через background-clip */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .flink::before {
        will-change: height;
    }
}

/* === Светлая тема — спокойнее и без неона === */
html body.light-theme .flink,
body.light-theme .flink {
    color: #4a5568;
}
html body.light-theme .flink .icon,
body.light-theme .flink .icon {
    color: #0369a1;
}
html body.light-theme .flink:hover,
html body.light-theme .flink:focus-visible,
body.light-theme .flink:hover {
    color: #0369a1 !important;
    transform: translateX(4px);
}
html body.light-theme .flink:hover .icon,
body.light-theme .flink:hover .icon {
    color: #0369a1;
    transform: scale(1.15) rotate(-8deg);
}
html body.light-theme .flink::before,
body.light-theme .flink::before {
    background: linear-gradient(180deg, #0369a1, #7c3aed);
}
html body.light-theme .flink::after,
body.light-theme .flink::after {
    background: linear-gradient(90deg, #0369a1, transparent 70%);
}

/* Отменяем подчёркивание из общих правил для light-theme */
html body.light-theme .footer a.flink:hover,
body.light-theme .footer a.flink:hover {
    text-decoration: none !important;
}

/* === Тёмная тема — неоновый вариант === */
html body:not(.light-theme) .flink:hover .icon {
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0,243,255,.4);
}

/* === Мобильная адаптация — без сдвига, чтобы не «прыгало» === */
@media (max-width: 720px) {
    .flink { padding-left: 0; }
    .flink:hover,
    .flink:focus-visible { transform: none; }
    .flink::before { display: none; }
    .flink::after { left: 0; }
}

/* ==========================================================================
   === FLINK FINAL: цвет текста не меняется, без подчёркивания ===
   Ссылки в подвале сохраняют свой цвет во всех состояниях:
   обычное, hover, focus, visited (кликнутая), active.
   ========================================================================== */

.flink,
.flink:link,
.flink:visited,
.flink:hover,
.flink:active,
.flink:focus,
.flink:focus-visible,
body.light-theme .flink,
body.light-theme .flink:link,
body.light-theme .flink:visited,
body.light-theme .flink:hover,
body.light-theme .flink:active,
body.light-theme .flink:focus,
body.light-theme .footer .flink,
body.light-theme .footer .flink:visited,
body.light-theme .footer .flink:hover,
html body.light-theme .flink,
html body.light-theme .flink:visited,
html body.light-theme .flink:hover {
    text-decoration: none !important;
    border-bottom: 0 !important;
}

/* Тёмная тема: цвет текста всегда один и тот же */
.flink,
.flink:link,
.flink:visited,
.flink:hover,
.flink:active,
.flink:focus,
.flink:focus-visible {
    color: var(--text-secondary) !important;
    -webkit-text-fill-color: var(--text-secondary) !important;
}

/* Светлая тема: цвет текста всегда один и тот же */
html body.light-theme .flink,
html body.light-theme .flink:link,
html body.light-theme .flink:visited,
html body.light-theme .flink:hover,
html body.light-theme .flink:active,
html body.light-theme .flink:focus,
html body.light-theme .flink:focus-visible,
body.light-theme .flink,
body.light-theme .flink:visited,
body.light-theme .footer .flink:hover {
    color: #4a5568 !important;
    -webkit-text-fill-color: #4a5568 !important;
}

/* Иконка — тоже без изменения цвета, только лёгкая анимация */
.flink .icon,
.flink:hover .icon,
.flink:focus-visible .icon {
    color: currentColor !important;
    fill: currentColor !important;
}

/* Убираем полоску-подсветку — она тоже «меняет» вид */
.flink::after {
    display: none !important;
}

/* Hover сохраняет только мягкий сдвиг и растущую левую полоску */
.flink:hover,
.flink:focus-visible {
    transform: translateX(4px);
}

/* Иконка внутри — SVG одной буквы, центрируется flex'ом */
.soc .soc-svg path {
    fill: currentColor !important;
    stroke: none !important;
}

/* Светлая тема */

/* ==========================================================================
   === SOCIALS: чистый финальный блок ===
   Три круглые кнопки. Круг рисует CSS. SVG = только буква/значок.
   Всё выравнивается через flex, никаких вычислений.
   ========================================================================== */

.socials {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.soc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: #2a2a2a;
    color: #dbdbdb;
    text-decoration: none;
    border: 0;
    box-shadow: none;
    outline: none;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.soc:hover {
    transform: translateY(-2px);
    background: #3a3a3a;
    color: #ffffff;
}

.soc .soc-svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
    overflow: visible;
}
.soc .soc-svg path {
    fill: currentColor;
    stroke: none;
}

/* Светлая тема */
html body.light-theme .soc {
    background: #e8e8e8;
    color: #2a2a2a;
}
html body.light-theme .soc:hover {
    background: #d0d0d0;
    color: #000000;
}

/* ==========================================================================
   === FLINK DARK: #dbdbdb для ссылок подвала ===
   В тёмной теме все ссылки .flink (и иконки внутри них) — цвета #dbdbdb.
   Перебивает theme-main и universal-правила.
   При наведении — остаётся #dbdbdb (без смены цвета).
   ========================================================================== */

/* Основное правило для ссылки и её иконки */
html body:not(.light-theme) .flink,
html body:not(.light-theme) a.flink,
html body:not(.light-theme) a.flink:link,
html body:not(.light-theme) a.flink:visited,
html body:not(.light-theme) a.flink:active,
html body:not(.light-theme) a.flink:focus,
html body:not(.light-theme) .footer a.flink,
html body:not(.light-theme) .footer .flink {
    color: #dbdbdb !important;
    -webkit-text-fill-color: #dbdbdb !important;
    text-decoration: none !important;
}

/* Иконка внутри ссылки — тоже #dbdbdb */
html body:not(.light-theme) .flink .icon,
html body:not(.light-theme) .flink svg,
html body:not(.light-theme) .flink svg use,
html body:not(.light-theme) a.flink .icon,
html body:not(.light-theme) a.flink svg,
html body:not(.light-theme) a.flink svg use {
    color: #dbdbdb !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Hover — цвет текста остаётся тем же #dbdbdb */
html body:not(.light-theme) .flink:hover,
html body:not(.light-theme) .flink:focus-visible,
html body:not(.light-theme) a.flink:hover,
html body:not(.light-theme) a.flink:focus-visible {
    color: #dbdbdb !important;
    -webkit-text-fill-color: #dbdbdb !important;
}

html body:not(.light-theme) .flink:hover .icon,
html body:not(.light-theme) .flink:hover svg,
html body:not(.light-theme) .flink:focus-visible .icon {
    color: #dbdbdb !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* ==========================================================================
   === FOOTER LOGO: без обводки ===
   Логотип в подвале (.footer-brand-top img / .logo-img) — без рамки,
   без тени, без свечения.
   ========================================================================== */
.footer-brand-top img,
.footer-brand-top .logo-img,
.footer .logo-img,
footer .logo-img {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Светлая тема: то же */
html body.light-theme .footer-brand-top img,
html body.light-theme .footer .logo-img {
    border: 0 !important;
    box-shadow: none !important;
}
/* ============================================================
   ЕДИНЫЕ СТИЛИ СОЦ-ИКОНОК В ПОДВАЛЕ.
   Перенесено из инлайн-<style id="soc-inline-fix"> в includes/header.php,
   чтобы работало на всех страницах одинаково.
   ============================================================ */

/* --- ТЁМНАЯ ТЕМА --- */
html body:not(.light-theme) .socials a.soc,
html body:not(.light-theme) .socials a.soc:link,
html body:not(.light-theme) .socials a.soc:visited,
html body:not(.light-theme) .socials a.soc:hover,
html body:not(.light-theme) .socials a.soc:active,
html body:not(.light-theme) .socials a.soc:focus,
html body:not(.light-theme) .socials a.soc:focus-visible {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #dbdbdb !important;
    -webkit-text-fill-color: #dbdbdb !important;
}
html body:not(.light-theme) .socials a.soc:hover {
    background: #3a3a3a !important;
    background-color: #3a3a3a !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html body:not(.light-theme) .socials a.soc svg,
html body:not(.light-theme) .socials a.soc svg.soc-svg,
html body:not(.light-theme) .socials a.soc svg.soc-svg path,
html body:not(.light-theme) .socials a.soc .soc-svg,
html body:not(.light-theme) .socials a.soc .soc-svg path {
    fill: #dbdbdb !important;
    color: #dbdbdb !important;
    stroke: none !important;
}
html body:not(.light-theme) .socials a.soc:hover svg,
html body:not(.light-theme) .socials a.soc:hover svg.soc-svg,
html body:not(.light-theme) .socials a.soc:hover svg.soc-svg path,
html body:not(.light-theme) .socials a.soc:hover .soc-svg path {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* --- СВЕТЛАЯ ТЕМА --- */
html body.light-theme .socials a.soc,
html body.light-theme .socials a.soc:link,
html body.light-theme .socials a.soc:visited,
html body.light-theme .socials a.soc:hover,
html body.light-theme .socials a.soc:active,
html body.light-theme .socials a.soc:focus,
html body.light-theme .socials a.soc:focus-visible {
    background: #e8e8e8 !important;
    background-color: #e8e8e8 !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #2a2a2a !important;
    -webkit-text-fill-color: #2a2a2a !important;
}
html body.light-theme .socials a.soc:hover {
    background: #d0d0d0 !important;
    background-color: #d0d0d0 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}
html body.light-theme .socials a.soc svg,
html body.light-theme .socials a.soc svg.soc-svg,
html body.light-theme .socials a.soc svg.soc-svg path,
html body.light-theme .socials a.soc .soc-svg path {
    fill: #2a2a2a !important;
    color: #2a2a2a !important;
    stroke: none !important;
}
html body.light-theme .socials a.soc:hover svg,
html body.light-theme .socials a.soc:hover svg.soc-svg path {
    fill: #000000 !important;
    color: #000000 !important;
}

/* --- Иконки не должны менять цвет от глобальных hover --- */
html body .socials a.soc,
html body .socials a.soc:hover,
html body .socials a.soc:focus,
html body .socials a.soc:active {
    text-decoration: none !important;
}
html body .socials a.soc .soc-svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    stroke: none !important;
    overflow: visible !important;
}

/* === ЕДИНЫЕ ПРАВИЛА ПОДВАЛА (перенесено) ===
   Перенесено из theme-main.css и icons.css.
   Эти правила были в других файлах и перебивали footer.css.
   Теперь источник один — этот файл.
   ============================================================ */

.flink .icon {
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
    flex-shrink: 0 !important;
}
.soc .icon {
    width: 1em !important;
    height: 1em !important;
}

html body:not(.light-theme) .footer,
html body:not(.light-theme) footer.footer {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    border-top-color: rgba(255, 255, 255, 0.06) !important;
    color: #b8b8b8 !important;
}
html body:not(.light-theme) .footer a,
html body:not(.light-theme) .footer .flink,
html body:not(.light-theme) .flink {
    color: #b8b8b8 !important;
}
html body:not(.light-theme) .flink:hover,
html body:not(.light-theme) .footer a:hover,
html body:not(.light-theme) .footer .flink:hover {
    color: var(--neon-cyan, #94adae) !important;
}
html body:not(.light-theme) .fcol-t,
html body:not(.light-theme) .footer .fcol-t {
    color: var(--neon-cyan, #94adae) !important;
}
html body:not(.light-theme) .fcopy,
html body:not(.light-theme) .footer .fcopy {
    color: #8a8a8a !important;
}


/* === MOBILE FOOTER BRAND CENTER (2026-10-06) ===
   Мобильная версия подвала: лого + название + tagline вертикально по центру,
   соц-иконки по центру. Все селекторы только под .footer — шапку не затрагивает.
   ============================================================ */

@media (max-width: 768px) {
    /* Футер: бренд-блок — вертикально, по центру */
    .footer .footer-brand {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    .footer .footer-brand-top {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .footer .footer-brand-top .logo-text {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    /* Название логотипа — показать и по центру */
    .footer .footer-brand-top h1,
    .footer .footer-brand-top .logo-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center !important;
        font-size: 22px !important;
        line-height: 1.15 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    /* Tagline — показать и по центру */
    .footer .footer-brand p,
    .footer .footer-brand .logo-tagline {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center !important;
        max-width: 100% !important;
        margin: 6px auto 0 !important;
    }
    /* Соц-иконки — по центру */
    .footer .socials {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }
}


/* FOOTER-CONTAINER-FIX 2026-10-09 */
.footer .container,
footer.footer .container {
    width: 100%;
    max-width: var(--container-max, 1440px);
    margin: 0 auto;
    padding: var(--container-padding, 0 clamp(16px, 4vw, 48px));
    box-sizing: border-box;
}
