/*
Theme Name: dds_pddschool24.ru
Author: Алексей Кравцов
Description: Экспертно-информационный портал, объединяющий блог о создании обучающих симуляторов, библиотеку методик цифрового обучения и практические руководства по внедрению IT-стандартов в автошколах.
Version: 1.1
Text Domain: dds_pddschool24
*/

/* ---------- Базовые переменные ---------- */
:root {
    --bg: #F5F7FC;
    --surface: #FFFFFF;
    --ink: #1E2A3E;
    --ink-soft: #4A627A;
    --accent: #0A58CA;
    --accent-deep: #0044AA;
    --signature: #E68A2E;
    --code-bg: #0B1120;
    --code-blue: #2A6DFF;
    --line: #E2E8F0;
    --chip-bg: #E9ECF3;
    --footer-bg: #0F1B2D;
    --footer-ink: #D4DDEB;
    --footer-ink-soft: #8C9DB8;
    --footer-line: #1F2E47;
    --radius: 8px;
    --shadow-soft: 0 1px 2px rgba(15, 27, 45, 0.04), 0 4px 14px rgba(15, 27, 45, 0.05);
    --shadow-lift: 0 10px 28px rgba(15, 27, 45, 0.1);
    --shell: min(92%, 1180px);
}

/* ---------- Сброс ---------- */
* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-deep); }
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.25);
    border-radius: 3px;
}

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ---------- Контейнер ---------- */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
    text-decoration: none;
    line-height: 1.2;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-deep);
    color: #fff;
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-secondary:hover {
    background: rgba(10, 88, 202, 0.05);
    color: var(--accent-deep);
    border-color: var(--accent-deep);
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.3);
}

/* ---------- Шапка ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    text-decoration: none;
    color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--signature));
    border-radius: 10px;
    color: #fff;
}
.brand-logo {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 38ch;
}
.brand-tagline {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 52ch;
}

/* Главное меню */
.primary-nav { min-width: 0; }
.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.primary-nav a {
    display: block;
    padding: 0.55rem 0.9rem;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color .18s ease, color .18s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    background: var(--chip-bg);
    color: var(--accent);
}

/* Переключатель мобильного меню */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    color: var(--ink);
    font-size: 1rem;
    align-items: center;
    gap: 0.4rem;
}
.nav-toggle:hover { background: var(--chip-bg); }
.nav-toggle-bar {
    display: block;
    width: 18px; height: 2px;
    background: currentColor;
    position: relative;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px; height: 2px;
    background: currentColor;
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--ink-soft);
    padding: 1rem 0 0.5rem;
}
.breadcrumbs a {
    color: var(--ink-soft);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep {
    margin: 0 0.4rem;
    color: var(--ink-soft);
}
.breadcrumbs > span:last-child {
    color: var(--signature);
    font-weight: 500;
}

/* ---------- Основная сетка с сайдбаром ---------- */
.site-main {
    padding: 1.5rem 0 3rem;
}
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.5%;
    align-items: start;
}
.layout-no-sidebar {
    display: block;
    width: 85%;
    margin-inline: auto;
}

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

/* ---------- Карточки записей ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .22s ease, box-shadow .22s ease;
    min-width: 0;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.card-thumb {
    display: block;
    overflow: hidden;
    background: var(--chip-bg);
}
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.3rem;
    min-width: 0;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}
.card-meta .meta-date { color: var(--signature); font-weight: 500; }
.card-title {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    line-height: 1.35;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.93rem;
    margin-bottom: 1rem;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }
.card-excerpt a { color: var(--accent); }

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

/* Горизонтальные карточки (для блог-страницы) */
.cards.cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.cards-list .card {
    flex-direction: row;
    min-height: 200px;
}
.cards-list .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--chip-bg);
}
.cards-list .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.cards-list .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.cards-list .card:hover .card-thumb-wrap img { transform: scale(1.04); }
.cards-list .card-body {
    padding: 1.3rem 1.4rem 1.4rem;
}

