/*
Theme Name: dds_michellemoves.com
Author: Анна Смирнова
Description: Региональный образовательный портал для родителей и школьников. Тема для информационного сайта о местных школах, кружках, репетиторах и образовательных событиях.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: eduportal
*/

/* ============ Переменные ============ */
:root {
    --bg: #FEF9F0;
    --terra: #C84E31;
    --terra-dark: #B04127;
    --sage: #6B8C61;
    --sage-dark: #5a7752;
    --amber: #E8B042;
    --ink: #2D2F31;
    --ink-soft: #6B6F73;
    --border: #E6E0D5;
    --beige: #F2EDE4;
    --white: #FFFFFF;
    --footer-bg: #2B2A26;
    --shadow-soft: 0 6px 22px rgba(45, 47, 49, 0.08);
    --shadow-lift: 0 14px 34px rgba(45, 47, 49, 0.16);
    --radius-pill: 40px;
    --font-base: 'Inter', 'Manrope', 'Segoe UI', Arial, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

/* ============ Скрытие через атрибут hidden (см. правило A11) ============ */
[hidden] { display: none !important; }
.route-panel[hidden] { display: none !important; }
.cookie-banner[hidden] { display: none !important; }

/* ============ Сброс и база ============ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

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

a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-base);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.05rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

blockquote {
    margin: 0 0 1em;
    padding: 0.4em 0 0.4em 1.1em;
    border-left: 4px solid var(--amber);
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--ink);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--terra);
    color: var(--white);
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ============ Контейнер ширины (единственное место, см. A12.7) ============ */
.shell {
    width: min(92%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

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

.site-main { flex: 1 0 auto; }

.page-block { padding: 28px 0 60px; }

/* ============ Раскладки ============ */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 44px;
    align-items: start;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

.sidebar { min-width: 0; }

/* ============ Шапка ============ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 28px;
    padding: 20px 0;
}

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

.brand-logo-link { display: block; flex: 0 0 auto; line-height: 0; }

.brand-logo {
    display: block;
    width: 60px;
    height: 60px;
}

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

.site-title {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.3;
}
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--terra); text-decoration: none; }

.site-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.5;
    margin-top: 4px;
}

/* ============ Навигация (не липкая) ============ */
.main-nav { flex: 0 0 auto; }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.nav-list li { margin: 0; }

.nav-list a {
    display: block;
    padding: 9px 16px;
    border-radius: 22px;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 1.18rem;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-list a:hover {
    background: var(--beige);
    color: var(--terra);
    text-decoration: none;
}

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
    background: var(--terra);
    color: var(--white);
}

.nav-list .sub-menu {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 9px;
    background: var(--beige);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-family: var(--font-base);
    font-size: 0.95rem;
    color: var(--ink);
}

.nav-toggle-bar {
    position: relative;
    width: 20px;
    height: 2px;
    background: var(--terra);
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--terra);
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--sage); }
.breadcrumbs a:hover { color: var(--terra); }
.breadcrumbs .sep { color: var(--border); margin: 0 2px; }
.breadcrumbs span { color: var(--ink-soft); }

/* ============ Кнопки ============ */
.btn-primary,
.btn-secondary {
    display: inline-block;
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    padding: 14px 30px;
    border: 2px solid var(--terra);
    border-radius: var(--radius-pill);
    background: var(--terra);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--terra-dark);
    border-color: var(--terra-dark);
    color: var(--white);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transform: scale(1.02);
}

.btn-secondary {
    padding: 12px 26px;
    border: 2px solid var(--sage);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--sage);
}
.btn-secondary:hover {
    background: var(--sage);
    color: var(--white);
    text-decoration: none;
}

.btn-filter {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--beige);
    color: var(--ink);
    font-size: 0.95rem;
    cursor: pointer;
}
.btn-filter.is-active,
.btn-filter:hover {
    background: var(--terra);
    border-color: var(--terra);
    color: var(--white);
    text-decoration: none;
}

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
    border-color: var(--terra);
}

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

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

.card-thumb--empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--beige), #e9dec8);
    position: relative;
}
.card-thumb--empty::after {
    content: "michellemoves";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(107, 140, 97, 0.5);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

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

.card-meta {
    font-size: 0.82rem;
    color: var(--sage);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    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(--terra); text-decoration: none; }

.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.96rem;
    margin-bottom: 16px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 9px 20px;
    font-size: 0.92rem;
}

/* ============ Главная — общие секции ============ */
.block-inner {
    width: min(85%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 1.85rem;
    margin-bottom: 8px;
}
.section-sub,
.archive-sub,
.section-lead {
    color: var(--ink-soft);
    margin-bottom: 26px;
    max-width: 640px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 12px;
}

/* --- Блок 1: приветствие + умные карточки --- */
.intro-block {
    padding: 56px 0 50px;
    border-bottom: 1px solid var(--border);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.intro-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.intro-lead {
    font-size: 1.1rem;
    color: var(--ink-soft);
    margin-bottom: 26px;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.smart-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.smart-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 5px solid var(--sage);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.smart-card:nth-child(2) { border-left-color: var(--terra); }
.smart-card:nth-child(3) { border-left-color: var(--amber); }
.smart-card:hover {
    transform: translateX(4px);
    border-color: var(--terra);
}

.smart-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--beige);
}
.smart-icon svg { width: 26px; height: 26px; }

.smart-body { min-width: 0; }
.smart-body h3 { margin-bottom: 4px; font-size: 1.1rem; }
.smart-body p { margin: 0 0 8px; font-size: 0.92rem; color: var(--ink-soft); }
.smart-body a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--terra);
}

