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

/* =========================
   Базовые переменные
   ========================= */
:root {
    --color-bg: #f3ede0;
    --color-bg-alt: #ebe3d2;
    --color-card: #fbf7ee;
    --color-paper: #fffdf7;
    --color-text: #2c333d;
    --color-text-soft: #5b6271;
    --color-text-muted: #7a7a7a;
    --color-primary: #1f3a5f;
    --color-primary-dark: #15294a;
    --color-accent: #b9583a;
    --color-accent-dark: #944526;
    --color-accent-soft: #d8a98f;
    --color-border: #d5cab0;
    --color-border-soft: #e3dac4;
    --color-divider: #c2b894;
    --color-success: #3d6b4a;
    --color-warning: #c98b2c;

    --shadow-soft: 0 2px 6px rgba(31, 58, 95, 0.06);
    --shadow-lift: 0 6px 18px rgba(31, 58, 95, 0.12);
    --shadow-stamp: 0 1px 0 rgba(185, 88, 58, 0.08), 0 0 0 0 transparent;

    --radius-sm: 4px 12px 12px 4px;
    --radius-md: 6px 16px 16px 6px;
    --radius-lg: 8px 22px 22px 8px;

    --font-head: 'Manrope', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'PT Serif', Georgia, 'Times New Roman', serif;

    --maxw: 1180px;
    --gap: 28px;
}

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

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

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(31, 58, 95, 0.35);
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--color-primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 1.4em 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.1rem; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.4em;
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    font-style: italic;
    color: var(--color-text-soft);
}

code, pre {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.92em;
}
code {
    background: var(--color-bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
}
pre {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    padding: 1em;
    overflow-x: auto;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--color-border);
    background: var(--color-paper);
}
th, td {
    border: 1px solid var(--color-border);
    padding: 10px 14px;
    text-align: left;
}
th {
    background: var(--color-bg-alt);
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-primary);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-divider) 20%, var(--color-divider) 80%, transparent);
    margin: 2em 0;
}

/* Полосато-пунктирный разделитель «как пункт договора» */
.contract-divider {
    border: 0;
    height: 4px;
    margin: 2.2em 0;
    background-image:
        linear-gradient(to right, var(--color-primary) 50%, transparent 50%),
        linear-gradient(to right, var(--color-accent) 50%, transparent 50%);
    background-size: 14px 1px, 8px 1px;
    background-position: 0 0, 0 100%;
    background-repeat: repeat-x;
}

/* =========================
   Контейнеры и сетки
   ========================= */
.shell {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.site-main { flex: 1 0 auto; padding: 36px 0 56px; }

/* =========================
   Шапка
   ========================= */
.site-header {
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-mark {
    width: 56px; height: 56px;
    flex: 0 0 56px;
    display: block;
}
.brand-mark {
    background: var(--color-primary);
    border-radius: 8px 14px 14px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg);
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-primary);
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.005em;
}
.brand-tag {
    font-size: 0.84rem;
    color: var(--color-text-soft);
    margin: 2px 0 0;
    line-height: 1.35;
}

/* Главное меню */
.main-nav { flex: 0 1 auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: inline-block;
    padding: 9px 16px;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.97rem;
    color: var(--color-text);
    border-radius: 4px 12px 12px 4px;
    transition: background .18s, color .18s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* Кнопка-гамбургер */
.nav-toggle {
    display: none;
    background: var(--color-primary);
    color: var(--color-paper);
    border: 0;
    padding: 8px 14px;
    border-radius: 4px 12px 12px 4px;
    font-family: var(--font-head);
    font-size: 0.95rem;
    cursor: pointer;
}
.nav-toggle[hidden] { display: none !important; }

/* =========================
   Хлебные крошки
   ========================= */
.crumbs {
    font-size: 0.88rem;
    color: var(--color-text-soft);
    margin: 0 0 22px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-divider);
}
.crumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before {
    content: "›";
    color: var(--color-accent);
    margin-right: 2px;
}
.crumbs a {
    text-decoration: none;
    color: var(--color-text-soft);
    border-bottom: 1px dotted var(--color-divider);
}
.crumbs a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.crumbs [aria-current="page"] {
    color: var(--color-primary);
    font-weight: 600;
}

