/*
Theme Name: dds_519hearthglen.com
Theme URI: https://519hearthglen.com/
Author: Алексей Загородный
Description: Тёмная корпоративно-издательская тема для информационного портала о сделках с частными домами: оценка, юридическая проверка, аналитика рынка.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: hglen
*/

/* ============ Переменные ============ */
:root {
    --bg: #12161C;
    --bg-alt: #1A2029;
    --bg-head: #0E1217;
    --bg-foot: #0B0E12;
    --bg-side: #161B23;
    --ink: #E8E6E1;
    --copper: #C87A4A;
    --copper-dark: #A85F35;
    --steel: #8FA8B8;
    --muted: #8A8F98;
    --line: #2A3441;
    --serif: Georgia, "PT Serif", "Noto Serif", "Times New Roman", serif;
    --sans: Inter, "IBM Plex Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
}

/* ============ База ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='320' viewBox='0 0 420 320'%3E%3Cg fill='none' stroke='%23C87A4A' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M40 190 L210 60 L380 190'/%3E%3Cpath d='M78 176 L78 292 L342 292 L342 176'/%3E%3Cpath d='M178 292 L178 214 L242 214 L242 292'/%3E%3Cpath d='M108 206 L150 206 L150 248 L108 248 Z'/%3E%3Cpath d='M270 206 L312 206 L312 248 L270 248 Z'/%3E%3Cpath d='M300 118 L300 76 L330 76 L330 142'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -60px top 40px;
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.22;
    color: var(--ink);
    margin: 0 0 0.7em;
}

h1 { font-size: 3.2rem; letter-spacing: -0.01em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

.entry-content a,
.widget a,
.breadcrumbs a,
.site-foot a {
    position: relative;
}

.entry-content a::after,
.widget-area a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--copper);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

.entry-content a:hover::after,
.widget-area a:hover::after { transform: scaleX(1); }

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

figure { margin: 0 0 1.4em; }

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

blockquote {
    margin: 1.8em 0;
    padding: 0.4em 0 0.4em 16px;
    border-left: 3px solid var(--copper);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--ink);
}

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

code, pre {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.92em;
    background: #0E1217;
    color: var(--steel);
}

pre {
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid var(--line);
    font-size: 0.95rem;
}

th, td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

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

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

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

.site-main { display: block; }

.page-shell { padding: 48px 0 72px; }

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

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

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); margin-top: 0.4em; }

.sticky .card-title::before { content: "▲ "; color: var(--copper); font-size: 0.7em; vertical-align: middle; }

/* ============ Кнопки ============ */
.btn {
    display: inline-block;
    padding: 0.72em 1.5em;
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn-fill {
    background: var(--copper);
    color: #12161C;
    border: 1.5px solid var(--copper);
}

.btn-fill:hover {
    background: var(--copper-dark);
    border-color: var(--copper-dark);
    color: #12161C;
    box-shadow: 0 4px 12px rgba(200, 122, 74, 0.25);
}

.btn-line {
    background: transparent;
    color: var(--copper);
    border: 1.5px solid var(--copper);
}

.btn-line:hover { background: var(--copper); color: #12161C; }

/* ============ Шапка ============ */
.site-top {
    background: var(--bg-head);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 -3px 0 -1px rgba(200, 122, 74, 0.55);
    position: static;
}

.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 20px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-mark { flex: 0 0 auto; display: block; }

.brand-logo { display: block; max-height: 56px; width: auto; }

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

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

.brand-name:hover { color: var(--copper); }

.brand-desc {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
    font-family: var(--sans);
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.9rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: inline-block;
    font-size: 0.93rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink);
    padding: 0.3em 0;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--copper);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

.main-nav a:hover { color: var(--copper); }
.main-nav a:hover::after { transform: scaleX(1); }

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--copper); }

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.83rem;
    color: var(--muted);
    padding: 18px 0 0;
    line-height: 1.6;
}

