/*
Theme Name: dds_merolith-yug.ru
Theme URI: https://merolith-yug.ru/
Author: Кирилл Лебедев
Description: Индивидуальная тема информационного проекта о строительной химии и фасадном декоре.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mrlth
*/

/* ============================================================
   1. Переменные и базовый слой
   ============================================================ */

:root {
    --bg: #F4F2F8;
    --bg-alt: #E9E6F0;
    --head-bg: #2B2640;
    --foot-bg: #1A1730;
    --side-bg: #FCFAFE;
    --ink: #1E1A2B;
    --accent: #B46AE3;
    --accent-2: #6DD5C9;
    --muted: #8B83A0;
    --mesh: #D6CFE8;
    --shadow-a: rgba(180, 106, 227, .2);
    --shadow-b: rgba(109, 213, 201, .38);
    --corner: 22px;
    --font-head: "Montserrat", "Futura", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
    --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(60deg, rgba(214, 207, 232, .55) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(-60deg, rgba(214, 207, 232, .55) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(0deg, rgba(214, 207, 232, .35) 0 1px, transparent 1px 100%);
    background-size: 44px 76px;
    background-attachment: fixed;
}

/* «Кристаллический срез» — декоративное пятно в правом верхнем углу */
body::before {
    content: "";
    position: fixed;
    top: -60px;
    right: -80px;
    width: 520px;
    height: 480px;
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 380'%3E%3Cpolygon points='210,4 318,38 372,116 356,214 396,268 300,330 214,318 132,362 74,286 12,242 40,152 8,84 108,58' fill='%23B46AE3' fill-opacity='0.09'/%3E%3Cpolygon points='196,52 292,90 314,182 258,254 160,266 96,196 110,104' fill='%236DD5C9' fill-opacity='0.07'/%3E%3C/svg%3E");
}

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

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

/* ============================================================
   2. Типографика
   ============================================================ */

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

h1 {
    font-size: 3.2rem;
    letter-spacing: .015em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.42rem;
}

h4 {
    font-size: 1.16rem;
}

p {
    margin: 0 0 1.15em;
}

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

.entry-content a,
.widget-block a,
.excerpt-text a {
    border-bottom: 1px dashed var(--accent);
    transition: border-bottom-color .2s ease, border-bottom-style .2s ease, color .2s ease;
}

.entry-content a:hover,
.widget-block a:hover,
.excerpt-text a:hover {
    color: #2A9E93;
    border-bottom: 1px solid var(--accent-2);
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%);
}

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

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

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

/* Технические маркеры списков */
.entry-content ul,
.checklist,
.widget-block ul {
    list-style: none;
    padding-left: 0;
}

.entry-content ul li,
.widget-block ul li {
    position: relative;
    padding-left: 2.1rem;
    margin-bottom: .55em;
}

.entry-content ul li::before,
.widget-block ul li::before {
    content: "Х";
    position: absolute;
    left: 0;
    top: .38em;
    width: 19px;
    height: 19px;
    line-height: 19px;
    text-align: center;
    font-family: var(--font-head);
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
}

.entry-content ol {
    padding-left: 1.3rem;
}

.entry-content ol li {
    margin-bottom: .55em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--muted);
    background: #fff;
}

table th,
table td {
    border: 1px solid var(--muted);
    padding: .62rem .8rem;
    text-align: left;
}

table th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-size: .95rem;
    letter-spacing: .03em;
}

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

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

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

.site-main {
    padding: 2.8rem 0 4rem;
}

.front .site-main {
    padding: 0 0 4rem;
}

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

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

.btn,
.btn-ghost {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .94rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-radius: 3px;
    padding: .78rem 1.5rem;
    cursor: pointer;
    transition: background-color .22s ease, color .22s ease, border-color .22s ease;
}

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

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

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

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(180, 106, 227, .16);
    color: var(--accent);
}

.on-dark .btn-ghost {
    color: var(--accent-2);
    border-color: var(--accent-2);
}

.on-dark .btn-ghost:hover {
    background: rgba(109, 213, 201, .16);
}

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

.site-header {
    background: var(--head-bg);
    color: #EFEAF7;
    border-bottom: 3px solid var(--accent);
}

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

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

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

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

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

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