/* =========================
   Кнопки
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--color-primary);
    color: var(--color-paper) !important;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    border-radius: 4px 18px 18px 4px;
    box-shadow: 2px 2px 0 var(--color-primary-dark);
    transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover {
    background: var(--color-primary-dark);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--color-accent-dark);
    text-decoration: none;
}
.btn-accent {
    background: var(--color-accent);
    box-shadow: 2px 2px 0 var(--color-accent-dark);
}
.btn-accent:hover {
    background: var(--color-accent-dark);
    box-shadow: 4px 4px 0 var(--color-primary-dark);
}
.btn-ghost {
    background: transparent;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary);
    box-shadow: none;
    padding: 9px 20px;
}
.btn-ghost:hover {
    background: var(--color-primary);
    color: var(--color-paper) !important;
    box-shadow: 3px 3px 0 var(--color-accent-dark);
}
.btn .btn-icon {
    width: 16px; height: 16px;
    display: inline-block;
    flex: 0 0 16px;
}

/* =========================
   Карточки записей (template-parts/content-card.php)
   ========================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
    margin: 0 0 30px;
}

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border-soft);
    border-radius: 6px 18px 18px 6px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--color-bg-alt);
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}
.card-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.card-meta a { color: var(--color-accent); text-decoration: none; }
.card-meta a:hover { color: var(--color-accent-dark); text-decoration: underline; }
.card-title {
    font-family: var(--font-head);
    font-size: 1.18rem;
    line-height: 1.3;
    margin: 0 0 10px;
    color: var(--color-primary);
}
.card-title a {
    color: inherit;
    text-decoration: none;
}
.card-title a:hover { color: var(--color-accent); }
.card-excerpt {
    color: var(--color-text-soft);
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 0 0 14px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }
.card-foot {
    margin-top: auto;
    padding-top: 4px;
}
.card-foot .card-link {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-accent-soft);
    padding-bottom: 1px;
}
.card-foot .card-link:hover {
    color: var(--color-accent-dark);
    border-bottom-style: solid;
}

/* Горизонтальная карточка (используется на главной/блоге опционально) */
.card-row {
    flex-direction: row;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    text-decoration: none;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================
   Записи (single, page)
   ========================= */
.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.layout.has-sidebar {
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout.wide .content-area {
    max-width: 85%;
    margin: 0 auto;
}
.layout.full .content-area {
    max-width: 100%;
}

.entry {
    background: var(--color-paper);
    padding: 32px 36px;
    border-radius: 6px 18px 18px 6px;
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
}
.entry-header { margin-bottom: 22px; }
.entry-title { margin: 0 0 10px; }
.entry-meta {
    font-size: 0.86rem;
    color: var(--color-text-muted);
    font-family: var(--font-head);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.entry-meta a { color: var(--color-accent); text-decoration: none; }
.entry-thumb {
    margin: 0 0 24px;
    border-radius: 6px 18px 18px 6px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }

.entry-content > * + * { margin-top: 1em; }
.entry-content img { border-radius: 4px 12px 12px 4px; }

.entry-tags {
    margin: 28px 0 0;
    padding: 18px 0 0;
    border-top: 1px dashed var(--color-divider);
    font-size: 0.92rem;
    color: var(--color-text-soft);
}
.entry-tags a {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    border-radius: 3px 10px 10px 3px;
    text-decoration: none;
    font-size: 0.86rem;
}
.entry-tags a:hover {
    background: var(--color-primary);
    color: var(--color-paper);
}

/* =========================
   Сайдбар
   ========================= */
.sidebar {
    position: relative;
}
.widget {
    background: var(--color-paper);
    padding: 22px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border-soft);
    border-radius: 6px 18px 18px 6px;
    box-shadow: var(--shadow-soft);
}
.widget-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    color: var(--color-primary);
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px dashed var(--color-divider);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px dotted var(--color-border);
    font-size: 0.95rem;
}
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget a {
    color: var(--color-text);
    text-decoration: none;
}
.widget a:hover { color: var(--color-accent); }

/* =========================
   Главная страница
   ========================= */
.front-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-paper);
    padding: 48px 44px;
    border-radius: 8px 24px 24px 8px;
    margin: 0 0 40px;
    position: relative;
    overflow: hidden;
}
.front-hero::after {
    content: "";
    position: absolute;
    right: -60px; top: -60px;
    width: 240px; height: 240px;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    pointer-events: none;
}
.front-hero::before {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 180px; height: 180px;
    border: 2px dashed rgba(184, 92, 60, 0.25);
    border-radius: 50%;
    pointer-events: none;
}
.front-hero h1 {
    color: var(--color-paper);
    font-size: 2.3rem;
    margin: 0 0 14px;
    max-width: 760px;
}
.front-hero p {
    font-size: 1.08rem;
    max-width: 720px;
    color: rgba(255,255,255,0.88);
    margin: 0 0 22px;
}
.front-hero .btn {
    background: var(--color-accent);
    box-shadow: 2px 2px 0 var(--color-accent-dark);
}
.front-hero .btn:hover { background: var(--color-accent-dark); }

