/*
Theme Name: dds_flutter-academy.com
Author: Алексей Громов
Version: 1.1
Text Domain: fa
Description: Тема для медиа-проекта о цифровых технологиях в строительстве и эксплуатации зданий.
*/

/* ---------- ОСНОВЫ ---------- */

:root {
    --bg: #121618;
    --bg-card: #1A1E22;
    --bg-deep: #0E1214;
    --bg-stripe: #1F2428;
    --text: #E6EAEF;
    --text-mute: #B0B8C5;
    --text-soft: #8A93A0;
    --accent: #0066FF;
    --accent-hover: #1E78FF;
    --ochre: #E6A017;
    --border: #262C32;
    --border-soft: #1E2329;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.62;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
    color: #fff;
    font-weight: 700;
    line-height: 1.22;
    margin: 1.6em 0 .6em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 2vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid var(--ochre);
    background: var(--bg-stripe);
    color: var(--text);
    font-style: italic;
}

code, pre {
    font-family: "JetBrains Mono", Menlo, Consolas, monospace;
    background: var(--bg-stripe);
    color: #E6EAEF;
    border-radius: 4px;
}
code { padding: .12em .35em; font-size: .92em; }
pre {
    padding: 1em 1.2em;
    overflow-x: auto;
    margin: 1.2em 0;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--border);
}
th, td {
    border: 1px solid var(--border);
    padding: .6em .8em;
    text-align: left;
}
th { background: var(--bg-stripe); color: #fff; font-weight: 600; }

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

/* ---------- ОБЁРТКА ---------- */

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

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

/* ---------- ШАПКА ---------- */

.site-head {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

.site-head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: block;
}

.brand-logo svg { width: 100%; height: 100%; display: block; }

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

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.01em;
}

.brand-desc {
    font-size: .8rem;
    color: var(--text-mute);
    margin: 2px 0 0;
    line-height: 1.35;
    max-width: 520px;
}

/* Навигация */

.head-nav { min-width: 0; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font: inherit;
    align-items: center;
    gap: 8px;
}

.nav-toggle-bars {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.head-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
    align-items: center;
}

.head-menu li { margin: 0; }

.head-menu a {
    color: var(--text);
    font-size: .95rem;
    padding: 6px 0;
    position: relative;
    display: inline-block;
}
.head-menu a:hover { color: #fff; }
.head-menu a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transition: right .25s ease;
}
.head-menu a:hover::after,
.head-menu .current-menu-item > a::after,
.head-menu .current_page_item > a::after { right: 0; }
.head-menu .current-menu-item > a,
.head-menu .current_page_item > a { color: #fff; }

/* ---------- ХЛЕБНЫЕ КРОШКИ ---------- */

.breadcrumbs {
    padding: 18px 0 6px;
    font-size: .87rem;
    color: var(--text-mute);
}
.breadcrumbs a { color: var(--text-mute); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--text-soft); }

/* ---------- ОСНОВНОЙ КОНТЕЙНЕР СТРАНИЦЫ ---------- */

.main {
    padding: 24px 0 60px;
    min-height: 50vh;
}

/* Раскладка с сайдбаром (single, page, archive) */
.layout-with-sidebar {
    display: flex;
    gap: 6%;
    align-items: flex-start;
}
.layout-with-sidebar .content-col {
    flex: 0 0 67%;
    min-width: 0;
}
.layout-with-sidebar .sidebar-col {
    flex: 0 0 27%;
    min-width: 0;
}

/* Раскладка без сайдбара (front-page, single без виджетов) */
.layout-narrow {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- ВИДЖЕТЫ (САЙДБАР) ---------- */

.sidebar-col .widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px 18px 14px;
    margin-bottom: 20px;
}
.sidebar-col .widget-title {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ochre);
    display: inline-block;
}
.sidebar-col .widget,
.sidebar-col .widget p,
.sidebar-col .widget li { color: var(--text); }
.sidebar-col .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-col .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
    line-height: 1.4;
}
.sidebar-col .widget li:last-child { border-bottom: none; }
.sidebar-col .widget a {
    color: var(--text);
    font-size: .93rem;
}
.sidebar-col .widget a:hover { color: var(--accent); }
.sidebar-col .widget .post-date { color: var(--text-soft); }

