/*
Theme Name: dds_swaginos.com
Author: Артём Григорьев
Description: Тёмная индустриально-«кухонная» тема для образовательного проекта о профессиях ресторанного дела и пищевой промышленности. Терракота, бордо и горчица на фоне мокрого асфальта. Без динамических данных, телефонов и форм сбора данных.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: swg
*/

/* =========================================================
   Переменные
   ========================================================= */
:root {
    --bg:          #1d1a17;   /* мокрый асфальт, тёплый подтон */
    --bg-soft:     #24201c;
    --cherry:      #2c0e16;   /* тёмно-вишнёвый для цитат */
    --card:        #3c1620;   /* бордо / переспелая вишня */
    --card-edge:   #4a1822;
    --accent:      #cf5f30;   /* выжженный терракот */
    --accent-deep: #4a1822;   /* бордо при наведении */
    --mustard:     #c9a227;   /* золотисто-горчичный */
    --text:        #e8dcc4;   /* песочный */
    --muted:       #9d958a;   /* пепельно-серый */
    --line:        rgba(157, 149, 138, 0.28);
    --grain:       rgba(255, 255, 255, 0.025);
    --shadow:      0 10px 30px rgba(0, 0, 0, 0.45);
    --radius:      7px;
    --font-head:   "Oswald", "Arial Narrow", sans-serif;
    --font-body:   "Golos Text", system-ui, sans-serif;
    --font-mono:   "JetBrains Mono", ui-monospace, monospace;
}

/* =========================================================
   База
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 12% -10%, rgba(207, 95, 48, 0.10), transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(60, 22, 32, 0.45), transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: var(--text);
    margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.35rem; }

h2.section-title { color: var(--accent); }

p { margin: 0 0 1.1em; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mustard);
    display: inline-block;
    margin-bottom: 0.6em;
}

/* Контейнер ширины — задан в одном месте (A12.7) */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.site-main { padding: 2.4rem 0 3.5rem; }

/* =========================================================
   Кнопки (F): радиус 6-8px, левый нижний угол прямой
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.62em 1.3em;
    background: var(--accent);
    color: #1a0f0a;
    border: 1px solid transparent;
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    cursor: pointer;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.btn:hover {
    background: var(--accent-deep);
    border-color: var(--mustard);
    color: var(--text);
    font-weight: 600;
}

/* Прозрачная второстепенная кнопка (читайте также / архив) */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    background: none;
    border: 0;
    padding: 0.2em 0;
    border-bottom: 1px dashed var(--accent);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.btn-ghost:hover { color: var(--mustard); border-color: var(--mustard); }

/* Ссылка «Читать историю» — прорисовывается линией снизу */
.read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    position: relative;
    padding-bottom: 3px;
}
.read-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.28s ease;
}
.read-link:hover { color: var(--accent); }
.read-link:hover::after { width: 100%; }
.read-link .arrow { transition: transform 0.28s ease; }
.read-link:hover .arrow { transform: translateX(4px); }

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    background: linear-gradient(180deg, rgba(44, 14, 22, 0.55), transparent);
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}
.brand-logo { display: block; flex: 0 0 auto; border-radius: 8px; }
.brand-text { min-width: 0; }
.site-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text);
    line-height: 1.2;
    /* длинное название не должно ломать строку слишком сильно */
    max-height: 2.6em;
    overflow: hidden;
}
.site-desc {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 4px;
}

/* Навигация */
.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.6rem;
}
.main-nav a {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.02rem;
    color: var(--text);
    letter-spacing: 0.02em;
    padding: 0.2em 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--accent);
    border-color: var(--accent);
}

/* Бургер */
.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    margin-left: auto;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 11px;
    width: 20px; height: 2px;
    background: var(--accent);
    transition: transform 0.28s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span::after  { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Хлебные крошки
   ========================================================= */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--accent); margin: 0 0.2em; }
.breadcrumbs span:last-child { color: var(--text); }

/* =========================================================
   Раскладки
   ========================================================= */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.6rem;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 100%; }

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

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

/* =========================================================
   Сайдбар и виджеты — явный контраст (F)
   ========================================================= */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    color: var(--text);
}
.sidebar .widget-title {
    font-family: var(--font-head);
    color: var(--accent);
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
}
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.45rem 0; border-bottom: 1px dotted var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
}

