/*
Theme Name: dds_naftaeco-water.ru
Theme URI: https://naftaeco-water.ru
Author: Игорь Савельев
Description: Независимый информационно-образовательный портал для инженеров-проектировщиков, содержащий технические разборы, методики фильтрации и учебные пособия по локальным очистным сооружениям. Тёмная технологичная тема с акцентом на читаемость технических материалов.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: naftaeco
*/

/* ============================================================
 * Переменные
 * ============================================================ */
:root {
    --c-bg:        #0F172A;
    --c-panel:     #1E293B;
    --c-panel-bd:  #334155;
    --c-accent:    #3B82F6;
    --c-hover:     #F97316;
    --c-text:      #E2E8F0;
    --c-text-2:    #94A3B8;
    --c-code:      #38BDF8;
    --c-warn:      #F59E0B;
    --c-border:    #2D3A4F;
    --c-footer-bg: #0B1120;
    --c-btn-bd:    #475569;
    --radius:      4px;
    --font-head:   'Inter', system-ui, sans-serif;
    --font-body:   'Cormorant Garamond', Georgia, serif;
    --font-mono:   'JetBrains Mono', ui-monospace, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color 0.18s ease;
}
a:hover,
a:focus { color: var(--c-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--c-text);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 600;
}

p {
    margin: 0 0 1em;
}

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

code, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--c-code);
    background: rgba(56, 189, 248, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: #0B1120;
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    overflow-x: auto;
    line-height: 1.55;
}
pre code {
    background: none;
    padding: 0;
    color: inherit;
}

blockquote {
    margin: 1.4em 0;
    padding: 0.8em 1.2em;
    border-left: 3px solid var(--c-accent);
    background: rgba(59, 130, 246, 0.06);
    color: var(--c-text);
    font-style: italic;
}

hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    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: -999px;
    top: 0;
    background: var(--c-accent);
    color: #fff;
    padding: 0.6em 1em;
    z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ============================================================
 * Контейнер ширины — задаётся в ОДНОМ месте
 * ============================================================ */
.shell {
    width: min(90%, 1180px);
    margin-inline: auto;
}

/* ============================================================
 * Кнопки
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.62em 1.25em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
    background: rgba(59, 130, 246, 0.16);
    border-color: var(--c-accent);
    color: var(--c-text);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--c-hover);
    border-color: var(--c-hover);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
}

.btn-secondary {
    background: transparent;
    border-color: var(--c-btn-bd);
    color: var(--c-accent);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(59, 130, 246, 0.10);
    color: var(--c-text);
}

.btn-ico {
    width: 14px;
    height: 14px;
    display: inline-block;
    background:
        radial-gradient(circle at center, transparent 2.5px, currentColor 2.6px, currentColor 4px, transparent 4.1px),
        conic-gradient(currentColor 0 100%);
    -webkit-mask:
        radial-gradient(circle at center, #000 5.5px, transparent 5.6px),
        radial-gradient(circle at center, transparent 2.4px, #000 2.5px);
    mask:
        radial-gradient(circle at center, #000 5.5px, transparent 5.6px),
        radial-gradient(circle at center, transparent 2.4px, #000 2.5px);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    flex: 0 0 auto;
}

/* ============================================================
 * Шапка
 * ============================================================ */
.site-header {
    background: var(--c-panel);
    border-bottom: 1px solid var(--c-border);
}
.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1.1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}
.brand-logo-link {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}
.brand-logo {
    width: 54px;
    height: 54px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--c-text);
}
.brand-name:hover,
.brand-name:focus { color: var(--c-accent); }
.brand-desc {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--c-text-2);
}