.section {
    margin: 0 0 56px;
}
.section-head {
    margin: 0 0 26px;
    text-align: left;
}
.section-head h2 {
    margin: 0 0 8px;
    font-size: 1.85rem;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}
.section-head h2::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 64px; height: 3px;
    background: var(--color-accent);
}
.section-head p {
    color: var(--color-text-soft);
    margin: 6px 0 0;
    font-size: 1.02rem;
}

/* Блок «Типичные схемы» — карточки-выписки со штампом */
.schemes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}
.scheme-card {
    background: var(--color-paper);
    padding: 24px 26px 26px;
    border: 1px solid var(--color-border);
    border-radius: 4px 16px 16px 4px;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}
.scheme-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}
.scheme-card .scheme-stamp {
    position: absolute;
    top: 14px; right: 14px;
    width: 64px; height: 64px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    color: var(--color-accent);
    font-family: var(--font-head);
    font-size: 0.62rem;
    text-align: center;
    line-height: 1;
    transform: rotate(-12deg);
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    pointer-events: none;
}
.scheme-card .scheme-date {
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--color-divider);
    display: inline-block;
}
.scheme-card h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    padding-right: 60px;
    color: var(--color-primary);
}
.scheme-card p {
    color: var(--color-text-soft);
    font-size: 0.96rem;
    margin: 0;
    flex: 1;
}
.scheme-card .scheme-foot {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--color-divider);
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--color-accent);
}

/* Категории-иконки */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap);
}
.cat-tile {
    display: block;
    padding: 26px 24px;
    background: var(--color-paper);
    border: 1px solid var(--color-border-soft);
    border-radius: 4px 16px 16px 4px;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .2s, transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-soft);
}
.cat-tile:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lift);
    text-decoration: none;
}
.cat-tile .cat-icon {
    width: 46px; height: 46px;
    display: block;
    margin-bottom: 14px;
    color: var(--color-primary);
}
.cat-tile:hover .cat-icon {
    color: var(--color-accent);
}
.cat-tile h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    color: var(--color-primary);
}
.cat-tile p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Шаги (используется как часть тематического блока) */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    counter-reset: step-count;
}
.step {
    background: var(--color-card);
    padding: 22px 22px 22px 60px;
    border: 1px solid var(--color-border-soft);
    border-radius: 4px 14px 14px 4px;
    position: relative;
    counter-increment: step-count;
}
.step::before {
    content: counter(step-count, decimal-leading-zero);
    position: absolute;
    left: 16px; top: 18px;
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}
.step h3 {
    margin: 0 0 6px;
    font-size: 1.02rem;
    color: var(--color-primary);
}
.step p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-text-soft);
    line-height: 1.5;
}

/* Front: latest posts wrap */
.latest-posts-wrap {
    margin: 0 0 56px;
}

/* =========================
   Поиск
   ========================= */
.search-form {
    display: flex;
    gap: 0;
    max-width: 520px;
    margin: 16px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--color-border);
    border-right: 0;
    background: var(--color-paper);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    border-radius: 4px 0 0 4px;
    outline: none;
}
.search-form input[type="search"]:focus {
    border-color: var(--color-primary);
}
.search-form button {
    padding: 11px 22px;
    background: var(--color-primary);
    color: var(--color-paper);
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 14px 14px 0;
    transition: background .2s;
}
.search-form button:hover { background: var(--color-accent-dark); }

/* =========================
   Пагинация
   ========================= */
.pagination {
    margin: 36px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-family: var(--font-head);
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px 12px 12px 4px;
    transition: background .2s, color .2s, border-color .2s;
}
.pagination .page-numbers:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-accent);
}
.pagination .page-numbers.current {
    background: var(--color-primary);
    color: var(--color-paper);
    border-color: var(--color-primary);
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
}

/* =========================
   Комментарии
   ========================= */
.comments-area {
    margin: 36px 0 0;
    padding: 28px 32px;
    background: var(--color-paper);
    border: 1px solid var(--color-border-soft);
    border-radius: 6px 18px 18px 6px;
}
.comments-area h3 {
    margin-top: 0;
    font-size: 1.25rem;
}
.comment-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.comment-list .comment {
    padding: 16px 0;
    border-bottom: 1px dashed var(--color-divider);
}
.comment-list .comment:last-child { border-bottom: 0; }
.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.96rem;
}
.comment-meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.comment-content { font-size: 0.95rem; }
.comment-list .children {
    list-style: none;
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px dashed var(--color-border);
    margin-top: 12px;
}

.comment-form { display: grid; gap: 12px; margin-top: 16px; }
.comment-form p { margin: 0; }
.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    border-radius: 4px 12px 12px 4px;
    outline: none;
    transition: border-color .2s;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-primary); }
