/*
Theme Name: dds_ivstm.ru
Theme URI: https://ivstm.ru/
Author: Баженов Эмиль Баженов Эмиль
Author URI: https://ivstm.ru/
Description: Тема для информационного сайта о недвижимости. Брутальный премиум-конструктор: холодная бетонная палитра, жёсткие рамки и геометрика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: iskry
*/

/* ============ 1. Переменные и база ============ */
:root {
    --c-bg:        #EBEDEF;
    --c-bg-alt:    #FFFFFF;
    --c-head:      #1C2024;
    --c-foot:      #0D0F12;
    --c-side:      #E2E4E8;
    --c-text:      #1A1C1E;
    --c-accent:    #D32F2F;
    --c-accent2:   #546E7A;
    --c-muted:     #7A8187;
    --c-shadow:    #B0B5BA;
    --c-plus:      #2E7D32;
    --f-head: "Inter", "TT Norms", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Roboto", "PT Sans", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(26,28,30,0.05) 0 1px, transparent 1px 20px),
        repeating-linear-gradient(90deg, rgba(26,28,30,0.05) 0 1px, transparent 1px 20px);
}

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

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

.entry-content a:not(.btn),
.card-excerpt a,
.textwidget a {
    font-weight: 700;
    display: inline;
    background-image: linear-gradient(var(--c-accent), var(--c-accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 3px;
    transition: background-size .25s ease;
    padding-bottom: 2px;
}
.entry-content a:not(.btn):hover,
.card-excerpt a:hover,
.textwidget a:hover { background-size: 100% 3px; }

/* ============ 2. Типографика ============ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: var(--c-text);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    font-weight: 800;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15em; }

blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--c-bg-alt);
    border-left: 6px solid var(--c-accent);
    font-family: var(--f-head);
    font-size: 1.15rem;
    font-weight: 600;
}
blockquote p:last-child { margin-bottom: 0; }

code, pre { font-family: "Consolas", "Menlo", monospace; background: var(--c-side); }
pre { padding: 1rem 1.2rem; overflow-x: auto; border-left: 6px solid var(--c-accent2); }

.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .5rem;
}
.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .65em;
    width: 8px;
    height: 8px;
    border: 2px solid var(--c-accent);
    transform: rotate(45deg);
}
.entry-content ol { padding-left: 1.3rem; }
.entry-content ol li { margin-bottom: .5rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
}
th, td { border: 1px solid var(--c-text); padding: .7rem .9rem; text-align: left; }
th { background: var(--c-side); font-family: var(--f-head); font-weight: 700; }

hr {
    border: 0;
    height: 2px;
    background: var(--c-text);
    margin: 2.4rem 0;
}

/* ============ 3. Контейнеры и раскладки ============ */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.site-main { padding: 2.4rem 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, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-with-sidebar > * { min-width: 0; }

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

/* ============ 4. Шапка ============ */
.site-header {
    position: relative;
    background-color: var(--c-head);
    color: #fff;
    border-bottom: 4px solid var(--c-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='200' viewBox='0 0 320 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='3'%3E%3Cpath d='M20 190V90h60v100M80 130h60v60M140 110h50v80M190 60h70v130'/%3E%3Ccircle cx='250' cy='40' r='26'/%3E%3Cpath d='M250 14v52M224 40h52'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -20px bottom -30px;
    background-size: 320px auto;
}
.site-header::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 20px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 20px);
    pointer-events: none;
}
.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 320px;
}
.brand-logo { width: 58px; height: 58px; flex: 0 0 auto; display: block; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #fff;
    text-transform: uppercase;
}
.brand-name:hover { color: var(--c-accent); }
.brand-desc {
    display: block;
    margin-top: .3rem;
    font-size: .82rem;
    line-height: 1.4;
    color: #9AA3AA;
}

/* ============ 5. Навигация ============ */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .6rem 1rem;
    cursor: pointer;
}
.nav-toggle:hover { background: var(--c-accent); border-color: var(--c-accent); }
.nav-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
    display: block;
}

.main-nav { flex: 0 0 auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}
.main-nav li { position: relative; }
.main-nav a {
    display: block;
    color: #fff;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .35rem 0;
    position: relative;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 4px;
    background: var(--c-accent);
    transition: width .25s ease;
}
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after { width: 100%; }
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    background: var(--c-head);
    border: 2px solid var(--c-accent);
    padding: .5rem .9rem;
    min-width: 210px;
    flex-direction: column;
    gap: .3rem;
}
.main-nav li:hover > ul { display: flex; }

