/*
Theme Name: cave-panzoult.com
Theme URI: https://cave-panzoult.com
Author: Алексей Громов
Author URI: https://cave-panzoult.com
Description: Журнал-обозреватель умных технологий для ценителей вина, высокой кухни и премиальных путешествий. Тема в стиле «пещерный минимализм встречает высокие технологии».
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cavepz
*/

/* ================================================================
   1. Переменные
   ================================================================ */
:root {
    --stone-dark:   #1E1E1E;
    --stone-panel:  #262320;
    --stone-raise:  #2F2B26;
    --limestone:    #D8CFC0;
    --limestone-dk: #C7BCA8;
    --amber:        #FFB347;
    --terracotta:   #9E4A2F;
    --text-light:   #F2EDE4;
    --text-dark:    #1A1714;
    --text-muted:   #B3A68F;
    --border:       #B3A68F;
    --candle-bg:    #0A0806;

    --font-head: "Instrument Sans", "Trebuchet MS", sans-serif;
    --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;

    --shell: 1180px;
}

/* ================================================================
   2. Сброс и база
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--stone-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Зернистая каменная текстура поверх фона */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

.site-wrapper { position: relative; z-index: 1; }

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--text-light);
    margin: 0 0 .6em;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

blockquote {
    background: var(--limestone);
    color: var(--text-dark);
    border-left: 4px solid var(--terracotta);
    margin: 1.6em 0;
    padding: 1rem 1.4rem;
    font-family: var(--font-mono);
    font-size: .95rem;
}

code, pre {
    font-family: var(--font-mono);
    font-size: .9rem;
}
pre {
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.3);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--border);
}
th, td {
    border: 1px solid var(--border);
    padding: .6rem .8rem;
    text-align: left;
}
th {
    background: var(--stone-raise);
    font-family: var(--font-head);
}

hr {
    border: 0;
    border-top: 1px solid rgba(179,166,143,.3);
    margin: 2rem 0;
}

/* ================================================================
   3. Контейнер ширины — единый источник
   ================================================================ */
.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

/* Раскладка с сайдбаром: реальная двухколоночная сетка */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3rem;
    padding: 2.6rem 0 3.4rem;
}

/* Одноколоночная раскладка — обычный блок */
.layout-single {
    display: block;
    padding: 2.6rem 0 3.4rem;
}
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

/* ================================================================
   4. Кнопки
   ================================================================ */
.btn-primary,
.btn-secondary {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, border-width .15s ease;
}

.btn-primary {
    padding: .72rem 1.5rem;
    border: none;
    border-radius: 6px;
    color: #1A1714;
    background: linear-gradient(135deg, var(--amber) 0%, var(--terracotta) 115%);
    box-shadow: inset 0 2px 5px rgba(255,255,255,.35),
                inset 0 -3px 7px rgba(0,0,0,.4),
                0 2px 6px rgba(0,0,0,.4);
}
.btn-primary:hover {
    color: #1A1714;
    box-shadow: inset 0 2px 5px rgba(255,255,255,.4),
                inset 0 -3px 7px rgba(0,0,0,.35),
                0 0 22px rgba(255,179,71,.55);
}

.btn-secondary {
    padding: .55rem .4rem;
    background: none;
    border: none;
    border-bottom: 2px solid var(--amber);
    color: var(--terracotta);
}
.btn-secondary:hover {
    color: var(--terracotta);
    border-bottom-width: 4px;
    transform: translateY(-2px);
}

/* Кнопки-фильтры в форме сталагмитов */
.filter-chip {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .82rem;
    padding: .5rem 1.1rem .9rem;
    color: var(--text-light);
    background: var(--stone-raise);
    border: 1px solid var(--border);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
    transition: background .2s ease, color .2s ease;
}
.filter-chip:hover,
.filter-chip.is-active {
    background: var(--amber);
    color: var(--text-dark);
}

/* ================================================================
   5. Шапка
   ================================================================ */
