/*
Theme Name: dds_prehouse.ru
Author: Фёдор Быков
Description: Информационная тема для сайта о быстровозводимых домах и строительных технологиях. Холодная палитра Ocean, чертёжная сетка фона, таймлайн этапов и рубрикатор направлений.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: prehouse
*/

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

:root {
    --bg: #F0F6FB;
    --bg-alt: #E4EDF5;
    --head-bg: #FFFFFF;
    --foot-bg: #0B1C2D;
    --text: #1C2E3A;
    --accent: #0077B6;
    --accent-dark: #005A8C;
    --accent-2: #00A8CC;
    --muted: #6A8A9C;
    --line: #C0D4DF;
    --card-bg: #FFFFFF;
    --shadow: 0 8px 20px rgba(0, 20, 40, 0.08);
    --shadow-deep: 0 14px 28px rgba(0, 20, 40, 0.14);
    --font-head: Montserrat, Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: Roboto, "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(to right, rgba(28, 46, 58, 0.05) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(to bottom, rgba(28, 46, 58, 0.05) 0 1px, transparent 1px 44px);
}

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

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

h1 {
    font-size: 3.8rem;
    letter-spacing: 0.02em;
    line-height: 1.06;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.35rem;
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1.1rem;
}

ul, ol {
    margin: 0 0 1.2rem;
    padding-left: 1.3rem;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--accent-dark);
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
}

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

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

th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    letter-spacing: 0.03em;
}

/* =========================================================
   3. Контейнеры и раскладки
   ========================================================= */

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

.site-main {
    display: block;
    padding: 2.2rem 0 3.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%);
    justify-content: space-between;
    align-items: start;
}

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

.sidebar {
    min-width: 0;
    background: var(--bg);
    padding: 0.2rem 0 0;
}

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

.site-top {
    background: var(--head-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(0, 20, 40, 0.05);
}

.top-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.6rem;
    padding: 1.1rem 0;
}

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

.brand-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    flex: 0 0 auto;
}

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

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.05em;
    line-height: 1.3;
    color: var(--text);
}

.brand-desc {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

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

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

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

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

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

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

.nav-list a {
    display: inline-block;
    padding: 0.35rem 0;
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

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

.nav-list .sub-menu {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0 0 0 0.8rem;
}

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

.btn {
    display: inline-block;
    padding: 0.72rem 1.6rem;
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 20, 40, 0.18);
    transform: translateY(-1px);
}

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

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

/* =========================================================
   6. Хлебные крошки, заголовки страниц
   ========================================================= */

.breadcrumbs {
    font-size: 0.84rem;
    color: var(--muted);
    margin: 0 0 1.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration-style: dotted;
}

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

.breadcrumbs .sep {
    color: var(--accent-2);
    padding: 0 0.25rem;
}

.page-head {
    font-size: 2.6rem;
    margin-bottom: 1.6rem;
    position: relative;
    padding-left: 20px;
}

.page-head::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.16em;
    width: 6px;
    height: 1.5em;
    background: var(--accent-2);
}

.archive-note {
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.empty-note {
    background: var(--bg-alt);
    border-radius: 6px;
    padding: 1.4rem 1.6rem;
    color: var(--muted);
}

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

.front {
    padding-top: 0.6rem;
}

.front-section {
    position: relative;
    padding: 2.6rem 0;
}

.section-title {
    position: relative;
    padding-left: 20px;
    margin-bottom: 0.5rem;
    text-align: left;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.16em;
    width: 6px;
    height: 1.5em;
    background: var(--accent-2);
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 8px;
    margin-top: 0.55rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M0 4 Q7.5 0 15 4 T30 4 T45 4 T60 4 T75 4 T90 4 T105 4 T120 4' fill='none' stroke='%2300A8CC' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

.section-lead {
    max-width: 62ch;
    color: var(--muted);
    margin-bottom: 1.8rem;
}

.wave-divider {
    position: relative;
    height: 18px;
    margin: 1.4rem 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18'%3E%3Cpath d='M0 12 L12 5 L24 12 L36 5 L48 12' fill='none' stroke='%23C0D4DF' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
}

.wave-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent-2);
}

/* --- Hero --- */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    padding: 3.4rem 2.6rem;
    margin-top: 1.4rem;
    background: linear-gradient(135deg, #0B1C2D 0%, #1F4A6B 100%);
    color: #E8F2F8;
    box-shadow: var(--shadow);
}

.hero-plan {
    position: absolute;
    right: -110px;
    top: -60px;
    width: 620px;
    max-width: none;
    height: auto;
    display: block;
    opacity: 0.18;
    transform: rotate(15deg);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
}

.hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.hero-sub {
    color: #C9DEEC;
    max-width: 52ch;
    margin-bottom: 1.8rem;
}

