/*
Theme Name: dds_poshdallastx.com
Theme URI: https://poshdallastx.com
Author: Алексей Воронцов
Author URI: https://poshdallastx.com
Description: Контентный сайт о недвижимости — практические статьи, рыночные обзоры и разбор вопросов, связанных с жильём.
Version: 1.1
Requires at least: 6.0
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: dds_poshdallastx
*/

/* =========================================================
   Дизайн-токены
   ========================================================= */
:root {
    --bg-paper: #F8F7F4;
    --bg-card: #FFFFFF;
    --color-accent: #C25A3C;
    --color-accent-dark: #8B3A24;
    --color-accent-soft: rgba(194, 90, 60, 0.05);
    --color-accent-mid: rgba(194, 90, 60, 0.12);
    --color-mustard: #E6B85C;
    --color-coal: #1E231F;
    --color-graphite: #2F3A36;
    --color-slate: #7A8B85;
    --color-border-sand: #E9E1D4;
    --shadow-card: 0 8px 24px rgba(30, 35, 31, 0.06);
    --radius-btn: 4px;
    --radius-pill: 40px;
    --content-width: 1280px;
    --reading-width: 760px;
    --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Literata", "Spectral", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg-paper);
    color: var(--color-graphite);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--color-coal);
    line-height: 1.4;
    margin: 0 0 0.6em;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; line-height: 1.7; }

blockquote {
    margin: 1.5em 0;
    padding: 0.5em 0 0.5em 1.25em;
    border-left: 3px solid var(--color-accent);
    font-style: italic;
    font-weight: 600;
    color: var(--color-coal);
}

code, pre {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--color-border-sand);
    color: var(--color-coal);
}
code { padding: 1px 6px; border-radius: 3px; }
pre { padding: 1em; border-radius: 4px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--color-border-sand);
    background: var(--bg-card);
}
th, td {
    border: 1px solid var(--color-border-sand);
    padding: 0.75em 1em;
    text-align: left;
    vertical-align: top;
}
th {
    background: var(--bg-paper);
    color: var(--color-coal);
    font-family: var(--font-display);
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border-sand);
    margin: 2em 0;
}

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

::selection { background: var(--color-accent-mid); color: var(--color-coal); }

/* =========================================================
   Контейнеры
   ========================================================= */
.site-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    margin: 32px auto 64px;
}
.layout-grid.no-sidebar { grid-template-columns: 85%; justify-content: center; }
.layout-grid.no-sidebar > .main-col { max-width: none; }

.layout-grid > .main-col { min-width: 0; }

/* =========================================================
   Шапка
   ========================================================= */
.site-head {
    background: var(--bg-card);
    border-bottom: 1px solid var(--color-border-sand);
    padding: 18px 0;
}

.site-head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}
.brand:hover { color: inherit; }

.brand-mark {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}
.brand-logo {
    max-width: 56px;
    max-height: 56px;
    width: auto;
    height: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-coal);
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.brand-tag {
    font-size: 0.82rem;
    color: var(--color-slate);
    line-height: 1.4;
    margin-top: 2px;
    max-width: 520px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Главное меню */
.primary-nav { flex: 0 0 auto; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
}
.primary-nav a {
    color: var(--color-coal);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Бургер для мобилки */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border-sand);
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-coal);
    border-radius: 2px;
}

/* Кнопка «Закрыть» в мобильной выезжающей панели — на десктопе скрыта */
.nav-close {
    display: none;
}

/* =========================================================
   Хлебные крошки
   ========================================================= */
.crumbs {
    padding: 14px 0;
    font-size: 0.85rem;
    color: var(--color-slate);
    font-family: var(--font-display);
}
.crumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.crumbs li { margin: 0; }
.crumbs a { color: var(--color-slate); text-decoration: none; }
.crumbs a:hover { color: var(--color-accent); }
.crumbs .sep { color: var(--color-border-sand); margin: 0 2px; }
.crumbs .current { color: var(--color-coal); }

/* =========================================================
   Главная — герой и блоки
   ========================================================= */