.site-header {
    background: linear-gradient(180deg, #161412 0%, var(--stone-dark) 100%);
    border-bottom: 1px solid rgba(179,166,143,.28);
    padding: 1.4rem 0;
}
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem 1.6rem;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 320px;
}
.brand-logo,
.brand-logo-svg {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 6px;
}
.brand-logo { object-fit: cover; }
.brand-text { min-width: 0; }
.site-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}
.site-title a { color: var(--text-light); }
.site-title a:hover { color: var(--amber); }
.site-description {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-muted);
    margin: .35rem 0 0;
    line-height: 1.5;
}

/* Навигация (не липкая) */
.main-navigation { flex: 0 1 auto; }
.menu-toggle {
    display: none;
    font-family: var(--font-head);
    font-weight: 600;
    background: var(--stone-raise);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .9rem;
    cursor: pointer;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.4rem;
}
.nav-menu li { position: relative; }
.nav-menu a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-light);
    padding: .35rem 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--amber);
    border-bottom-color: var(--amber);
}
.nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: .4rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--stone-raise);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: none;
    z-index: 30;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a { padding: .35rem 1rem; }

/* ================================================================
   6. Хлебные крошки
   ================================================================ */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--amber); }
.breadcrumbs a:hover { color: var(--terracotta); }
.breadcrumbs .sep { color: var(--terracotta); margin: 0 .15rem; }

/* ================================================================
   7. Главная страница
   ================================================================ */
.front-section { padding: 3rem 0; }
.front-section + .front-section {
    border-top: 1px solid rgba(179,166,143,.18);
}
.front-content { width: 85%; margin-left: auto; margin-right: auto; }

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 .5rem;
}
.section-title { font-size: 2rem; margin-bottom: 1.2rem; }

/* Hero */
.hero {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255,179,71,.12), transparent 55%),
        linear-gradient(180deg, #161412, var(--stone-dark));
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}
.hero h1 { font-size: 2.7rem; margin-bottom: .7rem; }
.hero-lead { font-size: 1.12rem; color: #d9d2c5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.6rem; }
.hero-figure {
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.3);
    border-radius: 6px;
    padding: 1.6rem;
    box-shadow: inset 0 0 40px rgba(0,0,0,.55);
}

/* Температурная линия */
.temp-line-wrap { margin-top: 1rem; }
.temp-line-label {
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: .4rem;
}
.temp-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #3E6E9E, #6FA8C9, var(--amber), var(--terracotta));
    transform: scaleX(.15);
    transform-origin: left center;
    transition: transform 1.4s cubic-bezier(.2,.7,.3,1);
}
.temp-line.is-warmed { transform: scaleX(1); }

/* Каменный слайдер */
.stone-slider {
    position: relative;
}
.stone-track {
    display: flex;
    gap: 1.4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .6rem .2rem 1.4rem;
    scrollbar-width: thin;
}
.stone-slide {
    flex: 0 0 clamp(240px, 70%, 340px);
    scroll-snap-align: start;
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.28);
    clip-path: polygon(0 4%, 6% 0, 94% 3%, 100% 0, 100% 96%, 95% 100%, 5% 97%, 0 100%);
    box-shadow: inset 0 0 32px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45);
    min-width: 0;
}
.stone-slide .slide-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.stone-slide .slide-body { padding: 1rem 1.2rem 1.3rem; }
.stone-slide h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.stone-slide h3 a { color: var(--text-light); }
.stone-slide h3 a:hover { color: var(--amber); }
.slide-cat {
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.slider-controls {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
    margin-top: .4rem;
}
.slider-btn {
    font-family: var(--font-head);
    font-weight: 700;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--stone-raise);
    color: var(--amber);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.slider-btn:hover { background: var(--amber); color: var(--text-dark); }

/* Категории-сталагмиты */
.cat-cloud { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Блок контактов (без форм) */
.contact-static {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: .92rem;
    margin-top: 1rem;
}
.contact-static a { color: var(--amber); }

/* ================================================================
   8. Карточки записей
   ================================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 1.7rem;
    margin: 1.4rem 0;
}
.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 6px;
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.26);
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
    transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0,0,0,.55);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background:
        repeating-linear-gradient(135deg, #2c2924 0 16px, #262320 16px 32px);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-meta {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: .35rem;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .8rem;
}
.card-title { font-size: 1.2rem; margin-bottom: .5rem; }
.card-title a { color: var(--text-light); }
.card-title a:hover { color: var(--amber); }
.card-excerpt {
    flex: 1;
    color: #d6cfc2;
    font-size: .95rem;
}
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-footer { margin-top: .9rem; }

/* Индекс инноваций */
.innovation-index {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--amber);
    border-radius: 4px;
    padding: .12rem .5rem;
}
.innovation-index svg { width: 13px; height: 13px; }

/* ================================================================
   9. Запись и страница
   ================================================================ */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.2rem; }
