/*
Theme Name: dds_greenson.ru
Theme URI: https://greenson.ru/
Author: Дмитрий Колесников
Author URI: https://greenson.ru/
Description: Образовательно-аналитический портал по промышленной экологии и безопасной бытовой химии. Тема в индустриально-лабораторной эстетике для технологов, экологов и осознанных производителей.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dds_greenson
*/

/* ============================================
   ПЕРЕМЕННЫЕ И БАЗА
   ============================================ */
:root {
    --paper:        #F7F6F2;
    --paper-2:      #EFF2F0;
    --paper-line:   #D1DDD6;
    --hairline:     #C6D3CD;
    --ink:          #1E262A;
    --ink-2:        #4A565C;
    --aqua:         #2A6F6F;
    --aqua-dark:    #1F5252;
    --aqua-soft:    #9BB8B8;
    --olive:        #6F7E4A;
    --olive-soft:   #F0F3EA;
    --terracotta:   #C26A4A;
    --footer-bg:    #1C2528;
    --footer-ink:   #D8DEDC;
    --footer-mute:  #8FA09E;

    --font-display: 'Manrope', 'Montserrat', 'Helvetica Neue', sans-serif;
    --font-body:    'Spectral', 'Merriweather', Georgia, serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

/* Контейнер ширины — в одном месте (правило A12.7) */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ============================================
   ГЛОБАЛЬНЫЙ СБРОС И ТИПОГРАФИКА
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    /* «зернистость лабораторной бумаги» */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(30, 38, 42, 0.04) 1px, transparent 0),
        repeating-linear-gradient(0deg, rgba(198, 211, 205, 0.06) 0 1px, transparent 1px 24px);
    background-size: 3px 3px, auto;
    overflow-x: hidden; /* правило A12.5 — страховка */
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--aqua); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--aqua-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.25;
    margin: 1.6em 0 0.5em;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 600; color: var(--aqua); }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

/* p без background-color (требование F) */
p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: 0.9em 1.2em 0.9em 1.5em;
    border-left: 4px solid var(--terracotta);
    background: #FBF4F0;
    font-style: italic;
    position: relative;
}
blockquote::before {
    content: '⚗';
    position: absolute;
    left: -14px;
    top: 0.7em;
    width: 24px;
    height: 24px;
    background: var(--paper);
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-style: normal;
}

code, pre, kbd {
    font-family: var(--font-mono);
    font-size: 0.92em;
}
code {
    background: var(--paper-2);
    border: 1px solid var(--hairline);
    padding: 0.05em 0.4em;
    border-radius: 3px;
}
pre {
    background: var(--paper-2);
    border: 1px solid var(--hairline);
    padding: 1em 1.2em;
    border-radius: 6px;
    overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--hairline);
    margin: 1.4em 0;
}
th, td {
    border: 1px solid var(--hairline);
    padding: 0.55em 0.8em;
    text-align: left;
    vertical-align: top;
}
th {
    background: var(--paper-2);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.93em;
}

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

::selection { background: var(--aqua); color: #fff; }

/* ============================================
   ХИМИЧЕСКАЯ ШАПКА — pH-индикатор
   ============================================ */
.ph-indicator {
    height: 4px;
    width: 100%;
    background: linear-gradient(to right,
        #C26A4A 0%,
        #D89464 20%,
        #E8C26A 40%,
        #B8C770 60%,
        #6F7E4A 80%,
        #2A6F6F 100%);
    position: relative;
}
.ph-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    width: 6px;
    height: 4px;
    background: var(--ink);
    left: var(--ph-pos, 65%);
    transition: left 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   ШАПКА САЙТА
   ============================================ */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 1.4em 0 1em;
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1.6em;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9em;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: block;
}

.brand-text { min-width: 0; }

.brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.3;
    margin: 0 0 0.15em;
    max-width: 56ch;
}
.brand-title a { color: inherit; }
.brand-title a:hover { color: var(--aqua); text-decoration: none; }

