/*
Theme Name: dds_stroiresurs18.rf
Author: Алексей Зверев
Description: Информационно-образовательная тема о строительстве и архитектуре: профессии, образование, технологии, проектирование. Концепция «Чертёж в сине-стальных тонах».
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: strres
*/

/* ---------- Правила для атрибута hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Токены ---------- */
:root {
    --paper: #F4F7FA;
    --paper-alt: #E8EEF5;
    --paper-load: #DCE6F0;
    --head: #0E2A3A;
    --foot: #0A1F2B;
    --sheet: #FFFFFF;
    --ink: #1B2A38;
    --muted: #6B7F8E;
    --red: #E63946;
    --red-dark: #C1121F;
    --teal: #2A9D8F;
    --teal-dark: #21867A;
    --blue: #1B6CA8;
    --line: #D0DCE6;
    --font-head: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Sans 3", "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
    --grid: rgba(42, 157, 143, 0.06);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300' fill='none' stroke='%230E2A3A' stroke-opacity='.05' stroke-width='2'%3E%3Cpath d='M40 296V40h44v256M48 40v256M76 40v256'/%3E%3Cpath d='M84 70h212v46H84M84 78h212M84 108h212'/%3E%3Cpath d='M84 116h70l-70 70z'/%3E%3Cpath d='M84 70h50L84 30z'/%3E%3Ccircle cx='100' cy='132' r='5'/%3E%3Ccircle cx='124' cy='132' r='5'/%3E%3Ccircle cx='100' cy='156' r='5'/%3E%3Ccircle cx='100' cy='54' r='5'/%3E%3Cpath d='M20 296h270M14 40h20M14 116h20M24 40v76'/%3E%3C/svg%3E"),
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-repeat: no-repeat, repeat, repeat;
    background-size: 300px 300px, 20px 20px, 20px 20px;
    background-position: right 24px bottom 24px, 0 0, 0 0;
    background-attachment: fixed, scroll, scroll;
    overflow-wrap: break-word;
    hyphens: auto;
}

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

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.22;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    hyphens: manual;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); letter-spacing: -0.015em; font-weight: 800; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.15rem; }

a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
a:hover, a:focus-visible { color: var(--teal); text-decoration: none; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid var(--line); background: var(--sheet); }
th, td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
th { background: var(--paper-alt); font-family: var(--font-head); font-weight: 600; }

blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-left: 4px solid var(--red);
    font-size: 1.12rem;
}
blockquote p:last-child { margin-bottom: 0; }

pre, code { font-family: Consolas, "Courier New", monospace; font-size: .92em; }
pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--sheet); border: 1px solid var(--line); }

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

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    background: var(--red);
    color: #fff;
    padding: .6rem 1rem;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 2px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--teal); color: var(--teal); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; transform: translateY(-2px); }
