/*
Theme Name: dds_детивкраснодаре.рф
Author: Елена Кравцова
Version: 1.1
Text Domain: dds
Description: Информационный блог для родителей про образование детей.
*/

/* =========================================================
   Базовые переменные: палитра темы
   ========================================================= */
:root {
    --bg: #FDF9F4;
    --ink: #1E2F4B;
    --terracotta: #CC765A;
    --terracotta-dark: #AD5F45;
    --honey: #E9B35F;
    --mint: #B5C9C4;
    --muted: #7A8598;
    --line: #E6DED1;
    --paper: #FFFFFF;
}

/* =========================================================
   Сброс и типографика
   ========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Georgia", serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--terracotta-dark); }

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

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.3em;
    border-left: 3px solid var(--honey);
    background: rgba(181, 201, 196, 0.18);
    font-style: italic;
    color: var(--ink);
    border-radius: 0 6px 6px 0;
}

pre, code {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
    background: #f3ece0;
    border-radius: 4px;
}
code { padding: 0.1em 0.35em; }
pre { padding: 0.8em 1em; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--line);
}
th, td {
    padding: 0.65em 0.9em;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th { background: rgba(181, 201, 196, 0.25); font-weight: 700; }

/* =========================================================
   Сетка / контейнер
   ========================================================= */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

.layout {
    display: grid;
    gap: 40px;
    margin: 40px 0 60px;
}
.layout.has-sidebar { grid-template-columns: 67% 27%; justify-content: space-between; }
.layout.no-sidebar  { grid-template-columns: minmax(0, 85%); justify-content: center; }

@media (max-width: 960px) {
    .layout.has-sidebar,
    .layout.no-sidebar { grid-template-columns: 1fr; }
}

/* =========================================================
   Шапка сайта
   ========================================================= */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 24px 0 20px;
}
.site-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.brand-svg {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
}
.brand-text { min-width: 0; }
.brand-title {
    display: block;
    color: var(--ink);
    line-height: 1.2;
    font-weight: 700;
}
.brand-title .t-big {
    display: block;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
.brand-title .t-small {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 400;
    margin-top: 2px;
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-byline {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
    text-align: right;
    line-height: 1.35;
    max-width: 180px;
}
.author-byline .b-kicker {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--honey);
    font-style: normal;
}

/* Главная навигация */
.main-nav {
    border-top: 1px dashed var(--line);
    margin-top: 18px;
    padding-top: 14px;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}
.main-nav a {
    color: var(--ink);
    font-weight: 600;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--terracotta);
    border-bottom-color: var(--honey);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1.5px solid var(--ink);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
}

@media (max-width: 760px) {
    .site-header-inner {
        grid-template-columns: 1fr auto;
    }
    .author-byline { display: none; }
    .brand-title .t-small { white-space: normal; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        margin-top: 14px;
        padding-top: 10px;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 2px;
        display: none;
    }
    .main-nav.is-open ul { display: flex; }
    .main-nav a {
        display: block;
        padding: 10px 4px;
        border-bottom: 1px solid var(--line);
    }
}

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .06s ease;
}
.btn-primary {
    background: var(--terracotta);
    color: #fff;
}
.btn-primary:hover {
    background: var(--terracotta-dark);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(233, 179, 95, 0.3), inset 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-ghost {
    background: transparent;
    color: var(--terracotta);
    border-color: var(--ink);
}
.btn-ghost:hover {
    background: rgba(30, 47, 75, 0.04);
    color: var(--terracotta-dark);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   Карточки записей
   Правило A8: контейнер flex-column, body = flex:1
   Правило A10: никаких height: 100% на <a> внутри flex-stretch
   ========================================================= */
.cards {
    display: grid;
    gap: 28px;
    margin: 28px 0;
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
    position: relative;
}
.card:hover {
    box-shadow: 0 10px 30px -10px rgba(30, 47, 75, 0.18);
    transform: translateY(-2px);
}

.card-thumb-wrap {
    display: block;
    overflow: hidden;
    background: var(--mint);
}
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.03); }

.card-body {
    flex: 1;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
}
.card-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.card-meta .reading-badge {
    background: var(--mint);
    color: var(--ink);
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.card-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.3;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--terracotta); }

.card-excerpt {
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 14px;
    flex: 1;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-cta {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    color: var(--terracotta);
    border-bottom: 2px solid rgba(204, 118, 90, 0.3);
    padding-bottom: 2px;
}
.card-cta:hover { border-bottom-color: var(--terracotta); }

/* Горизонтальная «первая» карточка */
.card-feature {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 260px;
}
.card-feature .card-thumb-wrap {
    flex: 0 0 46%;
    position: relative;
    overflow: hidden;
}
.card-feature .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-feature .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
}
.card-feature .card-body {
    padding: 28px 32px;
    justify-content: center;
}
.card-feature .card-title { font-size: 1.55rem; }