.brand-desc {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--ink-2);
    line-height: 1.45;
    max-width: 70ch;
    margin: 0;
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 0.5em 0.8em;
    font: 600 0.85rem / 1 var(--font-display);
    color: var(--ink);
    cursor: pointer;
    align-items: center;
    gap: 0.5em;
}
.nav-toggle:hover { border-color: var(--aqua); color: var(--aqua); }
.nav-toggle .bars {
    width: 18px;
    height: 12px;
    display: inline-block;
    position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after,
.nav-toggle .bars span {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: currentColor;
}
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars span    { top: 5px; }
.nav-toggle .bars::after  { bottom: 0; }

.primary-nav { flex: 0 0 auto; }

.primary-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.4em;
    flex-wrap: wrap;
}

.primary-nav a {
    display: inline-block;
    padding: 0.55em 0.95em;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--ink);
    border-radius: 6px;
    border-bottom: 2px solid transparent;
}
.primary-nav a:hover {
    color: var(--aqua);
    background: var(--olive-soft);
    text-decoration: none;
}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    color: var(--aqua);
    border-bottom-color: var(--aqua);
}

/* ============================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================ */
.breadcrumbs {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-2);
    margin: 1.5em 0 1em;
    padding-bottom: 0.6em;
    border-bottom: 1px dashed var(--hairline);
}
.breadcrumbs a { color: var(--aqua); }
.breadcrumbs .sep {
    color: var(--olive);
    margin: 0 0.35em;
    font-weight: 600;
}

/* ============================================
   ОСНОВНОЙ МАКЕТ
   ============================================ */
.site-main { padding: 1.5em 0 3em; }

/* Single-column (front-page и страницы без сайдбара) — display: block (правило A12.3) */
.layout-wide {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* Двухколоночная раскладка с сайдбаром */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3em;
    align-items: start;
}

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2.2em;
    }
    .layout-wide { width: 100%; }
}

.main-content { min-width: 0; } /* правило A12.6 */

/* ============================================
   КАРТОЧКИ ЗАПИСЕЙ — горизонтальные, правило A10
   ============================================ */
.card-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6em;
    margin: 1.5em 0;
}

.card {
    display: flex;                  /* правило A8 */
    flex-direction: row;
    background: var(--paper-2);
    border: 1px solid var(--paper-line);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    position: relative;
    /* псевдо-лабораторная сетка — едва заметная линовка */
    background-image: repeating-linear-gradient(0deg,
        rgba(42, 111, 111, 0.025) 0 1px,
        transparent 1px 8px);
}
.card:hover {
    border-color: var(--aqua-soft);
    box-shadow: 0 6px 24px -12px rgba(30, 38, 42, 0.18);
    transform: translateY(-1px);
}

/* Миниатюра — горизонтальная, position: absolute (правило A10) */
.card-thumb-wrap {
    flex: 0 0 240px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #DCE7E2, #C6D3CD);
    min-height: 180px;
}
.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Заглушка миниатюры (когда нет thumbnail) */
.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--aqua);
    opacity: 0.55;
}
.card-thumb-placeholder svg { width: 60px; height: 60px; }

.card-body {
    flex: 1;                        /* правило A8 */
    display: flex;
    flex-direction: column;
    padding: 1.3em 1.5em 1.4em;
    min-width: 0;                   /* правило A12.6 */
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5em;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--aqua); text-decoration: none; }

.card-meta {
    font-family: var(--font-display);
    font-size: 0.82rem;
    color: var(--ink-2);
    margin-bottom: 0.7em;
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}
.card-meta time::before { content: '◷ '; color: var(--aqua); }
.card-meta .card-cats::before { content: '⚙ '; color: var(--olive); }

.card-excerpt {
    color: var(--ink);
    margin-bottom: 1em;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;              /* правило A8 */
    background: none;
}

