/*
Theme Name: dds_beonlinebyhp.com
Theme URI: https://beonlinebyhp.com/
Author: Алексей Мартынов
Author URI: https://beonlinebyhp.com/
Description: SmartStudy Flow — минималистичная и тёплая тема для контентного проекта об обучении и продуктивности в учёбе.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
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: smartstudy_flow
*/

/* ============================================================
   Базовые токены и сброс
   ============================================================ */
:root {
    --bg-main: #FEFCF5;
    --bg-soft: #F9F6EE;
    --ink: #1E2A2E;
    --ink-mute: #4A5B5E;
    --mint: #2D9C7A;
    --mint-deep: #217A5F;
    --amber: #E8B86B;
    --peach: #F4A28C;
    --lavender: #B7B0E0;
    --sky: #A5D0E0;
    --line: #E4DFCC;
    --shadow-soft: 0 6px 18px rgba(30, 42, 46, 0.06);
    --shadow-hover: 0 10px 28px rgba(45, 156, 122, 0.14);
    --radius-s: 12px;
    --radius-m: 16px;
    --radius-pill: 40px;
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
    --measure: 72ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--mint);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--mint-deep); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--ink);
    line-height: 1.3;
    margin: 1.2em 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

blockquote {
    border-left: 4px solid var(--amber);
    margin: 1.4em 0;
    padding: 0.4em 1.2em;
    font-style: italic;
    color: var(--ink-mute);
    background: var(--bg-soft);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

code {
    font-family: "JetBrains Mono", Consolas, Monaco, monospace;
    background: var(--bg-soft);
    padding: 0.15em 0.4em;
    border-radius: 6px;
    font-size: 0.92em;
}
pre {
    background: var(--bg-soft);
    padding: 1em 1.2em;
    border-radius: var(--radius-s);
    overflow-x: auto;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--line);
}
table th, table td {
    border: 1px solid var(--line);
    padding: 0.7em 1em;
    text-align: left;
}
table th { background: var(--bg-soft); font-weight: 600; }

/* ============================================================
   Лейаут
   ============================================================ */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-main {
    padding: 40px 0 60px;
    min-height: 50vh;
}

.layout {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}
.layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
    .layout.has-sidebar {
        grid-template-columns: minmax(0, 67%) minmax(0, 27%);
        gap: 6%;
    }
}

.content-narrow { max-width: 85%; margin: 0 auto; }

/* ============================================================
   Шапка
   ============================================================ */
.topbar {
    background: rgba(254, 252, 245, 0.82);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.25s ease;
}
.brand:hover { text-decoration: none; transform: translateY(-1px); }
.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-tagline {
    font-size: 0.82rem;
    color: var(--ink-mute);
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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: inline-block;
    padding: 8px 14px;
    color: var(--ink);
    border-radius: var(--radius-s);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    background: var(--bg-soft);
    color: var(--mint-deep);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    width: 48px; height: 48px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--ink);
    transition: transform 0.25s ease;
}
.menu-toggle:hover { transform: scale(1.1) rotate(-4deg); }
.menu-toggle svg { width: 22px; height: 22px; }

/* Маршруты обучения */
.routes {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}
.routes-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--ink-mute);
}
.routes-label { font-weight: 500; margin-right: 8px; }
.route-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.route-pill:hover,
.route-pill.is-active {
    background: var(--mint);
    color: #fff;
    border-color: var(--mint);
    text-decoration: none;
}

/* ============================================================
   Хлебные крошки
   ============================================================ */
.crumbs {
    font-size: 0.9rem;
    color: var(--ink-mute);
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 6px;
    color: var(--line);
}
.crumbs a { color: var(--mint); }
.crumbs .current { color: var(--ink); }