.hero {
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    padding: 56px 48px;
    margin-top: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--color-accent);
}
.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    font-weight: 600;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    max-width: 720px;
}
.hero p { max-width: 680px; font-size: 1.1rem; color: var(--color-graphite); }

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
}
.feature-tile {
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    padding: 28px 24px;
    box-shadow: var(--shadow-card);
}
.feature-tile h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--color-coal);
}
.feature-tile p { margin: 0; font-size: 0.96rem; color: var(--color-graphite); }
.feature-tile .feature-num {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    display: inline-block;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 4px;
}

.section-block {
    margin: 64px 0;
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    padding: 48px;
    box-shadow: var(--shadow-card);
}
.section-block h2 {
    margin-top: 0;
    font-size: 1.85rem;
}
.section-eyebrow {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-bottom: 8px;
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 28px;
}
.step-item h4 {
    color: var(--color-accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
}
.step-item p { margin: 0; }

.checklist {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
}
.checklist li {
    padding-left: 28px;
    position: relative;
    margin: 0;
    font-size: 0.96rem;
}
.checklist li::before {
    content: "";
    position: absolute;
    left: 0; top: 6px;
    width: 14px; height: 14px;
    border: 1.5px solid var(--color-accent);
    border-radius: 3px;
    background: transparent;
}
.checklist li::after {
    content: "";
    position: absolute;
    left: 4px; top: 8px;
    width: 5px; height: 9px;
    border: solid var(--color-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lead-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Лента последних записей на главной */
.latest-block {
    margin: 64px 0;
}
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--color-border-sand);
    padding-bottom: 12px;
}
.latest-head h2 { margin: 0; font-size: 1.5rem; }
.latest-head .latest-meta {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

/* =========================================================
   Карточки записей (A8, A10)
   ========================================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(30, 35, 31, 0.09);
}

/* Вертикальная карточка — миниатюра через aspect-ratio */
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-link { display: block; line-height: 0; }
.card-thumb-link img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-meta {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-slate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.card-meta .meta-cat { color: var(--color-accent); font-weight: 600; }
.card-meta .badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--color-accent-mid);
    color: var(--color-accent);
    border-radius: var(--radius-pill);
    font-weight: 600;
    letter-spacing: 0.05em;
}
.card-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.35;
}
.card-title a { color: var(--color-coal); text-decoration: none; }
.card-title a:hover { color: var(--color-accent); }
.card-excerpt { color: var(--color-graphite); font-size: 0.97rem; }
.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: 12px;
}

/* Горизонтальная вариация (для главной — первая статья) */
.card.card-wide {
    grid-column: 1 / -1;
    flex-direction: row;
}
.card-wide .card-thumb-wrap {
    flex: 0 0 380px;
    position: relative;
    overflow: hidden;
}
.card-wide .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-wide .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-wide .card-body { padding: 32px; }
.card-wide .card-title { font-size: 1.55rem; }

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    line-height: 1.2;
}
.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: var(--color-coal);
    border-color: var(--color-coal);
    color: #fff;
    text-decoration: none;
}
.btn-ghost {
    background: transparent;
    color: var(--color-coal);
    border: 1.5px solid var(--color-accent);
}
.btn-ghost:hover {
    background: var(--color-accent-soft);
    color: var(--color-coal);
    text-decoration: none;
}
.btn-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--bg-paper);
    color: var(--color-slate);
    border: 1px solid var(--color-border-sand);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}
.btn-pill:hover,
.btn-pill.is-active {
    background: var(--color-accent-mid);
    color: var(--color-accent);
    border-color: transparent;
}

/* =========================================================
   Сайдбар, виджеты
   ========================================================= */
.side-col { min-width: 0; }
.widget {
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}
.widget-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border-sand);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin: 0 0 10px; padding: 0; }
.widget ul li a { color: var(--color-coal); text-decoration: none; }
.widget ul li a:hover { color: var(--color-accent); }