.card-more {
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--aqua);
    padding: 0.45em 0.9em;
    border: 1px solid var(--aqua);
    border-radius: 6px;
    background: transparent;
    transition: all .15s ease;
}
.card-more:hover {
    background: var(--aqua);
    color: #fff;
    text-decoration: none;
}

/* Адаптив карточек — сброс абсолютного позиционирования (правило A10) */
@media (max-width: 600px) {
    .card { flex-direction: column; }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        min-height: 0;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-body { padding: 1.1em 1.2em 1.2em; }
}

/* ============================================
   ГЛАВНАЯ — тематические блоки
   ============================================ */
.hero-block {
    background: linear-gradient(135deg, #2A6F6F 0%, #1F5252 60%, #16403F 100%);
    color: #fff;
    border-radius: 10px;
    padding: 2.5em 2em;
    margin: 1.4em 0 2em;
    position: relative;
    overflow: hidden;
}
.hero-block::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 220px; height: 220px;
    border: 2px solid rgba(255,255,255,0.07);
    border-radius: 50%;
}
.hero-block::after {
    content: '';
    position: absolute;
    top: 20px; right: 20px;
    width: 140px; height: 140px;
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 50%;
}
.hero-block h1 {
    color: #fff;
    font-size: 2.1rem;
    max-width: 22ch;
    margin-top: 0;
    position: relative;
}
.hero-block .hero-lead {
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 56ch;
    color: rgba(255,255,255,0.88);
    margin-bottom: 1.5em;
    position: relative;
}
.hero-cta {
    display: inline-block;
    background: var(--olive);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 0.7em 1.4em;
    border-radius: 6px;
    border-bottom: 2px solid #5B6939;
    position: relative;
}
.hero-cta:hover {
    background: #5B6939;
    color: #fff;
    text-decoration: none;
}

.section-block {
    margin: 2.5em 0;
    padding: 2em 0;
    border-top: 1px solid var(--hairline);
}
.section-block:first-of-type { border-top: 0; padding-top: 0.5em; }

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--aqua);
    margin: 0 0 0.4em;
    position: relative;
    padding-left: 1.1em;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 0.6em;
    height: 0.6em;
    background: var(--olive);
    transform: rotate(45deg);
}

.section-lead {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ink-2);
    max-width: 70ch;
    margin: 0 0 1.5em;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.2em;
    margin-top: 1.2em;
}
.tile {
    background: var(--paper-2);
    border: 1px solid var(--paper-line);
    border-left: 4px solid var(--aqua);
    border-radius: 6px;
    padding: 1.2em 1.3em;
    min-width: 0;
}
.tile:nth-child(2) { border-left-color: var(--olive); }
.tile:nth-child(3) { border-left-color: var(--terracotta); }
.tile:nth-child(4) { border-left-color: var(--aqua-soft); }

.tile h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4em;
    color: var(--ink);
}
.tile p {
    font-size: 0.92rem;
    color: var(--ink-2);
    margin: 0;
    line-height: 1.55;
}

/* Шаги/процесс */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.2em;
    margin-top: 1.4em;
    counter-reset: step;
}
.step {
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: 6px;
    padding: 1.2em;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--olive);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.4em;
}
.step h4 {
    margin: 0 0 0.4em;
    font-size: 1rem;
}
.step p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-2);
}

/* Латест-посты на главной */
.latest-posts {
    margin: 2.5em 0;
}

/* ============================================
   САЙДБАР И ВИДЖЕТЫ
   ============================================ */
.site-sidebar {
    min-width: 0;
    font-family: var(--font-display);
}

.widget {
    background: var(--paper-2);
    border: 1px solid var(--paper-line);
    border-radius: 6px;
    padding: 1.2em 1.3em;
    margin-bottom: 1.4em;
    /* контраст в светлом сайдбаре: тёмный текст */
    color: var(--ink);
}
.widget-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--aqua);
    margin: 0 0 0.9em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--hairline);
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 0.45em 0;
    border-bottom: 1px dotted var(--hairline);
    font-size: 0.92rem;
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--aqua); }
.widget .post-date { color: var(--ink-2); font-size: 0.8rem; }

