/*
Theme Name: dds_postalinspectorsurvey.com
Theme URI: https://postalinspectorsurvey.com/
Author: Дмитрий Воронов
Description: Тема информационного портала о мошенничестве с недвижимостью: схемы обмана, юридические инструкции, проверка объектов.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: zhilfakt
*/

/* ==========================================================================
   1. Переменные и база
   ========================================================================== */

:root {
    --bg: #F4F7FB;
    --bg-alt: #E3EAF4;
    --head-bg: #0B1F3A;
    --foot-bg: #08172B;
    --side-bg: #EDF2F9;
    --ink: #12263F;
    --alert: #E63946;
    --alert-dark: #C22B37;
    --safe: #2A9D8F;
    --safe-dark: #1F7A6F;
    --muted: #6B7F99;
    --line: #D0DCE8;
    --shadow: 0 4px 12px rgba(11, 31, 58, 0.08);
    --shadow-up: 0 8px 18px rgba(11, 31, 58, 0.12);
    --font-head: "Manrope", "Inter Tight", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Sans 3", "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(42, 157, 143, 0.04) 0 0.5px, transparent 0.5px 24px),
        repeating-linear-gradient(-45deg, rgba(42, 157, 143, 0.04) 0 0.5px, transparent 0.5px 24px);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -30px;
    width: 420px;
    height: 360px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.03;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 360' fill='none' stroke='%230B1F3A' stroke-width='4'%3E%3Cpath d='M30 180 210 40l180 140'/%3E%3Cpath d='M70 170v150h280V170'/%3E%3Cpath d='M150 320v-90h60v90'/%3E%3Crect x='240' y='210' width='70' height='60'/%3E%3Cpath d='M240 240h70M275 210v60'/%3E%3C/svg%3E");
}

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

a {
    color: var(--safe);
    text-decoration: none;
    background-image: linear-gradient(var(--alert), var(--alert));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.25s ease, color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--safe-dark);
    background-size: 100% 2px;
}

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

h1 { font-size: 3.2rem; font-weight: 800; }
h2 { font-size: 2.1rem; font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }

p {
    margin: 0 0 1.1em;
}

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

blockquote {
    margin: 1.6em 0;
    padding: 1.4rem 1.6rem;
    border-left: 6px solid var(--safe);
    background: var(--bg-alt);
    border-radius: 0 6px 6px 0;
}

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

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

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

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);
    font-weight: 700;
}

figure {
    margin: 1.5em 0;
}

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

/* ==========================================================================
   2. Контейнеры и служебные состояния
   ========================================================================== */

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

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

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

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

.topline {
    height: 3px;
    background: linear-gradient(to right, var(--alert) 0 60%, var(--safe) 60% 100%);
}

/* ==========================================================================
   3. Кнопки и типовые элементы
   ========================================================================== */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.2;
    padding: 0.85rem 1.6rem;
    border-radius: 4px;
    border: 1.5px solid transparent;
    cursor: pointer;
    background-image: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-fill {
    background-color: var(--alert);
    color: #fff;
}

.btn-fill:hover,
.btn-fill:focus {
    background-color: var(--alert-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(11, 31, 58, 0.18);
}

.btn-line {
    background-color: transparent;
    border-color: var(--safe);
    color: var(--safe);
}

.btn-line:hover,
.btn-line:focus {
    border-color: var(--safe-dark);
    color: var(--safe-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(11, 31, 58, 0.14);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.1rem;
    margin-bottom: 1.4rem;
}

.section-title::before {
    content: "";
    flex: 0 0 56px;
    height: 4px;
    background: var(--alert);
}

.section-title.mark-safe::before {
    background: var(--safe);
}

.lead {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 62ch;
}

.marked {
    list-style: none;
    padding-left: 0;
}

.marked li {
    position: relative;
    padding-left: 1.7rem;
    margin-bottom: 0.65rem;
}

.marked li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--safe);
}

.marked.warn li::before {
    background: var(--alert);
}

.entry-content ul:not(.marked) {
    list-style: none;
    padding-left: 0;
}

.entry-content ul:not(.marked) li {
    position: relative;
    padding-left: 1.7rem;
    margin-bottom: 0.5rem;
}

.entry-content ul:not(.marked) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--safe);
}

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

.site-head {
    background: var(--head-bg);
    color: #fff;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    color: #fff;
    background-image: none;
}

.brand:hover {
    color: #fff;
}

.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    display: block;
    width: 46px;
    height: 46px;
}

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

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

.brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.12rem;
    line-height: 1.25;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: #9FB4CC;
    line-height: 1.35;
    margin-top: 0.25rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

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

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

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

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

.main-nav a {
    color: #E4ECF5;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    padding-bottom: 2px;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #fff;
    background-size: 100% 2px;
}