.brand-desc {
    display: block;
    margin-top: .28rem;
    font-size: .78rem;
    line-height: 1.45;
    color: #B4ABC9;
    max-width: 46ch;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--accent);
    color: #fff;
    border-radius: 3px;
    padding: .5rem .85rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.site-nav {
    background: #241F36;
    border-top: 1px solid #3A3352;
}

.menu-main {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.menu-main li {
    position: relative;
}

.menu-main a {
    display: block;
    padding: .92rem 1.25rem;
    color: #D9D2EA;
    font-family: var(--font-head);
    font-size: .87rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.menu-main a:hover,
.menu-main .current-menu-item > a {
    color: #fff;
    background: #2F2947;
    border-bottom-color: var(--accent-2);
}

.menu-main .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: #241F36;
    border: 1px solid #3A3352;
    z-index: 30;
    display: none;
}

.menu-main li:hover > .sub-menu,
.menu-main li:focus-within > .sub-menu {
    display: block;
}

/* Поиск в шапке */
.search-form {
    display: flex;
    gap: .4rem;
}

.search-form input[type="search"] {
    border: 1px solid var(--mesh);
    background: #fff;
    color: var(--ink);
    padding: .55rem .7rem;
    border-radius: 3px;
    font-family: var(--font-body);
    font-size: .92rem;
    min-width: 0;
    width: 100%;
}

.search-form input[type="search"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.search-form button {
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 3px;
    padding: .55rem 1rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.search-form button:hover {
    background: var(--accent-2);
    color: #14202A;
}

.header-search {
    flex: 0 0 240px;
}

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

.breadcrumbs {
    font-size: .82rem;
    color: var(--muted);
    padding: 1rem 0 0;
    line-height: 1.6;
}

.breadcrumbs a {
    color: var(--muted);
    border-bottom: 1px dashed var(--mesh);
}

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

.breadcrumbs .sep {
    margin: 0 .45rem;
    color: var(--accent);
}

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

.section-title {
    position: relative;
    padding-left: 1.1rem;
    padding-bottom: .65rem;
    margin-bottom: 1.7rem;
    font-size: 1.85rem;
}

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

.section-title::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    right: 0;
    bottom: 0;
    border-bottom: 1px dashed var(--muted);
}

.on-dark .section-title,
.on-dark h2,
.on-dark h3 {
    color: #fff;
}

.on-dark .section-title::after {
    border-bottom-color: rgba(255, 255, 255, .3);
}

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

.fs {
    padding: 4.2rem 0;
}

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

/* Декоративный «пропил» между секциями — зубцы врезаются в следующую секцию */
.saw {
    height: 20px;
    background-color: var(--bg-alt);
    background-image:
        linear-gradient(135deg, var(--bg) 50%, transparent 50%),
        linear-gradient(225deg, var(--bg) 50%, transparent 50%);
    background-size: 28px 20px;
    background-repeat: repeat-x;
}

.saw-reverse {
    background-color: var(--bg);
    background-image:
        linear-gradient(135deg, var(--bg-alt) 50%, transparent 50%),
        linear-gradient(225deg, var(--bg-alt) 50%, transparent 50%);
}

.saw-dark {
    background-color: var(--bg-alt);
    background-image:
        linear-gradient(135deg, var(--head-bg) 50%, transparent 50%),
        linear-gradient(225deg, var(--head-bg) 50%, transparent 50%);
}

/* --- Блок 1: hero --- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--head-bg);
    clip-path: polygon(0 0, calc(100% - 90px) 0, 100% 90px, 100% 100%, 0 100%);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(115deg, rgba(26, 23, 48, .93) 12%, rgba(43, 38, 64, .82) 55%, rgba(62, 44, 90, .74) 100%);
}

.hero-inner {
    padding: 5.4rem 0 5rem;
    color: #F2EEF9;
}

.hero-tag {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .76rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-2);
    border: 1px solid rgba(109, 213, 201, .5);
    padding: .35rem .8rem;
    margin-bottom: 1.5rem;
}

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

.hero-sub {
    font-size: 1.06rem;
    color: #CFC7E2;
    max-width: 62ch;
    margin-bottom: 1.6rem;
}

.hero-author {
    font-family: var(--font-head);
    font-size: .88rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9F97B8;
    margin-bottom: 2rem;
}

.hero-author span {
    color: var(--accent-2);
}

/* --- Блок 2: чек-лист --- */
.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem 2.6rem;
}

.checklist li {
    position: relative;
    min-width: 0;
    padding: .35rem 0 .35rem 3.1rem;
    border-left: 3px solid var(--accent);
}

.checklist li::before {
    content: "V";
    position: absolute;
    left: 1rem;
    top: .3rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-2);
    text-shadow: 0 0 0 var(--accent-2);
}

