/*
Theme Name: dds_ancsanctionedgenocide.com
Author: Дмитрий Седов
Description: Аналитическая тема для информационного ресурса: расследования, экспертные разборы и данные. Адаптивная вёрстка, акцент на читаемость длинных материалов.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: prizma
*/

:root {
    --paper: #f5f3ec;
    --surface: #ffffff;
    --ink: #181b1f;
    --muted: #595e64;
    --line: #e1ddd1;
    --line-strong: #cfc9ba;
    --accent: #9c3b1b;
    --accent-dark: #7c2e14;
    --deep: #14171a;
    --deep-soft: #1d2126;
    --deep-text: #c9ccd0;
    --deep-muted: #888d93;
    --serif: Georgia, "Times New Roman", "PT Serif", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.5em;
    font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

/* ширина контента задаётся в одном месте */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Шапка ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-mark { flex: 0 0 auto; display: block; }
.brand-mark { width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    display: block;
    max-width: 540px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 4px;
    max-width: 540px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--ink);
    font-size: 0.95rem;
}

.primary-nav { margin-left: auto; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.primary-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--ink);
    font-size: 0.96rem;
    border-radius: 4px;
}
.primary-nav a:hover { background: var(--paper); color: var(--accent); text-decoration: none; }
.primary-nav .current-menu-item > a { color: var(--accent); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 16px 0 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line-strong); }

/* ---------- Основная раскладка ---------- */
.site-main { padding: 30px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 44px;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}
.content-area { min-width: 0; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--ink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---------- Карточки записей ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb.is-placeholder {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--deep-soft), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb.is-placeholder span {
    font-family: var(--serif);
    color: rgba(255,255,255,0.85);
    font-size: 1.4rem;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.card-title { font-size: 1.18rem; margin: 0 0 10px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-excerpt { color: var(--muted); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

/* ---------- Одиночная запись / страница ---------- */
.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 2rem; }
.entry-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 6px; }
.entry-content h2 { margin-top: 1.4em; }
.entry-featured img { border-radius: 8px; margin-bottom: 24px; display: block; width: 100%; }

.entry-content table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.entry-content table, .entry-content th, .entry-content td { border: 1px solid var(--line-strong); }
.entry-content th, .entry-content td { padding: 9px 12px; text-align: left; }
.entry-content th { background: var(--paper); }

blockquote {
    margin: 1.4em 0;
    padding: 6px 22px;
    border-left: 4px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}

/* ---------- Пагинация (type => plain, селекторы .page-numbers) ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 8px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
}
.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ---------- Главная ---------- */
.front-wrap { width: 85%; margin-inline: auto; }

.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }

/* блок текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img, .split-media svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* сетка направлений */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 22px;
    margin-top: 28px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px 24px;
    min-width: 0;
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.feature .feature-icon { width: 40px; height: 40px; margin-bottom: 14px; display: block; }

/* пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 24px;
    margin-top: 28px;
    counter-reset: step;
}
.step { position: relative; padding-left: 56px; min-width: 0; }
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0; top: 0;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--deep);
    color: #fff;
    font-family: var(--serif);
    border-radius: 8px;
    font-size: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* CTA */
.cta {
    background: var(--deep);
    color: var(--deep-text);
    border-radius: 12px;
    padding: 48px 44px;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: var(--deep-text); max-width: 62ch; margin-inline: auto; }
.cta-actions {
    margin-top: 22px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.96rem;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { border: 1px solid var(--deep-muted); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; text-decoration: none; }

.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

/* контакты статичные */
.contact-block { margin-top: 18px; font-size: 1.02rem; }
.contact-block a { font-weight: 600; }
.social-links { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 0.95rem;
}
.search-form button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--accent-dark); }

/* ---------- Комментарии ---------- */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 22px; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
}
.comment-author { font-weight: 700; font-size: 0.95rem; }
.comment-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.comment-list .children { list-style: none; margin: 18px 0 0 28px; padding: 0; }
.comment-respond { margin-top: 28px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 85%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 12px;
}
.comment-respond textarea { width: 100%; max-width: none; }
.comment-respond .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 22px;
    cursor: pointer;
    font-size: 0.96rem;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 40px 0; }
.notfound h1 { font-size: 4rem; color: var(--accent); margin-bottom: 0; }
.notfound .search-form { max-width: 460px; margin: 24px auto 0; }

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--deep);
    color: var(--deep-text);
    padding: 50px 0 26px;
    margin-top: auto;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 36px;
}
.footer-col { min-width: 0; }
.footer-col .widget-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 14px;
}
.footer-col, .footer-col p, .footer-col li { color: var(--deep-text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 6px 0; }
.footer-col a { color: var(--deep-text); }
.footer-col a:hover { color: #fff; }
.footer-col .post-date { display: block; font-size: 0.78rem; color: var(--deep-muted); }
.site-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--deep-soft);
    font-size: 0.84rem;
    color: var(--deep-muted);
}

.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Cookie-баннер (правило [hidden] ДО основного блока, см. A11) ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--deep);
    color: var(--deep-text);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    border-top: 2px solid var(--accent);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 70ch; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    cursor: pointer;
    font-size: 0.92rem;
    flex: 0 0 auto;
}
.cookie-banner button:hover { background: var(--accent-dark); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .split { grid-template-columns: 1fr; gap: 28px; }
    .split.reverse .split-media { order: 0; }
    .layout-single .content-area, .front-wrap { width: 100%; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .entry-title { font-size: 1.6rem; }
    .nav-toggle { display: inline-block; }
    .primary-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 2px; }
    .primary-nav a { padding: 11px 12px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .section { padding: 40px 0; }
    .cta { padding: 34px 22px; }
}