@media (max-width: 760px) {
    .card-feature { flex-direction: column; min-height: 0; }
    .card-feature .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-feature .card-thumb-wrap a { position: static; }
    .card-feature .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-feature .card-body { padding: 18px 20px 20px; }
    .card-feature .card-title { font-size: 1.25rem; }
}

/* Выдвижная подсказка при наведении */
.card-hover-quote {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: var(--mint);
    color: var(--ink);
    font-style: italic;
    font-size: 0.92rem;
    padding: 14px 20px;
    transform: translateY(110%);
    transition: transform .3s ease;
    border-top: 1px solid rgba(30, 47, 75, 0.08);
}
.card:hover .card-hover-quote { transform: translateY(0); }
@media (max-width: 760px) { .card-hover-quote { display: none; } }

/* =========================================================
   Волнистый разделитель
   ========================================================= */
.wave-divider {
    display: block;
    margin: 38px auto;
    width: 160px;
    height: 18px;
    opacity: 0.7;
}

/* =========================================================
   Хлебные крошки
   ========================================================= */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 22px 0 6px;
}
.breadcrumbs a { color: var(--muted); border-bottom: 1px dotted var(--muted); }
.breadcrumbs a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.breadcrumbs .sep { margin: 0 7px; color: var(--line); }

/* =========================================================
   Пагинация
   ========================================================= */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
}
.pagination a:hover {
    background: var(--mint);
    color: var(--ink);
    border-color: var(--mint);
}
.pagination .current {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}
.pagination .dots { border: none; background: none; min-width: auto; }

/* =========================================================
   Главная — тематические блоки
   ========================================================= */
.hero {
    background: linear-gradient(135deg, rgba(181, 201, 196, 0.35), rgba(233, 179, 95, 0.18));
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}
.hero-inner {
    max-width: 780px;
}
.hero h1 {
    margin-top: 0;
    font-size: 2.4rem;
    line-height: 1.15;
}
.hero p {
    font-size: 1.08rem;
    color: var(--ink);
    max-width: 640px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.topic-block {
    padding: 44px 0;
    border-bottom: 1px dashed var(--line);
}
.topic-block:last-of-type { border-bottom: none; }
.topic-block h2 {
    font-size: 1.7rem;
    margin: 0 0 8px;
}
.topic-block .lede {
    color: var(--muted);
    max-width: 680px;
    font-size: 1rem;
    margin: 0 0 24px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 18px;
}
@media (max-width: 960px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .topic-grid { grid-template-columns: 1fr; } }

.topic-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
}
.topic-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 22px;
    counter-reset: step;
}
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -14px;
    left: 18px;
    background: var(--honey);
    color: var(--ink);
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
}
.step h4 { margin: 6px 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Форма подписки — кнопка слева, поле в пунктирной рамке */
.subscribe {
    background: var(--paper);
    border: 1.5px dashed var(--ink);
    border-radius: 10px;
    padding: 18px;
    margin: 26px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.subscribe .s-label {
    flex: 1 1 280px;
    min-width: 240px;
    color: var(--muted);
    font-size: 0.98rem;
    order: 3;
}
.subscribe input[type="email"] {
    flex: 1 1 240px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--ink);
    border-bottom: 1.5px dashed var(--mint);
    outline: none;
    order: 2;
}
.subscribe input[type="email"]:focus { border-color: var(--terracotta); }
.subscribe button {
    order: 1;
    background: var(--terracotta);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}
.subscribe button:hover { background: var(--terracotta-dark); }

/* «Дорожка выбора» — горизонтальный свитчер форматов */
.path-switch {
    margin: 26px 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
}
.path-switch-title {
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.path-switch-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.path-switch-controls button {
    background: transparent;
    border: 1.5px solid var(--line);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s ease;
}
.path-switch-controls button::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    flex: 0 0 10px;
}
.path-switch-controls button.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.path-switch-controls button.is-active::before { background: var(--honey); }
.path-switch-panel { display: none; }
.path-switch-panel.is-active { display: block; }
.path-switch-panel h4 { margin: 0 0 6px; }
.path-switch-panel p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    .path-switch-controls { display: none; }
    .path-switch-select {
        display: block;
        width: 100%;
        margin-bottom: 18px;
        padding: 11px 14px;
        font-family: inherit;
        font-size: 1rem;
        border: 1.5px solid var(--ink);
        border-radius: 8px;
        background: var(--paper);
        color: var(--ink);
    }
}
.path-switch-select { display: none; }