.checklist b {
    display: block;
    font-family: var(--font-head);
    font-size: 1.02rem;
    margin-bottom: .12rem;
}

.checklist span {
    display: block;
    font-size: .94rem;
    color: #4A4258;
    line-height: 1.6;
}

.fs-note {
    margin-top: 2rem;
    font-size: .93rem;
    color: var(--muted);
    max-width: 70ch;
}

/* --- Блок 3: статистика --- */
.fs-stats {
    background: linear-gradient(125deg, #2B2640 0%, #3E2C5A 100%);
    padding: 3.6rem 2.2rem;
    position: relative;
    color: #fff;
    clip-path: polygon(0 0, calc(100% - 54px) 0, 100% 54px, 100% 100%, 54px 100%, 0 calc(100% - 54px));
}

.fs-stats::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(60deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(-60deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 100%);
    background-size: 44px 76px;
    opacity: .55;
}

.fs-stats > * {
    position: relative;
}

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

.stat {
    min-width: 0;
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: .01em;
}

.stat-line {
    display: block;
    width: 46px;
    height: 3px;
    background: var(--accent-2);
    margin: .85rem 0 .8rem;
}

.stat-label {
    display: block;
    font-size: .93rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .78);
}

/* --- Блок 4: рубрикатор --- */
.topic-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.9rem 1.7rem;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--ink);
    transition: background-color .22s ease, border-color .22s ease;
}

.topic-tile:hover {
    background: rgba(180, 106, 227, .1);
    border-color: var(--accent-2);
}

.topic-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 1rem;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

.topic-tile:hover .topic-icon {
    stroke: #2A9E93;
}

.topic-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.24rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.topic-desc {
    display: block;
    font-size: .93rem;
    color: #55506A;
    line-height: 1.6;
}

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-radius: 0;
    border: none;
    box-shadow: 8px 8px 0 var(--shadow-a);
    transition: box-shadow .22s ease;
}

.card:hover {
    box-shadow: 10px 18px 0 var(--shadow-b);
}

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

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(125deg, #2B2640 0%, #3E2C5A 100%);
    clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%);
}

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

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

.card-title {
    font-size: 1.24rem;
    margin-bottom: .6rem;
}

.card-title a {
    color: var(--ink);
    transition: color .2s ease;
}

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

.card-excerpt {
    font-size: .96rem;
    color: #4A4258;
    margin-bottom: 1.1rem;
}

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

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: color .2s ease, border-color .2s ease;
}

.card-more:hover {
    color: #2A9E93;
    border-color: var(--accent-2);
}

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

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

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

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

.entry-thumb {
    width: 100%;
    margin-bottom: 1.8rem;
    clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%);
}

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

.entry-content img {
    clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%);
    margin: 1.4rem 0;
}

.entry-content h2 {
    margin-top: 1.9rem;
    font-size: 1.72rem;
}

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

.entry-footer {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--mesh);
    font-size: .88rem;
    color: var(--muted);
}

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

.page-heading {
    margin-bottom: 2rem;
}

.page-heading h1 {
    font-size: 2.3rem;
    margin-bottom: .3rem;
}

.page-heading p {
    color: var(--muted);
    font-size: .96rem;
    margin: 0;
}

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

.sidebar {
    min-width: 0;
}

.sidebar .widget-block {
    background: var(--side-bg);
    border: 1px solid var(--mesh);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.8rem;
    color: var(--ink);
}

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

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