.comment-form .form-submit { margin-top: 8px; }
.comment-form input[type="submit"] {
    padding: 11px 22px;
    background: var(--color-primary);
    color: var(--color-paper);
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.97rem;
    cursor: pointer;
    border-radius: 4px 18px 18px 4px;
    box-shadow: 2px 2px 0 var(--color-primary-dark);
    transition: background .2s, transform .15s, box-shadow .15s;
}
.comment-form input[type="submit"]:hover {
    background: var(--color-primary-dark);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--color-accent-dark);
}

/* =========================
   404
   ========================= */
.error-404 {
    text-align: center;
    padding: 50px 20px;
    background: var(--color-paper);
    border-radius: 6px 18px 18px 6px;
    border: 1px solid var(--color-border-soft);
}
.error-404 .err-code {
    font-family: var(--font-head);
    font-size: 6rem;
    line-height: 1;
    color: var(--color-accent);
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: -0.05em;
}
.error-404 h1 {
    margin: 0 0 14px;
}
.error-404 .search-form {
    margin: 24px auto;
}

/* =========================
   Подвал
   ========================= */
.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.85);
    padding: 44px 0 0;
    margin-top: auto;
}
.site-footer a {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.3);
}
.site-footer a:hover {
    color: var(--color-accent-soft);
    border-bottom-color: var(--color-accent-soft);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    padding-bottom: 36px;
}
.footer-col .widget {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}
.footer-col .widget-title {
    color: var(--color-paper);
    border-bottom-color: rgba(255,255,255,0.2);
}
.footer-col .widget li {
    border-bottom-color: rgba(255,255,255,0.12);
}
.footer-col .widget a {
    color: rgba(255,255,255,0.85);
}

.footer-sign {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.copyright {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
}
.author-seal {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.author-seal-mark {
    width: 56px; height: 56px;
    display: block;
    flex: 0 0 56px;
}

/* =========================
   Cookie-баннер
   ========================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: var(--color-primary);
    color: rgba(255,255,255,0.92);
    padding: 16px 22px;
    border-radius: 6px 18px 18px 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    border-left: 4px solid var(--color-accent);
    max-width: 720px;
    margin: 0 auto;
    font-size: 0.94rem;
    line-height: 1.45;
}
.cookie-banner .cookie-text { flex: 1 1 280px; margin: 0; }
.cookie-banner a { color: var(--color-accent-soft); }
.cookie-banner button {
    flex: 0 0 auto;
    padding: 9px 22px;
    background: var(--color-accent);
    color: var(--color-paper);
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px 14px 14px 4px;
    box-shadow: 2px 2px 0 var(--color-accent-dark);
    transition: transform .15s, box-shadow .15s, background .2s;
}
.cookie-banner button:hover {
    background: var(--color-accent-dark);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #5b2a18;
}

/* =========================
   Утилиты
   ========================= */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}
.alignleft { float: left; margin: 0 16px 12px 0; }
.alignright { float: right; margin: 0 0 12px 16px; }
.aligncenter { display: block; margin: 0 auto 12px; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    margin: 6px 0 0;
}

/* =========================
   Адаптив
   ========================= */
@media (max-width: 960px) {
    .layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .layout.wide .content-area,
    .layout.full .content-area {
        max-width: 100%;
    }
    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }
    .front-hero { padding: 36px 28px; }
    .front-hero h1 { font-size: 1.85rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    .shell { padding: 0 16px; }
    .site-main { padding: 24px 0 36px; }

    .header-inner {
        gap: 12px;
        padding: 14px 0;
    }
    .brand-logo, .brand-mark {
        width: 44px; height: 44px;
        flex: 0 0 44px;
    }
    .brand-name { font-size: 0.95rem; }
    .brand-tag { font-size: 0.78rem; }

    .nav-toggle { display: inline-flex; }
    .main-nav { width: 100%; flex-basis: 100%; }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
        background: var(--color-bg-alt);
        border-radius: 4px 14px 14px 4px;
        padding: 6px;
    }
    .main-nav[data-open="false"] ul { display: none; }
    .main-nav a { display: block; padding: 11px 14px; }

    .entry { padding: 22px 18px; }
    .comments-area { padding: 20px 18px; }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-sign {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .btn, .comment-form input[type="submit"] {
        width: 100%;
        justify-content: center;
        padding: 14px 22px;
        font-size: 1rem;
    }
    .btn-ghost { width: 100%; justify-content: center; }
    .front-hero .btn { width: auto; }

    .card-row {
        flex-direction: column;
    }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a {
        position: static;
    }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .cookie-banner button { width: 100%; }
}
