/*
Theme Name: dds_export08.ru
Theme URI: https://export08.ru/
Author: Алексей Руднев
Description: Навигатор экспорта — тема для информационно-обучающей платформы по внешнеэкономической деятельности. Японский минимализм, акцентная типографика, лавандово-сливовая палитра.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: expnav
*/

/* =========================================================
   1. Переменные
   ========================================================= */

:root {
    --bg: #F7F5FC;
    --bg-alt: #EDE8F5;
    --bg-header: #FFFFFF;
    --bg-footer: #1E1A2E;
    --bg-side: #F0ECF7;
    --ink: #1E1A2E;
    --accent: #7C3AED;
    --accent-dark: #6D28D9;
    --accent-soft: #A78BFA;
    --muted: #8B81A3;
    --line: #D6CDE3;
    --pale: #C4B5D4;
    --font-head: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-body: "Open Sans", "Noto Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --shadow-hard: 4px 6px 0 var(--line);
    --shadow-hard-hover: 4px 8px 0 var(--line);
}

/* =========================================================
   2. База
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1.18;
    margin: 0 0 0.7em;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1.15em; }

a {
    color: var(--accent);
    text-decoration: none;
    text-decoration-color: transparent;
    transition: color 0.18s ease, text-decoration-color 0.25s ease;
}

a:hover,
a:focus {
    color: var(--accent-dark);
    text-decoration: underline dotted;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent-soft);
    text-underline-offset: 4px;
}

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

blockquote {
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(167, 139, 250, 0.15)), var(--bg-alt);
    border-left: 3px solid var(--accent);
    font-family: var(--font-head);
    font-size: 1.12rem;
    position: relative;
}

blockquote::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(to top left, var(--accent) 50%, transparent 50%);
}

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

code, pre {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.92em;
    background: var(--bg-alt);
}

pre {
    padding: 1.1rem 1.3rem;
    overflow-x: auto;
    border-left: 3px solid var(--accent-soft);
}

code { padding: 0.1em 0.35em; }

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

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

th { background: var(--bg-alt); font-family: var(--font-head); font-weight: 700; }

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

figure { margin: 1.6em 0; }
figcaption { color: var(--muted); font-size: 0.88rem; }

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

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

/* =========================================================
   3. Контейнеры
   ========================================================= */

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.wide {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.site-main { padding: 2.6rem 0 4rem; }

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}

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

/* =========================================================
   4. Шапка
   ========================================================= */

.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--line);
    position: static;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.35rem 0;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-mark { flex: 0 0 auto; line-height: 0; }
.brand-mark img,
.brand-mark svg { display: block; width: 52px; height: 52px; }

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--ink);
    max-width: 60ch;
}

a.brand-name:hover { color: var(--accent); text-decoration: none; }

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 62ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 0 0 8px 0;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

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

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

.main-nav li { position: relative; }

.main-nav a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    padding: 0.3rem 0;
    display: inline-block;
}

.main-nav a:hover { color: var(--accent); }

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

.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    min-width: 210px;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--line);
    padding: 0.5rem 0;
}

.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 0.45rem 1rem; display: block; }

/* =========================================================
   5. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.82rem 1.7rem;
    border: 2px solid var(--accent);
    border-radius: 0 0 8px 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(2px);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-light {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-light:hover,
.btn-light:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

/* =========================================================
   6. Хлебные крошки
   ========================================================= */

.breadcrumbs {
    font-size: 0.83rem;
    color: var(--muted);
    margin: 0 0 1.6rem;
    line-height: 1.6;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--accent-soft); margin: 0 0.35rem; }
.breadcrumbs span:not(.sep) { color: var(--ink); }

.breadcrumbs-bar { padding-top: 1.6rem; }

/* =========================================================
   7. Точечный маркер у заголовков
   ========================================================= */

.dot-head::before,
.entry-content h2::before,
.entry-content h3::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 0.6rem;
    position: relative;
    top: -0.3em;
}

.entry-content h3::before { background: var(--accent-soft); }

/* =========================================================
   8. Секции главной
   ========================================================= */

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

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