/* --- Блок 2: маршрут образования (таймлайн) --- */
.route-block { padding: 56px 0; }

.edu-route {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 16px;
    margin-top: 8px;
}

.route-stage {
    grid-row: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 14px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--font-base);
    color: var(--ink);
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.route-stage:nth-of-type(1) { grid-column: 1; }
.route-stage:nth-of-type(2) { grid-column: 2; }
.route-stage:nth-of-type(3) { grid-column: 3; }
.route-stage:nth-of-type(4) { grid-column: 4; }
.route-stage:hover { border-color: var(--sage); }
.route-stage.is-active {
    border-color: var(--terra);
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.route-num {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--beige);
    color: var(--sage);
    font-weight: 700;
}
.route-stage.is-active .route-num {
    background: var(--terra);
    color: var(--white);
}

.route-name {
    font-weight: 600;
    font-size: 1rem;
}
.route-hint {
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.route-panel {
    grid-row: 2;
    grid-column: 1 / -1;
    margin-top: 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: var(--shadow-soft);
}
.route-panel h3 {
    color: var(--terra);
    font-size: 1.3rem;
}
.route-panel ul { margin-bottom: 0; }
.route-panel li { margin-bottom: 6px; }

/* --- Блок 3: свежие материалы --- */
.latest-block {
    padding: 56px 0;
    background: var(--beige);
}

/* --- Блок 4: родительский блокнот --- */
.notebook-block {
    padding: 56px 0;
    background-color: #FBEFCB;
    background-image: radial-gradient(rgba(200, 78, 49, 0.16) 1.4px, transparent 1.4px);
    background-size: 20px 20px;
}

.notebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 24px;
}

.notebook-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #ECD9A6;
    border-radius: 16px;
    padding: 24px 26px;
    min-width: 0;
}
.notebook-card h3 { color: var(--terra); font-size: 1.15rem; }
.notebook-card.is-quote {
    display: flex;
    align-items: center;
}
.notebook-card blockquote {
    border-left: none;
    padding: 0;
    margin: 0;
}
.notebook-card blockquote cite {
    display: block;
    font-family: var(--font-base);
    font-size: 0.88rem;
    font-style: normal;
    color: var(--ink-soft);
    margin-top: 10px;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 9px;
    font-size: 0.96rem;
}
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 2px solid var(--sage);
    background:
        linear-gradient(45deg, transparent 44%, var(--sage) 44%, var(--sage) 56%, transparent 56%),
        linear-gradient(-45deg, transparent 44%, var(--sage) 44%, var(--sage) 56%, transparent 56%);
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.link-list li { margin-bottom: 8px; }
.link-list a {
    color: var(--sage-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- Блок 5: локальная идентичность + контакты --- */
.local-block {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

.local-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.local-points {
    list-style: none;
    padding: 0;
    margin: 0;
}
.local-points li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
}
.local-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid var(--terra);
}

.local-contacts {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}
.local-contacts h3 { color: var(--terra); }

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.98rem;
}
.contact-list li:last-child { border-bottom: none; }

.empty-note {
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 26px;
    color: var(--ink-soft);
}

/* ============ Архив / запись ============ */
.archive-head { margin-bottom: 26px; }
.archive-title { font-size: 1.95rem; }

.post-head { margin-bottom: 20px; }
.post-title { font-size: 2.1rem; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.post-cover {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
}
.post-cover img { display: block; width: 100%; }

.post-content { font-size: 1.04rem; }
.post-content img { border-radius: 12px; }
.post-content h2 { margin-top: 1.5em; }
.post-content h3 { margin-top: 1.3em; }
.post-content a { text-decoration: underline; }

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--border);
}
.post-content th,
.post-content td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}
.post-content th {
    background: var(--beige);
    font-weight: 700;
}

.post-tags {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.post-tags a {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 5px 13px;
    background: var(--beige);
    border-radius: 8px;
    font-size: 0.86rem;
    color: var(--sage-dark);
}

.page-links {
    margin-top: 20px;
    font-size: 0.92rem;
}

/* ============ Пагинация ============ */
.pager { margin-top: 30px; }
.pager-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pager-list a,
.pager-list span {
    display: block;
    min-width: 42px;
    padding: 9px 14px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-weight: 600;
}
.pager-list a:hover {
    background: var(--beige);
    border-color: var(--sage);
    color: var(--terra);
    text-decoration: none;
}
.pager-list .current {
    background: var(--terra);
    border-color: var(--terra);
    color: var(--white);
}

/* ============ Сайдбар и виджеты ============ */
.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}
.sidebar .widget-title {
    color: var(--terra);
    font-size: 1.15rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--beige);
}
.sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--terra); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ============ Подвал ============ */
.site-footer {
    flex-shrink: 0;
    background-color: var(--footer-bg);
    background-image:
        radial-gradient(circle at 12% 20%, rgba(107, 140, 97, 0.14), transparent 32%),
        radial-gradient(circle at 88% 78%, rgba(200, 78, 49, 0.14), transparent 34%);
    color: #E6E0D5;
    margin-top: 40px;
}

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

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