/* Бургер */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--c-btn-bd);
    border-radius: var(--radius);
    cursor: pointer;
    flex: 0 0 auto;
}
.nav-toggle-bar {
    display: block;
    height: 2px;
    background: var(--c-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Меню */
.primary-nav { flex-basis: 100%; }
.primary-nav[class] { /* mobile-first: скрыто, раскрывается классом */ }
.primary-nav:not(.is-open) { display: none; }

.nav-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.nav-list li { min-width: 0; }
.nav-list a {
    display: block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    color: var(--c-text);
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius);
}
.nav-list a:hover,
.nav-list a:focus,
.nav-list .current-menu-item > a {
    background: rgba(59, 130, 246, 0.12);
    color: var(--c-accent);
}
.nav-list .sub-menu {
    list-style: none;
    margin: 0.2rem 0 0 0.6rem;
    padding: 0;
}

@media (min-width: 961px) {
    .nav-toggle { display: none; }
    .primary-nav { flex-basis: auto; }
    .primary-nav:not(.is-open) { display: block; }
    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 0;
        gap: 0.25rem;
    }
    .nav-list .sub-menu {
        margin: 0;
        position: absolute;
        background: var(--c-panel);
        border: 1px solid var(--c-border);
        border-radius: var(--radius);
        min-width: 200px;
        padding: 0.3rem;
        display: none;
        z-index: 30;
    }
    .nav-list .menu-item-has-children { position: relative; }
    .nav-list .menu-item-has-children:hover > .sub-menu,
    .nav-list .menu-item-has-children:focus-within > .sub-menu { display: block; }
}

/* ============================================================
 * Основной контент
 * ============================================================ */
.site-main {
    display: block;
    padding: 2.2rem 0 3.5rem;
}

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

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

@media (max-width: 960px) {
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 2.5rem; }
}

/* ============================================================
 * Хлебные крошки
 * ============================================================ */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--c-text-2);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}
.breadcrumbs a { color: var(--c-accent); }
.breadcrumbs a:hover { color: var(--c-hover); }
.breadcrumbs .sep { color: var(--c-text-2); margin: 0 0.15rem; }
.breadcrumbs span:last-child { color: var(--c-text); }

/* ============================================================
 * Заголовки архивов / страниц
 * ============================================================ */
.archive-header,
.page-header { margin-bottom: 1.8rem; }
.archive-title,
.page-title {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
}
.archive-title span { color: var(--c-accent); }
.archive-desc {
    color: var(--c-text-2);
    font-size: 1.05rem;
}

/* ============================================================
 * Карточки записей (A8, A10)
 * ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}
.card-thumb-link {
    display: block;
    line-height: 0;
}
.card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1E293B, #0F172A);
}
.card-thumb-placeholder svg {
    width: 64px;
    height: 64px;
    display: block;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.3rem;
    min-width: 0;
}

.card-cat {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-code);
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.18em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.6rem;
}

.card-title {
    font-size: 1.18rem;
    margin-bottom: 0.5rem;
}
.card-title a { color: var(--c-text); }
.card-title a:hover,
.card-title a:focus { color: var(--c-accent); }

.card-excerpt {
    color: var(--c-text-2);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }

.card-meta {
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: var(--c-text-2);
    margin-top: auto;
    padding-top: 0.6rem;
}
.card-link {
    align-self: flex-start;
    margin-top: 0.9rem;
}

/* Горизонтальная лента «Инженерный дашборд» */
.dash-scroll {
    display: flex;
    gap: 1.4rem;
    overflow-x: auto;
    padding-bottom: 0.8rem;
    scroll-snap-type: x proximity;
    cursor: grab;
}
.dash-scroll.is-dragging { cursor: grabbing; }
.dash-scroll .card {
    flex: 0 0 320px;
    max-width: 320px;
    scroll-snap-align: start;
}
.dash-scroll::-webkit-scrollbar { height: 8px; }
.dash-scroll::-webkit-scrollbar-track { background: var(--c-panel); border-radius: 4px; }
.dash-scroll::-webkit-scrollbar-thumb { background: var(--c-panel-bd); border-radius: 4px; }

@media (max-width: 600px) {
    .dash-scroll .card {
        flex-basis: 82%;
        max-width: 82%;
    }
}

/* ============================================================
 * Главная страница
 * ============================================================ */
.home { padding-bottom: 1rem; }
.home-section {
    margin-bottom: 3.4rem;
}
.section-kicker {
    font-family: var(--font-head);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-code);
    margin-bottom: 0.6rem;
}
.section-title {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}
.home-hero .section-title { font-size: 2.4rem; }
.section-lead {
    color: var(--c-text-2);
    font-size: 1.1rem;
    max-width: 760px;
    margin-bottom: 1.6rem;
}

