/*
Theme Name: dds_bioritm31.ru
Theme URI: https://bioritm31.ru/
Author: Анисимов Артём Анисимов Артём
Author URI: https://bioritm31.ru/
Description: Тема для информационного сайта о выборе загородного дома. Холодная «лесная» палитра, архитектурная типографика, адаптивная вёрстка.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: bioritm31
*/

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

:root {
    --bg: #F4F7F9;
    --bg-alt: #E8EEF2;
    --surface: #FFFFFF;
    --dark: #0B1E2B;
    --dark-2: #162B3B;
    --text: #1E2A35;
    --accent: #2A7F6E;
    --accent-dark: #1B5E50;
    --accent-2: #4A8B9B;
    --muted: #7A8A93;
    --line: #DDE5EA;
    --shadow: 0 6px 22px rgba(30, 60, 82, .10);
    --shadow-hi: 0 18px 38px rgba(30, 60, 82, .20);
    --font-head: "Montserrat", "Inter", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
    --font-body: "PT Sans", "Roboto", "Segoe UI", Arial, sans-serif;
    --corner: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

/* ==================================================================
   2. Сброс и база
   ================================================================== */

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

html { scroll-behavior: smooth; }

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

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .03;
    background-image:
        repeating-linear-gradient(45deg, #0B1E2B 0, #0B1E2B 1px, transparent 1px, transparent 46px),
        repeating-linear-gradient(-45deg, #0B1E2B 0, #0B1E2B 1px, transparent 1px, transparent 46px);
}

.site {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main { flex: 1; }

img, svg, video { max-width: 100%; }

img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.2;
    letter-spacing: .02em;
    margin: 0 0 .7em;
    font-weight: 700;
}

h1 { font-size: 3.8rem; letter-spacing: .01em; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

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

blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    font-style: italic;
}

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

pre { padding: 1.1rem 1.2rem; overflow-x: auto; }

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

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

th { background: var(--bg-alt); font-family: var(--font-head); font-size: .95rem; }

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

.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(85%, 1180px);
    margin-inline: auto;
}

.layout-single {
    display: block;
    width: 100%;
}

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

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

.page-body { padding: 2.6rem 0 3.6rem; }

/* ==================================================================
   4. Ссылки с анимированным подчёркиванием
   ================================================================== */

.nav-list a,
.entry-content a,
.card-title a,
.widget a,
.breadcrumbs a,
.footer-bottom a {
    position: relative;
    text-decoration: none;
}

.nav-list a::after,
.entry-content a::after,
.card-title a::after,
.widget a::after,
.breadcrumbs a::after,
.footer-bottom a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .28s ease;
}

.nav-list a:hover::after,
.entry-content a:hover::after,
.card-title a:hover::after,
.widget a:hover::after,
.breadcrumbs a:hover::after,
.footer-bottom a:hover::after { transform: scaleX(1); }

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

.btn {
    display: inline-block;
    padding: .85rem 1.8rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, border-color .2s ease, color .2s ease;
}

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

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