/* ============================================================
   Карточки записей (лента)
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0 0 40px;
}
@media (min-width: 700px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
    .card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: var(--line);
}
.card-thumb-wrap a {
    display: block;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-thumb-ph {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--mint) 0%, var(--amber) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 2rem;
    opacity: 0.85;
}

.card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-meta {
    font-size: 0.82rem;
    color: var(--ink-mute);
    margin: 0 0 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}
.smart-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    border-radius: var(--radius-pill);
    background: var(--sky);
    color: var(--ink);
    line-height: 1.4;
}
.smart-tag.is-method { background: var(--mint); color: #fff; }
.smart-tag.is-time   { background: var(--amber); color: var(--ink); }
.smart-tag.is-list   { background: var(--lavender); color: var(--ink); }
.smart-tag.is-new    { background: var(--peach); color: var(--ink); }

.card-title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    line-height: 1.35;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--mint-deep); text-decoration: none; }

.card-excerpt {
    color: var(--ink-mute);
    font-size: 0.95rem;
    margin: 0 0 16px;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Горизонтальная карточка (для «свежего материала» на главной) */
.card.card-row {
    flex-direction: row;
    align-items: stretch;
}
@media (max-width: 600px) {
    .card.card-row { flex-direction: column; }
}
.card.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: auto;
}
@media (max-width: 600px) {
    .card.card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card.card-row .card-thumb-wrap a {
        position: static;
    }
    .card.card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid var(--mint);
    background: transparent;
    color: var(--mint);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn:hover {
    background: var(--mint);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(45, 156, 122, 0.18);
    transform: translateY(-1px);
}
.btn-primary {
    background: var(--mint);
    color: #fff;
}
.btn-primary:hover { background: var(--mint-deep); border-color: var(--mint-deep); }

.btn-ghost {
    padding: 8px 14px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    color: var(--ink-mute);
    background: transparent;
    font-size: 0.85rem;
}
.btn-ghost:hover {
    background: rgba(232, 184, 107, 0.1);
    color: var(--ink);
    border-color: var(--amber);
    text-decoration: none;
}

.btn-round {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.25s ease;
}
.btn-round:hover { transform: scale(1.1) rotate(-4deg); }

/* ============================================================
   Главная страница
   ============================================================ */
.hero {
    padding: 50px 0 20px;
}
.hero h1 {
    font-size: 2.4rem;
    margin: 0 0 14px;
    line-height: 1.2;
}
.hero p {
    font-size: 1.1rem;
    color: var(--ink-mute);
    max-width: 72ch;
}
.hero-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

.section {
    padding: 40px 0;
    border-bottom: 1px dashed var(--line);
}
.section:last-of-type { border-bottom: none; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}
.section-head h2 { margin: 0; }
.section-intro {
    color: var(--ink-mute);
    margin: 0 0 24px;
    max-width: 72ch;
}

/* Блок «Маршруты» */
.route-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 720px) {
    .route-cards { grid-template-columns: repeat(3, 1fr); }
}
.route-card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 26px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.route-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.route-card .route-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.4rem;
    font-family: var(--font-serif);
}
.route-card:nth-child(1) .route-icon { background: var(--mint); }
.route-card:nth-child(2) .route-icon { background: var(--amber); color: var(--ink); }
.route-card:nth-child(3) .route-icon { background: var(--lavender); color: var(--ink); }
.route-card h3 { margin: 0; font-size: 1.2rem; }
.route-card p { color: var(--ink-mute); margin: 0; }
.route-card .route-more {
    margin-top: 12px;
    color: var(--mint);
    font-weight: 500;
    align-self: flex-start;
}

/* Блок «Шаги / методика» */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 720px) {
    .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
    padding: 22px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    position: relative;
}
.step-num {
    width: 32px; height: 32px;
    background: var(--mint);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; margin: 6px 0 6px; }
.step p { color: var(--ink-mute); margin: 0; font-size: 0.95rem; }