.sec-rule {
    width: 70%;
    height: 1px;
    background: var(--line);
    margin: 74px 0 0;
}

.sec-head { margin-bottom: 2.6rem; }
.sec-head p { color: var(--muted); max-width: 62ch; margin-bottom: 0; }

/* --- Блок 1. Hero --- */

.hero {
    background-color: var(--bg-footer);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='%237C3AED' opacity='0.1'%3E%3Ccircle cx='170' cy='150' r='120'/%3E%3Ccircle cx='265' cy='235' r='135'/%3E%3Ccircle cx='115' cy='255' r='88'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -60px top -80px;
    background-size: 520px 520px;
    padding: 104px 0 96px;
    color: #fff;
}

.hero-marker {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    margin-bottom: 1.6rem;
}

.hero h1 {
    color: #fff;
    width: 55%;
    margin-bottom: 1.3rem;
}

.hero-sub {
    color: var(--pale);
    font-size: 1.06rem;
    max-width: 58ch;
    margin-bottom: 2.3rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* --- Блок 2. Сетка направлений --- */

.dir-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.dir-card {
    border-top: 2px solid var(--line);
    background: transparent;
    padding: 1.9rem 1.6rem 1.7rem;
    transition: background 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.dir-card:hover {
    background: var(--bg-alt);
    border-top-color: var(--accent);
}

.dir-ico {
    width: 54px;
    height: 54px;
    border: 1px solid var(--accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
}

.dir-ico svg { width: 26px; height: 26px; display: block; }

.dir-card h3 { margin-bottom: 0.5rem; font-size: 1.24rem; }
.dir-card p { margin-bottom: 0; color: var(--muted); font-size: 0.96rem; }

/* --- Блок 3. Последние записи на главной --- */

.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

/* --- Блок 4. Статистика --- */

.stats-section {
    background-color: var(--bg-alt);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='%23C4B5D4' opacity='0.18'%3E%3Ccircle cx='180' cy='170' r='125'/%3E%3Ccircle cx='270' cy='250' r='130'/%3E%3Ccircle cx='125' cy='265' r='85'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -70px bottom -90px;
    background-size: 480px 480px;
}

.stats-lead {
    position: relative;
    font-style: italic;
    color: var(--ink);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(167, 139, 250, 0.15));
    padding: 1.5rem 1.8rem;
    max-width: 70ch;
    margin-bottom: 3rem;
}

.stats-lead::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(to top left, var(--accent) 50%, transparent 50%);
}

.stats-lead p { margin: 0; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-item {
    min-width: 0;
    position: relative;
    padding: 0 1.4rem;
}

.stat-item + .stat-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 1px;
    height: 40px;
    background: var(--line);
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* --- Блок 5. Траектория (таймлайн) --- */

.track-section .track-head {
    width: 62%;
    margin-left: auto;
    margin-bottom: 3.2rem;
    text-align: right;
}

.track-head p { color: var(--muted); margin-bottom: 0; }

.track-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 3.6rem;
    width: 74%;
    position: relative;
}

.track-list::before {
    content: "";
    position: absolute;
    left: 1.35rem;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 2px;
    background: var(--accent-soft);
}

.track-item {
    position: relative;
    padding: 0 0 2.6rem 1.4rem;
    min-width: 0;
}

.track-item:last-child { padding-bottom: 0; }

.track-num {
    position: absolute;
    left: -3.6rem;
    top: -0.55rem;
    width: 2.7rem;
    text-align: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--accent);
    background: var(--bg);
    padding: 0.3rem 0;
}

.track-item h3 { margin-bottom: 0.4rem; }
.track-item p { color: var(--muted); margin-bottom: 0; }

/* =========================================================
   9. Карточки записей
   ========================================================= */

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top: 2px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow-hard);
    overflow: hidden;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    min-width: 0;
}

.card:hover {
    box-shadow: var(--shadow-hard-hover);
    background: var(--bg-side);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.5rem 1.5rem;
    min-width: 0;
}

.card-title {
    font-size: 1.18rem;
    line-height: 1.28;
    margin: 0 0 0.55rem;
}