.feature-grid,
.norms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}
.feature,
.norm-card {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.5rem;
    min-width: 0;
}
.feature h3,
.norm-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}
.feature p,
.norm-card p {
    color: var(--c-text-2);
    font-size: 1rem;
    margin: 0;
}
.feature-tag {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-accent);
    border-bottom: 2px dashed var(--c-accent);
    padding-bottom: 2px;
    margin-bottom: 0.7rem;
}

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
    counter-reset: none;
}
.step {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.3rem 1.3rem 1.4rem;
    min-width: 0;
}
.step-num {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--c-accent);
    display: block;
    margin-bottom: 0.5rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.step p { color: var(--c-text-2); font-size: 0.98rem; margin: 0; }

.contact-static {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-left: 3px solid var(--c-accent);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
}
.contact-static p { margin: 0 0 0.6rem; color: var(--c-text); }
.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    font-family: var(--font-head);
}

.empty-note,
.empty-state {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.6rem;
    color: var(--c-text-2);
}
.empty-state .search-form { margin-top: 1rem; }

/* ============================================================
 * Одиночная запись / страница
 * ============================================================ */
.post-single,
.page-single {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.8rem 1.9rem 2rem;
    min-width: 0;
}
.post-header { margin-bottom: 1.4rem; }
.post-cat {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-code);
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.18em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.7rem;
}
.post-title { font-size: 2rem; margin-bottom: 0.5rem; }
.post-meta {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--c-text-2);
}
.meta-sep { margin: 0 0.4rem; }

/* Чипы «Параметры среды» */
.param-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}
.chip {
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--c-text);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--c-panel-bd);
    border-radius: 3px;
    padding: 0.22em 0.7em;
}
.chip:hover,
.chip:focus {
    background: var(--c-hover);
    border-color: var(--c-hover);
    color: #fff;
}

.post-thumb {
    margin: 0 0 1.6rem;
}
.post-thumb img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

.entry-content {
    font-size: 1.1rem;
}
.entry-content h2 { font-size: 1.55rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.28rem; margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); display: block; }
.entry-content a { text-decoration: underline; }
.entry-content ul,
.entry-content ol { margin-bottom: 1.2em; }
.entry-content li { margin-bottom: 0.35em; }

.page-links {
    font-family: var(--font-head);
    font-size: 0.9rem;
    margin-top: 1.4rem;
}

/* Таблицы */
.entry-content table,
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.98rem;
}
.entry-content th,
.entry-content td,
table th,
table td {
    border: 1px solid var(--c-border);
    padding: 0.6em 0.8em;
    text-align: left;
}
.entry-content th,
table th {
    background: rgba(59, 130, 246, 0.10);
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--c-text);
}

/* ============================================================
 * Комментарии
 * ============================================================ */
.comments-area {
    margin-top: 2.2rem;
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem 1.9rem;
}
.comments-title,
.comment-reply-title {
    font-size: 1.35rem;
    margin-bottom: 1.2rem;
}
.comment-list {
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 1px solid var(--c-border);
}
.comment-item { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}
.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--c-text);
}
.comment-date { font-size: 0.8rem; color: var(--c-text-2); }
.comment-content { color: var(--c-text); }
.comment-content p:last-child { margin-bottom: 0; }
.comment-pending { color: var(--c-warn); font-size: 0.9rem; }
.comment-reply { margin-top: 0.5rem; }
.comment-reply a {
    font-family: var(--font-head);
    font-size: 0.85rem;
}
.comments-closed { color: var(--c-text-2); }

/* Поля формы комментариев */
.comment-form p { margin-bottom: 1rem; }
.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
    color: var(--c-text);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6em 0.8em;
}
.comment-form textarea { min-height: 130px; }
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--c-accent);
}
.comment-form .form-submit { margin-bottom: 0; }
.comment-notes,
.comment-form-cookies-consent label {
    font-size: 0.85rem;
    color: var(--c-text-2);
}