/* ============ 6. Хлебные крошки ============ */
.breadcrumbs {
    font-size: .84rem;
    color: var(--c-muted);
    padding: .9rem 0;
    border-bottom: 2px solid rgba(26,28,30,0.12);
    margin-bottom: 1.8rem;
    font-family: var(--f-head);
    letter-spacing: .02em;
}
.breadcrumbs a { color: var(--c-accent2); font-weight: 700; }
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs .sep { margin: 0 .45rem; color: var(--c-shadow); }

/* ============ 7. Кнопки ============ */
.btn {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .82rem 1.6rem;
    border: 2px solid var(--c-accent);
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.btn:hover {
    transform: translateY(2px);
    box-shadow: -4px 4px 0 rgba(26,28,30,0.35);
    color: #fff;
}
.btn-ghost {
    background: transparent;
    color: var(--c-accent2);
    border-color: var(--c-accent2);
}
.btn-ghost:hover { background: var(--c-accent2); color: #fff; }
.btn-light { background: transparent; border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--c-text); }

/* ============ 8. Заголовки секций ============ */
.section-title {
    position: relative;
    margin-bottom: 1.6rem;
}
.section-title::before {
    content: "";
    display: block;
    width: 74px;
    height: 4px;
    background: var(--c-accent);
    margin: 0 0 .85rem -18px;
}
.section-lead {
    max-width: 760px;
    color: #454A4F;
    margin-bottom: 1.8rem;
}

/* ============ 9. Карточки записей ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.card-list {
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    border-radius: 2px;
    box-shadow: 4px 4px 0 var(--c-shadow);
    overflow: hidden;
    transition: box-shadow .18s ease, background .18s ease;
}
.card:hover { box-shadow: 8px 8px 0 var(--c-shadow); background: #F7F8F9; }

.card--row { flex-direction: row; }

.card-thumb-wrap { overflow: hidden; }
.card-thumb-wrap img {
    width: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.08);
    transition: filter .25s ease;
}
.card:hover .card-thumb-wrap img { filter: grayscale(0%) contrast(1); }

.card--grid .card-thumb-wrap a { display: block; }
.card--grid .card-thumb-wrap img { aspect-ratio: 1 / 1; height: auto; }

.card--row .card-thumb-wrap {
    flex: 0 0 260px;
    position: relative;
    overflow: hidden;
    border-right: 2px solid var(--c-text);
}
.card--row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card--row .card-thumb-wrap img { width: 100%; height: 100%; }

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-meta {
    font-family: var(--f-head);
    font-size: .76rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: .55rem;
}
.card-meta .card-meta-mark {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--c-accent);
    margin-right: .5rem;
}
.card-title {
    font-size: 1.28rem;
    margin: 0 0 .7rem;
    line-height: 1.22;
}
.card-title a { color: var(--c-text); }
.card-title a:hover { color: var(--c-accent); }
.card-excerpt { color: #45494D; font-size: .95rem; line-height: 1.65; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; padding-top: 1rem; }
.card-more .btn { padding: .6rem 1.15rem; font-size: .78rem; }

/* ============ 10. Главная: секции ============ */
.front-section { padding: 3rem 0; }
.front-section--alt {
    background: var(--c-bg-alt);
    border-top: 2px solid var(--c-text);
    border-bottom: 2px solid var(--c-text);
    padding: 3rem 2.2rem;
    margin: 0 0 0;
}

/* 10.1 Hero */
.fs-hero {
    position: relative;
    border: 2px solid var(--c-text);
    box-shadow: 8px 8px 0 var(--c-shadow);
    overflow: hidden;
    margin-top: 2.4rem;
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 42px));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 42px));
}
.fs-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.25);
    z-index: 0;
}
.fs-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
    background: rgba(28,32,36,0.9);
    color: #fff;
    padding: 2.6rem 2.4rem 3.2rem;
    border-right: 6px solid var(--c-accent);
}
.fs-hero-tag {
    display: inline-block;
    background: var(--c-accent);
    color: #fff;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .35rem .8rem;
    margin-bottom: 1.2rem;
}
.fs-hero h1 { color: #fff; margin-bottom: 1rem; }
.fs-hero p { color: #C9CFD4; font-size: 1.05rem; }
.fs-hero .btn { margin-top: .6rem; }

/* 10.2 Таймлайн */
.timeline {
    position: relative;
    padding: .5rem 0;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--c-text);
    transform: translateX(-50%);
}
.tl-item {
    position: relative;
    width: 50%;
    padding: 0 2.4rem 2rem 0;
    box-sizing: border-box;
}
.tl-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2rem 2.4rem;
}
.tl-item::after {
    content: "";
    position: absolute;
    top: 1.4rem;
    right: -9px;
    width: 18px;
    height: 18px;
    background: var(--c-accent);
    border: 2px solid var(--c-text);
}
.tl-item:nth-child(even)::after { right: auto; left: -9px; }
.tl-card {
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 4px 4px 0 var(--c-shadow);
    padding: 1.3rem 1.5rem;
}
.tl-stage {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--c-accent2);
    padding: .28rem .7rem;
    margin-bottom: .7rem;
}
.tl-card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.tl-card p { margin: 0; font-size: .95rem; color: #45494D; }

/* 10.3 Плюсы и минусы */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}
.pm-col {
    position: relative;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 4px 4px 0 var(--c-shadow);
    padding: 2rem 1.8rem;
    overflow: hidden;
    min-width: 0;
}
.pm-col--plus { border-color: var(--c-plus); }
.pm-col--minus { border-color: var(--c-accent); }
.pm-sign {
    position: absolute;
    top: -34px;
    right: 8px;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 10rem;
    line-height: 1;
    color: rgba(26,28,30,0.07);
    pointer-events: none;
}
.pm-col h3 { font-size: 1.35rem; margin-bottom: 1.1rem; position: relative; }
.pm-col--plus h3 { color: var(--c-plus); }
.pm-col--minus h3 { color: var(--c-accent); }
.pm-col ul { list-style: none; margin: 0; padding: 0; position: relative; }
.pm-col li {
    position: relative;
    padding-left: 1.7rem;
    margin-bottom: .85rem;
    font-size: .97rem;
    line-height: 1.6;
}
.pm-col li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .6em;
    width: 9px;
    height: 9px;
    border: 2px solid currentColor;
    transform: rotate(45deg);
}
.pm-col--plus li::before { border-color: var(--c-plus); }
.pm-col--minus li::before { border-color: var(--c-accent); }