.mobile-nav {
    padding: 0 0 1.2rem;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mobile-nav a {
    display: block;
    padding: 0.7rem 0.2rem;
    color: #E4ECF5;
    font-family: var(--font-head);
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

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

.crumbs-bar {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}

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

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

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

.breadcrumbs .sep {
    margin: 0 0.35rem;
    color: var(--line);
}

/* ==========================================================================
   6. Раскладки
   ========================================================================== */

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2rem;
    align-items: start;
}

.layout-single {
    display: block;
}

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

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

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

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

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
    border-color: var(--safe);
}

.card-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-alt);
}

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

.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 58, 0);
    transition: background 0.25s ease;
}

.card:hover .card-thumb::after {
    background: rgba(11, 31, 58, 0.28);
}

.card-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    background: var(--head-bg);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.55rem;
    border-radius: 0;
}

.card-tag.tone-alert { background: var(--alert); }
.card-tag.tone-safe { background: var(--safe); }

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

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
}

.card-title a {
    color: var(--ink);
    background-image: linear-gradient(var(--alert), var(--alert));
}

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

.card-meta {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.card-excerpt {
    color: #3A4F68;
    font-size: 0.97rem;
    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-weight: 700;
    font-size: 0.9rem;
    color: var(--safe);
    border-bottom: 2px solid transparent;
    background-image: none;
}

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

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

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    background-image: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--safe);
    color: var(--safe);
    transform: translateY(-2px);
}

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

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ==========================================================================
   9. Главная страница
   ========================================================================== */

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

.front-section.tone-alt {
    background: var(--bg-alt);
    background-image:
        repeating-linear-gradient(45deg, rgba(42, 157, 143, 0.06) 0 0.5px, transparent 0.5px 24px),
        repeating-linear-gradient(-45deg, rgba(42, 157, 143, 0.06) 0 0.5px, transparent 0.5px 24px);
}

/* 9.1 Hero */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--head-bg);
    padding: 0;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

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

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 58, 0.75);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 5rem 0 4.6rem;
}

.hero-box {
    border-left: 4px solid var(--alert);
    padding-left: 1.7rem;
    max-width: 62ch;
    min-width: 0;
}

.hero h1 {
    color: #fff;
    font-size: 3.2rem;
    margin-bottom: 0.6rem;
}

.hero-sub {
    color: var(--safe);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.22rem;
    margin-bottom: 1.1rem;
}

.hero-text {
    color: #D4DFEC;
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
}

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

.hero-actions .btn-line {
    color: #7FD6CB;
    border-color: #2A9D8F;
}

.hero-actions .btn-line:hover {
    color: #fff;
    border-color: #7FD6CB;
}

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

.timeline {
    position: relative;
    margin-top: 2.4rem;
    padding-left: 0;
}

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

.tl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
    align-items: center;
    margin-bottom: 1.8rem;
}

.tl-row:last-child {
    margin-bottom: 0;
}

.tl-num {
    grid-column: 2;
    justify-self: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--alert);
    background: var(--bg-alt);
    padding: 0.1rem 0.5rem;
    line-height: 1.1;
}

.tl-card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
    border-color: var(--safe);
}

.tl-row.side-left .tl-card { grid-column: 1; }
.tl-row.side-right .tl-card { grid-column: 3; }

.tl-card h3 {
    font-size: 1.18rem;
    margin-bottom: 0.45rem;
}

.tl-card p {
    margin: 0 0 0.6rem;
    font-size: 0.97rem;
}

.tl-card p:last-child {
    margin-bottom: 0;
}

.tl-note {
    display: block;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--line);
    font-size: 0.84rem;
    color: var(--muted);
}

/* 9.3 Цитата */

.quote-section {
    background-color: var(--head-bg);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 16px);
    padding: 3.6rem 0;
}

.quote-plate {
    border-left: 6px solid var(--safe);
    padding: 0.4rem 2rem 0.4rem 1.8rem;
    min-width: 0;
}

.quote-plate p {
    font-family: var(--font-head);
    font-weight: 700;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1.25;
    margin: 0 0 1rem;
}

.quote-author {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

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

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

.topic-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 1.4rem 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background-image: none;
    overflow: hidden;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--alert);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.topic-tile svg {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    stroke: var(--safe);
    fill: none;
    stroke-width: 1.5;
    transition: stroke 0.2s ease;
}

.topic-tile span {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.08rem;
    min-width: 0;
}

.topic-tile em {
    display: block;
    font-style: normal;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.86rem;
    color: var(--muted);
    margin-top: 0.15rem;
    transition: color 0.2s ease;
}

.topic-tile:hover {
    background-color: var(--head-bg);
    border-color: var(--head-bg);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
}