/* Воронцовский указатель */
.expert-pointer {
    background: var(--bg-card);
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}
.expert-pointer::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 24px;
    width: 16px; height: 16px;
    background: var(--color-accent);
    transform: rotate(45deg);
    border-radius: 2px;
}
.expert-pointer-eyebrow {
    font-family: var(--font-display);
    font-size: 0.72rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    margin-bottom: 6px;
}
.expert-pointer-title {
    font-family: var(--font-display);
    color: var(--color-coal);
    font-size: 1.05rem;
    margin: 0 0 12px;
}
.expert-pointer ul li {
    border-bottom: 1px dashed var(--color-border-sand);
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.expert-pointer ul li:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
.expert-pointer ul li a {
    color: var(--color-coal);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: inline-block;
}
.expert-pointer ul li a:hover { color: var(--color-accent); }

/* =========================================================
   Контент записей и страниц
   ========================================================= */
.entry-head { margin-bottom: 28px; }
.entry-eyebrow {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-bottom: 10px;
}
.entry-title {
    font-size: 2.1rem;
    margin: 0 0 14px;
}
.entry-meta {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-slate);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--color-border-sand);
    border-bottom: 1px solid var(--color-border-sand);
}
.entry-meta .badge-verified {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--color-accent-mid);
    color: var(--color-accent);
    border-radius: var(--radius-pill);
    font-weight: 600;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.entry-thumb {
    margin: 0 0 24px;
    border-radius: 6px;
    overflow: hidden;
}
.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content { font-size: 1.05rem; }
.entry-content h2,
.entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: 4px; margin: 1em 0; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption {
    font-size: 0.85rem;
    color: var(--color-slate);
    margin-top: 6px;
    text-align: center;
}

/* Карточка автора */
.author-card {
    margin: 48px 0 24px;
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
    padding: 24px;
    background: var(--bg-card);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.author-card-mark {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-accent-mid);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
}
.author-card-body { flex: 1; }
.author-card-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-coal);
    margin: 0 0 4px;
}
.author-card-tag {
    font-size: 0.85rem;
    color: var(--color-slate);
    margin-bottom: 10px;
    font-family: var(--font-display);
}
.author-card-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.85rem;
    color: var(--color-graphite);
}
.author-card-stats li {
    margin: 0;
    padding-left: 18px;
    position: relative;
}
.author-card-stats li::before {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 8px; height: 8px;
    border: 1.5px solid var(--color-accent);
    border-radius: 1px;
}

/* Категории как pill */
.term-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

/* =========================================================
   Пагинация
   ========================================================= */
.paginate {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.paginate a, .paginate span {
    display: inline-block;
    padding: 9px 14px;
    min-width: 40px;
    text-align: center;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--color-coal);
    border: 1px solid var(--color-border-sand);
    line-height: 1.3;
}
.paginate a:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.paginate .current {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.paginate .dots {
    background: transparent;
    border-color: transparent;
    color: var(--color-slate);
}

/* =========================================================
   Поиск
   ========================================================= */
.search-form {
    display: flex;
    gap: 0;
    align-items: stretch;
    border-bottom: 1.5px solid var(--color-border-sand);
    transition: border-color 0.2s ease;
    padding: 4px 0;
}
.search-form:focus-within { border-bottom-color: var(--color-accent); }
.search-form input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-coal);
    outline: none;
}
.search-form input[type="search"]::placeholder { color: var(--color-slate); }
.search-form button {
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.search-form button:hover { color: var(--color-accent-dark); }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border-sand);
}
.comments-title {
    font-size: 1.35rem;
    margin-bottom: 24px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.comment-list .comment {
    margin-bottom: 24px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--color-border-sand);
    border-radius: 6px;
}
.comment-list .children {
    list-style: none;
    margin-top: 14px;
    padding-left: 24px;
    border-left: 2px solid var(--color-border-sand);
}
.comment-meta {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-slate);
    margin-bottom: 8px;
}
.comment-meta strong { color: var(--color-coal); font-weight: 600; }
.comment-body p { margin: 0 0 0.6em; }
.comment-reply-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--color-accent);
}

.comment-form { margin-top: 24px; }
.comment-form label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-slate);
    margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--color-border-sand);
    background: transparent;
    padding: 8px 0;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-coal);
    margin-bottom: 18px;
    transition: border-color 0.2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-submit input[type="submit"] {
    background: var(--color-accent);
    color: #fff;
    border: 1.5px solid var(--color-accent);
    border-radius: var(--radius-btn);
    padding: 11px 22px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--color-coal);
    border-color: var(--color-coal);
}

