/*
Theme Name: dds_pol-video.ru
Author: Алексей Власов
Description: Тема информационного видеопортала о медицинской визуализации: эндоскопия, КТ и МРТ, разборы снимков и подготовка к обследованиям.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: medvis
*/

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg:          #f7fafc;
    --bg-alt:      #edf2f7;
    --head-bg:     #ffffff;
    --foot-bg:     #1a202c;
    --side-bg:     #f0f4f8;
    --ink:         #1a202c;
    --accent:      #2b6cb0;
    --accent-dark: #22548a;
    --teal:        #38b2ac;
    --teal-dark:   #2c908b;
    --muted:       #718096;
    --line:        #e2e8f0;
    --radius:      6px;
    --btn-radius:  4px;
    --shell:       1180px;
    --font-head:   "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    --font-body:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image: radial-gradient(rgba(203, 213, 224, .4) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
}

img { max-width: 100%; height: auto; }

a {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 0 1px;
    background-position: 0 100%;
    transition: background-size .28s ease, color .2s ease;
}

a:hover, a:focus { background-size: 100% 1px; color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: .01em;
    margin: 0 0 .7em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .45em; }

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--teal);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #2d3748;
}

blockquote p:last-child { margin-bottom: 0; }

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .92em;
}

pre {
    padding: 1.1rem 1.3rem;
    background: #1a202c;
    color: #e2e8f0;
    border-radius: var(--radius);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid #cbd5e0;
    background: #fff;
}

th, td {
    border: 1px solid #cbd5e0;
    padding: .65rem .85rem;
    text-align: left;
}

th { background: var(--bg-alt); font-family: var(--font-head); }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }

/* =========================================================
   2. Контейнеры и раскладки
   ========================================================= */

.shell { width: min(92%, var(--shell)); margin-inline: auto; }

.page-wrap { padding: 2.6rem 0 3.6rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}

.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }

.content-area { min-width: 0; }

/* =========================================================
   3. Декоративные приёмы
   ========================================================= */

.top-beam {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
}

.scan-figure {
    position: fixed;
    top: 84px;
    right: -30px;
    width: 300px;
    opacity: .08;
    pointer-events: none;
    z-index: 0;
}

.rule-dot {
    position: relative;
    width: 58%;
    height: 0;
    margin: 0 auto;
    border-top: 1px dashed #cbd5e0;
}

.rule-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3.5px;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    border-radius: 50%;
    background: var(--teal);
}

.sec-title {
    position: relative;
    padding-left: 1.05rem;
    font-size: 1.95rem;
    margin-bottom: 1.5rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .22em;
    width: 3px;
    height: 1.05em;
    background: var(--teal);
}

.sec-title-spaced { margin-top: 2.6rem; }

.sec-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2rem; }

/* пульсирующая точка у H2 в текстах записей и страниц */
.entry-content h2 { position: relative; padding-left: 1rem; }

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .58em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    transition: transform .35s ease, box-shadow .35s ease;
}

.entry-content h2:hover::before {
    transform: scale(1.35);
    box-shadow: 0 0 0 5px rgba(56, 178, 172, .16);
}

/* =========================================================
   4. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    padding: .72rem 1.5rem;
    border-radius: var(--btn-radius);
    font-family: var(--font-head);
    font-size: .98rem;
    line-height: 1.35;
    border: 1px solid transparent;
    background-image: none;
    cursor: pointer;
    transition: background-color .22s ease, color .22s ease, transform .22s ease, border-color .22s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover, .btn-teal:focus { background: var(--teal-dark); color: #fff; transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover, .btn-ghost:focus { background: var(--accent); color: #fff; transform: translateY(-2px); }

.btn-ghost.on-dark { color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost.on-dark:hover { background: #fff; color: var(--ink); }

/* =========================================================
   5. Шапка
   ========================================================= */

.site-head {
    position: relative;
    background: var(--head-bg);
    border-bottom: 1px solid var(--line);
    z-index: 3;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.15rem 0;
}

.brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand a { background-image: none; }
.brand-mark { display: inline-flex; flex: 0 0 auto; }
.brand-logo { display: block; width: auto; max-height: 52px; }
.brand-text { min-width: 0; }

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    max-width: 46ch;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-desc {
    display: block;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 52ch;
    margin-top: .2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .55rem .9rem;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    font-family: var(--font-head);
    font-size: .95rem;
    color: var(--ink);
    cursor: pointer;
}