.entry-meta {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-top: .5rem;
}
.entry-thumb {
    margin: 1.2rem 0;
    border-radius: 6px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 6px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

.entry-footer {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(179,166,143,.25);
    font-family: var(--font-mono);
    font-size: .82rem;
}
.entry-footer a {
    display: inline-block;
    margin: .2rem .5rem .2rem 0;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.post-nav a {
    font-family: var(--font-head);
    font-weight: 600;
}

.archive-header { padding-top: 1rem; }
.archive-title { font-size: 2rem; }
.archive-description { color: #cfc8bb; font-size: .98rem; }

/* ================================================================
   10. Сайдбар — «Дневник пещеры»
   ================================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    position: relative;
    background: var(--limestone);
    color: var(--text-dark);
    border: 1px solid var(--limestone-dk);
    border-radius: 6px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    overflow: hidden;
}
/* Декоративные «царапины» */
.sidebar .widget::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(115deg, transparent 48%, rgba(26,23,20,.06) 49%, transparent 51%),
        linear-gradient(125deg, transparent 70%, rgba(26,23,20,.05) 71%, transparent 73%);
}
.sidebar .widget-title {
    font-family: var(--font-head);
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: .8rem;
    border-bottom: 2px solid var(--terracotta);
    padding-bottom: .35rem;
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--text-dark); }
.sidebar .widget a { color: var(--terracotta); }
.sidebar .widget a:hover { color: #7b3722; }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: .4rem 0;
    border-bottom: 1px dashed rgba(26,23,20,.2);
    font-size: .92rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget .post-date,
.sidebar .widget time {
    display: block;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: #5c5044;
}

/* ================================================================
   11. Подвал — «слои породы»
   ================================================================ */
.site-footer { position: relative; }
.footer-strata {
    height: 14px;
    background:
        linear-gradient(180deg, var(--amber) 0 33%, var(--terracotta) 33% 66%, #5c4632 66% 100%);
}
.footer-widgets {
    background: #161412;
    padding: 3rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}
.footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 1rem; }
.site-footer .widget-title {
    font-family: var(--font-head);
    color: var(--amber);
    font-size: 1.05rem;
    margin-bottom: .7rem;
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: var(--text-light); }
.site-footer .widget a { color: var(--limestone); }
.site-footer .widget a:hover { color: var(--amber); }
.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer .widget li {
    padding: .32rem 0;
    border-bottom: 1px solid rgba(179,166,143,.16);
    font-size: .92rem;
}
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget .post-date,
.site-footer .widget time {
    display: block;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-muted);
}
.footer-copyright {
    background: #0E0D0B;
    border-top: 1px solid rgba(179,166,143,.16);
    padding: 1.3rem 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-muted);
}

/* ================================================================
   12. Пагинация
   ================================================================ */
.pagination { margin: 2.4rem 0 1rem; }
.pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.pagination a,
.pagination span {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    min-width: 42px;
    text-align: center;
    padding: .5rem .7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    background: var(--stone-raise);
}
.pagination a:hover { background: var(--amber); color: var(--text-dark); }
.pagination .current {
    background: linear-gradient(135deg, var(--amber), var(--terracotta));
    color: var(--text-dark);
    border-color: var(--amber);
}
.pagination .dots { background: none; border-color: transparent; }

/* ================================================================
   13. Комментарии
   ================================================================ */
.comments-area {
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(179,166,143,.25);
}
.comments-title { font-size: 1.4rem; }
.comment-list {
    list-style: none;
    margin: 1.2rem 0;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    margin: 1rem 0 0 1.4rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(179,166,143,.25);
}
.comment-body {
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.24);
    border-radius: 6px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.1rem;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .6rem;
}
.comment-avatar { border-radius: 6px; }
.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    display: block;
}
.comment-date {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-muted);
}
.comment-pending {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--amber);
}
.comment-actions {
    margin-top: .5rem;
    font-family: var(--font-head);
    font-size: .85rem;
}