/* Блок «Инструменты / колонки» */
.cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 720px) {
    .cols { grid-template-columns: repeat(3, 1fr); }
}
.col-item {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 24px 22px;
}
.col-item .col-dot {
    width: 12px; height: 12px; border-radius: 50%;
    display: inline-block; margin-right: 8px; vertical-align: middle;
}
.col-item h3 { font-size: 1.1rem; margin: 0 0 8px; }
.col-item p { color: var(--ink-mute); margin: 0; }

/* Блок «Цитата / призыв» */
.callout {
    background: linear-gradient(135deg, rgba(45, 156, 122, 0.08) 0%, rgba(232, 184, 107, 0.1) 100%);
    border-radius: var(--radius-m);
    padding: 36px 32px;
    border: 1px solid var(--line);
    text-align: center;
}
.callout h2 { margin-top: 0; }
.callout p { max-width: 60ch; margin: 0 auto 20px; color: var(--ink-mute); }

/* ============================================================
   Запись и страница
   ============================================================ */
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0 0 10px; font-size: 2rem; }
.entry-meta {
    color: var(--ink-mute);
    font-size: 0.9rem;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.entry-thumb {
    margin: 0 0 24px;
    border-radius: var(--radius-m);
    overflow: hidden;
}
.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.entry-listen {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-soft);
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-pill);
    color: var(--ink-mute);
    font-size: 0.9rem;
    margin: 0 0 20px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: background 0.2s ease;
}
.entry-listen:hover { background: #fff; }
.entry-listen .play {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--amber);
    color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.entry-content {
    line-height: 1.8;
    max-width: var(--measure);
}
.entry-content img { border-radius: var(--radius-s); }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { margin: 1em 0; padding-left: 1.6em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.entry-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.entry-tags a {
    font-size: 0.85rem;
    background: var(--bg-soft);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    color: var(--ink-mute);
}
.entry-tags a:hover { background: var(--mint); color: #fff; text-decoration: none; }

/* Опорный конспект */
.summary-box {
    background: var(--bg-soft);
    border-left: 4px solid var(--mint);
    padding: 18px 22px;
    margin: 24px 0;
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
    box-shadow: var(--shadow-soft);
}
.summary-box h4 { margin: 0 0 10px; font-size: 1rem; color: var(--mint-deep); }
.summary-box ul { list-style: none; padding: 0; margin: 0; }
.summary-box li {
    padding-left: 26px;
    position: relative;
    margin-bottom: 6px;
}
.summary-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--mint);
    font-weight: 700;
}

/* ============================================================
   Сайдбар
   ============================================================ */
.sidebar {
    font-size: 0.95rem;
}
.widget {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.widget-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-family: var(--font-serif);
    color: var(--ink);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li { margin-bottom: 8px; }
.widget li:last-child { margin-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--mint-deep); }

.widget_search input[type="text"],
.widget_search input[type="search"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: #fff;
    color: var(--ink);
    font-size: 0.95rem;
}
.widget_search input[type="submit"] {
    margin-top: 8px;
    padding: 8px 18px;
    border: 1px solid var(--mint);
    background: var(--mint);
    color: #fff;
    border-radius: var(--radius-pill);
    cursor: pointer;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 40px 0 10px;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    color: var(--ink);
    background: #fff;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.pager .page-numbers:hover {
    border-color: var(--mint);
    color: var(--mint-deep);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--mint);
    color: #fff;
    border-color: var(--mint);
}

/* ============================================================
   Форма поиска
   ============================================================ */
.searchform {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 20px auto;
}
.searchform input[type="search"],
.searchform input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--ink);
    font-size: 0.95rem;
}
.searchform input[type="submit"] {
    padding: 10px 22px;
    background: var(--mint);
    color: #fff;
    border: 1px solid var(--mint);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.2s ease;
}
.searchform input[type="submit"]:hover { background: var(--mint-deep); border-color: var(--mint-deep); }

/* ============================================================
   Подвал — «Куда дальше?»
   ============================================================ */