/* 10.4 Рубрикатор */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.rubric {
    display: block;
    position: relative;
    background: var(--c-head);
    color: #fff;
    border: 2px solid var(--c-text);
    box-shadow: 4px 4px 0 var(--c-shadow);
    padding: 1.8rem 1.4rem 1.6rem;
    min-width: 0;
    transition: box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.rubric:hover {
    box-shadow: 8px 8px 0 var(--c-shadow);
    transform: translateY(2px);
    background: #262B31;
    color: #fff;
}
.rubric svg { width: 52px; height: 52px; display: block; margin-bottom: 1.1rem; }
.rubric-name {
    display: block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
    margin-bottom: .4rem;
}
.rubric-note { display: block; font-size: .86rem; color: #9AA3AA; line-height: 1.5; }

/* 10.5 Последние записи на главной */
.fs-latest { padding-top: 3rem; }
.fs-latest .front-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.fs-latest .section-title { margin-bottom: 1.2rem; }

/* ============ 11. Сайдбар и виджеты ============ */
.sidebar {
    background: var(--c-side);
    border: 2px solid var(--c-text);
    box-shadow: 4px 4px 0 var(--c-shadow);
    padding: 1.6rem 1.5rem;
    color: var(--c-text);
    min-width: 0;
}
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-family: var(--f-head);
    font-size: 1.02rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-text);
    margin: 0 0 1rem;
    padding-bottom: .55rem;
    border-bottom: 4px solid var(--c-accent);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: .75rem; line-height: 1.5; }