.btn-ghost:hover,
.btn-ghost:focus { background: var(--accent); color: #fff; }

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

.btn-light:hover,
.btn-light:focus { background: var(--accent); border-color: var(--accent); }

.btn::after { display: none; }

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

.site-header {
    position: relative;
    background: var(--dark);
    color: #fff;
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1.3rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 0;
}

.brand-mark { flex: 0 0 auto; line-height: 0; }

.brand-logo { max-height: 62px; width: auto; }

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

.brand-title {
    display: block;
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.25;
}

.brand-title::after { display: none; }

.brand-desc {
    display: block;
    margin-top: .25rem;
    font-size: .82rem;
    line-height: 1.45;
    color: #9BB0BC;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 2px;
    color: #fff;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-toggle-bars {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #fff;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.main-nav { min-width: 0; }

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list li { margin: 0; }

.nav-list a {
    color: #E4ECF1;
    font-family: var(--font-head);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.nav-list a:hover { color: #fff; }

.nav-list .current-menu-item > a { color: var(--accent-2); }

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

.breadcrumbs {
    padding: 1rem 0 0;
    font-size: .86rem;
    color: var(--muted);
}

.breadcrumbs a { color: var(--accent-2); }

.breadcrumbs .crumb-sep { color: var(--muted); margin: 0 .35rem; }

.breadcrumbs span { color: var(--muted); }

/* ==================================================================
   8. Заголовки секций
   ================================================================== */

.sec-title {
    position: relative;
    padding-left: 1.15rem;
    margin-bottom: 1.5rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .12em;
    width: 3px;
    height: 1.5em;
    background: var(--accent);
}

.sec-title .rhomb {
    color: var(--accent);
    margin-right: .5rem;
    font-size: .8em;
    vertical-align: .12em;
}

.sec-lead {
    max-width: 68ch;
    color: #45525C;
    margin-bottom: 2rem;
}

.fs-dark .sec-title,
.fs-dark .sec-lead { color: #fff; }

.fs-dark .sec-lead { color: #B7C7D1; }

.fs-dark .sec-title::before { background: var(--accent-2); }

/* ==================================================================
   9. Главная — секции
   ================================================================== */

.fs { padding: 4rem 0; }

.fs-white { background: var(--surface); }
.fs-alt { background: var(--bg-alt); }

.fs-dark {
    background: linear-gradient(150deg, var(--dark) 0%, var(--dark-2) 100%);
    color: #E4ECF1;
    position: relative;
    overflow: hidden;
}

.fs-sep {
    height: 1px;
    background: var(--line);
    width: min(72%, 900px);
    margin: 0 auto;
}

/* --- Блок 1: hero --- */

.hero {
    position: relative;
    background: var(--dark);
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(11, 30, 43, .93) 0%, rgba(11, 30, 43, .72) 55%, rgba(22, 43, 59, .55) 100%);
}

.hero-forest {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 62%;
    height: 200px;
    opacity: .10;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cg fill='%23A9CBD8'%3E%3Cpath d='M10 200 L48 74 L86 200 Z'/%3E%3Cpath d='M70 200 L104 108 L138 200 Z'/%3E%3Cpath d='M120 200 L166 48 L212 200 Z'/%3E%3Cpath d='M200 200 L236 96 L272 200 Z'/%3E%3Cpath d='M252 200 L296 62 L340 200 Z'/%3E%3Cpath d='M320 200 L356 104 L392 200 Z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
    position: relative;
    padding: 6.5rem 0 6rem;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 1.1rem;
    padding: .35rem .8rem;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 2px;
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #A9CBD8;
}

.hero-title {
    max-width: 20ch;
    color: #fff;
    margin-bottom: 1.2rem;
}

.hero-sub {
    max-width: 56ch;
    color: #C4D4DD;
    font-size: 1.1rem;
    margin-bottom: 2.1rem;
}

/* --- Блок 2: сетка рубрик --- */

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

.pillar {
    min-width: 0;
    background: transparent;
    padding: .2rem 0 1.5rem;
    border-bottom: 2px solid var(--accent);
}

.pillar-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 1.1rem;
    color: var(--accent-2);
}

.pillar h3 { margin-bottom: .55rem; }

.pillar p { margin: 0; color: #45525C; }

/* --- Блок «Последние записи» --- */

.latest-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.latest-head .sec-title { margin-bottom: 1.2rem; }

/* --- Блок 3: таймлайн --- */

.timeline {
    position: relative;
    padding: .5rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--accent);
}

.tl-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr);
    gap: 0 3rem;
    align-items: center;
    padding: 1.5rem 0;
}

.tl-step {
    text-align: right;
    padding-right: 1.6rem;
    min-width: 0;
}

.tl-step .tl-num {
    display: block;
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .18em;
    color: var(--accent-2);
    margin-bottom: .3rem;
}

.tl-step h3 { margin: 0; }

.tl-dot {
    position: relative;
    width: 0;
}

.tl-dot::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 50%;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px dashed var(--accent);
}

.fs-white .tl-dot::before { background: var(--surface); }

.tl-text {
    padding-left: 1.6rem;
    min-width: 0;
    color: #45525C;
}

.tl-text p { margin: 0; }

/* --- Блок 4: плюсы и минусы --- */

.fs-dark .forest-mark {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 460px;
    max-width: 58%;
    height: 190px;
    opacity: .10;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cg fill='%234A8B9B'%3E%3Cpath d='M10 200 L48 74 L86 200 Z'/%3E%3Cpath d='M70 200 L104 108 L138 200 Z'/%3E%3Cpath d='M120 200 L166 48 L212 200 Z'/%3E%3Cpath d='M200 200 L236 96 L272 200 Z'/%3E%3Cpath d='M252 200 L296 62 L340 200 Z'/%3E%3Cpath d='M320 200 L356 104 L392 200 Z'/%3E%3C/g%3E%3C/svg%3E");
}

.pm-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem;
    margin-bottom: 2.4rem;
}

.pm-col {
    min-width: 0;
    padding: 1.8rem 1.7rem;
    border: 1px solid rgba(169, 203, 216, .22);
    border-radius: 2px;
    background: rgba(255, 255, 255, .04);
    clip-path: var(--corner);
}

.pm-col h3 { color: #fff; margin-bottom: 1rem; }

.pm-list { list-style: none; margin: 0; padding: 0; }

.pm-list li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: .8rem;
    color: #D3E0E8;
}

.pm-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-head);
    font-weight: 700;
}

