/*
Theme Name: dds_anthaiphuong.com
Author: Анна Нгуен
Description: Тема для информационно-аналитического портала о здоровом жилье: экология районов, вода, воздух, шум и зелёные зоны.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ecoliv
*/

/* =========================================================
   1. Переменные и базовая типографика
   ========================================================= */

:root {
    --bg: #F4F5FA;
    --bg-alt: #EBEDF5;
    --ink: #1E1A2B;
    --accent: #6A4C93;
    --accent-2: #B8A9D4;
    --accent-soft: #9B7EC4;
    --muted: #8B83A3;
    --line: #D6D0E5;
    --dark: #1A1625;
    --white: #FFFFFF;
    --shell: min(92%, 1180px);
    --font-head: "Unbounded", "Montserrat Alternates", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
    --font-body: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(184, 169, 212, 0.16) 1px, transparent 0);
    background-size: 26px 26px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

a:hover,
a:focus {
    text-decoration: underline;
}

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

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.35rem;
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1.1em;
}

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

li {
    margin-bottom: 0.45em;
}

blockquote {
    margin: 1.6em 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    color: #2A2338;
}

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

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
    background: var(--bg-alt);
}

pre {
    padding: 1rem 1.2rem;
    border-radius: 6px;
    overflow-x: auto;
}

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

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

th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-size: 0.95rem;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

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

/* =========================================================
   2. Кнопки и декоративные элементы
   ========================================================= */

.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.btn:hover,
.btn:focus {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border: 1px solid var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #573C7B;
    border-color: #573C7B;
    color: var(--white);
}

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

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(106, 76, 147, 0.08);
    color: var(--accent);
}

.btn-light {
    background: var(--white);
    color: var(--accent);
    border: 1px solid var(--white);
}

.btn-light:hover,
.btn-light:focus {
    background: #F0EAF9;
    color: #4B346C;
}

.btn-on-dark {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-on-dark:hover,
.btn-on-dark:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--white);
    color: var(--white);
}

/* Заголовок секции: вертикальная черта 2px + иконка-капля */
.sec-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-left: 1rem;
    margin-bottom: 1.6rem;
    font-size: 2rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 2px;
    background: var(--accent);
}

.sec-title .drop {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: block;
}

/* Волновой разделитель «кардиограмма» */
.wave-sep {
    height: 26px;
    margin: 0;
    border: 0;
    background-repeat: repeat-x;
    background-position: center;
    background-size: 180px 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='26' viewBox='0 0 180 26'%3E%3Cpath d='M0 13h28l6-9 7 18 6-14 5 5h40l6-9 7 18 6-14 5 5h64' fill='none' stroke='%23D6D0E5' stroke-width='1.6'/%3E%3C/svg%3E");
}

.wave-sep-top {
    margin-top: 2.6rem;
}

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

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--ink);
}

.brand:hover,
.brand:focus {
    text-decoration: none;
}

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

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

.site-title {
    display: block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-desc {
    display: block;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted);
    margin-top: 0.25rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    padding: 0.55rem 0.9rem;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: var(--font-head);
    font-size: 0.85rem;
    cursor: pointer;
}

.main-nav {
    flex: 0 0 auto;
}

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

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.93rem;
    color: var(--ink);
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

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

/* =========================================================
   4. Каркас страницы
   ========================================================= */

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

.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;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

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

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

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

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

.page-head h1 {
    font-size: 2.6rem;
    margin-bottom: 0.4rem;
}

.page-head .page-sub {
    color: var(--muted);
    margin: 0;
}

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
    z-index: 2;
}

.card:hover {
    background: var(--bg-alt);
    border-color: var(--accent-2);
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb img {
    transform: scale(1.03);
}

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

.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.5rem;
}

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

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

.card-excerpt {
    color: #46405A;
    font-size: 0.96rem;
    margin-bottom: 1rem;
}

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

.card-foot {
    margin-top: auto;
}

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

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

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

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

.card-more {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--accent);
    border-bottom: 1px solid transparent;
}

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

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pager .page-numbers:hover {
    background: var(--bg-alt);
    border-color: var(--accent-2);
    color: var(--accent);
    text-decoration: none;
    transform: translateY(-2px);
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    min-width: 0;
    padding: 0.5rem 0.2rem;
}

/* =========================================================
   7. Запись и страница
   ========================================================= */