/* ---------- КАРТОЧКИ ЗАПИСЕЙ ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    margin: 24px 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease;
    min-width: 0;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    background: var(--bg-stripe);
}

.card-no-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1A1E22 0%, #232930 50%, #1A1E22 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.card-no-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 39px, rgba(176,184,197,.07) 39px 40px),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(176,184,197,.07) 39px 40px);
}
.card-no-thumb::after {
    content: attr(data-mark);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-mute);
    font-size: .85rem;
    font-family: "JetBrains Mono", Menlo, monospace;
    letter-spacing: .2em;
}

.card-body {
    flex: 1;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: .8rem;
    color: var(--text-soft);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.card-meta a { color: var(--text-mute); }
.card-meta a:hover { color: var(--accent); }

.card-cat {
    color: var(--ochre);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .72rem;
    font-weight: 600;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    line-height: 1.3;
    color: #fff;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
    flex: 1;
    color: var(--text);
    font-size: .94rem;
    margin-bottom: 14px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }

/* Индикатор «Уровень цифровизации» */
.dlevel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 14px;
    font-size: .7rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.dlevel-bars {
    display: flex;
    gap: 3px;
}
.dlevel-bar {
    width: 14px;
    height: 6px;
    background: var(--border);
    border-radius: 1px;
}
.dlevel-bar.is-on { background: var(--accent); }
.dlevel-bar.is-on:last-of-type { background: var(--ochre); }
.dlevel-name { color: var(--text-mute); }

/* Кнопки */
.btn-read {
    display: inline-block;
    color: var(--text);
    font-size: .9rem;
    font-weight: 500;
    padding: 0 0 2px;
    border-bottom: 1px dashed var(--text-mute);
    align-self: flex-start;
    transition: border-color .2s ease, color .2s ease;
}
.btn-read:hover {
    color: #fff;
    border-bottom: 1px solid var(--accent);
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 11px 24px;
    border-radius: 0;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-soft {
    display: inline-block;
    background: transparent;
    color: var(--text);
    padding: 10px 22px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: .95rem;
    cursor: pointer;
    position: relative;
    transition: border-color .2s ease;
}
.btn-soft:hover {
    color: #fff;
    border-color: var(--text-mute);
    box-shadow: inset 0 -3px 0 var(--accent);
}

/* ---------- ГЛАВНАЯ ---------- */

.hero {
    padding: 60px 0 50px;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(18,22,24,.5) 0%, var(--bg) 100%),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(176,184,197,.04) 79px 80px),
        repeating-linear-gradient(0deg, transparent 0 79px, rgba(176,184,197,.04) 79px 80px),
        var(--bg-deep);
}
.hero-inner { display: grid; gap: 28px; }
.hero-eyebrow {
    color: var(--ochre);
    font-size: .75rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 8px;
    font-family: "JetBrains Mono", Menlo, monospace;
}
.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.3rem);
    margin: 0 0 18px;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 880px;
}
.hero-text {
    font-size: 1.08rem;
    color: var(--text-mute);
    max-width: 720px;
    margin: 0 0 22px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Секции */
.section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-soft);
}
.section:last-of-type { border-bottom: none; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.section-eyebrow {
    color: var(--ochre);
    font-size: .72rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    font-family: "JetBrains Mono", Menlo, monospace;
    margin: 0 0 8px;
}
.section-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    max-width: 680px;
    line-height: 1.18;
}
.section-text {
    color: var(--text-mute);
    font-size: 1rem;
    max-width: 540px;
    margin: 0;
    text-align: right;
}

/* Модульная «стройплощадка» — сетка с разной шириной плиток */
.site-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}
.tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 28px 26px;
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    overflow: hidden;
}
.tile.is-wide { grid-column: span 4; }
.tile.is-full { grid-column: span 6; }
.tile-mark {
    font-family: "JetBrains Mono", Menlo, monospace;
    font-size: .7rem;
    color: var(--text-soft);
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.tile-title {
    color: #fff;
    font-size: 1.25rem;
    margin: 0 0 10px;
    line-height: 1.25;
}
.tile-text {
    color: var(--text-mute);
    font-size: .95rem;
    margin: 0;
    flex: 1;
}
.tile-corner {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    color: var(--text-soft);
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-family: "JetBrains Mono", monospace;
}

/* Категории */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 14px;
}
.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 22px 20px;
    border-radius: 6px;
    transition: border-color .2s ease, transform .2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}