.pm-plus li::before { content: "✓"; color: #4CC79E; }
.pm-minus li::before { content: "✕"; color: #E2686B; }

.pm-cta {
    position: relative;
    text-align: center;
}

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

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border-radius: 4px;
    border-top: 3px solid transparent;
    box-shadow: var(--shadow);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hi);
    border-top-color: var(--accent);
}

.fs-alt .card,
.fs-white .card { background: var(--surface); }

.card-thumb { display: block; line-height: 0; }

.card-thumb a { display: block; line-height: 0; }

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    clip-path: var(--corner);
}

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

.card-title {
    font-size: 1.28rem;
    margin: 0 0 .55rem;
}

.card-title a { color: var(--text); }

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

.card-meta {
    font-size: .82rem;
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-family: var(--font-head);
    margin-bottom: .9rem;
}

.card-excerpt { color: #45525C; margin-bottom: 1.3rem; }

.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more { margin-top: auto; align-self: flex-start; }

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

.entry-header { margin-bottom: 1.7rem; }

.entry-title { font-size: 2.4rem; margin-bottom: .5rem; }

.entry-meta {
    font-family: var(--font-head);
    font-size: .84rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.entry-thumb { margin-bottom: 1.8rem; }

.entry-thumb img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    clip-path: var(--corner);
}

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

.entry-content h2 {
    position: relative;
    padding-left: 1.1rem;
    margin-top: 2rem;
    font-size: 1.8rem;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .12em;
    width: 3px;
    height: 1.5em;
    background: var(--accent);
}

.entry-content h3 { margin-top: 1.7rem; }

.entry-content img { border-radius: 2px; }

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

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

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

.post-nav-item {
    min-width: 0;
    padding: 1.1rem 1.3rem;
    background: var(--surface);
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.post-nav-item span {
    display: block;
    font-family: var(--font-head);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .3rem;
}

.post-nav-item a { color: var(--text); font-weight: 600; }

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

.page-head { margin-bottom: 1.8rem; }

.page-head .page-title { font-size: 2.4rem; margin-bottom: .3rem; }

.page-head .page-sub { color: var(--muted); margin: 0; }

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

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--surface);
    color: var(--text);
    padding: 1.5rem 1.5rem 1.6rem;
    margin-bottom: 1.7rem;
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.sidebar .widget-title {
    position: relative;
    padding-left: .9rem;
    font-size: 1.1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1rem;
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15em;
    width: 3px;
    height: 1.4em;
    background: var(--accent);
}

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

.sidebar .widget li {
    padding: .55rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

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

.sidebar .widget a { color: var(--text); }

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

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

.sidebar .widget p { color: #45525C; }

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

.site-footer {
    position: relative;
    background: var(--dark);
    color: #C9D6DE;
    overflow: hidden;
    border-top: 3px solid var(--accent);
}

.site-footer .footer-forest {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 460px;
    max-width: 55%;
    height: 190px;
    opacity: .10;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cg fill='%234A8B9B'%3E%3Cpath d='M10 200 L48 74 L86 200 Z'/%3E%3Cpath d='M70 200 L104 108 L138 200 Z'/%3E%3Cpath d='M120 200 L166 48 L212 200 Z'/%3E%3Cpath d='M200 200 L236 96 L272 200 Z'/%3E%3Cpath d='M252 200 L296 62 L340 200 Z'/%3E%3Cpath d='M320 200 L356 104 L392 200 Z'/%3E%3C/g%3E%3C/svg%3E");
}

.footer-cols {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
    padding: 3.2rem 0 2.4rem;
}

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

.footer-col .widget { margin-bottom: 1.6rem; color: #C9D6DE; }

.footer-col .widget:last-child { margin-bottom: 0; }

.footer-col .widget-title {
    position: relative;
    padding-left: .9rem;
    font-size: 1.02rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: .9rem;
}

.footer-col .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15em;
    width: 3px;
    height: 1.4em;
    background: var(--accent-2);
}

.footer-col .widget p { color: #C9D6DE; }

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

.footer-col .widget li {
    padding: .4rem 0;
    border-bottom: 1px solid rgba(201, 214, 222, .14);
    color: #C9D6DE;
}

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

.footer-col .widget a { color: #D8E4EB; }

.footer-col .widget a:hover { color: #fff; }

.footer-col .widget .post-date,
.footer-col .widget .rss-date { display: block; font-size: .8rem; color: #93A7B3; }

.footer-bottom {
    position: relative;
    border-top: 1px solid rgba(201, 214, 222, .16);
    padding: 1.3rem 0;
    font-size: .86rem;
    color: #93A7B3;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 .85rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-head);
    font-size: .92rem;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.pager .page-numbers:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(2px);
}

.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);
    transform: none;
}

/* ==================================================================
   15. Форма поиска
   ================================================================== */

.search-form {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.search-form .search-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    color: var(--text);
    font-family: var(--font-body);
    font-size: .95rem;
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form .search-submit { flex: 0 0 auto; }

.sidebar .widget .search-form .search-field { background: #fff; }

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

.comments-area {
    margin-top: 2.8rem;
    padding: 1.9rem 1.8rem;
    background: var(--surface);
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.comments-title,
.comment-reply-title {
    position: relative;
    padding-left: 1rem;
    font-size: 1.35rem;
}

.comments-title::before,
.comment-reply-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15em;
    width: 3px;
    height: 1.4em;
    background: var(--accent);
}

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

.comment-list .children { list-style: none; margin: 1rem 0 0 1.4rem; padding: 0; }

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

.comment-inner {
    padding: 1.1rem 1.2rem;
    background: var(--bg);
    border-left: 3px solid var(--accent-2);
    border-radius: 2px;
}

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

.comment-author { font-family: var(--font-head); font-weight: 700; }

.comment-date { font-size: .8rem; color: var(--muted); }

.comment-text p { margin: 0 0 .7em; }

.comment-actions a { font-size: .86rem; color: var(--accent); }

.comment-hold { color: var(--muted); font-size: .9rem; }

.comment-form { display: block; }

.comment-form p { margin-bottom: 1rem; }

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .05em;
    margin-bottom: .35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    font-family: var(--font-body);
    font-size: .96rem;
    color: var(--text);
}

.comment-form textarea { min-height: 150px; resize: vertical; }

.comment-form .submit {
    display: inline-block;
    padding: .85rem 1.8rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.comment-form .submit:hover {
    background: var(--accent-dark);
    transform: translateY(2px);
}

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

/* ==================================================================
   17. 404 и страница поиска
   ================================================================== */

.error-box {
    padding: 2.6rem 2.2rem;
    background: var(--surface);
    border-radius: 2px;
    box-shadow: var(--shadow);
    clip-path: var(--corner);
}

.error-code {
    font-family: var(--font-head);
    font-size: 4.6rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: .6rem;
}

.error-actions { margin-top: 1.6rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.error-search { margin-top: 1.8rem; max-width: 520px; }

.notice-empty {
    padding: 1.6rem 1.7rem;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    color: #45525C;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.6rem;
    background: var(--dark-2);
    border-top: 2px solid var(--accent);
    color: #D5E1E8;
    font-size: .9rem;
}

.cookie-banner p { margin: 0; max-width: 70ch; }

.cookie-banner a { color: #9FD8CB; }

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

@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    h2 { font-size: 1.8rem; }

    .shell { width: min(92%, 1180px); }

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

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

    .main-nav { flex: 1 0 100%; }

    .nav-list[hidden] { display: none !important; }

    .nav-list {
        flex-direction: column;
        gap: .2rem;
        padding-top: .9rem;
        border-top: 1px solid rgba(255, 255, 255, .16);
    }

    .nav-list li { padding: .5rem 0; }

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

    .hero-inner { padding: 4.6rem 0 4.2rem; }
}

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

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.22rem; }

    .fs { padding: 2.8rem 0; }

    .hero-inner { padding: 3.4rem 0 3rem; }

    .hero-sub { font-size: 1rem; }

    .grid-3,
    .cards-grid,
    .pm-grid,
    .post-nav,
    .footer-cols { grid-template-columns: minmax(0, 1fr); }

    .footer-cols { gap: 1.8rem; padding: 2.4rem 0 1.8rem; }

    .pm-col { padding: 1.5rem 1.3rem; }

    .pm-grid { gap: 1.4rem; margin-bottom: 1.8rem; }

    .comments-area { padding: 1.4rem 1.2rem; }

    .error-box { padding: 1.9rem 1.4rem; }

    .notice-empty { padding: 1.3rem 1.2rem; }

    .cookie-banner {
        justify-content: flex-start;
        gap: .9rem;
        padding: 1rem 1.2rem;
    }

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

    .entry-title,
    .page-head .page-title { font-size: 1.75rem; }

    /* таймлайн — в одну колонку */
    .timeline::before { left: 9px; margin-left: 0; }

    .tl-row {
        grid-template-columns: minmax(0, 1fr);
        gap: .4rem;
        padding: 1rem 0 1rem 2.4rem;
    }

    .tl-step { text-align: left; padding-right: 0; }

    .tl-dot { position: static; width: auto; height: 0; }

    .tl-dot::before {
        left: 0;
        top: 1.5rem;
        margin-top: 0;
        width: 18px;
        height: 18px;
    }

    .tl-text { padding-left: 0; }

    .hero-forest,
    .site-footer .footer-forest,
    .fs-dark .forest-mark { max-width: 78%; height: 130px; }
}