.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.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: 0.9rem; }

.card-more a {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.card-thumb-wrap { overflow: hidden; }
.card-thumb-wrap img { display: block; }

/* Вертикальная карточка (сетка) */
.card-grid .card-thumb-wrap a { display: block; }

.card-grid .card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.15);
    transition: filter 0.25s ease;
}

.card-grid:hover .card-thumb-wrap img { filter: grayscale(30%) contrast(1.05); }

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

.card-row .card-thumb-wrap {
    flex: 0 0 210px;
    aspect-ratio: 1 / 1;
    position: relative;
}

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

.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.15);
    transition: filter 0.25s ease;
}

.card-row:hover .card-thumb-wrap img { filter: grayscale(30%) contrast(1.05); }

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.9rem;
    margin-bottom: 2.8rem;
}

.post-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent); }

.meta-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-soft);
}

/* =========================================================
   10. Пагинация
   ========================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.4rem 0 0;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0 0 8px 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.94rem;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pager .page-numbers:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

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

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

/* =========================================================
   11. Записи и страницы
   ========================================================= */

.entry-header { margin-bottom: 1.8rem; }
.entry-title { margin-bottom: 0.7rem; }

.entry-thumb { margin: 0 0 2rem; }

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.12);
}

.entry-content { min-width: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2.1em; }
.entry-content h3 { margin-top: 1.7em; }

.entry-content img { display: block; height: auto; }

.entry-footer {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

.entry-footer a { color: var(--accent); }

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.4rem;
}

.post-nav-item {
    border-top: 2px solid var(--line);
    padding: 1rem 1.2rem 1.1rem;
    background: #fff;
    min-width: 0;
}

.post-nav-item span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.post-nav-item.next { text-align: right; }

.page-title-block { margin-bottom: 2rem; }

/* =========================================================
   12. Сайдбар и виджеты
   ========================================================= */

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--bg-side);
    border-top: 2px solid var(--accent-soft);
    padding: 1.5rem 1.5rem 1.6rem;
    margin-bottom: 1.8rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.12rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

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

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

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

.sidebar .widget li {
    padding: 0.5rem 0 0.5rem 1rem;
    border-bottom: 1px solid var(--line);
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.sidebar .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

.sidebar .widget select {
    width: 100%;
    padding: 0.55rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

/* Виджеты подвала */

.site-footer .widget { color: var(--pale); margin-bottom: 0; }

.site-footer .widget-title {
    color: #fff;
    font-size: 1.06rem;
    margin-bottom: 1.05rem;
}

.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget { color: var(--pale); font-size: 0.94rem; }

.site-footer .widget a { color: #fff; }
.site-footer .widget a:hover { color: var(--accent-soft); text-decoration-color: var(--accent-soft); }

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

.site-footer .widget li {
    padding: 0.42rem 0 0.42rem 1rem;
    position: relative;
    line-height: 1.5;
}

.site-footer .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-soft);
}

.site-footer .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

/* =========================================================
   13. Формы
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.6rem;
    min-width: 0;
}

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

.search-form input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.96rem;
}

input:focus, textarea:focus {
    outline: 2px solid var(--accent-soft);
    outline-offset: 1px;
}

.search-form .btn { flex: 0 0 auto; padding: 0.72rem 1.2rem; }

/* =========================================================
   14. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comments-title { font-size: 1.5rem; margin-bottom: 1.6rem; }

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

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

.comment-item { margin-bottom: 1.2rem; }

.comment-inner {
    background: #fff;
    border-top: 2px solid var(--line);
    box-shadow: var(--shadow-hard);
    padding: 1.15rem 1.4rem 1.25rem;
}

.comment-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}

.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-await { color: var(--accent); font-size: 0.88rem; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-actions { margin-top: 0.6rem; font-size: 0.88rem; }

.comment-respond {
    background: var(--bg-alt);
    padding: 1.7rem 1.8rem 1.8rem;
    border-top: 2px solid var(--accent-soft);
}

.comment-reply-title { font-size: 1.28rem; margin-bottom: 1rem; }
.comment-form p { margin-bottom: 1rem; }

.comment-form label {
    display: block;
    font-size: 0.88rem;
    font-family: var(--font-head);
    font-weight: 600;
    margin-bottom: 0.32rem;
}

.comment-form input[type="submit"] {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.82rem 1.7rem;
    border: 2px solid var(--accent);
    border-radius: 0 0 8px 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.comment-form input[type="submit"]:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(2px);
}

.comment-notes, .comment-form-cookies-consent label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 400;
}

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

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

.no-comments { color: var(--muted); }

/* =========================================================
   15. Подвал
   ========================================================= */

.site-footer {
    background: var(--bg-footer);
    color: var(--pale);
    padding: 62px 0 0;
    margin-top: 3rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
    padding-bottom: 48px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(214, 205, 227, 0.22);
    padding: 22px 0 26px;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.6;
}

/* =========================================================
   16. Cookie-баннер
   ========================================================= */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.1rem;
    background: var(--bg-footer);
    border-top: 2px solid var(--accent);
    color: var(--pale);
    padding: 1.1rem 1.6rem;
    font-size: 0.88rem;
    line-height: 1.55;
}