.breadcrumbs a { color: var(--steel); }
.breadcrumbs a:hover { color: var(--copper); }
.breadcrumbs .sep { margin: 0 0.45em; color: var(--line); }

/* ============ Раскладки ============ */
.layout-single {
    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: 6%;
    align-items: start;
}

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

.sidebar {
    min-width: 0;
    background: var(--bg-side);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px 22px;
}

/* ============ Виджеты ============ */
.widget { margin-bottom: 2rem; }
.widget:last-child { margin-bottom: 0; }

.widget-title {
    position: relative;
    font-family: var(--serif);
    font-size: 1.15rem;
    margin: 0 0 1.1rem;
    padding-top: 14px;
}

.widget-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--copper);
}

.widget ul { list-style: none; margin: 0; padding: 0; }

.widget li {
    padding: 0.55em 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.93rem;
    line-height: 1.5;
}

.widget li:last-child { border-bottom: 0; }

.widget .post-date,
.widget .rss-date { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }

.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--copper); }
.sidebar .widget-title { color: var(--ink); }

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

.post-list { display: grid; grid-template-columns: 1fr; gap: 26px; }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--copper);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.card-thumb { display: block; width: 100%; }

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

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(140deg, #1E2530 0%, #12161C 100%);
    border-bottom: 1px solid var(--line);
}

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.card-cats { margin: 0 0 0.7rem; display: flex; flex-wrap: wrap; gap: 6px; }

.cat-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 3px;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(200, 122, 74, 0.15);
    color: var(--copper);
}

.cat-tag:nth-child(2n) { background: rgba(143, 168, 184, 0.15); color: var(--steel); }
.cat-tag:nth-child(3n) { background: rgba(107, 122, 90, 0.15); color: #9BAE86; }
.cat-tag:nth-child(4n) { background: rgba(122, 90, 107, 0.15); color: #B98BA2; }

.card-title { font-size: 1.22rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--copper); }

.card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.8rem;
    letter-spacing: 0.02em;
}

.card-excerpt { font-size: 0.94rem; color: #C9CBCE; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more { margin-top: auto; padding-top: 14px; }

.card-more .btn { padding: 0.55em 1.2em; font-size: 0.85rem; }

/* горизонтальная карточка (лента блога) */
.card-row { flex-direction: row; }

.card-row .card-thumb-wrap {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border-right: 1px solid var(--line);
}

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

.card-row .card-thumb-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-row .card-thumb-empty {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: auto;
    border-bottom: 0;
}

/* ============ Пагинация ============ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 42px;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5em 0.8em;
    border: 1px solid var(--line);
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--bg-alt);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pager a.page-numbers:hover { border-color: var(--copper); color: var(--copper); }

.pager .page-numbers.current {
    background: var(--copper);
    border-color: var(--copper);
    color: #12161C;
    font-weight: 600;
}

.pager .page-numbers.dots { border-color: transparent; background: transparent; color: var(--muted); }

/* ============ Главная ============ */
.front-inner { width: 85%; margin-left: auto; margin-right: auto; }

.front-section { padding: 80px 0; }

.front-section.alt { background: var(--bg-alt); }

.front-section.hatched {
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg, rgba(42, 52, 65, 0.3) 0 1px, transparent 1px 12px);
}

.section-head { margin-bottom: 38px; }

.section-title {
    position: relative;
    margin: 0 0 0.4em;
    padding-top: 14px;
    font-size: 2rem;
    text-align: left;
}

.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--copper);
}

.section-lead { color: var(--muted); font-size: 1rem; max-width: 60ch; margin: 0; }

/* Блок 1 — hero */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #0B0E12;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(18, 22, 28, 0.9) 0%, rgba(18, 22, 28, 0.55) 45%, rgba(18, 22, 28, 0.12) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding: 90px 0 56px;
}

.hero-rule { width: 48px; height: 2px; background: var(--copper); margin-bottom: 22px; }