.entry {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2rem 2.2rem 2.4rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.entry-thumb {
    margin: 1.4rem 0 1.8rem;
    border-radius: 8px;
    overflow: hidden;
}

.entry-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

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

.entry-content h3 {
    font-size: 1.3rem;
    margin-top: 1.4em;
}

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

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content ul li {
    position: relative;
    padding-left: 1.7rem;
}

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 14px;
    height: 14px;
    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 24 24'%3E%3Cpath d='M12 2.5c4.2 5 6.6 8.2 6.6 11.2A6.6 6.6 0 0 1 12 20.3a6.6 6.6 0 0 1-6.6-6.6c0-3 2.4-6.2 6.6-11.2z' fill='none' stroke='%236A4C93' stroke-width='1.6'/%3E%3C/svg%3E");
}

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

.entry-tags a {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.18rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--accent);
}

.entry-tags a:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

.post-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    font-size: 0.9rem;
}

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

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 8px 24px rgba(30, 26, 43, 0.05);
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    padding-left: 0.7rem;
    border-left: 2px solid var(--accent);
    color: var(--ink);
}

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

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

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 10px;
    height: 10px;
    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 24 24'%3E%3Cpath d='M12 2.5c4.2 5 6.6 8.2 6.6 11.2A6.6 6.6 0 0 1 12 20.3a6.6 6.6 0 0 1-6.6-6.6c0-3 2.4-6.2 6.6-11.2z' fill='none' stroke='%236A4C93' stroke-width='2'/%3E%3C/svg%3E");
}

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

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

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

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

.site-footer {
    position: relative;
    background: var(--dark);
    color: #DCD6E8;
    padding: 3rem 0 1.6rem;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -40px;
    width: 420px;
    height: 320px;
    opacity: 0.35;
    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 420 320'%3E%3Cg fill='none' stroke='%23B8A9D4' stroke-width='1.2' opacity='.55'%3E%3Cpath d='M20 60h150v90H20z'/%3E%3Cpath d='M190 30h120v70H190z'/%3E%3Cpath d='M60 180h180v100H60z'/%3E%3Cpath d='M250 130h130v120H250z'/%3E%3Cpath d='M0 165h420M120 0v320M300 0v320'/%3E%3Ccircle cx='170' cy='150' r='38'/%3E%3Ccircle cx='300' cy='210' r='26'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.footer-cols {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    z-index: 1;
}

.site-footer .widget {
    color: #DCD6E8;
    font-size: 0.94rem;
}

.site-footer .widget-title {
    font-family: var(--font-head);
    font-size: 1.02rem;
    color: var(--white);
    margin: 0 0 0.9rem;
    padding-left: 0.7rem;
    border-left: 2px solid var(--accent-2);
}

.site-footer .widget p {
    color: #C7BFD8;
}

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

.site-footer .widget li {
    padding: 0.35rem 0 0.35rem 1.2rem;
    position: relative;
}

.site-footer .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 9px;
    height: 9px;
    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 24 24'%3E%3Cpath d='M12 2.5c4.2 5 6.6 8.2 6.6 11.2A6.6 6.6 0 0 1 12 20.3a6.6 6.6 0 0 1-6.6-6.6c0-3 2.4-6.2 6.6-11.2z' fill='none' stroke='%23B8A9D4' stroke-width='2'/%3E%3C/svg%3E");
}

.site-footer .widget a {
    color: #E4DFEE;
}

.site-footer .widget a:hover {
    color: var(--white);
}

.site-footer .widget .post-date {
    color: #A79CC0;
    font-size: 0.78rem;
}

.footer-contact {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #C7BFD8;
}

.footer-contact a {
    color: #D9CFF0;
}

.site-copy {
    position: relative;
    z-index: 1;
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(184, 169, 212, 0.28);
    font-size: 0.82rem;
    line-height: 1.6;
    color: #A79CC0;
}

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

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

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

.cookie-banner p {
    margin: 0;
    max-width: 780px;
}

.cookie-banner a {
    color: var(--accent-2);
}

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

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

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

.front-shell {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.section-lead {
    max-width: 720px;
    color: #46405A;
    margin-bottom: 2rem;
}

/* Блок 1 — hero */
.hero {
    position: relative;
    margin: 2rem auto 0;
    width: 85%;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(120deg, #2B2140 0%, #6A4C93 60%, #9B7EC4 100%);
    color: var(--white);
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    display: block;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.18) 1px, transparent 0);
    background-size: 22px 22px;
    pointer-events: none;
}

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