.cookie-banner p { margin: 0; max-width: 78ch; }
.cookie-banner a { color: var(--accent-soft); }

/* =========================================================
   17. 404 и поиск
   ========================================================= */

.notfound { padding: 1rem 0 2rem; }
.notfound-code {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 8rem);
    line-height: 1;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.notfound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1.6rem;
}

.notfound .search-form { max-width: 480px; margin-top: 1.4rem; }

.archive-head { margin-bottom: 2.2rem; }
.archive-head p { color: var(--muted); margin-bottom: 0; }

/* =========================================================
   18. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    body { font-size: 16px; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.6rem;
    }

    .layout-single,
    .wide { width: 100%; }

    .hero h1 { width: 78%; }

    .track-list { width: 100%; }
    .track-section .track-head { width: 100%; text-align: left; }

    .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
    .stat-item:nth-child(odd)::before { display: none; }

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

    .main-nav {
        flex: 0 0 100%;
        order: 3;
        display: none;
        padding-bottom: 0.6rem;
    }

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

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .main-nav li { width: 100%; border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 0.7rem 0; width: 100%; }

    .main-nav .sub-menu {
        display: flex;
        position: static;
        border: 0;
        padding: 0 0 0 1rem;
        min-width: 0;
    }

    .header-inner { flex-wrap: wrap; }
}

@media (max-width: 600px) {
    .front-section { padding: 56px 0; }
    .hero { padding: 68px 0 62px; background-size: 360px 360px; background-position: right -80px top -70px; }
    .hero h1 { width: 100%; }
    .sec-rule { margin-top: 48px; }

    .dir-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .dir-card { padding: 1.5rem 1.3rem 1.4rem; }

    .latest-grid { grid-template-columns: minmax(0, 1fr); }

    .stats-row { grid-template-columns: minmax(0, 1fr); row-gap: 1.9rem; }
    .stat-item { padding: 0 0 0 1.1rem; }
    .stat-item::before,
    .stat-item + .stat-item::before { content: ""; display: block; position: absolute; left: 0; top: 0.55rem; width: 1px; height: 40px; background: var(--line); }
    .stats-lead { padding: 1.25rem 1.3rem; }

    .track-list { padding-left: 2.8rem; }
    .track-list::before { left: 1rem; }
    .track-num { left: -2.8rem; width: 2.1rem; font-size: 1.9rem; }

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

    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        aspect-ratio: auto;
    }

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

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

    .card-body { padding: 1.2rem 1.2rem 1.3rem; }

    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-item.next { text-align: left; }

    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 2.1rem; }

    .cookie-banner { padding: 1rem 1.2rem; }

    .comment-respond { padding: 1.3rem 1.3rem 1.4rem; }
    blockquote { padding: 1.25rem 1.3rem; }
    .search-form { flex-wrap: wrap; }
    .search-form label { flex: 1 1 100%; }
}