/* ============================================
   ПОДВАЛ
   ============================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    margin-top: 3em;
    padding: 2.5em 0 1.5em;
    border-top: 4px solid var(--olive);
}
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2em;
    margin-bottom: 2em;
}
@media (max-width: 960px) {
    .footer-columns { grid-template-columns: 1fr; gap: 1.6em; }
}

/* Виджеты в футере — светлый текст (контраст с тёмным фоном) */
.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--footer-ink);
}
.site-footer .widget-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.12);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
}
.site-footer .widget a { color: var(--footer-ink); }
.site-footer .widget a:hover { color: #fff; }
.site-footer .widget li {
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: var(--footer-mute);
}
.site-footer .widget .post-date { color: var(--footer-mute); }

.site-copyright {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--footer-mute);
    padding-top: 1.5em;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================
   ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   ============================================ */
.entry-header {
    margin-bottom: 1.4em;
}
.entry-title {
    font-size: 2rem;
    margin: 0.3em 0 0.4em;
}
.entry-meta {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-2);
    display: flex;
    gap: 1.2em;
    flex-wrap: wrap;
}
.entry-meta a { color: var(--olive); }

.entry-thumbnail {
    margin: 1.2em 0 1.5em;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--paper-line);
}
.entry-thumbnail img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.02rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img {
    display: block;
    margin: 1.2em auto;
    border-radius: 6px;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-tags {
    margin: 1.8em 0;
    font-family: var(--font-display);
    font-size: 0.88rem;
    color: var(--ink-2);
}
.entry-tags a {
    display: inline-block;
    margin: 0 0.3em 0.3em 0;
    padding: 0.2em 0.65em;
    background: var(--olive-soft);
    color: var(--olive);
    border-radius: 4px;
    font-weight: 600;
}
.entry-tags a:hover { background: var(--olive); color: #fff; text-decoration: none; }

/* ============================================
   КОММЕНТАРИИ
   ============================================ */
.comments-area {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid var(--hairline);
}
.comments-title {
    font-size: 1.3rem;
    margin: 0 0 1em;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2em;
}
.comment-list .comment {
    background: var(--paper-2);
    border: 1px solid var(--paper-line);
    border-radius: 6px;
    padding: 1em 1.2em;
    margin-bottom: 1em;
}
.comment-list .children {
    list-style: none;
    padding-left: 1.5em;
    margin-top: 1em;
    border-left: 2px solid var(--hairline);
}
.comment-author {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}
.comment-metadata {
    font-size: 0.82rem;
    color: var(--ink-2);
    margin-bottom: 0.5em;
}
.comment-body p { margin-bottom: 0.5em; }
.comment-reply-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--olive);
    font-weight: 600;
}

.comment-form label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-bottom: 0.3em;
    color: var(--ink);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.55em 0.7em;
    border: 1px solid var(--paper-line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    margin-bottom: 0.9em;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: 0;
    border-color: var(--aqua);
}
.comment-form .submit, .comment-form input[type="submit"] {
    background: var(--aqua);
    color: #fff;
    border: 0;
    border-bottom: 2px solid var(--aqua-soft);
    padding: 0.65em 1.3em;
    border-radius: 6px;
    font: 600 0.95rem var(--font-display);
    cursor: pointer;
    transition: background .15s;
}
.comment-form .submit:hover, .comment-form input[type="submit"]:hover {
    background: var(--aqua-dark);
}

/* ============================================
   ПОИСК
   ============================================ */
.search-form {
    display: flex;
    gap: 0;
    margin: 1em 0;
    max-width: 460px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.55em 0.85em;
    font: 0.95rem var(--font-body);
    border: 1px solid var(--paper-line);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #fff;
    color: var(--ink);
}
.search-form input[type="search"]:focus {
    outline: 0;
    border-color: var(--aqua);
}
.search-form button {
    background: var(--aqua);
    color: #fff;
    border: 0;
    padding: 0 1.1em;
    font: 600 0.9rem var(--font-display);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}