/* =========================================================
   Карточки записей (A8, A10)
   ========================================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    background-image: linear-gradient(0deg, var(--grain), var(--grain));
    border: 1px solid var(--card-edge);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.28s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}
.card:hover::before { transform: scaleY(1); }

.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.05); }
.card-thumb-empty {
    aspect-ratio: 16 / 10;
    background:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.15) 0 12px, transparent 12px 24px),
        var(--cherry);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.card-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--text); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot { margin-top: auto; padding-top: 0.8rem; }

/* Метка материала */
.material-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--mustard);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 4px 4px 4px 0;
    padding: 0.12em 0.55em;
}
.material-label .label-clock { color: var(--mustard); }

/* =========================================================
   Главная
   ========================================================= */
.front-block { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.front-block:last-child { border-bottom: 0; }
.front-head { max-width: 60ch; margin-bottom: 1.8rem; }
.front-head p { color: var(--muted); margin-bottom: 0; }

/* Профессии */
.prof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.4rem;
}
.prof-card {
    position: relative;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 1.5rem 1.4rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-width: 0;
}
.prof-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.28s ease;
}
.prof-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.prof-card:hover::before { transform: scaleY(1); }
.prof-icon { color: var(--muted); transition: color 0.25s ease; margin-bottom: 0.6rem; }
.prof-card:hover .prof-icon { color: var(--accent); }
.prof-card h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.prof-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Программы обучения */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
}
.program-card {
    background: var(--card);
    background-image: linear-gradient(0deg, var(--grain), var(--grain));
    border: 1px solid var(--card-edge);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 1.5rem 1.4rem;
    min-width: 0;
}
.program-card h3 { color: var(--accent); }
.program-card p { color: var(--text); margin-bottom: 1rem; }

/* Цитаты / истории — слайдер */
.stories { background: var(--cherry); border-radius: var(--radius) var(--radius) var(--radius) 0; }
.quote-slider {
    position: relative;
    background-color: var(--cherry);
    background-image: radial-gradient(rgba(232, 220, 196, 0.05) 1px, transparent 1px);
    background-size: 14px 14px;
    border: 1px solid var(--card-edge);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 2.4rem 2rem 1.6rem;
    overflow: hidden;
}
.quote-track { position: relative; min-height: 9rem; }
.quote-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.quote-slide.is-active { opacity: 1; transform: none; position: relative; pointer-events: auto; }
.quote-mark {
    display: inline-block;
    width: 34px; height: 8px;
    border-top: 4px solid var(--accent);
    border-bottom: 4px solid var(--accent);
    margin-bottom: 1rem;
}
.quote-text {
    font-family: var(--font-head);
    font-weight: 400;
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    line-height: 1.35;
    color: var(--text);
    margin: 0 0 1rem;
}
.quote-author { font-family: var(--font-mono); font-size: 0.85rem; color: var(--mustard); }
.quote-dots { display: flex; gap: 0.5rem; margin-top: 1.4rem; }
.quote-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.quote-dot.is-active { background: var(--accent); border-color: var(--accent); }

/* Блок проекта / контакты */
.project-block { background: var(--bg-soft); border-radius: var(--radius) var(--radius) var(--radius) 0; padding: 2.4rem 2rem; border: 1px solid var(--line); }
.email-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 0.5em 0.9em;
}
.email-line svg { color: var(--mustard); }
.email-line:hover { color: var(--accent); border-color: var(--accent); }