.comment-respond {
    background: var(--stone-panel);
    border: 1px solid rgba(179,166,143,.24);
    border-radius: 6px;
    padding: 1.3rem 1.4rem;
    margin-top: 1.4rem;
}
.comment-respond label {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    display: block;
    margin-bottom: .3rem;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    background: var(--stone-dark);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .55rem .7rem;
    font-family: var(--font-body);
    margin-bottom: .9rem;
}
.comment-respond .submit {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--amber), var(--terracotta));
    border: none;
    border-radius: 6px;
    padding: .65rem 1.4rem;
    cursor: pointer;
}

/* ================================================================
   14. Форма поиска
   ================================================================ */
.search-form {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1 1 200px;
    min-width: 0;
    background: var(--stone-panel);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .55rem .8rem;
    font-family: var(--font-body);
}
.search-form .search-submit {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--amber), var(--terracotta));
    border: none;
    border-radius: 6px;
    padding: .55rem 1.2rem;
    cursor: pointer;
}

/* ================================================================
   15. Страница 404
   ================================================================ */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}
.error-404 .error-code {
    font-family: var(--font-head);
    font-size: 6rem;
    color: var(--terracotta);
    line-height: 1;
    margin: 0;
}
.error-404 .search-form { margin: 1.6rem auto; justify-content: center; }

/* ================================================================
   16. Cookie-баннер
   ================================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.6rem;
    background: rgba(14,13,11,.97);
    border-top: 2px solid var(--amber);
    padding: 1rem 1.4rem;
    box-shadow: 0 -6px 22px rgba(0,0,0,.5);
}
.cookie-banner p {
    margin: 0;
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-light);
    max-width: 720px;
}
.cookie-banner a { color: var(--amber); }

/* ================================================================
   17. Режим чтения «Свеча»
   ================================================================ */
.candle-toggle {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .8rem;
    background: var(--stone-raise);
    color: var(--amber);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .85rem;
    cursor: pointer;
}
body.candle-mode { background-color: var(--candle-bg); }
body.candle-mode .site-header { background: var(--candle-bg); }
body.candle-mode .card,
body.candle-mode .stone-slide,
body.candle-mode .comment-body,
body.candle-mode .comment-respond {
    background: #15110C;
}
body.candle-mode .entry-content,
body.candle-mode .hero-lead,
body.candle-mode .card-excerpt { color: #f6e6c8; }
body.candle-mode a { color: var(--amber); }

/* ================================================================
   18. Утилиты
   ================================================================ */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.section-intro { color: #d6cfc2; }
.page-content { padding-top: 1rem; }

/* ================================================================
   19. Адаптив
   ================================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .layout-single .content-area,
    .front-content { width: 100%; }
    .hero-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.1rem; }
    .entry-title { font-size: 1.8rem; }
}

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

    .menu-toggle { display: inline-block; }
    .main-navigation { flex: 1 1 100%; }
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: .8rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        overflow: hidden;
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu li {
        border-bottom: 1px solid rgba(179,166,143,.2);
    }
    .nav-menu a {
        display: block;
        padding: .7rem 1rem;
        border-bottom: none;
    }
    .nav-menu .sub-menu {
        position: static;
        display: block;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,.25);
    }

    .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }

    /* Кнопки превращаются в «капли» */
    .btn-primary,
    .btn-secondary {
        border-radius: 999px;
        padding: .7rem 1.5rem;
    }
    .btn-secondary { border: 2px solid var(--amber); }

    /* Температурная линия становится вертикальной */
    .temp-line {
        height: 140px;
        width: 12px;
        background: linear-gradient(180deg, #3E6E9E, #6FA8C9, var(--amber), var(--terracotta));
        transform: scaleY(.15);
        transform-origin: top center;
    }
    .temp-line.is-warmed { transform: scaleY(1); }

    .stone-slide { flex: 0 0 84%; }
    .error-404 .error-code { font-size: 4.2rem; }
}