.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.cat-card-num {
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
    color: var(--ochre);
    letter-spacing: .15em;
}
.cat-card-name {
    color: #fff;
    font-size: 1rem;
    margin: 6px 0 0;
    font-weight: 600;
    line-height: 1.3;
}

/* «Этапы цифровизации» — пять уровней */
.stages {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.stage {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 22px 18px 26px;
    border-radius: 6px;
    border-top: 3px solid var(--accent);
    min-width: 0;
}
.stage:nth-child(1) { border-top-color: var(--text-soft); }
.stage:nth-child(2) { border-top-color: var(--text-mute); }
.stage:nth-child(3) { border-top-color: var(--accent); }
.stage:nth-child(4) { border-top-color: var(--accent-hover); }
.stage:nth-child(5) { border-top-color: var(--ochre); }
.stage-num {
    font-family: "JetBrains Mono", monospace;
    font-size: .7rem;
    color: var(--text-soft);
    letter-spacing: .2em;
}
.stage-name {
    color: #fff;
    font-size: 1rem;
    margin: 8px 0 8px;
    font-weight: 600;
}
.stage-text {
    color: var(--text-mute);
    font-size: .87rem;
    margin: 0;
}

/* Цитата эксперта */
.expert {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 36px 38px;
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.expert-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--ochre) 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.6rem;
    font-family: "JetBrains Mono", monospace;
    flex: 0 0 90px;
}
.expert-quote {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 12px;
}
.expert-name {
    color: #fff;
    font-weight: 600;
    margin: 0;
}
.expert-role {
    color: var(--text-mute);
    font-size: .9rem;
    margin: 2px 0 0;
}

/* ---------- ОДИНОЧНАЯ ЗАПИСЬ ---------- */

.entry-head {
    margin: 8px 0 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.entry-cat {
    color: var(--ochre);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .74rem;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
}
.entry-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 12px 0 14px;
    color: #fff;
    line-height: 1.15;
}
.entry-meta {
    display: flex;
    gap: 18px;
    color: var(--text-soft);
    font-size: .87rem;
    flex-wrap: wrap;
}
.entry-meta a { color: var(--text-mute); }

.entry-thumb {
    margin: 0 0 26px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content { font-size: 1.02rem; line-height: 1.72; }
.entry-content img {
    display: block;
    margin: 1.4em auto;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.entry-tags {
    margin: 30px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.entry-tags-label {
    color: var(--text-soft);
    font-size: .85rem;
    margin-right: 4px;
}
.entry-tags a {
    color: var(--text-mute);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: .85rem;
}
.entry-tags a:hover {
    color: #fff;
    border-color: var(--accent);
    background: rgba(0,102,255,.08);
}

/* ---------- КОММЕНТАРИИ ---------- */

.comments {
    margin: 40px 0 0;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}
.comments-title {
    margin: 0 0 22px;
    font-size: 1.3rem;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}
.comment-list ol.children {
    list-style: none;
    padding-left: 28px;
    margin: 14px 0 0;
}
.comment-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.comment-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 10px;
}
.comment-meta img {
    border-radius: 50%;
    display: block;
}
.comment-author {
    color: #fff;
    display: block;
    line-height: 1.2;
    font-size: .95rem;
}
.comment-date {
    color: var(--text-soft);
    font-size: .78rem;
}
.comment-content p:last-child { margin-bottom: 0; }
.comment-actions a {
    color: var(--accent);
    font-size: .85rem;
}

.comment-respond {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 22px;
}
.comment-respond h3 { margin-top: 0; }
.comment-form label { display: block; color: var(--text-mute); font-size: .87rem; margin: 10px 0 4px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
    width: 100%;
    background: var(--bg-deep);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 4px;
    font: inherit;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 11px 26px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 14px;
    border-radius: 0;
}
.comment-form .submit:hover { background: var(--accent-hover); }

/* ---------- ПАГИНАЦИЯ ---------- */

.pagination {
    margin: 36px 0 8px;
    display: flex;
    justify-content: center;
}
.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination li { margin: 0; }
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    font-size: .92rem;
    text-decoration: none;
}
.pagination a:hover {
    color: #fff;
    border-color: var(--accent);
    background: rgba(0,102,255,.1);
}
.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.pagination .dots {
    background: transparent;
    border: none;
}

/* ---------- ПОИСК ---------- */

.search-form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 8px 0 0;
}
.search-field {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 4px;
    font: inherit;
}
.search-field:focus {
    outline: none;
    border-color: var(--accent);
}
.search-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 22px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
}
.search-submit:hover { background: var(--accent-hover); }