.nav-toggle-bars { position: relative; width: 18px; height: 2px; background: var(--accent); display: inline-block; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--accent); }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; }
.main-nav li { margin: 0; }

.main-nav a {
    font-family: var(--font-head);
    font-size: 1rem;
    color: var(--ink);
    padding-bottom: 2px;
}

.main-nav a:hover { color: var(--accent); }
.main-nav .current-menu-item > a { color: var(--accent); background-size: 100% 1px; }

/* =========================================================
   6. Хлебные крошки
   ========================================================= */

.crumbs {
    font-size: .88rem;
    color: var(--muted);
    padding: 1.1rem 0 0;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs-sep { color: #a0aec0; margin: 0 .2rem; }

/* =========================================================
   7. Карточки записей
   ========================================================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(26, 32, 44, .04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(26, 32, 44, .09);
    border-color: var(--teal);
}

.card-thumb { display: block; width: 100%; }
.card-thumb a { display: block; background-image: none; }

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e6eef6 0%, #dbe7f1 100%);
    position: relative;
}

.card-thumb-empty::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    border: 2px solid rgba(43, 108, 176, .35);
    background: radial-gradient(circle at 56% 50%, rgba(56, 178, 172, .55) 0 6px, transparent 7px);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.15rem 1.25rem 1.35rem;
}

.card-title { font-size: 1.16rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); background-image: linear-gradient(var(--accent), var(--accent)); }
.card-title a:hover { color: var(--accent); }

.card-excerpt { color: #4a5568; font-size: .95rem; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt p:last-child { margin-bottom: 0; }

.card-foot { margin-top: auto; }

.post-meta { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--teal-dark); }
.post-meta-sep { margin: 0 .25rem; }

.card-link {
    font-family: var(--font-head);
    font-size: .92rem;
    color: var(--accent);
}

/* горизонтальные карточки в ленте */
.feed-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }

.feed-list .card { flex-direction: row; }

.feed-list .card-thumb {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    min-height: 190px;
}

.feed-list .card-thumb a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.feed-list .card-thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}

.feed-list .card-thumb-empty { height: 100%; aspect-ratio: auto; }

/* =========================================================
   8. Пагинация
   ========================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.4rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    background: #fff;
    background-image: none;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .95rem;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.pager .page-numbers:hover { border-color: var(--teal); color: var(--accent); transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; }

/* =========================================================
   9. Запись и страница
   ========================================================= */

.entry-head { margin-bottom: 1.6rem; }
.entry-title { margin-bottom: .6rem; }

.entry-thumb {
    margin: 0 0 1.8rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}

.entry-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.entry-content { font-size: 1.03rem; }
.entry-content img { border-radius: var(--radius); display: block; }
.entry-content h2 { margin-top: 1.9em; }
.entry-content h3 { margin-top: 1.5em; }

.entry-tags { margin-top: 2rem; font-size: .9rem; color: var(--muted); }
.entry-tags a { display: inline-block; margin-right: .4rem; }

.entry-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: .95rem;
}

.entry-nav span { display: block; font-family: var(--font-body); font-size: .8rem; color: var(--muted); }

.archive-head { margin-bottom: 2rem; }
.archive-title { margin-bottom: .4rem; }
.archive-desc { color: var(--muted); }

.no-posts {
    padding: 2rem 1.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* =========================================================
   10. Сайдбар и виджеты
   ========================================================= */

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--side-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.sidebar .widget-title {
    position: relative;
    padding-left: .9rem;
    font-size: 1.12rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .25em;
    width: 3px;
    height: 1em;
    background: var(--teal);
}

.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { margin-bottom: .75rem; padding-bottom: .75rem; border-bottom: 1px solid #dde5ee; line-height: 1.5; }
.sidebar .widget li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.sidebar .widget a { color: var(--ink); font-size: .96rem; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.sidebar .widget p { color: #2d3748; font-size: .95rem; }

/* =========================================================
   11. Поиск
   ========================================================= */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.search-form { display: flex; gap: .5rem; }

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid #cbd5e0;
    border-radius: var(--btn-radius);
    background: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink);
}

.search-form input[type="search"]:focus { outline: 2px solid rgba(43, 108, 176, .35); outline-offset: 1px; }

.search-form button {
    padding: .7rem 1.2rem;
    border: 0;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: .95rem;
    cursor: pointer;
    transition: background-color .22s ease, transform .22s ease;
}

.search-form button:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* =========================================================
   12. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 1rem 0 0 1.5rem; padding: 0; }

.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}