.hero h1 { margin: 0 0 0.45em; max-width: 18ch; }

.hero-sub {
    font-family: var(--sans);
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 62ch;
    margin: 0;
}

/* Блок 2 — статистика */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.stat-cell {
    min-width: 0;
    padding: 6px 26px;
    border-left: 1px solid var(--line);
    text-align: left;
}

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

.stat-num {
    display: block;
    font-family: var(--serif);
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--copper);
}

.stat-cap {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Блок 3 — чек-лист */
.checklist { list-style: none; margin: 0; padding: 0; max-width: 78ch; }

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    min-width: 0;
    font-size: 1.02rem;
    color: var(--ink);
}

.checklist li:last-child { margin-bottom: 0; }

.checklist .tick { flex: 0 0 auto; display: block; margin-top: 4px; }

.checklist .tick-note { display: block; font-size: 0.87rem; color: var(--muted); margin-top: 2px; }

/* Блок 4 — карта тем */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.topic-tile {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
    padding: 26px 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.topic-tile:hover { border-color: var(--copper); background: #1E2530; }

.topic-tile svg { flex: 0 0 auto; }

.topic-tile .tile-name {
    display: block;
    font-family: var(--sans);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.35;
}

.topic-tile .tile-note { display: block; margin-top: 6px; font-size: 0.87rem; color: var(--muted); }

/* блок последних записей на главной */
.latest-foot { margin-top: 36px; }

/* ============ Записи и страницы ============ */
.entry-head { margin-bottom: 26px; }

.entry-title { margin: 0 0 0.35em; font-size: 2.5rem; }

.entry-meta { font-size: 0.83rem; color: var(--muted); letter-spacing: 0.02em; }

.entry-meta a { color: var(--steel); }

.entry-thumb { margin: 0 0 28px; }

.entry-thumb img { display: block; width: 100%; border-radius: 6px; }

.entry-content { font-size: 1.02rem; }

.entry-content h2 {
    position: relative;
    padding-top: 14px;
    margin-top: 1.8em;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--copper);
}

.entry-content h3 { margin-top: 1.6em; }

.entry-content img { border-radius: 6px; }

.entry-content ul li, .entry-content ol li { margin-bottom: 0.5em; }

.entry-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }

.archive-head { margin-bottom: 34px; }
.archive-title { margin: 0 0 0.3em; font-size: 2.3rem; }
.archive-desc { color: var(--muted); margin: 0; }

.nothing {
    padding: 34px 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-alt);
}

/* ============ Комментарии ============ */
.comments-block { margin-top: 56px; }

.comments-title {
    position: relative;
    padding-top: 14px;
    font-size: 1.5rem;
    margin-bottom: 1.2em;
}

.comments-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--copper);
}

.comment-list { list-style: none; margin: 0 0 2.4rem; padding: 0; }

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

.comment-list li.comment { margin-bottom: 1.2rem; }

.comment-body {
    padding: 20px 22px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.comment-author { font-family: var(--serif); font-weight: 700; }

.comment-author .says { display: none; }

.comment-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.6em; }

.comment-meta a { color: var(--muted); }

.comment-body p { font-size: 0.96rem; }

.comment-reply-link { font-size: 0.85rem; }

.comment-respond {
    padding: 28px 26px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.comment-respond .comment-reply-title { margin-top: 0; font-size: 1.3rem; }

.comment-form label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35em; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    background: #12161C;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
}

.comment-form textarea { min-height: 150px; resize: vertical; }

.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--copper); }

.comment-form .form-submit input {
    background: var(--copper);
    color: #12161C;
    border: 1.5px solid var(--copper);
    border-radius: 4px;
    padding: 0.72em 1.5em;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.comment-form .form-submit input:hover { background: var(--copper-dark); border-color: var(--copper-dark); }

.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }

.comment-form .comment-form-cookies-consent label { margin: 0; }