.hero-quote {
    margin: 0;
    padding: 1.4rem 1.6rem;
    border-left: 4px solid var(--accent-2);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0 6px 6px 0;
    font-family: var(--font-head);
    font-size: 1.06rem;
    letter-spacing: 0.02em;
    line-height: 1.55;
    color: #E8F2F8;
}

.hero-quote p {
    margin: 0;
}

/* --- Таймлайн --- */

.fs-timeline {
    position: relative;
    background: var(--bg-alt);
    border-radius: 6px;
    padding: 2.6rem 2.2rem;
    overflow: hidden;
}

.fs-timeline::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 204, 0.28) 0%, rgba(0, 168, 204, 0) 70%);
    pointer-events: none;
}

.timeline {
    position: relative;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

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

.tl-item {
    position: relative;
    width: 50%;
    min-width: 0;
    padding: 0 3rem 2rem 0;
    text-align: right;
}

.tl-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2rem 3rem;
    text-align: left;
}

.tl-num {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    z-index: 1;
}

.tl-item:nth-child(odd) .tl-num {
    right: -22px;
}

.tl-item:nth-child(even) .tl-num {
    left: -22px;
}

.tl-body {
    min-width: 0;
}

.tl-head {
    font-size: 1.18rem;
    margin-bottom: 0.35rem;
}

.tl-body p {
    margin: 0;
    color: #33505f;
    font-size: 0.95rem;
}

/* --- Плюсы и минусы --- */

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

.pc-col {
    min-width: 0;
    border-radius: 6px;
    padding: 1.9rem 1.8rem;
    box-shadow: var(--shadow);
}

.pc-plus {
    background: linear-gradient(180deg, rgba(0, 168, 204, 0.18) 0%, rgba(0, 168, 204, 0.06) 100%);
}

.pc-minus {
    background: linear-gradient(180deg, rgba(106, 138, 156, 0.22) 0%, rgba(106, 138, 156, 0.08) 100%);
}

.pc-head {
    font-size: 1.22rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.pc-plus .pc-head {
    text-align: left;
    color: #046a83;
}

.pc-minus .pc-head {
    text-align: right;
    color: #405d6e;
}

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

.pc-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.9rem;
    font-size: 0.97rem;
}

.pc-list li:last-child {
    margin-bottom: 0;
}

.pc-plus .pc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 14 V3 M3 8 L8 2.6 L13 8' fill='none' stroke='%2300A8CC' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

.pc-minus .pc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M2 8 H14' fill='none' stroke='%236A8A9C' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

/* --- Рубрикатор --- */

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

.rubric {
    display: block;
    min-width: 0;
    padding: 1.8rem 1.5rem;
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    text-decoration: none;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -4px 10px rgba(11, 28, 45, 0.10),
        var(--shadow);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.rubric-ico {
    display: block;
    color: var(--accent);
    margin-bottom: 0.9rem;
    line-height: 0;
    transition: color 0.22s ease;
}

.rubric-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.rubric-note {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    transition: color 0.22s ease;
}

.rubric:hover,
.rubric:focus {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-deep);
}

.rubric:hover .rubric-ico,
.rubric:focus .rubric-ico,
.rubric:hover .rubric-note,
.rubric:focus .rubric-note {
    color: #fff;
}

.latest-more {
    margin: 1.8rem 0 0;
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.6rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 78px;
    height: 3px;
    background: var(--accent-2);
    transition: width 0.28s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
}

.card:hover::after {
    width: 100%;
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}

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

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

.card-thumb-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='34' viewBox='0 0 400 34' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C60 4 120 30 200 18 C270 8 330 26 400 14 L400 34 L0 34 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}

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

.card-meta {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.16rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.6rem;
}

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

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

.card-excerpt {
    font-size: 0.95rem;
    color: #3c5666;
    margin-bottom: 1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    border-bottom: 2px solid var(--accent-2);
    padding-bottom: 2px;
}

.card-more:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

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

.entry {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 2.2rem 2.4rem;
    box-shadow: var(--shadow);
}

.entry-title {
    margin-bottom: 0.8rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.post-meta .dot {
    color: var(--accent-2);
    padding: 0 0.3rem;
}

.entry-cover {
    margin: 0 0 1.8rem;
}

.entry-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.entry-content h2 {
    font-size: 1.7rem;
    margin-top: 2rem;
    position: relative;
    padding-left: 20px;
}

.entry-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.16em;
    width: 6px;
    height: 1.5em;
    background: var(--accent-2);
}

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

.entry-content img {
    display: block;
    height: auto;
    border-radius: 6px;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content li {
    margin-bottom: 0.4rem;
}

.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.5rem 1.8rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent-2);
    border-radius: 6px;
    box-shadow: inset 0 3px 10px rgba(11, 28, 45, 0.13);
    font-family: var(--font-head);
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

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

.entry-tags {
    margin-top: 1.8rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
}

.entry-tags a {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
    padding: 0.25rem 0.7rem;
    background: var(--bg-alt);
    border-radius: 4px;
    text-decoration: none;
    color: var(--accent);
}

