/*
Theme Name: dds_imoyemen.com
Theme URI: https://imoyemen.com/
Author: Алексей Громов
Description: Информационная тема для портала о регистрации прав на недвижимость, кадастровом учёте и госуслугах. Скандинавский минимализм с элементами швейцарского стиля, холодная палитра.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: imoyem
*/

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

:root {
    --bg: #F4F6F8;
    --bg-alt: #E8ECF1;
    --surface: #FFFFFF;
    --deep: #1B2A3A;
    --ink: #1B2A3A;
    --accent: #2E6FF2;
    --accent-dark: #1F5BD6;
    --teal: #00B8A9;
    --muted: #6B7A8D;
    --line: #E8ECF1;
    --radius: 12px;
    --radius-btn: 8px;
    --shadow: 0 2px 8px rgba(27, 42, 58, 0.06);
    --shadow-hover: 0 6px 16px rgba(27, 42, 58, 0.10);
    --font: "Inter", "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%232E6FF2' stroke-width='2' opacity='0.03'%3E%3Cpath d='M30 230V110l60-40 60 40v120'/%3E%3Cpath d='M90 70V30h40v22'/%3E%3Cpath d='M150 230V150h80v80z'/%3E%3Cpath d='M55 140h30v30H55zM95 140h30v30H95zM55 185h30v30H55zM95 185h30v30H95zM175 175h30v30h-30z'/%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(232, 236, 241, 0.4) 0 1px, transparent 1px 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -20px bottom -20px, top left;
    background-attachment: fixed, scroll;
}

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

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

p {
    margin: 0 0 1.1em;
}

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

h1 {
    font-size: 3.2rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    padding-left: 14px;
    border-left: 3px solid var(--teal);
}

h4 {
    font-size: 1.12rem;
    font-weight: 600;
}

ul, ol {
    padding-left: 1.3rem;
}

li {
    margin-bottom: 0.4em;
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--surface);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius);
    color: var(--ink);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    background: var(--surface);
}

table th,
table td {
    border: 1px solid #C9D3DE;
    padding: 0.7rem 0.9rem;
    text-align: left;
}

table th {
    background: var(--bg-alt);
    font-weight: 600;
}

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

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

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

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

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

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

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

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

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

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

.topbar {
    display: flex;
    height: 4px;
}

.topbar span {
    flex: 1;
}

.topbar span:nth-child(1) { background: var(--accent); }
.topbar span:nth-child(2) { background: var(--teal); }
.topbar span:nth-child(3) { background: var(--deep); }

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

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

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

.brand-mark {
    flex: 0 0 auto;
}

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

.brand-name {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.brand-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 460px;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-btn);
    color: var(--accent);
    font: inherit;
    font-size: 0.92rem;
    cursor: pointer;
}

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

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

.main-nav li {
    margin: 0;
}

.main-nav a {
    position: relative;
    display: inline-block;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 0.2rem 0;
}

.main-nav a::after,
.entry-content a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--accent);
}

.main-nav a:hover::after {
    width: 100%;
}

.entry-content a {
    position: relative;
    display: inline;
}

.entry-content a::after {
    bottom: -1px;
}

.entry-content a:hover {
    color: var(--accent-dark);
}

.entry-content a:hover::after {
    width: 100%;
}

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

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.2;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-filled {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-filled:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-outlined {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outlined:hover {
    background: var(--bg-alt);
    transform: translateY(-1px);
}

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

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

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

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

.crumbs .sep {
    color: #AEBCCB;
    margin: 0 0.35rem;
}

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

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

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

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

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

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

.card:hover::before {
    opacity: 1;
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-alt);
}

.card-thumb-ph {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #E8ECF1 0%, #D7DFE8 100%);
}

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

.card-title {
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.6rem;
    padding: 0;
    border: 0;
}

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

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

.card-excerpt {
    color: #43556A;
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

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

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.meta-tag {
    display: inline-block;
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 184, 169, 0.12);
    color: #00867B;
    font-weight: 600;
}

/* -------------------------------------------------------------
   7. Главная страница
------------------------------------------------------------- */

.fs {
    padding: 5rem 0;
}

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

.fs-head {
    margin-bottom: 2.6rem;
}

.fs-head p {
    color: var(--muted);
    margin: 0.6rem 0 0;
    max-width: 720px;
}

.dotline {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}

.dotline span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.55;
}