.comment-navigation { margin-bottom: 1.6rem; font-size: 0.9rem; }

/* ============ Поиск ============ */
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }

.search-form label { flex: 1 1 200px; min-width: 0; }

.search-form input[type="search"] {
    width: 100%;
    padding: 0.7em 0.9em;
    background: #12161C;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
}

.search-form input[type="search"]:focus { outline: none; border-color: var(--copper); }

.search-form button {
    padding: 0.7em 1.4em;
    background: var(--copper);
    color: #12161C;
    border: 1.5px solid var(--copper);
    border-radius: 4px;
    font-family: var(--sans);
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover { background: var(--copper-dark); border-color: var(--copper-dark); }

/* ============ 404 ============ */
.err-block { padding: 70px 0 90px; text-align: left; }
.err-code { font-family: var(--serif); font-size: 5rem; color: var(--copper); line-height: 1; margin: 0 0 0.2em; }
.err-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.err-search { margin-top: 34px; max-width: 520px; }

/* ============ Подвал ============ */
.site-foot {
    background: var(--bg-foot);
    border-top: 2px solid var(--copper);
    margin-top: 0;
    padding: 56px 0 26px;
    color: #C4C7CB;
}

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

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

.foot-col .widget-title { color: var(--ink); }

.foot-col .widget,
.foot-col .widget p,
.foot-col .widget li { color: #BFC3C8; font-size: 0.92rem; }

.foot-col .widget a { color: #D6D8DA; }
.foot-col .widget a:hover { color: var(--copper); }

.foot-col .widget li { border-bottom: 1px solid #1A1F26; }

.foot-bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid #1A1F26;
    font-size: 0.83rem;
    color: var(--muted);
}

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 26px;
    background: #0E1217;
    border-top: 1px solid var(--copper);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
}

.cookie-banner p { margin: 0; font-size: 0.88rem; color: #C4C7CB; min-width: 0; flex: 1 1 320px; }

.cookie-banner .btn { flex: 0 0 auto; }

/* ============ Адаптив ============ */
@media (max-width: 960px) {
    h1 { font-size: 2.3rem; }
    .entry-title { font-size: 2rem; }
    .section-title { font-size: 1.7rem; }

    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 42px; }
    .layout-single { width: 100%; }
    .front-inner { width: 92%; }
    .hero-inner { width: 92%; }

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

    .main-nav {
        flex: 1 1 100%;
        display: none;
        padding-top: 14px;
    }

    .main-nav.open { display: block; }

    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0.2rem; }

    .main-nav li { width: 100%; border-bottom: 1px solid var(--line); }

    .main-nav a { display: block; padding: 0.7em 0; width: 100%; }

    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 0; }
    .stat-cell:nth-child(odd) { border-left: 0; padding-left: 0; }

    .topic-grid { grid-template-columns: 1fr; }

    .front-section { padding: 56px 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.9rem; }
    .entry-title { font-size: 1.7rem; }
    .section-title { font-size: 1.45rem; }
    .stat-num { font-size: 2.2rem; }

    .front-section { padding: 44px 0; }
    .page-shell { padding: 34px 0 54px; }

    .hero { min-height: 62vh; }
    .hero-inner { padding: 64px 0 40px; }

    .foot-cols { grid-template-columns: 1fr; gap: 32px; }

    .card-row { flex-direction: column; }

    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .card-row .card-thumb-wrap a { position: static; }

    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-row .card-thumb-empty { position: static; aspect-ratio: 16 / 9; }

    .card-body { padding: 18px 18px 20px; }

    .topic-tile { padding: 20px 18px; }

    .cookie-banner { padding: 14px 18px; }

    .err-code { font-size: 3.4rem; }

    .comment-respond { padding: 20px 16px; }

    .comment-body { padding: 16px 16px; }

    .sidebar { padding: 20px 16px; }

    blockquote { font-size: 1.2rem; }
}