/* Контраст текста виджетов в подвале — фон тёмный, текст светлый */
.site-footer .widget {
    color: #E6E0D5;
    margin-bottom: 0;
}
.site-footer .widget-title {
    color: var(--bg);
    font-size: 1.12rem;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(230, 224, 213, 0.18);
}
.site-footer .widget p { color: #E6E0D5; }
.site-footer .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer .widget li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(230, 224, 213, 0.12);
}
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget a { color: var(--amber); }
.site-footer .widget a:hover { color: var(--white); }
.site-footer .widget .post-date,
.site-footer .widget .rss-date {
    display: block;
    font-size: 0.8rem;
    color: #B7B2A6;
}

.footer-bottom {
    border-top: 1px solid rgba(230, 224, 213, 0.14);
    padding: 18px 0;
}
.copyright {
    margin: 0;
    font-size: 0.86rem;
    color: #B7B2A6;
}

/* ============ Cookie-баннер ============ */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 22px;
    padding: 16px 22px;
    background: var(--ink);
    color: var(--bg);
    box-shadow: 0 -6px 22px rgba(45, 47, 49, 0.22);
}
.cookie-text {
    margin: 0;
    font-size: 0.92rem;
    max-width: 760px;
}
.cookie-accept {
    padding: 11px 26px;
    font-size: 0.94rem;
}

/* ============ Комментарии ============ */
.comments-area {
    margin-top: 44px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.comments-title { font-size: 1.4rem; }

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}

.comment-body {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.comment-avatar { border-radius: 50%; }
.comment-author { font-weight: 700; }
.comment-date { font-size: 0.82rem; color: var(--ink-soft); }
.comment-await { font-size: 0.85rem; color: var(--terra); }
.comment-reply a {
    font-size: 0.86rem;
    font-weight: 600;
}
.comments-closed { color: var(--ink-soft); }

.comment-respond {
    background: var(--beige);
    border-radius: 16px;
    padding: 24px 26px;
}
.comment-respond .comment-reply-title { font-size: 1.25rem; }
.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    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 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-base);
    font-size: 0.96rem;
    background: var(--white);
    margin-bottom: 14px;
}
.comment-form textarea { min-height: 130px; }
.comment-form .form-submit { margin: 0; }

/* ============ Форма поиска ============ */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin: 14px 0;
}
.search-label {
    flex: 1 1 220px;
    min-width: 0;
}
.search-label-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ink-soft);
}
.search-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-base);
    font-size: 0.98rem;
    background: var(--white);
}
.search-submit {
    align-self: flex-end;
    padding: 12px 24px;
}
.sidebar .search-form { flex-direction: column; }
.sidebar .search-submit { align-self: stretch; }

/* ============ 404 ============ */
.error-404 { text-align: center; }
.error-title {
    font-size: 4.5rem;
    color: var(--terra);
    margin-bottom: 4px;
}
.error-lead {
    font-size: 1.1rem;
    color: var(--ink-soft);
}
.error-404 .search-form { justify-content: center; }

/* ============ Адаптив: до 960px ============ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }
    .intro-grid,
    .local-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
    .intro-title { font-size: 2.1rem; }
    .footer-cols {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 28px;
    }

    .main-nav {
        flex-basis: 100%;
        order: 3;
    }
    .nav-toggle { display: flex; }
    .nav-list {
        display: none;
        flex-direction: column;
        gap: 4px;
        background: var(--beige);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
    }
    .nav-list.is-open { display: flex; }
    .nav-list a { font-size: 1.05rem; }
}

/* ============ Адаптив: до 600px ============ */
@media (max-width: 600px) {
    body { font-size: 16px; }

    h1 { font-size: 1.7rem; }
    .intro-title { font-size: 1.78rem; }
    .post-title { font-size: 1.6rem; }
    .section-title { font-size: 1.5rem; }

    .layout-single .content-area { width: 100%; }
    .block-inner { width: 90%; }

    .intro-block,
    .route-block,
    .latest-block,
    .notebook-block,
    .local-block { padding: 38px 0; }

    .intro-actions .btn-primary,
    .intro-actions .btn-secondary {
        flex: 1 1 100%;
    }

    /* Таймлайн превращается в вертикальный аккордеон */
    .edu-route {
        display: block;
    }
    .route-stage {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        margin-bottom: 8px;
    }
    .route-panel {
        margin-top: 0;
        margin-bottom: 14px;
        border-radius: 12px;
    }

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

    .card-grid { gap: 22px; }

    .search-submit { align-self: stretch; width: 100%; }
}