/* ---------- 404 ---------- */

.not-found {
    text-align: center;
    padding: 60px 0 80px;
}
.not-found-code {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--ochre);
    line-height: 1;
    margin: 0 0 10px;
}
.not-found-text {
    color: var(--text-mute);
    margin: 0 auto 26px;
    max-width: 520px;
}

/* ---------- ПОДВАЛ ---------- */

.site-foot {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 50px 0 22px;
    margin-top: 50px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-bottom: 32px;
}
.foot-col { min-width: 0; }

/* Стили виджетов в подвале — явно задаём цвета на тёмном фоне */
.foot-col .widget { color: var(--text); }
.foot-col .widget-title {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ochre);
    display: inline-block;
}
.foot-col .widget p,
.foot-col .widget li {
    color: var(--text-mute);
    font-size: .92rem;
    line-height: 1.55;
}
.foot-col .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.foot-col .widget li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
}
.foot-col .widget li:last-child { border-bottom: none; }
.foot-col .widget a { color: var(--text-mute); }
.foot-col .widget a:hover { color: var(--accent); }
.foot-col .widget .post-date { color: var(--text-soft); font-size: .82rem; }

.foot-bottom {
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .85rem;
    text-align: center;
}

/* ---------- COOKIE-БАННЕР ---------- */

/* Правило для скрытия — до основного блока (правило A11) */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
    max-width: 980px;
    margin: 0 auto;
}
.cookie-text {
    flex: 1;
    min-width: 240px;
    color: var(--text);
    font-size: .9rem;
    margin: 0;
}
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
    font-size: .9rem;
    border-radius: 0;
    transition: background .2s ease;
}
.cookie-accept:hover { background: var(--accent-hover); }

/* ---------- АДАПТИВ ---------- */

@media (max-width: 960px) {
    .site-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tile, .tile.is-wide, .tile.is-full { grid-column: span 2; }
    .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
    .layout-with-sidebar {
        flex-direction: column;
        gap: 32px;
    }
    .layout-with-sidebar .content-col,
    .layout-with-sidebar .sidebar-col {
        flex: 1 1 auto;
        width: 100%;
    }
    .layout-narrow { width: 92%; }
    .brand-desc { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    .site-head { padding: 12px 0; }
    .site-head-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-toggle { display: inline-flex; }
    .head-nav {
        order: 3;
        width: 100%;
    }
    .head-menu {
        display: none;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
        background: var(--bg-card);
        padding: 12px;
        border-radius: 6px;
        border: 1px solid var(--border);
    }
    .head-menu.is-open { display: flex; }
    .head-menu a { padding: 8px 4px; display: block; }
    .head-menu a::after { display: none; }

    .site-grid { grid-template-columns: 1fr; }
    .tile, .tile.is-wide, .tile.is-full { grid-column: 1; }
    .stages { grid-template-columns: 1fr; }
    .foot-cols { grid-template-columns: 1fr; gap: 24px; }
    .cards-grid { grid-template-columns: 1fr; gap: 18px; }
    .section { padding: 40px 0; }
    .hero { padding: 40px 0 36px; }
    .expert {
        grid-template-columns: 1fr;
        padding: 22px 22px;
    }
    .expert-avatar { width: 70px; height: 70px; flex: 0 0 70px; font-size: 1.3rem; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .section-text { text-align: left; }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 14px;
    }
    .layout-narrow { width: 100%; }
}