.topic-tile:hover::before { opacity: 1; }
.topic-tile:hover svg { stroke: #fff; }
.topic-tile:hover em { color: #9FB4CC; }

/* 9.5 Последние записи на главной */

.front-latest {
    padding: 3.4rem 0;
}

.front-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

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

.entry-head {
    margin-bottom: 1.6rem;
}

.entry-head h1 {
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.entry-content {
    font-size: 1.04rem;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin-top: 1.8em;
}

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

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

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

.post-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.post-nav a {
    display: block;
    min-width: 0;
    padding: 1rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background-image: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-nav a:hover {
    transform: translateY(-4px);
    border-color: var(--safe);
    box-shadow: var(--shadow-up);
}

.post-nav small {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.post-nav span {
    font-family: var(--font-head);
    font-weight: 700;
}

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

.comments-area {
    margin-top: 3rem;
    padding: 1.8rem 1.8rem 2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
}

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

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

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

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

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

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

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

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

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

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

.comment-form textarea {
    width: 100%;
    max-width: none;
    min-height: 150px;
}

.comment-form input:focus,
.comment-form textarea:focus,
.search-form input:focus {
    outline: none;
    border-color: var(--safe);
}

.comment-form .submit {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.98rem;
    padding: 0.85rem 1.6rem;
    border: 1.5px solid var(--alert);
    border-radius: 4px;
    background: var(--alert);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--alert-dark);
    border-color: var(--alert-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(11, 31, 58, 0.18);
}

.comment-notes,
.comment-form .form-submit {
    margin-top: 0.8rem;
}

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

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

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.search-form button {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1.2rem;
    border: 1.5px solid var(--alert);
    border-radius: 4px;
    background: var(--alert);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.search-form button:hover {
    background: var(--alert-dark);
    transform: translateY(-2px);
}

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

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--side-bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.4rem;
    color: var(--ink);
}

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

.sidebar .widget-title {
    font-size: 1.12rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--line);
    color: var(--ink);
}

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

.sidebar .widget li {
    position: relative;
    padding: 0 0 0.6rem 1.3rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px dashed var(--line);
    font-size: 0.96rem;
    color: var(--ink);
}

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--safe);
}

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

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

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

.sidebar .widget p {
    color: var(--ink);
    font-size: 0.96rem;
}

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

.site-foot {
    background: var(--foot-bg);
    color: #C6D3E2;
    margin-top: 3rem;
}

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

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

.site-foot .widget {
    color: #C6D3E2;
}

.site-foot .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.site-foot .widget p {
    color: #C6D3E2;
    font-size: 0.95rem;
}

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

.site-foot .widget li {
    position: relative;
    padding-left: 1.3rem;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
    color: #C6D3E2;
}

.site-foot .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--safe);
}

.site-foot .widget a {
    color: #DCE6F1;
}

.site-foot .widget a:hover {
    color: #fff;
}

.foot-contact {
    font-size: 0.95rem;
}

.foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.1rem 0 1.4rem;
    font-size: 0.87rem;
    color: #8FA3BA;
}

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

.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;
    padding: 1rem 1.6rem;
    background: var(--head-bg);
    border-top: 3px solid var(--alert);
    color: #DCE6F1;
    font-size: 0.92rem;
}

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

.cookie-banner a {
    color: #7FD6CB;
}

.cookie-accept {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.65rem 1.4rem;
    border: 1.5px solid var(--alert);
    border-radius: 4px;
    background: var(--alert);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cookie-accept:hover {
    background: var(--alert-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   16. Служебные страницы
   ========================================================================== */

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

.notfound {
    text-align: left;
    padding: 1rem 0 2rem;
}

.notfound .code {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 5rem;
    color: var(--alert);
    line-height: 1;
    margin-bottom: 0.4rem;
}

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

.notfound-search {
    max-width: 520px;
    margin-top: 1.6rem;
}

.empty-note {
    padding: 1.6rem 1.8rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

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

@media (max-width: 960px) {
    h1 { font-size: 2.4rem; }
    .hero h1 { font-size: 2.4rem; }
    .hero-inner { padding: 3.6rem 0 3.2rem; }

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

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

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

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

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

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
    }

    .head-inner {
        padding: 1.1rem 0;
    }
}

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .section-title { font-size: 1.6rem; gap: 0.7rem; }
    .section-title::before { flex-basis: 32px; }

    .hero h1 { font-size: 2rem; }
    .hero-sub { font-size: 1.05rem; }
    .hero-inner { padding: 2.8rem 0 2.6rem; }
    .hero-box { padding-left: 1.1rem; }

    .front-section,
    .front-latest { padding: 2.4rem 0; }

    .quote-section { padding: 2.4rem 0; }
    .quote-plate { padding: 0.2rem 1.1rem 0.2rem 1.1rem; }
    .quote-plate p { font-size: 1.45rem; }

    .timeline::before {
        left: 18px;
        transform: none;
    }

    .tl-row {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 0.6rem;
        margin-bottom: 1.2rem;
    }

    .tl-num {
        grid-column: 1;
        justify-self: start;
        font-size: 1.6rem;
        padding: 0.1rem 0.35rem;
    }

    .tl-row.side-left .tl-card,
    .tl-row.side-right .tl-card {
        grid-column: 2;
    }

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

    .foot-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
        padding: 2.2rem 0 1.6rem;
    }

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

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"] {
        width: 100%;
    }

    .cookie-banner {
        padding: 0.9rem 1.1rem;
        font-size: 0.88rem;
    }

    .notfound .code { font-size: 3.4rem; }

    body::after { display: none; }
}