.social-row { display: flex; gap: 0.9rem; margin-top: 1.2rem; }
.social-row a {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.social-row a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Контент записи / страницы
   ========================================================= */
.entry { margin-bottom: 2.4rem; }
.entry-header { margin-bottom: 1.6rem; }
.entry-meta {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}
.entry-thumb { margin: 0 0 1.6rem; border-radius: var(--radius) var(--radius) var(--radius) 0; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.05rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content h3 { font-family: var(--font-mono); font-weight: 500; font-size: 1.1rem; color: var(--mustard); letter-spacing: 0; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius) var(--radius) var(--radius) 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content blockquote {
    position: relative;
    background-color: var(--cherry);
    background-image: radial-gradient(rgba(232, 220, 196, 0.06) 1px, transparent 1px);
    background-size: 14px 14px;
    border-left: 0;
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 400;
    font-size: 1.3rem;
    line-height: 1.4;
}
.entry-content blockquote::before {
    content: "";
    display: block;
    width: 34px; height: 8px;
    border-top: 4px solid var(--accent);
    border-bottom: 4px solid var(--accent);
    margin-bottom: 0.9rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Таблицы — видимые границы */
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; border: 1px solid var(--line); }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 0.6em 0.8em; text-align: left; }
.entry-content th { background: var(--bg-soft); font-family: var(--font-head); color: var(--accent); }

.entry-content pre { background: #14110f; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; min-width: 0; }
.entry-content code { font-family: var(--font-mono); font-size: 0.9em; }

.entry-tags { margin-top: 2rem; font-family: var(--font-mono); font-size: 0.8rem; }
.entry-tags a {
    display: inline-block;
    margin: 0 0.4em 0.5em 0;
    padding: 0.2em 0.6em;
    border: 1px solid var(--line);
    border-radius: 4px 4px 4px 0;
    color: var(--muted);
}
.entry-tags a:hover { color: var(--accent); border-color: var(--accent); }

.page-title { margin-bottom: 1.6rem; }
.archive-head { margin-bottom: 2rem; }
.archive-desc { color: var(--muted); }

/* =========================================================
   Пагинация — круглые номера (F)
   ========================================================= */
.pagination { margin: 2.4rem 0 0.5rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 1px solid var(--muted);
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a0f0a;
}
.pagination .dots { border-color: transparent; }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.comments-title { color: var(--accent); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-body {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.2rem;
}
.comment-head { display: flex; gap: 0.9rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.5rem; }
.comment-author { font-family: var(--font-head); color: var(--text); }
.comment-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.comment-await { font-family: var(--font-mono); font-size: 0.78rem; color: var(--mustard); }
.comment-reply a { font-family: var(--font-mono); font-size: 0.8rem; }

.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%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    padding: 0.6em 0.8em;
    margin-bottom: 0.9rem;
}
.comment-respond label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); display: block; margin-bottom: 0.3rem; }
.comment-form-cookies-consent { display: flex; align-items: center; gap: 0.5rem; }
.comment-form-cookies-consent input { width: auto; margin: 0; }
.form-submit input { all: unset; }
.comment-respond .submit {
    font-family: var(--font-head);
    font-weight: 500;
    padding: 0.62em 1.3em;
    background: var(--accent);
    color: #1a0f0a;
    border: 1px solid transparent;
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    cursor: pointer;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.comment-respond .submit:hover { background: var(--accent-deep); border-color: var(--mustard); color: var(--text); }

/* =========================================================
   Форма поиска
   ========================================================= */
.search-form { display: flex; gap: 0.6rem; max-width: 460px; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    color: var(--text);
    font-family: var(--font-body);
    padding: 0.6em 0.9em;
}
.search-form .search-submit {
    font-family: var(--font-head);
    background: var(--accent);
    color: #1a0f0a;
    border: 1px solid transparent;
    border-radius: var(--radius) var(--radius) var(--radius) 0;
    padding: 0 1.1em;
    cursor: pointer;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.search-form .search-submit:hover { background: var(--accent-deep); border-color: var(--mustard); color: var(--text); }

/* =========================================================
   404
   ========================================================= */
.error-404 { text-align: center; padding: 2rem 0 3rem; }
.error-404 .big { font-family: var(--font-head); font-size: clamp(4rem, 16vw, 9rem); color: var(--accent); line-height: 1; }
.error-404 .search-form { margin: 1.6rem auto 0; }

/* =========================================================
   Подвал
   ========================================================= */
.site-footer {
    background: linear-gradient(0deg, rgba(44, 14, 22, 0.6), transparent);
    border-top: 1px solid var(--line);
    padding: 2.8rem 0 1.6rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.footer-col { min-width: 0; color: var(--text); }
.footer-col .widget-title {
    font-family: var(--font-head);
    color: var(--accent);
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
}
.footer-col, .footer-col p { color: var(--text); }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--accent); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 0.32rem 0; }
.footer-col .post-date { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}
.footer-meta .social-row { margin-top: 0; }

.footer-bottom {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

@media (max-width: 960px) {
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}

/* =========================================================
   Cookie-баннер (D6, A11)
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--card);
    border-top: 2px solid var(--accent);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
    padding: 1rem 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; color: var(--text); font-size: 0.92rem; min-width: 0; flex: 1; }
.cookie-inner a { color: var(--mustard); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (min-width: 681px) {
    .site-desc { display: block; }
}

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

    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
    }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 0.8em 0; border-bottom: 0; }

    /* мобильные кнопки шире и с полным скруглением */
    .btn { width: 100%; justify-content: center; border-radius: 999px; }
    .comment-respond .submit { width: 100%; border-radius: 999px; }
}

@media (max-width: 600px) {
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .layout-with-sidebar { gap: 1.8rem; }
}