.next-nav {
    background: var(--bg-soft);
    padding: 40px 0;
    border-top: 1px solid var(--line);
}
.next-nav h2 {
    text-align: center;
    margin: 0 0 24px;
    font-size: 1.4rem;
}
.next-nav-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 700px) {
    .next-nav-grid { grid-template-columns: repeat(3, 1fr); }
}
.next-nav-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 26px 24px;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.next-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    color: var(--ink);
}
.next-nav-card .icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--mint);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.next-nav-card:nth-child(2) .icon { background: var(--amber); color: var(--ink); }
.next-nav-card:nth-child(3) .icon { background: var(--lavender); color: var(--ink); }
.next-nav-card h3 { margin: 0; font-size: 1.05rem; }
.next-nav-card p { margin: 2px 0 0; color: var(--ink-mute); font-size: 0.9rem; }

.site-foot {
    background: rgba(249, 246, 238, 0.9);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-top: 1px solid var(--line);
    padding: 40px 0 20px;
}
.foot-cols {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
    margin-bottom: 30px;
}
@media (min-width: 820px) {
    .foot-cols { grid-template-columns: repeat(3, 1fr); }
}
.foot-cols .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.foot-cols .widget-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
}
.copyright {
    text-align: center;
    color: var(--ink-mute);
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.copyright .foot-author { margin-left: 10px; opacity: 0.8; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}
.comments-area h3 { margin-top: 0; }
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.comment-list li {
    padding: 18px 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-s);
    margin-bottom: 14px;
    border: 1px solid var(--line);
}
.comment-list li ul.children {
    list-style: none;
    margin: 14px 0 0 24px;
    padding: 0;
}
.comment-author { font-weight: 600; }
.comment-meta { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 8px; }
.comment-reply-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
}

.comment-form p {
    margin-bottom: 14px;
}
.comment-form label {
    display: block;
    font-size: 0.9rem;
    color: var(--ink-mute);
    margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .form-submit input[type="submit"] {
    padding: 10px 26px;
    background: var(--mint);
    color: #fff;
    border: 1px solid var(--mint);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--mint-deep);
    border-color: var(--mint-deep);
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-bar {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    background: rgba(30, 42, 46, 0.94);
    color: #fff;
    border-radius: var(--radius-m);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 999;
    flex-wrap: wrap;
    font-size: 0.92rem;
    backdrop-filter: blur(6px);
}
.cookie-bar a { color: var(--amber); }
.cookie-bar button {
    padding: 8px 22px;
    background: var(--mint);
    color: #fff;
    border: 1px solid var(--mint);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}
.cookie-bar button:hover { background: var(--mint-deep); border-color: var(--mint-deep); }
.cookie-bar.is-hidden { display: none; }

/* ============================================================
   Мобильная навигация
   ============================================================ */
@media (max-width: 820px) {
    .menu-toggle { display: inline-flex; margin-left: auto; align-items: center; justify-content: center; }
    .primary-nav {
        order: 5;
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul {
        flex-direction: column;
        gap: 2px;
        padding: 10px 0;
    }
    .brand-title, .brand-tagline { max-width: 60vw; }
}

/* ============================================================
   404
   ============================================================ */
.err404 {
    text-align: center;
    padding: 50px 0 30px;
}
.err404 .code {
    font-size: 5rem;
    font-family: var(--font-serif);
    color: var(--mint);
    margin: 0;
    line-height: 1;
}
.err404 h1 { margin: 10px 0; }
.err404 p { color: var(--ink-mute); max-width: 50ch; margin: 10px auto 20px; }

/* ============================================================
   Утилиты
   ============================================================ */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.alignleft   { float: left; margin: 0.4em 1.4em 0.6em 0; }
.alignright  { float: right; margin: 0.4em 0 0.6em 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(--ink-mute);
    text-align: center;
    margin-top: 6px;
}

.sticky .card-title::before {
    content: "★";
    color: var(--amber);
    margin-right: 6px;
}