/* Hero */

.hero {
    position: relative;
    color: #FFFFFF;
    background: var(--deep);
    overflow: hidden;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(27, 42, 58, 0.92) 0%, rgba(27, 42, 58, 0.72) 55%, rgba(46, 111, 242, 0.35) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 6rem 0 6.5rem;
}

.hero-box {
    max-width: 780px;
}

.hero h1 {
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.hero-sub {
    color: var(--bg-alt);
    font-size: 1.12rem;
    max-width: 660px;
    margin-bottom: 2rem;
}

.hero-kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-left: 14px;
    border-left: 3px solid var(--teal);
}

/* Шаги */

.steps {
    position: relative;
    display: grid;
    gap: 1.2rem;
}

.step {
    display: flex;
    gap: 1.3rem;
    align-items: flex-start;
    position: relative;
    background: var(--surface);
    border: 1px solid #DCE3EB;
    border-radius: var(--radius);
    padding: 1.5rem 1.7rem;
    min-width: 0;
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 2.55rem;
    bottom: -1.2rem;
    height: 1.2rem;
    border-left: 2px dotted var(--muted);
}

.step-num {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--teal);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.step-body h3 {
    border: 0;
    padding: 0;
    margin-bottom: 0.35rem;
    font-size: 1.16rem;
}

.step-body p {
    margin: 0;
    color: #43556A;
    font-size: 0.97rem;
}

/* Статистика */

.fs-stats {
    background-color: var(--deep);
    background-image: repeating-linear-gradient(45deg, rgba(46, 111, 242, 0.08) 0 1px, transparent 1px 24px);
    color: #FFFFFF;
}

.fs-stats h2 {
    color: #FFFFFF;
}

.fs-stats .fs-head p {
    color: var(--bg-alt);
}

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

.stat {
    min-width: 0;
    padding: 1.7rem 1.4rem;
    border: 1px solid rgba(232, 236, 241, 0.16);
    border-radius: var(--radius);
    background: rgba(244, 246, 248, 0.04);
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: #6FA0FF;
    margin-bottom: 0.4rem;
}

.stat-label {
    display: block;
    color: var(--bg-alt);
    font-size: 0.93rem;
    line-height: 1.5;
}

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

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

.topic {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.4rem;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 1.6rem 1.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.topic:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.topic svg {
    width: 40px;
    height: 40px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.6;
    transition: stroke 0.25s ease;
}

.topic:hover svg {
    stroke: var(--teal);
}

.topic-name {
    font-size: 1.14rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.topic-note {
    display: block;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--muted);
    margin-top: 0.4rem;
}

/* -------------------------------------------------------------
   8. Записи и страницы
------------------------------------------------------------- */

.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.4rem 2.6rem 2.6rem;
    box-shadow: var(--shadow);
}

.entry-title {
    font-size: 2.35rem;
    margin-bottom: 0.8rem;
    padding: 0;
    border: 0;
}

.entry-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 1.4rem 0 1.8rem;
}

.entry-content h2 {
    margin-top: 2rem;
}

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

.entry-content img {
    border-radius: var(--radius);
}

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

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

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

.archive-note {
    color: var(--muted);
    margin-bottom: 2rem;
}