/* =========================================================
   Сайдбар и виджеты
   ========================================================= */
.sidebar { align-self: start; }
.widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.widget-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--ink);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--honey);
    display: inline-block;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
}
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--terracotta); }

/* Форма поиска */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    font-family: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}
.search-form button {
    padding: 10px 16px;
    border: none;
    background: var(--terracotta);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* =========================================================
   Запись
   ========================================================= */
.article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 34px 38px;
}
.article-title {
    font-size: 2rem;
    margin: 0 0 6px;
    line-height: 1.2;
}
.article-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.article-thumb {
    margin: 0 -38px 26px;
    display: block;
}
.article-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.article-content > :first-child { margin-top: 0; }
.article-content img { border-radius: 8px; }

@media (max-width: 600px) {
    .article { padding: 22px 20px; }
    .article-thumb { margin: 0 -20px 20px; }
    .article-title { font-size: 1.5rem; }
}

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area {
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}
.comments-title {
    margin: 0 0 18px;
    font-size: 1.3rem;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.comment-list li {
    margin-bottom: 18px;
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 22px;
}
.comment-author {
    font-weight: 700;
    margin-right: 10px;
}
.comment-date {
    color: var(--muted);
    font-size: 0.85rem;
}
.comment-body p:last-child { margin-bottom: 0; }

.comment-form label {
    display: block;
    margin: 10px 0 4px;
    font-weight: 600;
    font-size: 0.92rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
}
.comment-form .submit {
    margin-top: 12px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--terracotta-dark); }

/* =========================================================
   Подвал
   ========================================================= */
.site-footer {
    background: var(--ink);
    color: #E7E3DB;
    padding: 48px 0 22px;
    margin-top: 60px;
}
.site-footer a { color: #E7E3DB; }
.site-footer a:hover { color: var(--honey); }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 30px;
}
@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
.footer-col .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.footer-col .widget-title {
    color: #fff;
    border-bottom-color: var(--honey);
}
.footer-col .widget li {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.footer-col .widget a { color: #E7E3DB; }

.site-footer .footer-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-top: 22px;
    margin-top: 8px;
    font-size: 0.94rem;
    color: #CBC7BE;
}
.site-footer .footer-extra h4 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--honey);
    display: inline-block;
}
.site-footer .footer-extra ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.site-footer .footer-extra .formats li {
    width: 100%;
    padding: 4px 0;
}
@media (max-width: 600px) {
    .site-footer .footer-extra { grid-template-columns: 1fr; }
}

.site-copyright {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 22px;
    color: #CBC7BE;
    font-size: 0.9rem;
}

/* =========================================================
   Cookie-баннер
   Правило A11: [hidden] должен перебивать CSS display
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    background: var(--ink);
    color: #F5F1E8;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.35);
    display: flex;
    gap: 18px;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
    font-size: 0.94rem;
}
.cookie-banner p { margin: 0; flex: 1; line-height: 1.45; }
.cookie-banner button {
    background: var(--honey);
    color: var(--ink);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.cookie-banner button:hover { background: #d9a34c; }
@media (max-width: 600px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-banner button { width: 100%; }
}

/* =========================================================
   Кнопка «наверх» — карандаш
   ========================================================= */
.to-top[hidden] { display: none !important; }
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(30, 47, 75, 0.15);
    z-index: 50;
    transition: transform .2s ease, background .2s ease;
}
.to-top:hover {
    transform: translateY(-3px);
    background: var(--honey);
}
.to-top svg { width: 22px; height: 22px; }

/* =========================================================
   Разные страницы
   ========================================================= */
.page-heading {
    font-size: 2rem;
    margin: 10px 0 18px;
}
.section-heading {
    font-size: 1.7rem;
    margin: 20px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--honey);
    display: inline-block;
}

.not-found {
    text-align: center;
    padding: 40px 0;
}
.not-found h1 {
    font-size: 3rem;
    margin: 10px 0;
}
.not-found .huge-404 {
    font-size: 6rem;
    color: var(--honey);
    font-weight: 700;
    line-height: 1;
    margin: 0;
}
.not-found .back-home {
    margin-top: 22px;
    display: inline-block;
}

/* =========================================================
   Мобильные штрихи
   ========================================================= */
@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .hero { padding: 36px 0 28px; }
    .hero h1 { font-size: 1.7rem; }
    .btn { width: 100%; text-align: center; display: block; }
    .btn + .btn { margin-top: 10px; }
    .hero-actions { flex-direction: column; }
    .article { font-size: 1rem; }
}