.btn-large { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* ---------- Полоса-уровень и шапка ---------- */
.level-bar { height: 4px; background: linear-gradient(90deg, var(--red) 0 70%, var(--teal) 70% 100%); }

.masthead { background: var(--head); color: #E3ECF3; }
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    flex: 1 1 280px;
    max-width: 660px;
    color: #fff;
    text-decoration: none;
}
.brand:hover, .brand:focus-visible { color: #fff; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.3;
    color: #fff;
}
.brand-desc {
    display: none;
    margin-top: .25rem;
    font-size: .84rem;
    line-height: 1.4;
    color: #9FB4C4;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 2px;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; background: var(--red); }

.main-nav { display: none; flex: 1 1 100%; }
.main-nav.is-open { display: block; }
.main-nav-list { list-style: none; margin: 0; padding: .4rem 0 .6rem; }
.main-nav-list li { border-top: 1px solid rgba(255, 255, 255, .08); }
.main-nav-list a {
    display: block;
    padding: .7rem 0;
    color: #E3ECF3;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
}
.main-nav-list a:hover, .main-nav-list a:focus-visible { color: #fff; }
.main-nav-list .current-menu-item > a { color: #fff; box-shadow: inset 3px 0 0 var(--red); padding-left: .7rem; }
.main-nav-list .sub-menu { list-style: none; padding-left: 1rem; margin: 0; }

/* ---------- Заголовки секций и маркеры ---------- */
.sec-title {
    position: relative;
    margin: 0 0 2.2rem;
    padding: 0 0 .5rem 1.1rem;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 800;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .14em;
    width: 4px;
    height: 1.05em;
    background: var(--red);
}

.entry-content h2::before,
.entry-content h3::before,
.widget-title::before,
.comments-title::before,
.comment-reply-title::before,
.card-title::before,
.zz-heading::before,
.notfound .entry-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: .55em;
    vertical-align: baseline;
    background: var(--red);
}
.entry-content h3::before,
.card-title::before { background: var(--teal); }

/* ---------- Главная ---------- */
.front-inner { width: 92%; margin-inline: auto; }
.front-inner > :last-child { margin-bottom: 0; }

.front-section { padding: 4rem 0; border-top: 1px solid var(--line); }

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background: var(--head);
}
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-veil { position: absolute; inset: 0; background: rgba(14, 42, 58, .75); }
.hero-content { position: relative; z-index: 1; padding: 4rem 0 6rem; }
.hero-title { color: #fff; margin: 0 0 1.1rem; max-width: 24ch; }
.hero-lead { color: #C9D6E1; font-size: 1.15rem; max-width: 60ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-mark {
    position: absolute;
    z-index: 1;
    left: 4%;
    bottom: 1.6rem;
    pointer-events: none;
}
.hero-mark span {
    display: block;
    width: 250px;
    padding-top: .45rem;
    border-top: 1px solid rgba(255, 255, 255, .85);
    color: #D0DCE6;
    font-size: .9rem;
    letter-spacing: .02em;
}

.stats-section {
    background-color: var(--paper-alt);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 20px 20px;
}
.stats-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
}
.stat { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding-left: 1rem; border-left: 1px solid #BFCFDC; }
.stat-num {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.stat-num--red { color: var(--red); }
.stat-num--teal { color: var(--teal); }
.stat-label { color: var(--muted); font-size: 1rem; line-height: 1.4; }

.latest-more { margin: 2.2rem 0 0; }
.empty-note { color: var(--muted); }

.zigzag-section { padding: 0; }
.zz-row { padding: 4rem 0; }
.zz-row--alt { background: var(--paper-alt); border-top: 1px solid var(--line); }
.zz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.zz-text { min-width: 0; }
.zz-heading { margin-top: 0; font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.zz-heading::before { background: var(--red); }
.zz-figure { margin: 0; min-width: 0; }
.zz-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--sheet);
}

.cta-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
    border-top: 0;
    color: #fff;
    background-color: var(--head);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 360' fill='none' stroke='%23FFFFFF' stroke-opacity='.13' stroke-width='2'%3E%3Cpath d='M250 360V70h28v290M250 360l28-30M278 330l-28-30M250 300l28-30M278 270l-28-30M250 240l28-30M278 210l-28-30M250 180l28-30M278 150l-28-30M250 120l28-30'/%3E%3Cpath d='M30 70h390M30 88h390'/%3E%3Cpath d='M44 88l18-18 18 18 18-18 18 18 18-18 18 18 18-18 18 18 18-18 18 18M284 88l18-18 18 18 18-18 18 18 18-18 18 18 18-18 18 18 18-18 18 18'/%3E%3Cpath d='M244 70l20-52 20 52M264 18L60 70M264 18l140 52'/%3E%3Crect x='30' y='88' width='52' height='30'/%3E%3Cpath d='M360 88v150M346 238h28v20h-28z'/%3E%3C/svg%3E"),
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-repeat: no-repeat, repeat, repeat;
    background-size: 340px auto, 20px 20px, 20px 20px;
    background-position: right -40px top 0, 0 0, 0 0;
}
.cta-box { position: relative; z-index: 1; }
.cta-title { color: #fff; margin: 0 0 1rem; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; max-width: 18ch; }
.cta-lead { color: #C9D6E1; max-width: 56ch; font-size: 1.12rem; margin-bottom: 2rem; }

/* ---------- Карточки записей ---------- */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(14, 42, 58, .08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover, .card:focus-within {
    transform: translateY(-4px);
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal), 0 8px 20px rgba(14, 42, 58, .14);
}
.card-thumb { position: relative; background: var(--paper-alt); }
.card-thumb > a { display: block; text-decoration: none; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-blank { display: block; aspect-ratio: 16 / 9; background: var(--paper-alt); }
.card-thumb-blank svg { display: block; width: 100%; height: 100%; }
.card-plate {
    position: absolute;
    top: .75rem;
    left: .75rem;
    max-width: calc(100% - 1.5rem);
    padding: .22rem .6rem;
    border-radius: 2px;
    font-family: var(--font-head);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    text-decoration: none;
    background: var(--teal);
}
.card-plate:hover, .card-plate:focus-visible { color: #fff; filter: brightness(.9); }
.card-plate--red { background: var(--red); }
.card-plate--teal { background: var(--teal); }
.card-plate--blue { background: var(--blue); }
.card-plate--grey { background: #5E7181; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem 1.35rem 1.4rem;
}
.card-title { margin: 0 0 .5rem; font-size: 1.18rem; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover, .card-title a:focus-visible { color: var(--red); }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .7rem; font-size: .88rem; color: var(--muted); }
.card-pin { color: var(--red); font-weight: 600; }
.card-excerpt { color: #33475A; font-size: .99rem; 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: .93rem;
}

/* ---------- Внутренние страницы ---------- */
.page-head {
    padding: 1.8rem 0 2rem;
    border-bottom: 1px solid var(--line);
    background-color: var(--paper-load);
    background-image:
        linear-gradient(rgba(42, 157, 143, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 157, 143, .09) 1px, transparent 1px);
    background-size: 14px 14px;
}
.page-title { margin: .6rem 0 0; }
.page-intro { margin-top: 1rem; max-width: 70ch; color: #33475A; }
.page-intro > :last-child { margin-bottom: 0; }

.crumbs { font-size: .9rem; color: var(--muted); line-height: 1.5; }
.crumbs a { color: var(--ink); }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--teal); }
.crumbs-sep { color: var(--red); margin: 0 .25rem; }

.page-wrap { padding: 2.5rem 0 4.5rem; }
.page-wrap--top > .crumbs { margin-bottom: 1.6rem; }

.layout-single, .layout-with-sidebar { display: block; }
.content-area { min-width: 0; }

.sidebar {
    min-width: 0;
    margin-top: 3rem;
    padding: 1.6rem 1.5rem 1.6rem 2rem;
    background-color: var(--sheet);
    background-image:
        repeating-linear-gradient(to bottom, #9FB3C3 0 1px, transparent 1px 50px),
        repeating-linear-gradient(to bottom, #B9CBDA 0 1px, transparent 1px 10px);
    background-repeat: no-repeat, no-repeat;
    background-size: 12px 100%, 6px 100%;
    background-position: 0 0, 0 0;
    border: 1px solid var(--line);
    border-left: 1px solid #9FB3C3;
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 2rem; }
.sidebar .widget-title { margin: 0 0 .9rem; font-size: 1.02rem; color: var(--ink); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px dashed var(--line); line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover, .sidebar a:focus-visible { color: var(--red); }
.sidebar .post-date { display: block; font-size: .85rem; color: var(--muted); }
.sidebar p { color: #33475A; }

/* Запись и страница */
.entry-head { margin-bottom: 1.8rem; }
.entry-title { margin: .4rem 0 .8rem; }
.entry-meta { color: var(--muted); font-size: .92rem; }
.post-cats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.cat-tag { font-family: var(--font-head); font-weight: 700; font-size: .9rem; text-decoration: none; }
.cat-tag--red { color: var(--red); }
.cat-tag--teal { color: var(--teal); }
.cat-tag--blue { color: var(--blue); }
.cat-tag--grey { color: #5E7181; }
.cat-tag:hover, .cat-tag:focus-visible { text-decoration: underline; color: var(--ink); }

.entry-cover { margin: 0 0 2rem; }
.entry-cover img { display: block; width: 100%; border: 1px solid var(--line); }
.entry-content { font-size: 1.1rem; line-height: 1.72; }
.entry-content > :first-child { margin-top: 0; }
.entry-content img { display: block; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.entry-tags { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .95rem; }
.entry-tags-label { color: var(--muted); }
.entry-tags a { color: var(--teal); text-decoration: none; }
.entry-tags a:hover { color: var(--red); }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }

/* Пагинация (paginate_links, type => plain) */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2.6rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: 0 .85rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--sheet);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
}
.pager a.page-numbers:hover, .pager a.page-numbers:focus-visible { border-color: var(--teal); color: var(--teal); }
.pager .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; min-width: 1.6rem; padding: 0; }
.pager > a:not(.page-numbers), .pager > span:not(.page-numbers) {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6rem; min-height: 2.6rem; padding: 0 .85rem;
    border: 1px solid var(--line); background: var(--sheet); text-decoration: none;
}

/* Поиск */
.search-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 560px; }
.search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .78rem .95rem;
    border: 1px solid #BFCFDC;
    border-radius: 2px;
    background: var(--sheet);
    color: var(--ink);
    font: inherit;
}
.search-field:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 2px rgba(42, 157, 143, .25); }
.search-again { margin-bottom: 2rem; }
.sidebar .search-form, .basement .search-form { max-width: none; }

/* 404 */
.notfound { width: 100%; margin: 0 auto; padding: 1rem 0 2rem; }
.notfound-code {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--red);
}
.notfound .entry-title { margin-top: .8rem; }
.notfound-back { margin-top: 1.8rem; }

/* Комментарии */
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments-title { margin-top: 0; }
.remark-list, .remark-list .children { list-style: none; margin: 0; padding: 0; }
.remark-list .children { margin-left: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.remark-body { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.remark-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .5rem; }
.remark-head img { display: block; border-radius: 2px; }
.remark-author { font-family: var(--font-head); font-weight: 700; }
.remark-date { color: var(--muted); font-size: .88rem; }
.remark-wait { color: var(--red); font-size: .92rem; }
.remark-reply a { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.comment-respond { margin-top: 2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 600; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid #BFCFDC;
    border-radius: 2px;
    background: var(--sheet);
    color: var(--ink);
    font: inherit;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    padding: .78rem 1.6rem;
    border: 2px solid var(--red);
    border-radius: 2px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.comment-form .submit:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.req { color: var(--red); }

/* ---------- Подвал ---------- */
.basement { background: var(--foot); color: #C5D3DE; margin-top: 0; }
.basement-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    padding: 3.5rem 0 3rem;
}
.basement-col { min-width: 0; }
.basement .widget + .widget { margin-top: 1.8rem; }
.basement .widget-title { margin: 0 0 1rem; font-size: 1.05rem; color: #FFFFFF; }
.basement p, .basement .textwidget { color: #C5D3DE; }
.basement ul { list-style: none; margin: 0; padding: 0; }
.basement li { padding: .3rem 0; }
.basement a { color: #E3ECF3; text-decoration: none; }
.basement a:hover, .basement a:focus-visible { color: var(--teal); }
.basement .post-date { color: #8FA3B3; font-size: .85rem; }
.basement-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.2rem 0; }
.copyright { margin: 0; font-size: .9rem; color: #8FA3B3; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 60;
    width: min(92%, 1180px);
    transform: translateX(-50%);
    padding: 1rem 1.25rem;
    background: var(--head);
    color: #E3ECF3;
    border-top: 3px solid var(--red);
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(10, 31, 43, .35);
}
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; }
.cookie-text { margin: 0; flex: 1 1 320px; min-width: 0; font-size: .95rem; color: #E3ECF3; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив: от 601px ---------- */
@media (min-width: 601px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .basement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-desc { display: -webkit-box; }
    .hero { min-height: 580px; }
    .hero-content { padding: 5rem 0 7rem; }
}

/* ---------- Адаптив: от 961px ---------- */
@media (min-width: 961px) {
    .masthead-row { flex-wrap: nowrap; padding: 1.1rem 0; }
    .nav-toggle { display: none; }
    .main-nav, .main-nav.is-open { display: block; flex: 0 1 auto; }
    .main-nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem 1.8rem; padding: 0; }
    .main-nav-list li { border-top: 0; position: relative; }
    .main-nav-list a { padding: .4rem 0; }
    .main-nav-list .current-menu-item > a { padding-left: 0; box-shadow: inset 0 -2px 0 var(--red); }
    .main-nav-list .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 20;
        min-width: 220px;
        padding: .5rem 1rem;
        background: var(--head);
        border-top: 2px solid var(--red);
    }
    .main-nav-list li:hover > .sub-menu, .main-nav-list li:focus-within > .sub-menu { display: block; }

    .front-inner { width: min(85%, 1180px); }
    .hero { min-height: 640px; }
    .hero-mark { left: calc((100% - min(85%, 1180px)) / 2); }

    .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
    .stat { padding: .4rem 1.8rem; border-left: 1px solid #BFCFDC; }
    .stat:first-child { padding-left: 0; border-left: 0; }

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

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

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67%) minmax(0, 27%);
        justify-content: space-between;
        align-items: start;
    }
    .layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
    .sidebar { margin-top: 0; }
    .notfound { width: 85%; }

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

/* ---------- Мобильные уточнения до 600px ---------- */
@media (max-width: 600px) {
    body { font-size: 1rem; background-size: 180px 180px, 20px 20px, 20px 20px; }
    .front-section, .zz-row { padding: 3rem 0; }
    .cta-section { padding: 3.5rem 0; background-size: 220px auto, 20px 20px, 20px 20px; background-position: right -70px top 0, 0 0, 0 0; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-mark span { width: 200px; font-size: .82rem; }
    .sidebar { padding: 1.3rem 1.1rem 1.3rem 1.6rem; }
    .cookie-banner { padding: .9rem 1rem; }
    .cookie-accept { width: 100%; }
    .remark-list .children { margin-left: .6rem; padding-left: .6rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
    .card:hover, .card:focus-within, .btn:hover, .btn:focus-visible { transform: none; }
}