.sidebar a { color: var(--c-text); font-weight: 600; }
.sidebar a:hover { color: var(--c-accent); }
.sidebar .post-date { display: block; font-size: .78rem; color: #5D646A; }
.sidebar p { color: var(--c-text); font-size: .95rem; }

.footer-widgets .widget-title {
    font-family: var(--f-head);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #FFFFFF;
    margin: 0 0 1rem;
    padding-bottom: .55rem;
    border-bottom: 4px solid var(--c-accent);
}
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { margin-bottom: .6rem; line-height: 1.5; }
.footer-widgets a { color: #C9CFD4; font-weight: 600; }
.footer-widgets a:hover { color: #FFFFFF; }
.footer-widgets p { color: #A6AEB4; font-size: .93rem; }
.footer-widgets .post-date { display: block; font-size: .78rem; color: #7A8187; }

/* ============ 12. Подвал ============ */
.site-footer {
    position: relative;
    background-color: var(--c-foot);
    color: #A6AEB4;
    border-top: 4px solid var(--c-accent);
    margin-top: 3rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='240' viewBox='0 0 360 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='3'%3E%3Crect x='30' y='120' width='90' height='100'/%3E%3Crect x='140' y='70' width='80' height='150'/%3E%3Crect x='240' y='140' width='90' height='80'/%3E%3Cpath d='M30 120l45-40 45 40M0 220h360'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left -30px bottom -20px;
    background-size: 360px auto;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 20px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 20px);
    pointer-events: none;
}
.footer-widgets {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    padding: 2.8rem 0;
}
.footer-widgets > * { min-width: 0; }
.footer-bottom {
    position: relative;
    border-top: 2px solid rgba(255,255,255,0.14);
    padding: 1.2rem 0;
    font-size: .85rem;
    color: #7A8187;
    font-family: var(--f-head);
    letter-spacing: .03em;
}

/* ============ 13. Пагинация ============ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 2.6rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 .8rem;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 3px 3px 0 var(--c-shadow);
    color: var(--c-text);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .92rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
.pagination .page-numbers:hover {
    transform: translateY(2px);
    box-shadow: 5px 5px 0 var(--c-shadow);
    color: var(--c-accent);
}
.pagination .page-numbers.current {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    box-shadow: none;
    background: transparent;
    min-width: 24px;
}

/* ============ 14. Записи и страницы ============ */
.entry-header { margin-bottom: 1.6rem; }
.entry-title { font-size: 2.6rem; margin-bottom: .9rem; }
.entry-meta {
    font-family: var(--f-head);
    font-size: .8rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.entry-meta span { margin-right: 1.2rem; }
.entry-thumb {
    border: 2px solid var(--c-text);
    box-shadow: 6px 6px 0 var(--c-shadow);
    margin-bottom: 1.9rem;
    overflow: hidden;
}
.entry-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.03rem; }
.entry-content img { border: 2px solid var(--c-text); }
.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 1.6rem; }

.entry-taxonomies {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 2px solid rgba(26,28,30,0.15);
    font-size: .9rem;
}
.entry-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}
.entry-nav a {
    display: block;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 4px 4px 0 var(--c-shadow);
    padding: 1rem 1.2rem;
    color: var(--c-text);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .95rem;
    min-width: 0;
}
.entry-nav a:hover { color: var(--c-accent); }
.entry-nav .nav-label {
    display: block;
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: .3rem;
}

.page-header { margin-bottom: 1.8rem; }
.page-header .archive-desc { color: #45494D; }

/* ============ 15. Формы: поиск и комментарии ============ */
.search-form { display: flex; gap: 0; max-width: 520px; }
.search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 2px solid var(--c-text);
    background: var(--c-bg-alt);
    padding: .78rem .9rem;
    font-family: var(--f-body);
    font-size: .95rem;
    color: var(--c-text);
}
.search-form input[type="search"]:focus { outline: 3px solid var(--c-accent2); outline-offset: -3px; }
.search-form button {
    border: 2px solid var(--c-accent);
    border-left: 0;
    background: var(--c-accent);
    color: #fff;
    font-family: var(--f-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .85rem;
    padding: 0 1.2rem;
    cursor: pointer;
}
.search-form button:hover { background: var(--c-text); border-color: var(--c-text); }

.comments-area {
    margin-top: 3rem;
    padding: 1.9rem 1.8rem;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 6px 6px 0 var(--c-shadow);
}
.comments-title, .comment-reply-title {
    font-family: var(--f-head);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list ol.children { list-style: none; padding-left: 1.6rem; }
.comment-list li { margin-bottom: 1.2rem; }
.comment-box {
    border-left: 6px solid var(--c-accent2);
    background: var(--c-bg);
    padding: 1rem 1.2rem;
}
.comment-head {
    font-family: var(--f-head);
    font-size: .84rem;
    letter-spacing: .04em;
    color: var(--c-muted);
    margin-bottom: .5rem;
}
.comment-author-name { color: var(--c-text); font-weight: 800; margin-right: .7rem; }
.comment-body p { margin: 0 0 .6em; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    border: 2px solid var(--c-text);
    background: var(--c-bg);
    padding: .7rem .85rem;
    font-family: var(--f-body);
    font-size: .95rem;
    color: var(--c-text);
    margin-top: .3rem;
}
.comment-respond label { font-family: var(--f-head); font-weight: 700; font-size: .85rem; }
.comment-form-comment, .comment-form-author, .comment-form-email, .comment-form-url { margin-bottom: 1rem; }
.comment-respond .submit {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .88rem;
    padding: .8rem 1.6rem;
    border: 2px solid var(--c-accent);
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.comment-respond .submit:hover { background: var(--c-text); border-color: var(--c-text); }

/* ============ 16. Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--c-head);
    color: #C9CFD4;
    border-top: 4px solid var(--c-accent);
    padding: 1.1rem 1.6rem;
    font-size: .9rem;
    line-height: 1.55;
}
.cookie-banner p { margin: 0; max-width: 820px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .btn { flex: 0 0 auto; }

/* ============ 17. 404 и поиск ============ */
.error-block {
    background: var(--c-bg-alt);
    border: 2px solid var(--c-text);
    box-shadow: 8px 8px 0 var(--c-shadow);
    padding: 2.6rem 2.2rem;
}
.error-code {
    font-family: var(--f-head);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--c-accent);
    margin-bottom: .8rem;
}
.error-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.no-results {
    background: var(--c-bg-alt);
    border-left: 6px solid var(--c-accent);
    padding: 1.5rem 1.7rem;
}

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

/* ============ 18. Адаптив ============ */
@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    .entry-title { font-size: 2.05rem; }
    .layout-with-sidebar {
        display: block;
    }
    .layout-with-sidebar .sidebar { margin-top: 2.4rem; }
    .layout-single { width: 100%; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-hero-inner { max-width: 100%; }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        flex: 1 1 100%;
        display: none;
        padding-top: .6rem;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-top: 2px solid rgba(255,255,255,0.12); }
    .main-nav a { padding: .8rem 0; }
    .main-nav ul ul { display: flex; position: static; border: 0; padding: 0 0 0 1rem; background: transparent; }
}

@media (min-width: 961px) {
    .nav-toggle { display: none; }
    .main-nav { display: block !important; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.62rem; }
    .entry-title { font-size: 1.75rem; }
    .section-title::before { margin-left: 0; }
    .site-main { padding: 1.6rem 0 2.4rem; }
    .front-section { padding: 2.2rem 0; }
    .front-section--alt { padding: 2.2rem 1.3rem; }
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .rubric-grid { grid-template-columns: minmax(0, 1fr); }
    .pm-grid { grid-template-columns: minmax(0, 1fr); }
    .pm-col { padding: 1.7rem 1.3rem; }
    .footer-widgets { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding: 2.2rem 0; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .comments-area { padding: 1.4rem 1.2rem; }
    .error-block { padding: 1.8rem 1.3rem; }
    .fs-hero {
        -webkit-clip-path: none;
        clip-path: none;
    }
    .fs-hero-inner { padding: 1.9rem 1.4rem 2.2rem; border-right: 0; border-bottom: 6px solid var(--c-accent); }
    .cookie-banner { padding: 1rem 1.2rem; }
    .card--row { flex-direction: column; }
    .card--row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        border-right: 0;
        border-bottom: 2px solid var(--c-text);
    }
    .card--row .card-thumb-wrap a { position: static; }
    .card--row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .timeline::before { left: 9px; }
    .tl-item {
        width: 100%;
        padding: 0 0 1.6rem 2.4rem;
    }
    .tl-item:nth-child(even) { margin-left: 0; padding: 0 0 1.6rem 2.4rem; }
    .tl-item::after { right: auto; left: 0; }
    .tl-item:nth-child(even)::after { left: 0; }
    .pm-sign { font-size: 7rem; top: -22px; }
}