/* ---------- Sidebar / Widgets (общая) ---------- */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}
.widget-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--signature);
    display: inline-block;
}
.widget ul {
    list-style: none;
    margin: 0; padding: 0;
}
.widget li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.93rem;
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--accent); }
.widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
}

/* ---------- Главная страница: блоки ---------- */
.front-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-soft);
}
.front-block.front-block-dark {
    background: linear-gradient(135deg, #11203A, var(--code-bg));
    color: #E6ECF7;
    border: 0;
}
.front-block.front-block-dark h2,
.front-block.front-block-dark h3 { color: #fff; }
.front-block.front-block-dark p { color: #B6C2D6; }

.block-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--signature);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.front-block.front-block-dark .block-eyebrow {
    color: #FFB46B;
}

/* Сетка плиток на главной */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}
.tile {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.3rem;
    transition: transform .22s ease, box-shadow .22s ease;
    min-width: 0;
}
.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}
.tile h3 { margin: 0.4rem 0 0.5rem; font-size: 1.1rem; }
.tile p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(10, 88, 202, 0.1);
    color: var(--accent);
}
.front-block-dark .tile {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
.front-block-dark .tile h3 { color: #fff; }
.front-block-dark .tile p { color: #B6C2D6; }
.front-block-dark .tile-icon {
    background: rgba(42, 109, 255, 0.15);
    color: #6FA3FF;
}

/* Шаги / нумерованный список */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-top: 1.3rem;
    counter-reset: step;
}
.step {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--signature);
    margin-bottom: 0.4rem;
    letter-spacing: 0.04em;
}
.step h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.step p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Псевдо-терминал */
.terminal {
    background: var(--code-bg);
    color: #E6ECF7;
    border-radius: 10px;
    padding: 1.2rem 1.3rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.86rem;
    line-height: 1.55;
    margin-top: 1.3rem;
    overflow-x: auto;
}
.terminal-line { white-space: pre-wrap; }
.terminal-prompt { color: var(--code-blue); margin-right: 0.4rem; }
.terminal-comment { color: #7989A6; }
.terminal-out { color: #B6C2D6; }
.terminal-ok { color: #5BD180; }

/* Последние записи на главной */
.front-latest {
    margin: 1.5rem 0;
}
.front-latest h2 { margin-top: 0; }

/* ---------- Single / Page ---------- */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem 2rem 2.3rem;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}
.entry-header { margin-bottom: 1.3rem; }
.entry-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
}
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.1rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.entry-meta .meta-date { color: var(--signature); }

.entry-thumb {
    margin: 0 0 1.5rem;
    border-radius: 10px;
    overflow: hidden;
}
.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content {
    font-size: 1.02rem;
    color: var(--ink);
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--ink);
}
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--accent-deep); }
.entry-content img { border-radius: 8px; }
.entry-content blockquote {
    border-left: 4px solid var(--signature);
    margin: 1.2rem 0;
    padding: 0.5rem 1rem 0.5rem 1.2rem;
    background: var(--bg);
    border-radius: 0 8px 8px 0;
    color: var(--ink-soft);
    font-style: italic;
}
.entry-content pre,
.entry-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
}
.entry-content code {
    background: var(--chip-bg);
    color: var(--accent-deep);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
}
.entry-content pre {
    background: var(--code-bg);
    color: #E6ECF7;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.55;
}
.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.95rem;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th,
.entry-content td {
    padding: 0.6rem 0.85rem;
    text-align: left;
}
.entry-content th {
    background: var(--chip-bg);
    color: var(--ink);
    font-weight: 600;
}