.comment-head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: baseline; margin-bottom: .5rem; }
.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-date { font-size: .82rem; color: var(--muted); }
.comment-hold { font-size: .88rem; color: var(--teal-dark); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: .6rem; font-size: .9rem; }

.comment-respond {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.7rem;
}

.comment-respond .comment-reply-title { font-size: 1.3rem; margin-bottom: .9rem; }
.comment-form label { display: block; font-size: .9rem; margin-bottom: .3rem; color: #2d3748; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid #cbd5e0;
    border-radius: var(--btn-radius);
    background: #fff;
    font-family: var(--font-body);
    font-size: .96rem;
    color: var(--ink);
}

.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form p { margin-bottom: 1rem; }

.comment-form .submit {
    padding: .75rem 1.6rem;
    border: 0;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: .98rem;
    cursor: pointer;
    transition: background-color .22s ease, transform .22s ease;
}

.comment-form .submit:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* =========================================================
   13. Главная
   ========================================================= */

.front { width: 85%; margin-left: auto; margin-right: auto; }

.fs { padding: 4rem 0; }
.fs-alt { background: var(--bg-alt); }
.fs-white { background: #ffffff; }

/* 13.1 Hero */
.fs-hero {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.fs-hero-media { position: absolute; inset: 0; }
.fs-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fs-hero-veil {
    position: absolute;
    inset: 0;
    background-color: rgba(20, 52, 88, .55);
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px),
        linear-gradient(100deg, rgba(11, 27, 48, .94) 0%, rgba(20, 52, 88, .84) 48%, rgba(20, 52, 88, .42) 100%);
}

.fs-hero-inner {
    position: relative;
    padding: 5rem 0 4.6rem;
    max-width: 640px;
}

.fs-hero-kicker {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 1rem;
}

.fs-hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: .9rem; }
.fs-hero p { color: #cbd8e6; font-size: 1.05rem; margin-bottom: 1.8rem; }
.fs-hero .btn { margin-right: .7rem; }

/* 13.2 Статистика */
.fs-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.fs-stat {
    min-width: 0;
    padding: .4rem 1.2rem;
    text-align: center;
    border-left: 1px solid var(--line);
}

.fs-stat:first-child { border-left: 0; }

.fs-stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.9rem;
    line-height: 1.1;
    color: var(--teal);
    margin-bottom: .35rem;
}

.fs-stat-label { display: block; font-size: .92rem; color: var(--muted); }

/* 13.3 Последние записи */
.fs-latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fs-latest-head .sec-title { margin-bottom: 0; }

/* 13.4 Шаги */
.fs-steps { list-style: none; margin: 0; padding: 0; max-width: 760px; }

.fs-step {
    position: relative;
    display: flex;
    gap: 1.3rem;
    padding: 0 0 2.1rem 0;
    margin: 0;
}

.fs-step:last-child { padding-bottom: 0; }

.fs-step::before {
    content: "";
    position: absolute;
    left: 26px;
    top: 56px;
    bottom: 6px;
    width: 0;
    border-left: 1px dashed #b6c6d6;
}

.fs-step:last-child::before { display: none; }

.fs-step-num {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 53px;
    height: 53px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 1.22rem;
    color: var(--accent);
}

.fs-step-body { min-width: 0; padding-top: .35rem; }
.fs-step-body h3 { margin-bottom: .35rem; font-size: 1.16rem; }
.fs-step-body p { margin: 0; color: #4a5568; font-size: .97rem; }

/* 13.5 Рубрикатор */
.fs-topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
}

.fs-topic {
    min-width: 0;
    display: block;
    padding: 1.6rem 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-image: none;
    color: var(--ink);
    transition: background-color .25s ease, border-color .25s ease, transform .25s ease, color .25s ease;
}

.fs-topic-ico { display: block; margin-bottom: .9rem; }
.fs-topic-ico svg { display: block; }
.fs-topic-ico svg path,
.fs-topic-ico svg circle,
.fs-topic-ico svg rect,
.fs-topic-ico svg line,
.fs-topic-ico svg polyline { transition: stroke .25s ease; }

.fs-topic-name { display: block; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .3rem; }
.fs-topic-note { display: block; font-size: .9rem; color: var(--muted); transition: color .25s ease; }

