/*
Theme Name: dds_remont-p.ru
Theme URI: https://remont-p.ru/
Author: Алексей Громов
Description: Тема для информационно-образовательного портала о ремонте, отделке и строительных профессиях. Хвойно-изумрудная палитра, скандинавская сдержанность и «лесные» детали.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: remontp
*/

:root {
    --bg: #F4F7F2;
    --bg-alt: #E4EDE2;
    --bg-alt-deep: #DCE8DA;
    --head: #1F3D2B;
    --foot: #162B1E;
    --side: #EDF3EA;
    --ink: #1C2A20;
    --accent: #3E8E5A;
    --accent-dark: #387F51;
    --gold: #C9A227;
    --muted: #6B7F6E;
    --line: #D9E6D6;
    --white: #FFFFFF;
    --radius: 12px;
    --radius-btn: 8px;
    --shadow: 0 4px 12px rgba(31, 61, 43, 0.08);
    --shadow-hover: 0 8px 24px rgba(31, 61, 43, 0.12);
    --f-head: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Скрытые элементы (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.68;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 230'%3E%3Cpath d='M100 4 196 59v112l-96 55-96-55V59Z' fill='%233E8E5A' fill-opacity='0.05'/%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, #D9E6D6 0, #D9E6D6 1px, transparent 1px, transparent 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -70px bottom -60px, 0 0;
    background-size: 340px auto, auto;
    background-attachment: fixed, scroll;
}

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

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: var(--head);
    line-height: 1.22;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    overflow-wrap: break-word;
    hyphens: auto;
}
h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.1rem; }

/* Изумрудная точка перед H2/H3 */
h2:not(.section-title):not(.remarks-title)::before,
h3::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 0.55em;
    vertical-align: 0.22em;
}

p, li, dd, td, th, blockquote, .card-title, .brand-name, .brand-desc {
    overflow-wrap: break-word;
    hyphens: auto;
}