/* ============================================================
 * Форма поиска
 * ============================================================ */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.search-label {
    flex: 1 1 200px;
    min-width: 0;
}
.search-field {
    width: 100%;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6em 0.85em;
}
.search-field:focus {
    outline: none;
    border-color: var(--c-accent);
}
.search-submit { flex: 0 0 auto; }

/* ============================================================
 * Пагинация
 * ============================================================ */
.pagination {
    margin-top: 2.2rem;
}
.pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.4em 0.7em;
    font-family: var(--font-head);
    font-size: 0.9rem;
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    color: var(--c-text);
    background: var(--c-panel);
}
.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--c-accent);
    color: var(--c-accent);
}
.pagination .page-numbers.current {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

.comment-nav {
    margin-top: 1.4rem;
    font-family: var(--font-head);
    font-size: 0.9rem;
}
.comment-nav .page-numbers {
    padding: 0.3em 0.6em;
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    margin-right: 0.3rem;
}

/* ============================================================
 * Боковая панель — светлый текст на тёмной панели
 * ============================================================ */
.sidebar {
    min-width: 0;
}
.sidebar .widget {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--c-text);
}
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--c-text);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--c-border);
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li {
    color: var(--c-text);
}
.sidebar .widget a { color: var(--c-accent); }
.sidebar .widget a:hover,
.sidebar .widget a:focus { color: var(--c-hover); }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--c-border);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget_recent_entries .post-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--c-text-2);
    margin-top: 0.2rem;
}

/* ============================================================
 * Подвал — светлый текст на тёмном фоне
 * ============================================================ */
.site-footer {
    background: var(--c-footer-bg);
    border-top: 1px solid var(--c-border);
    color: var(--c-text-2);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2.2rem;
}
.footer-col { min-width: 0; }

.site-footer .widget {
    margin-bottom: 0;
    color: var(--c-text-2);
}
.site-footer .widget-title {
    font-size: 1.05rem;
    color: var(--c-text);
    margin-bottom: 0.8rem;
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li {
    color: var(--c-text-2);
    font-size: 1rem;
}
.site-footer .widget a { color: var(--c-accent); }
.site-footer .widget a:hover,
.site-footer .widget a:focus { color: var(--c-hover); }
.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer .widget li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--c-border);
}
.site-footer .widget li:last-child { border-bottom: 0; }
.site-footer .widget_recent_entries .post-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--c-text-2);
}

.footer-bottom {
    border-top: 1px solid var(--c-border);
    padding: 1.1rem 0;
}
.copyright {
    margin: 0;
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--c-text-2);
    line-height: 1.6;
}

/* ============================================================
 * Cookie-баннер — правило [hidden] ДО основных стилей (A11)
 * ============================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    background: var(--c-panel);
    border-top: 1px solid var(--c-panel-bd);
    padding: 1rem clamp(1rem, 4vw, 2.4rem);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}
.cookie-text {
    margin: 0;
    flex: 1 1 300px;
    min-width: 0;
    font-size: 0.95rem;
    color: var(--c-text);
}
.cookie-accept { flex: 0 0 auto; }

/* ============================================================
 * 404
 * ============================================================ */
.error-404 {
    background: var(--c-panel);
    border: 1px solid var(--c-panel-bd);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    text-align: center;
}
.error-code {
    font-family: var(--font-mono);
    font-size: 4rem;
    color: var(--c-accent);
    margin: 0;
    line-height: 1;
}
.error-title { font-size: 1.7rem; margin: 0.6rem 0; }
.error-text {
    color: var(--c-text-2);
    max-width: 520px;
    margin: 0 auto 1.4rem;
}
.error-404 .search-form {
    max-width: 460px;
    margin: 0 auto 1.4rem;
    justify-content: center;
}
.error-home { margin: 0; }

/* ============================================================
 * Адаптив
 * ============================================================ */
@media (max-width: 600px) {
    body { font-size: 18px; }
    .home-hero .section-title { font-size: 1.85rem; }
    .section-title { font-size: 1.6rem; }
    .post-title,
    .archive-title,
    .page-title { font-size: 1.55rem; }
    .post-single,
    .page-single,
    .comments-area { padding: 1.3rem 1.2rem 1.5rem; }
    .card-thumb-wrap { position: static; }
    .card-thumb-link { position: static; }
}