/* Tag chips */
.entry-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.entry-tags a {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--chip-bg);
    border-radius: 16px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    border: 1px solid transparent;
    transition: border-color .18s ease, color .18s ease;
}
.entry-tags a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Пагинация ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin: 2rem 0 1rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.pagination .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pagination .page-numbers.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* ---------- Комментарии ---------- */
.comments {
    margin-top: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.7rem 1.8rem;
    box-shadow: var(--shadow-soft);
}
.comments-title {
    margin: 0 0 1rem;
    font-size: 1.3rem;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.comment-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.comment-list li:last-child { border-bottom: 0; }
.comment-author {
    font-weight: 600;
    color: var(--ink);
}
.comment-date {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-left: 0.6rem;
}
.comment-text { margin-top: 0.4rem; color: var(--ink); }
.comment-respond { margin-top: 1.5rem; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--ink);
    margin-bottom: 0.7rem;
}
.comment-respond textarea { min-height: 120px; resize: vertical; }
.comment-respond label {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 0.3rem;
}
.comment-respond .submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color .18s ease, transform .18s ease;
}
.comment-respond .submit:hover { background: var(--accent-deep); transform: translateY(-2px); }

/* ---------- Поиск ---------- */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--ink);
}
.search-form .search-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.18);
}
.search-form .search-submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color .18s ease;
}
.search-form .search-submit:hover { background: var(--accent-deep); }

/* ---------- 404 ---------- */
.error-404 {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.error-code {
    font-size: clamp(4rem, 3rem + 6vw, 7rem);
    line-height: 1;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--signature));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.error-404 h1 { margin: 0 0 0.7rem; }
.error-404 p { color: var(--ink-soft); max-width: 480px; margin-inline: auto; }
.error-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}
.error-search { margin-top: 1.5rem; display: flex; justify-content: center; }

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 2.5rem 0 1.2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--footer-line);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col { min-width: 0; }
.footer-col .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--footer-ink);
}
.footer-col .widget-title {
    color: #fff;
    border-bottom-color: var(--signature);
}
.footer-col .widget li {
    border-bottom-color: var(--footer-line);
    color: var(--footer-ink);
}
.footer-col .widget a {
    color: var(--footer-ink);
}
.footer-col .widget a:hover { color: #fff; }
.footer-col .widget .post-date { color: var(--footer-ink-soft); }
.footer-col .widget p { color: var(--footer-ink); }

.site-info {
    border-top: 1px solid var(--footer-line);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--footer-ink-soft);
}

/* ---------- Cookie-баннер (A11 — правило hidden до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    background: var(--code-bg);
    color: #E6ECF7;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 980px;
    margin-inline: auto;
}
.cookie-banner__text {
    flex: 1;
    min-width: 240px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #D4DDEB;
}
.cookie-banner__text a { color: #6FA3FF; }
.cookie-banner__text a:hover { color: #fff; }
.cookie-banner__btn {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color .18s ease, transform .18s ease;
}
.cookie-banner__btn:hover {
    background: var(--accent-deep);
    transform: translateY(-2px);
}

/* ---------- Утилиты ---------- */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    overflow: hidden;
    height: 1px;
    width: 1px;
    word-wrap: normal !important;
}

.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin-inline: auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .layout-no-sidebar {
        width: 92%;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .primary-nav {
        order: 3;
        flex-basis: 100%;
    }
    .primary-nav[hidden] { display: none !important; }
    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        margin-top: 0.8rem;
        padding-top: 0.8rem;
        border-top: 1px solid var(--line);
    }
    .primary-nav a { padding: 0.7rem 0.4rem; }
    .header-inner { flex-wrap: wrap; row-gap: 0.4rem; }
}

@media (max-width: 600px) {
    .entry,
    .front-block,
    .comments {
        padding: 1.3rem 1.2rem;
    }
    .cards-list .card {
        flex-direction: column;
        min-height: 0;
    }
    .cards-list .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .cards-list .card-thumb-wrap a {
        position: static;
    }
    .cards-list .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .brand-name { font-size: 0.95rem; max-width: 22ch; }
    .brand-tagline { display: none; }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .cookie-banner__btn { width: 100%; }
}