a { color: var(--accent); text-decoration: none; }

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a,
.archive-desc a,
.card-excerpt a,
.crumbs a,
.widget a,
.remarks a,
.comment-notes a,
.notfound p a:not(.btn),
.empty-box a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.25s ease, color 0.2s ease;
    padding-bottom: 1px;
}
.entry-content a:hover,
.archive-desc a:hover,
.card-excerpt a:hover,
.crumbs a:hover,
.widget a:hover,
.remarks a:hover,
.notfound p a:not(.btn):hover,
.empty-box a:hover {
    background-size: 100% 2px;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

table { width: 100%; border-collapse: collapse; margin: 1.4em 0; border: 1px solid #C8D8C4; }
th, td { border: 1px solid #C8D8C4; padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-family: var(--f-head); font-weight: 700; color: var(--head); }

blockquote {
    margin: 1.6em 0;
    padding: 1.2em 1.5em;
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p:last-child { margin-bottom: 0; }

pre { overflow-x: auto; background: #1C2A20; color: #E4EDE2; padding: 1em 1.2em; border-radius: 8px; }
code { font-size: 0.92em; }

hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    background: var(--gold);
    color: var(--ink);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}
.skip-link:focus { top: 0.6rem; }

/* ---------- Контейнер ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell--front { width: min(85%, 1240px); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.8em 1.5em;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
    text-align: center;
    color: var(--white);
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover {
    transform: translateY(-2px);
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 6px 16px rgba(62, 142, 90, 0.2);
    color: var(--white);
}
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: rgba(62, 142, 90, 0.1); color: var(--accent-dark); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); color: var(--white); }

/* ---------- Брендовая полоса и шапка ---------- */
.brand-stripe { display: flex; height: 4px; }
.brand-stripe span { flex: 1; }
.brand-stripe span:nth-child(1) { background: #3E8E5A; }
.brand-stripe span:nth-child(2) { background: #C9A227; }
.brand-stripe span:nth-child(3) { background: #1F3D2B; }

.masthead { background: var(--head); color: #E4EDE2; }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.9rem; color: var(--white); min-width: 0; flex: 1 1 420px; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo { display: block; width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--white);
}
.brand-desc { font-size: 0.8rem; line-height: 1.4; color: #A9C2AE; margin-top: 0.25rem; max-width: 62ch; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-btn);
    padding: 0.5rem 0.9rem;
    font: 600 0.92rem var(--f-head);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: transform 0.2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.site-nav-list li { position: relative; }
.site-nav-list a {
    display: block;
    padding: 0.5rem 0.9rem;
    color: #E4EDE2;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.97rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.site-nav-list a:hover,
.site-nav-list .current-menu-item > a { background: rgba(62, 142, 90, 0.35); color: var(--white); }
.site-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--head);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    display: none;
    z-index: 20;
}
.site-nav-list li:hover > .sub-menu,
.site-nav-list li:focus-within > .sub-menu { display: block; }

/* ---------- Хлебные крошки ---------- */
.crumbs { font-size: 0.9rem; color: var(--muted); padding: 1.4rem 0 0.4rem; }
.crumbs-sep { margin: 0 0.35rem; color: var(--gold); }
.crumbs span:last-child { color: var(--ink); }

/* ---------- Раскладки ---------- */
.page-wrap { padding-bottom: 4rem; }
.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; }

.page-head { margin-bottom: 1.8rem; }
.page-title { font-size: 2.4rem; margin: 0.8rem 0 0.4rem; }
.archive-desc, .page-intro { color: var(--muted); }

/* ---------- Карточки записей ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.card-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 2;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card:hover::before { transform: scaleX(1); }

.card-thumb { overflow: hidden; background: var(--bg-alt); }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.55rem;
}
.card-cat {
    color: #6E5A12;
    background: rgba(201, 162, 39, 0.16);
    padding: 0.1rem 0.55rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}
.card-title { font-size: 1.18rem; margin: 0 0 0.6rem; line-height: 1.3; }
.card-title a { color: var(--head); transition: color 0.2s ease; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: #3D4F41; font-size: 0.96rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: 0.6rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.92rem;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.25s ease;
}
.card-more:hover { background-size: 100% 2px; }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 2.6rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.85rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--ink);
    font-family: var(--f-head);
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--white); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.3rem; }

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
    background: var(--side);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    margin-top: 0.8rem;
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 2rem; }
.sidebar .widget-title { margin: 0 0 0.9rem; font-size: 1.12rem; color: var(--head); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.82rem; }
.sidebar .widget p { color: var(--ink); }

/* ---------- Поиск ---------- */
.search-box { display: flex; gap: 0.5rem; max-width: 520px; margin: 1.2rem 0; }
.search-label { flex: 1; min-width: 0; }
.search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
}
.search-field:focus { outline: none; border-color: var(--accent); }
.search-submit { flex: 0 0 auto; }

/* ---------- Запись и страница ---------- */
.entry-head { margin-bottom: 1.4rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; color: var(--muted); font-size: 0.9rem; }
.entry-thumb { margin: 0 0 1.8rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.06rem; }
.entry-content img { border-radius: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content li::marker { color: var(--accent); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.4em; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.entry-tags a {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: var(--bg-alt);
    color: var(--head);
    font-size: 0.88rem;
    font-weight: 600;
}
.entry-tags a:hover { background: var(--accent); color: var(--white); }

.empty-note { color: var(--muted); font-size: 1.05rem; }
.empty-box { background: var(--white); border-radius: var(--radius); padding: 1.8rem 2rem; box-shadow: var(--shadow); }

/* ---------- Комментарии ---------- */
.remarks { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.remarks-title { font-size: 1.5rem; margin-top: 0; }
.remark-list, .remark-list .children { list-style: none; margin: 0; padding: 0; }
.remark-list .children { padding-left: 1.6rem; border-left: 2px solid var(--line); margin-top: 1rem; }
.remark { margin-bottom: 1.2rem; }
.remark-body { background: var(--white); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.remark-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.remark-head img { border-radius: 50%; display: block; }
.remark-who { display: flex; flex-direction: column; }
.remark-author { font-family: var(--f-head); font-weight: 700; color: var(--head); }
.remark-date { font-size: 0.82rem; color: var(--muted); }
.remark-wait { color: #6E5A12; font-size: 0.9rem; }
.remark-reply { margin-top: 0.4rem; font-size: 0.9rem; font-weight: 600; }
.comment-respond { margin-top: 2rem; background: var(--side); border-radius: var(--radius); padding: 1.6rem 1.6rem 1.2rem; }
.comment-reply-title { margin-top: 0; }
.comment-form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font: inherit;
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--ink);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    padding: 0.8em 1.5em;
    font: 700 0.98rem var(--f-head);
    color: var(--white);
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.comment-form .submit:hover { transform: translateY(-2px); background: var(--accent-dark); box-shadow: 0 6px 16px rgba(62, 142, 90, 0.2); }

/* ---------- 404 ---------- */
.notfound { padding: 2rem 0 1rem; }
.notfound-code {
    display: block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 6rem;
    line-height: 1;
    color: var(--gold);
}
.notfound-home { margin-top: 1.6rem; }

/* ---------- Главная: секции ---------- */
.front-section { padding: 5.5rem 0; }
.front-section--alt {
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg, rgba(217, 230, 214, 0.55) 0, rgba(217, 230, 214, 0.55) 1px, transparent 1px, transparent 24px);
}
.front-section--accent {
    background-color: var(--bg-alt);
    background-image:
        repeating-linear-gradient(45deg, rgba(201, 218, 197, 0.45) 0, rgba(201, 218, 197, 0.45) 1px, transparent 1px, transparent 24px),
        radial-gradient(ellipse at center, #E4EDE2 0%, #DCE8DA 100%);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: var(--head);
}
.section-title::before {
    content: "";
    flex: 0 0 40px;
    height: 3px;
    background: var(--accent);
}
.section-lead { max-width: 64ch; color: var(--muted); font-size: 1.08rem; margin-bottom: 2.6rem; }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: var(--white);
    background: var(--head);
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-veil { position: absolute; inset: 0; background: rgba(31, 61, 43, 0.7); }
.hero-hex {
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 230px;
    height: auto;
    opacity: 0.7;
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 6rem 0; }
.hero-title {
    font-size: 3.2rem;
    line-height: 1.12;
    font-weight: 800;
    color: var(--white);
    max-width: 18ch;
    margin: 0 0 1.2rem;
}
.hero-lead { max-width: 58ch; font-size: 1.15rem; color: #DCE8DA; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Шаги */
.steps {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2.4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    max-width: 860px;
}
.steps::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--accent);
}
.step {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem 1.8rem 1.4rem 5.2rem;
    min-width: 0;
}
.step::before {
    content: "";
    position: absolute;
    left: -2.25rem;
    top: 2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 3px solid var(--accent);
}
.step-num {
    position: absolute;
    left: 1.5rem;
    top: 1rem;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--gold);
}
.step-title { margin: 0 0 0.45rem; font-size: 1.25rem; }
.step p { margin: 0; color: #3D4F41; }

/* Последние записи */
.latest-more { margin-top: 2.4rem; text-align: center; }

/* Статистика */
.stats {
    list-style: none;
    margin: 2.2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.6rem 1.2rem;
    min-width: 0;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 3.4rem;
    line-height: 1.05;
    color: var(--accent);
}
.stat-label { margin-top: 0.5rem; color: var(--muted); font-size: 0.98rem; max-width: 18ch; }

/* Карта тем */
.topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.topic {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 1.7rem 1.6rem 1.6rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: var(--ink);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.topic::before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--ink); }
.topic:hover::before { transform: scaleX(1); }
.topic svg {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 0.6rem;
}
.topic-name { font-family: var(--f-head); font-weight: 700; font-size: 1.18rem; color: var(--head); }
.topic-note { font-size: 0.92rem; color: var(--muted); }

/* ---------- Подвал ---------- */
.basement {
    background: var(--foot);
    color: #C3D3C6;
    margin-top: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 230'%3E%3Cpath d='M100 4 196 59v112l-96 55-96-55V59Z' fill='none' stroke='%233E8E5A' stroke-opacity='0.18' stroke-width='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 3% bottom 30px;
    background-size: 160px auto;
}
.basement-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
    padding: 3.6rem 0 2.8rem;
}
.basement-col { min-width: 0; }
.basement .widget + .widget { margin-top: 1.6rem; }
.basement .widget-title { color: var(--white); font-size: 1.1rem; margin: 0 0 0.9rem; }
.basement .widget, .basement .widget p, .basement .widget .textwidget { color: #C3D3C6; font-size: 0.95rem; }
.basement .widget ul { list-style: none; margin: 0; padding: 0; }
.basement .widget li { padding: 0.3rem 0; }
.basement .widget a { color: #E4EDE2; }
.basement .widget a:hover { color: var(--gold); }
.basement .widget .post-date { color: #8FA593; display: block; font-size: 0.82rem; }
.basement-bottom { border-top: 1px solid rgba(217, 230, 214, 0.14); padding: 1.2rem 0; }
.basement-bottom p { margin: 0; font-size: 0.88rem; color: #8FA593; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.1rem 1.4rem;
    background: var(--head);
    color: #E4EDE2;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(22, 43, 30, 0.35);
    border-top: 3px solid var(--gold);
}
.cookie-text { margin: 0; font-size: 0.93rem; line-height: 1.5; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; padding: 0.4rem 0 0.6rem; }
    .site-nav-list .sub-menu { position: static; display: block; box-shadow: none; padding-left: 1rem; background: transparent; }
    .brand { flex: 1 1 0; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single { width: 100%; }
    .layout-single .card-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .stat:nth-child(3) { border-left: 0; }

    .hero-title { font-size: 2.6rem; }
    .basement-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell--front { width: min(92%, 1240px); }
    .brand-desc { display: none; }
    .brand-logo { width: 42px; height: 42px; }

    .page-title { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
    .front-section { padding: 3.6rem 0; }

    .hero { min-height: 480px; }
    .hero-inner { padding: 4rem 0; }
    .hero-title { font-size: 2.05rem; }
    .hero-lead { font-size: 1.02rem; }
    .hero-hex { width: 140px; }

    .card-grid,
    .card-grid--list,
    .layout-single .card-grid--list { grid-template-columns: minmax(0, 1fr); }
    .card-body { padding: 1.2rem 1.2rem 1.3rem; }

    .steps { padding-left: 1.8rem; }
    .steps::before { left: 0.35rem; }
    .step { padding: 4.2rem 1.3rem 1.3rem 1.3rem; }
    .step::before { left: -1.75rem; }
    .step-num { left: 1.3rem; top: 1rem; }

    .stats { grid-template-columns: minmax(0, 1fr); }
    .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-top: 1.6rem; }
    .stat-num { font-size: 2.8rem; }

    .topics { grid-template-columns: minmax(0, 1fr); }
    .topic { padding: 1.4rem 1.3rem; }

    .sidebar { padding: 1.4rem 1.2rem; }
    .empty-box { padding: 1.4rem 1.2rem; }
    .comment-respond { padding: 1.3rem 1.1rem 1rem; }
    .remark-body { padding: 1rem 1.1rem; }

    .basement-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .search-box { flex-direction: column; }
}