.fs-topic:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    transform: translateY(-3px);
}

.fs-topic:hover .fs-topic-note { color: rgba(255, 255, 255, .88); }
.fs-topic:hover .fs-topic-ico svg path,
.fs-topic:hover .fs-topic-ico svg circle,
.fs-topic:hover .fs-topic-ico svg rect,
.fs-topic:hover .fs-topic-ico svg line,
.fs-topic:hover .fs-topic-ico svg polyline { stroke: #fff; }

/* =========================================================
   14. Подвал
   ========================================================= */

.site-foot {
    background: var(--foot-bg);
    color: #cbd5e0;
    padding: 3rem 0 1.6rem;
    margin-top: 3rem;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.foot-col { min-width: 0; }

.site-foot .widget { margin-bottom: 1.4rem; color: #cbd5e0; }
.site-foot .widget:last-child { margin-bottom: 0; }

.site-foot .widget-title {
    position: relative;
    padding-left: .9rem;
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: .9rem;
}

.site-foot .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .25em;
    width: 3px;
    height: 1em;
    background: var(--teal);
}

.site-foot .widget p { color: #b6c2d1; font-size: .93rem; }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { margin-bottom: .55rem; line-height: 1.5; }
.site-foot .widget a { color: #d7e0ea; font-size: .95rem; }
.site-foot .widget a:hover { color: var(--teal); }
.site-foot .widget .post-date { display: block; font-size: .8rem; color: #8b98a8; }

.foot-bottom {
    margin-top: 2.2rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .86rem;
    color: #8b98a8;
    line-height: 1.6;
}

/* =========================================================
   15. Cookie-баннер
   ========================================================= */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1rem 1.6rem;
    background: rgba(26, 32, 44, .97);
    color: #e2e8f0;
    border-top: 2px solid var(--teal);
    font-size: .92rem;
}

.cookie-banner p { margin: 0; max-width: 70ch; }
.cookie-banner a { color: var(--teal); }

.cookie-accept {
    flex: 0 0 auto;
    padding: .6rem 1.4rem;
    border: 0;
    border-radius: var(--btn-radius);
    background: var(--teal);
    color: #10202e;
    font-family: var(--font-head);
    font-size: .93rem;
    cursor: pointer;
    transition: background-color .22s ease, transform .22s ease;
}

.cookie-accept:hover { background: #2fa19b; transform: translateY(-2px); }

/* =========================================================
   16. 404
   ========================================================= */

.err-wrap { width: 85%; margin-left: auto; margin-right: auto; text-align: center; padding: 2.4rem 0 1rem; }
.err-code { font-family: var(--font-head); font-size: 5.5rem; line-height: 1; color: var(--accent); margin-bottom: .6rem; }
.err-wrap .search-form { max-width: 460px; margin: 1.8rem auto; }
.err-links { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* =========================================================
   17. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    body { font-size: 16px; }
    h1 { font-size: 2.05rem; }
    .fs-hero h1 { font-size: 2.05rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single, .front, .err-wrap { width: 100%; }

    .scan-figure { display: none; }

    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .nav-toggle { display: inline-flex; }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        padding-top: .6rem;
    }

    .main-nav[data-open="true"] { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-top: 1px solid var(--line); }
    .main-nav a { display: block; padding: .75rem 0; }

    .head-inner { flex-wrap: wrap; }

    .fs-hero-inner { padding: 3.4rem 0; }
}

@media (max-width: 600px) {
    .fs { padding: 2.8rem 0; }
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .fs-topics { grid-template-columns: minmax(0, 1fr); }
    .foot-cols { grid-template-columns: minmax(0, 1fr); }

    .fs-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 0; }
    .fs-stat:nth-child(odd) { border-left: 0; }
    .fs-stat-num { font-size: 2.3rem; }

    .fs-hero-inner { padding: 2.8rem 0; }
    .fs-hero h1 { font-size: 1.8rem; }

    .feed-list .card { flex-direction: column; }
    .feed-list .card-thumb { flex: none; width: 100%; position: static; min-height: 0; }
    .feed-list .card-thumb a { position: static; }
    .feed-list .card-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .feed-list .card-thumb-empty { aspect-ratio: 16 / 9; height: auto; }

    .comment-list .children { margin-left: .75rem; }
    .rule-dot { width: 82%; }
    .err-code { font-size: 4rem; }
}