/* =========================================================
   Подвал
   ========================================================= */
.site-foot {
    margin-top: auto;
    background: var(--color-coal);
    color: #cdd0cd;
    padding: 56px 0 24px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.foot-col .widget {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}
.foot-col .widget-title {
    color: var(--color-mustard);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.foot-col .widget a { color: #cdd0cd; }
.foot-col .widget a:hover { color: var(--color-mustard); }
.foot-col .widget ul li { margin-bottom: 8px; }
.foot-col p { color: #b3b8b3; font-size: 0.95rem; }

.foot-bar {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #999d99;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-display);
}
.foot-signature {
    font-style: italic;
    color: var(--color-mustard);
}

/* =========================================================
   Cookie-баннер (A11)
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: var(--color-coal);
    color: #ededed;
    padding: 18px 24px;
    border-radius: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
    font-size: 0.92rem;
    line-height: 1.5;
    border-left: 4px solid var(--color-accent);
}
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--color-mustard); }
.cookie-banner button {
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.cookie-banner button:hover { background: var(--color-accent-dark); }

/* =========================================================
   404
   ========================================================= */
.error-404 {
    text-align: center;
    padding: 64px 24px;
}
.error-404 .err-num {
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--color-accent);
    line-height: 1;
    margin: 0 0 16px;
    font-weight: 800;
}
.error-404 h1 { margin-bottom: 12px; }
.error-404 .search-form { max-width: 480px; margin: 24px auto 32px; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 960px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.45rem; }
    .hero { padding: 40px 28px; }
    .hero h1 { font-size: 1.95rem; }
    .section-block { padding: 32px 24px; }
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .layout-grid.no-sidebar { grid-template-columns: 1fr; }
    .feature-row { grid-template-columns: 1fr; }
    .steps-row { grid-template-columns: 1fr; }
    .lead-row { grid-template-columns: 1fr; }
    .checklist { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; gap: 24px; }
    .foot-cols { grid-template-columns: 1fr; gap: 32px; }

    /* Горизонтальная карточка переходит в вертикальную (A10) */
    .card.card-wide { flex-direction: column; }
    .card-wide .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-wide .card-thumb-wrap a { position: static; }
    .card-wide .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-wide .card-body { padding: 24px; }
    .card-wide .card-title { font-size: 1.25rem; }

    /* Мобильное меню — выезжает справа */
    .menu-toggle { display: inline-flex; }
    .primary-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 340px;
        height: 100vh;
        background: var(--bg-card);
        background-image: repeating-linear-gradient(
            transparent 0,
            transparent 31px,
            var(--color-border-sand) 32px
        );
        padding: 70px 28px 28px;
        box-shadow: -8px 0 32px rgba(0,0,0,0.12);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    .primary-nav.is-open { right: 0; }
    .primary-nav ul {
        flex-direction: column;
        gap: 4px;
    }
    .primary-nav ul li {
        padding: 8px 12px;
        position: relative;
    }
    .primary-nav ul li.current-menu-item {
        background: var(--color-accent-mid);
        border-radius: 4px;
    }
    .primary-nav a {
        font-size: 1.05rem;
        border: none;
        display: block;
    }
    .menu-overlay[hidden] { display: none !important; }
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(30, 35, 31, 0.4);
        z-index: 998;
    }
    .nav-close {
        display: inline-block;
        position: absolute;
        top: 18px;
        right: 18px;
        background: none;
        border: 1px solid var(--color-border-sand);
        border-radius: 4px;
        padding: 8px 12px;
        cursor: pointer;
        font-family: var(--font-display);
        font-size: 0.85rem;
        color: var(--color-coal);
    }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .shell { padding: 0 16px; }
    .hero { padding: 28px 20px; margin-top: 16px; }
    .hero-eyebrow { font-size: 0.72rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 1rem; }
    .section-block { padding: 24px 18px; margin: 40px 0; }
    .feature-tile { padding: 22px 18px; }
    .entry-title { font-size: 1.55rem; }
    .author-card { flex-direction: column; }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 16px;
    }
    .cookie-banner button { width: 100%; }
    .foot-bar { flex-direction: column; }
    .brand-tag { display: none; }
    .latest-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Утилиты */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