.hero-kicker {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.32rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 0.6rem;
}

.hero-sub {
    font-size: 1.06rem;
    color: #EDE7F7;
    max-width: 34em;
}

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

.hero-art {
    min-width: 0;
    display: flex;
    justify-content: center;
}

.hero-art svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* Блок 2 — чек-лист */
.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.checklist li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: 0;
    margin: 0;
    padding: 1.15rem 1.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.checklist li:hover {
    border-color: var(--accent);
    background: #FBFAFE;
    transform: translateY(-2px);
}

.checklist-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-top: 0.15rem;
}

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

.checklist-body strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.08rem;
    margin-bottom: 0.25rem;
}

.checklist-body span {
    color: #56506B;
    font-size: 0.95rem;
}

/* Блок 3 — статистика */
.stats-plate {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    border-radius: 12px;
    padding: 2.6rem 2.2rem;
    color: var(--white);
}

.stats-plate h2 {
    color: var(--white);
}

.stats-plate .sec-title::before {
    background: var(--white);
}

.stats-lead {
    color: #F0EAFA;
    max-width: 720px;
    margin-bottom: 2rem;
}

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

.stat {
    min-width: 0;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.8rem;
    line-height: 1.05;
    color: var(--white);
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.92rem;
    color: #EFE9FA;
}

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

.rubric {
    display: block;
    min-width: 0;
    padding: 1.7rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.rubric:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: #FBFAFE;
    text-decoration: none;
}

.rubric svg {
    display: block;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
}

.rubric-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.22rem;
    margin-bottom: 0.35rem;
}

.rubric-note {
    display: block;
    font-size: 0.92rem;
    color: #56506B;
}

/* Последние записи на главной */
.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.latest-head .sec-title {
    margin-bottom: 0;
}

.front-cta {
    margin-top: 2.4rem;
    padding: 2.2rem 2.2rem;
    background: var(--dark);
    border-radius: 10px;
    color: #DCD6E8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
}

.front-cta h2 {
    color: var(--white);
    font-size: 1.6rem;
    margin: 0 0 0.4rem;
}

.front-cta p {
    margin: 0;
    max-width: 46em;
}

.front-cta-text {
    min-width: 0;
}

/* =========================================================
   12. Комментарии и формы
   ========================================================= */

.comments-area {
    margin-top: 2.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.8rem 2rem 2rem;
}

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

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

.comment-list .children {
    list-style: none;
    margin: 0.8rem 0 0 1.4rem;
    padding-left: 1.2rem;
    border-left: 1px solid var(--line);
}

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

.comment-body {
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    border-radius: 6px;
}

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

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

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

.comment-text p:last-child {
    margin-bottom: 0;
}

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

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.96rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    color: var(--muted);
}

input[type="submit"],
button[type="submit"],
.search-submit {
    padding: 0.7rem 1.4rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-head);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.search-submit:hover {
    background: #573C7B;
    transform: translateY(-2px);
}

.search-form {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
    min-width: 0;
}

.search-form label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

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

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

.error-block {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding: 2.4rem 2.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: left;
}

.error-code {
    font-family: var(--font-head);
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.error-actions {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
}

.no-posts {
    padding: 2rem 2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

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

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

    h1 {
        font-size: 2.5rem;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        padding: 2.8rem 2rem;
    }

    .hero-art {
        display: none;
    }

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

    .layout-single,
    .front-shell,
    .hero,
    .error-block {
        width: 100%;
    }

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

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

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

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

    .main-nav {
        flex: 1 1 100%;
        order: 3;
    }

    .main-nav[hidden] {
        display: none !important;
    }

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

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

    .main-nav a {
        display: block;
        padding: 0.7rem 0;
        border-bottom: 0;
    }

    .header-inner {
        flex-wrap: wrap;
    }
}

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

    h2,
    .sec-title {
        font-size: 1.6rem;
    }

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

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero-inner {
        padding: 2.2rem 1.4rem;
    }

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

    .entry,
    .comments-area {
        padding: 1.4rem 1.2rem 1.6rem;
    }

    .stats-plate {
        padding: 1.8rem 1.4rem;
    }

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

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

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

    .front-cta {
        padding: 1.8rem 1.4rem;
    }

    .error-block {
        padding: 1.8rem 1.4rem;
    }

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

    .checklist li {
        padding: 1rem 1.2rem;
    }

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