.search-form button:hover { background: var(--aqua-dark); }

/* ============================================
   ПАГИНАЦИЯ
   ============================================ */
.pagination {
    margin: 2em 0 1em;
    text-align: center;
    font-family: var(--font-display);
}
.pagination .page-numbers {
    display: inline-block;
    margin: 0 0.15em;
    padding: 0.45em 0.85em;
    border: 1px solid var(--paper-line);
    border-radius: 4px;
    color: var(--ink);
    font-size: 0.92rem;
    background: #fff;
    transition: all .15s;
}
.pagination .page-numbers:hover {
    border-color: var(--aqua);
    color: var(--aqua);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--aqua);
    color: #fff;
    border-color: var(--aqua);
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ============================================
   404
   ============================================ */
.error-404 {
    text-align: center;
    padding: 2em 0 3em;
}
.error-404 .err-code {
    font-family: var(--font-mono);
    font-size: 5rem;
    color: var(--aqua-soft);
    font-weight: 700;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.05em;
}
.error-404 h1 {
    margin-top: 0.3em;
    font-size: 1.6rem;
}
.error-404 .err-actions {
    margin-top: 1.5em;
    display: flex;
    gap: 0.8em;
    justify-content: center;
    flex-wrap: wrap;
}
.error-404 .err-actions .search-form { margin: 0; }
.error-404 a.btn-home {
    display: inline-block;
    background: var(--aqua);
    color: #fff;
    padding: 0.6em 1.2em;
    border-radius: 6px;
    font: 600 0.95rem var(--font-display);
    border-bottom: 2px solid var(--aqua-soft);
}
.error-404 a.btn-home:hover { background: var(--aqua-dark); text-decoration: none; }

/* ============================================
   COOKIE-БАННЕР
   ============================================ */
/* Правило A11 — обязательная страховка ДО основного блока стилей */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ink);
    color: #fff;
    border-top: 3px solid var(--olive);
    padding: 1em 0;
    box-shadow: 0 -6px 20px -8px rgba(0,0,0,0.3);
}
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 1.2em;
    flex-wrap: wrap;
}
.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 0.9rem;
    line-height: 1.5;
}
.cookie-banner a { color: var(--aqua-soft); }
.cookie-banner a:hover { color: #fff; }
.cookie-banner button {
    background: var(--olive);
    color: #fff;
    border: 0;
    border-bottom: 2px solid #5B6939;
    padding: 0.55em 1.2em;
    border-radius: 6px;
    font: 600 0.92rem var(--font-display);
    cursor: pointer;
    transition: background .15s;
}
.cookie-banner button:hover { background: #5B6939; }

/* ============================================
   АДАПТИВ — мобильная навигация
   ============================================ */
@media (max-width: 960px) {
    .site-header-inner { gap: 1em; }
    .brand-desc { display: none; }
    .nav-toggle { display: inline-flex; }
    .primary-nav { flex: 1 1 100%; }
    .primary-nav[hidden] { display: none !important; } /* правило A11 */
    .primary-nav ul {
        flex-direction: column;
        gap: 0.2em;
        margin-top: 0.8em;
        padding: 0.5em 0;
        border-top: 1px solid var(--hairline);
    }
    .primary-nav a { display: block; padding: 0.65em 0.9em; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .entry-title { font-size: 1.55rem; }
    h2 { font-size: 1.35rem; }
    .hero-block { padding: 1.8em 1.3em; }
    .hero-block h1 { font-size: 1.5rem; }
    .layout-wide { width: 100%; }
    .section-block { margin: 1.8em 0; padding: 1.5em 0; }
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.wp-caption {
    max-width: 100%;
    margin: 1em 0;
}
.wp-caption-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-2);
    text-align: center;
    margin-top: 0.4em;
}

/* WordPress alignment for blocks */
.alignwide, .alignfull { max-width: 100%; }