.page-links {
    margin-top: 1.4rem;
    font-size: 0.9rem;
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.8rem 0 0;
    font-size: 0.9rem;
}

.post-nav-item {
    min-width: 0;
}

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

.post-nav a {
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
}

/* =========================================================
   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: 42px;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--card-bg);
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    color: var(--text);
    text-decoration: none;
}

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

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

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

.widget {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow);
}

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

.widget-title {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--accent-2);
}

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

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.94rem;
}

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

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

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

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

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

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

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

.site-bottom {
    background: var(--foot-bg);
    color: #C6D8E4;
    padding: 2.8rem 0 1.6rem;
    margin-top: 2rem;
}

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

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

.site-bottom .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    color: #C6D8E4;
}

.site-bottom .widget-title {
    color: #FFFFFF;
    border-bottom-color: var(--accent-2);
}

.site-bottom .widget p {
    color: #C6D8E4;
    font-size: 0.94rem;
}

.site-bottom .widget li {
    border-bottom-color: rgba(198, 216, 228, 0.18);
}

.site-bottom .widget a {
    color: #7FD3E8;
    text-decoration: none;
}

.site-bottom .widget a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.site-bottom .widget .post-date {
    display: block;
    color: #93AFC1;
    font-size: 0.78rem;
}

.bottom-line {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(198, 216, 228, 0.2);
}

.copyright {
    margin: 0;
    font-size: 0.85rem;
    color: #93AFC1;
}

/* =========================================================
   13. Форма поиска, комментарии, 404
   ========================================================= */

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 1.4rem 0;
}

.search-label {
    flex: 0 0 100%;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}

.search-field:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 1px;
}

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

.comments {
    margin-top: 2.2rem;
    background: var(--card-bg);
    border-radius: 6px;
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow);
}

.comments-head {
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
}

.comment-list,
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .children {
    padding-left: 1.6rem;
    border-left: 2px solid var(--bg-alt);
}

.comment-list li {
    margin-bottom: 1.4rem;
}

.comment-body {
    background: var(--bg);
    border-radius: 6px;
    padding: 1.1rem 1.3rem;
}

.comment-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.comment-respond {
    margin-top: 1.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

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

.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent);
    border-radius: 4px;
    padding: 0.72rem 1.6rem;
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.comment-notes,
.comment-form-cookies-consent label {
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
    display: inline;
}

.error-page {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 2.4rem 2.4rem 2.8rem;
    box-shadow: var(--shadow);
}

.error-note {
    color: var(--muted);
    max-width: 60ch;
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    padding: 1.1rem 1.6rem;
    background: #0B1C2D;
    border-top: 3px solid var(--accent-2);
    box-shadow: 0 -8px 24px rgba(0, 20, 40, 0.24);
    color: #D8E8F2;
}

.cookie-text {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

.cookie-accept {
    flex: 0 0 auto;
}

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

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

    h1 {
        font-size: 2.6rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .page-head {
        font-size: 2.1rem;
    }

    .top-inner {
        gap: 0.9rem;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-nav {
        flex: 1 1 100%;
        display: none;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--line);
        padding-top: 0.6rem;
    }

    .nav-list li {
        border-bottom: 1px dashed var(--line);
    }

    .nav-list a {
        display: block;
        padding: 0.7rem 0;
    }

    .layout-single {
        width: 100%;
    }

    .layout-with-sidebar {
        display: block;
    }

    .sidebar {
        margin-top: 2.2rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

    .hero-plan {
        right: -160px;
        width: 480px;
        opacity: 0.12;
    }

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

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    .page-head {
        font-size: 1.75rem;
        padding-left: 16px;
    }

    .site-main {
        padding: 1.6rem 0 2.4rem;
    }

    .front-section {
        padding: 1.8rem 0;
    }

    .hero {
        padding: 2rem 1.4rem;
    }

    .hero-quote {
        padding: 1.1rem 1.2rem;
    }

    .fs-timeline {
        padding: 1.8rem 1.4rem;
    }

    .timeline::before {
        left: 21px;
        margin-left: 0;
    }

    .tl-item,
    .tl-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 1.8rem 3.6rem;
        text-align: left;
    }

    .tl-item:nth-child(odd) .tl-num,
    .tl-item:nth-child(even) .tl-num {
        left: 0;
        right: auto;
        width: 42px;
        height: 42px;
    }

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

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

    .pc-minus .pc-head {
        text-align: left;
    }

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

    .rubric {
        padding: 1.4rem 1.3rem;
    }

    .entry {
        padding: 1.5rem 1.3rem;
    }

    .comments {
        padding: 1.4rem 1.2rem;
    }

    .error-page {
        padding: 1.6rem 1.3rem 2rem;
    }

    .empty-note {
        padding: 1.2rem 1.2rem;
    }

    .bottom-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

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

    .post-nav-next {
        text-align: left;
    }

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