.tag-line {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

.tag-line a {
    display: inline-block;
    margin-right: 0.5rem;
}

/* -------------------------------------------------------------
   9. Сайдбар и виджеты
------------------------------------------------------------- */

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar .widget-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 1rem;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li {
    color: #3A4A5C;
}

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

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.sidebar .widget a {
    color: #24374B;
}

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

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

/* -------------------------------------------------------------
   10. Подвал
------------------------------------------------------------- */

.site-footer {
    background-color: var(--deep);
    background-image: repeating-linear-gradient(45deg, rgba(46, 111, 242, 0.08) 0 1px, transparent 1px 24px);
    color: var(--bg-alt);
    margin-top: 3rem;
}

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

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

.site-footer .widget {
    margin-bottom: 1.4rem;
}

.site-footer .widget-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 0.9rem;
    padding-left: 14px;
    border-left: 3px solid var(--teal);
}

.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget .textwidget {
    color: #C6D2DE;
    font-size: 0.93rem;
    line-height: 1.7;
}

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

.site-footer .widget li {
    padding: 0.32rem 0;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(232, 236, 241, 0.14);
    padding: 1.3rem 0;
    font-size: 0.85rem;
    color: #9DAEBF;
}

.footer-mail {
    color: #E8ECF1;
}

.footer-mail:hover {
    color: var(--teal);
}

/* -------------------------------------------------------------
   11. Пагинация
------------------------------------------------------------- */

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

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

/* -------------------------------------------------------------
   12. Форма поиска и комментарии
------------------------------------------------------------- */

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

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

.search-form label {
    flex: 1 1 200px;
    min-width: 0;
    display: block;
}

.search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid #C9D3DE;
    border-radius: var(--radius-btn);
    background: var(--surface);
    font: inherit;
    font-size: 0.97rem;
    color: var(--ink);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

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

.comments-area {
    margin-top: 2.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.2rem;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
}

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

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

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

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

.comment-author {
    font-weight: 700;
}

.comment-head time {
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-text p {
    margin: 0 0 0.6em;
}

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

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

.comment-respond {
    margin-top: 1.4rem;
}

.comment-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #C9D3DE;
    border-radius: var(--radius-btn);
    background: var(--surface);
    font: inherit;
    font-size: 0.96rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comment-form .submit {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-btn);
    background: var(--accent);
    color: #FFFFFF;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* -------------------------------------------------------------
   13. 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;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.6rem;
    background: var(--deep);
    border-top: 3px solid var(--accent);
    color: var(--bg-alt);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

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

/* -------------------------------------------------------------
   14. 404
------------------------------------------------------------- */

.nf {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2.6rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.nf-code {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.nf-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.nf .search-form {
    max-width: 480px;
    margin: 1.6rem auto 0;
    justify-content: center;
}

/* -------------------------------------------------------------
   15. Адаптив
------------------------------------------------------------- */

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

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

    .layout-single {
        width: 100%;
    }

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

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

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

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

    .nav-toggle {
        display: inline-flex;
        order: 3;
    }

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

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

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

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

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

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

    h1 { font-size: 1.95rem; }
    h2 { font-size: 1.45rem; padding-left: 12px; }
    h3 { font-size: 1.2rem; }

    .fs { padding: 3rem 0; }

    .hero-inner { padding: 3.6rem 0 4rem; }

    .site-main { padding: 1.8rem 0 3rem; }

    .card-grid,
    .card-list,
    .topic-grid,
    .stat-row,
    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .topic {
        aspect-ratio: auto;
        padding: 1.3rem 1.4rem;
    }

    .entry {
        padding: 1.5rem 1.3rem 1.8rem;
    }

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

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

    .nf {
        padding: 2.2rem 1.4rem;
    }

    .nf-code { font-size: 3.6rem; }

    .step {
        flex-direction: column;
        gap: 0.9rem;
        padding: 1.3rem 1.3rem;
    }

    .step:not(:last-child)::after {
        left: 1.3rem;
    }

    .stat {
        padding: 1.4rem 1.3rem;
    }

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

    .brand-desc {
        display: none;
    }

    .comment-list .children {
        margin-left: 0.7rem;
    }
}