.sidebar .widget-block ul {
    margin: 0;
}

.sidebar .widget-block ul li::before {
    content: "Т";
    background: var(--accent);
}

.sidebar .widget-block a {
    color: #362E4A;
    border-bottom: 1px dashed var(--mesh);
}

.sidebar .widget-block a:hover {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-2);
}

.sidebar .post-date {
    display: block;
    font-size: .78rem;
    color: var(--muted);
}

.sidebar .widget-block p {
    font-size: .94rem;
    color: #4A4258;
}

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

.site-footer {
    background: var(--foot-bg);
    color: #C9C1DE;
    margin-top: 3rem;
    border-top: 3px solid var(--accent);
}

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

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

.footer-col .widget-block {
    color: #C9C1DE;
}

.footer-col .widget-title {
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: .55rem;
    border-bottom: 1px dashed rgba(255, 255, 255, .22);
}

.footer-col .widget-block p {
    font-size: .93rem;
    color: #B7AECF;
}

.footer-col .widget-block a {
    color: #DCD5EC;
    border-bottom: 1px dashed rgba(220, 213, 236, .4);
}

.footer-col .widget-block a:hover {
    color: var(--accent-2);
    border-bottom: 1px solid var(--accent-2);
}

.footer-col .widget-block ul li::before {
    content: "Т";
    background: var(--accent);
    color: #fff;
}

.footer-col .post-date {
    display: block;
    font-size: .78rem;
    color: #9F97B8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 1.2rem 0 1.4rem;
    font-size: .84rem;
    color: #9F97B8;
}

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.8rem;
}

.pagination .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: .55rem .85rem;
    border: 2px solid var(--mesh);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .88rem;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

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

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

.pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

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

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--mesh);
}

.comments-title,
.comment-reply-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

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

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

.comment-body {
    background: #fff;
    border-left: 3px solid var(--accent);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.1rem;
}

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

.comment-meta-date {
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.comment-content {
    margin-top: .6rem;
    font-size: .97rem;
}

.comment-reply-link {
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--accent);
}

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

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

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

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

.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent);
    border-radius: 3px;
    padding: .72rem 1.5rem;
    font-family: var(--font-head);
    font-size: .88rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.comment-form .submit:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #14202A;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: var(--head-bg);
    border-top: 3px solid var(--accent);
    color: #DCD5EC;
    font-size: .9rem;
}

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

.cookie-banner a {
    color: var(--accent-2);
    border-bottom: 1px dashed var(--accent-2);
}

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

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

.notfound-code {
    font-family: var(--font-head);
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin-bottom: .4rem;
}

.notfound .search-form {
    max-width: 460px;
    margin: 1.6rem 0;
}

.no-results {
    background: #fff;
    border-left: 3px solid var(--accent);
    padding: 1.4rem 1.6rem;
}

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

@media (min-width: 600px) {
    .checklist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

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

@media (min-width: 960px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

    .layout-single {
        width: 100%;
    }

    .shell-front {
        width: 92%;
    }

    .hero {
        clip-path: polygon(0 0, calc(100% - 54px) 0, 100% 54px, 100% 100%, 0 100%);
    }
}

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

    .header-search {
        flex: 1 1 100%;
        order: 3;
    }

    .menu-main {
        display: none;
        flex-direction: column;
    }

    .menu-main.is-open {
        display: flex;
    }

    .menu-main a {
        border-bottom: 1px solid #342D4C;
    }

    .menu-main .sub-menu {
        position: static;
        display: block;
        border: none;
        padding-left: 1rem;
    }
}

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

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

    .fs {
        padding: 2.8rem 0;
    }

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

    .fs-stats {
        padding: 2.2rem 1.4rem;
        clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
    }

    .stat-num {
        font-size: 2.4rem;
    }

    .topic-tile {
        padding: 1.4rem 1.3rem;
    }

    blockquote {
        padding: 1.1rem 1.2rem;
    }

    .cookie-banner {
        padding: .9rem 1.1rem;
    }

    .card-body {
        padding: 1.1rem 1.2rem 1.3rem;
    }

    .site-main {
        padding: 2rem 0 2.6rem;
    }
}
