/*
Theme Name: dds_fyndeverything.com
Theme URI: https://fyndeverything.com/
Author: Алексей Кораблёв
Description: Тёмная техническая тема для информационного сайта об инженерных системах частного дома: отопление, водоснабжение, канализация.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: fndeng
*/

:root {
    --bg: #0B0E17;
    --bg-alt: #121A27;
    --bg-header: #080B12;
    --bg-footer: #050810;
    --bg-side: #0F1622;
    --text: #E8EDF5;
    --accent: #3B9CF9;
    --accent2: #5CD6D6;
    --drain: #1E4B7A;
    --muted: #6B7B93;
    --line: #2A3A52;
    --shadow: #1E2A3A;
    --grid-line: rgba(26, 37, 56, 0.3);
}

/* --- служебное: скрытие через атрибут hidden ---------------------------- */

.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* --- базовое ------------------------------------------------------------ */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text);
    font-family: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    letter-spacing: 0.012em;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -60px;
    width: 420px;
    height: 420px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%235CD6D6' stroke-width='6'%3E%3Ccircle cx='100' cy='100' r='60'/%3E%3Ccircle cx='100' cy='100' r='22'/%3E%3Cpath d='M100 10v30M100 160v30M10 100h30M160 100h30M36 36l21 21M143 143l21 21M164 36l-21 21M57 143l-21 21'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

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

a { color: var(--accent2); }

h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", "Manrope", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

.site-main {
    position: relative;
    z-index: 1;
    display: block;
    padding: 3rem 0 4.5rem;
}

.topline {
    height: 3px;
    width: 100%;
}
.topline.mode-heat  { background: var(--accent); }
.topline.mode-water { background: var(--accent2); }
.topline.mode-drain { background: var(--drain); }

/* --- шапка -------------------------------------------------------------- */

.site-header {
    position: relative;
    z-index: 2;
    background: var(--bg-header);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.4rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-link { display: block; line-height: 0; flex: none; }
.brand-logo { display: block; max-height: 64px; width: auto; }
.brand-mark { display: block; }

.brand-text { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }

.site-name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    display: block;
    max-width: 46ch;
}

.site-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
    display: block;
    max-width: 60ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--text);
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
}
.nav-toggle-bar { width: 18px; height: 2px; background: var(--accent); display: block; }
.nav-toggle-label { margin-left: 0.3rem; }
.nav-toggle.is-active { background: rgba(59, 156, 249, 0.2); }

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

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
}

.nav-list a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    display: inline-block;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: var(--accent2);
    border-bottom-color: var(--accent);
}

.nav-list .sub-menu {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- раскладки ---------------------------------------------------------- */

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}

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

/* --- хлебные крошки ----------------------------------------------------- */

.crumbs {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 2rem;
    letter-spacing: 0.03em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent2); }
.crumbs .sep { color: var(--line); margin: 0 0.3rem; }

/* --- заголовки страниц и секций ----------------------------------------- */

.page-head { margin-bottom: 2rem; }
.page-title { font-size: 2.6rem; margin-bottom: 0.5rem; }
.page-desc { color: var(--muted); }

.section-title {
    display: inline-block;
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: 0;
    width: 60%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(59, 156, 249, 0.9), 0 0 20px rgba(59, 156, 249, 0.5);
}

.section-lead {
    color: var(--muted);
    max-width: 70ch;
    margin-bottom: 2.5rem;
}

/* --- кнопки и ссылки ---------------------------------------------------- */

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { background: var(--accent2); border-color: var(--accent2); color: var(--bg); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--accent);
}
.btn-ghost:hover { background: rgba(59, 156, 249, 0.2); color: var(--text); border-color: var(--accent); }

.entry a,
.card-excerpt a,
.widget a {
    color: var(--accent2);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}
.entry a:hover,
.card-excerpt a:hover,
.widget a:hover {
    border-bottom-color: var(--accent2);
}

/* --- секции главной ----------------------------------------------------- */

.front-wrap { width: min(85%, 1180px); }

.front-section { padding: 100px 0; }

.front-section.fs-alt {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 100px 2.6rem;
}

/* hero */

.fs-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: var(--bg-alt);
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 5rem 2.6rem;
    background: linear-gradient(100deg, rgba(11, 14, 23, 0.94) 0%, rgba(11, 14, 23, 0.82) 45%, rgba(11, 14, 23, 0.35) 100%);
}

.hero-text { min-width: 0; flex: 1 1 auto; max-width: 46rem; }

.hero-tag {
    display: inline-block;
    color: var(--accent2);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.hero-title { font-size: 3.5rem; margin-bottom: 1.1rem; }

.hero-sub { color: #C3CEDD; font-size: 1.05rem; margin: 0; max-width: 62ch; }
.hero-sub .accent { color: var(--accent2); }

.hero-action { flex: none; }

/* таймлайн */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--accent);
    opacity: 0.55;
}

.tl-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1.6rem;
    padding-bottom: 2.4rem;
    position: relative;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-num {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
    color: var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.tl-body { min-width: 0; padding-top: 0.2rem; }

.tl-stage {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.tl-title { font-size: 1.25rem; margin-bottom: 0.4rem; }
.tl-body p { margin: 0; color: #B7C3D4; }

/* карта тем */

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}

.panel {
    position: relative;
    display: block;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2rem 1.8rem;
    color: var(--text);
    text-decoration: none;
    box-shadow: 6px 6px 0 var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.panel:hover { transform: translateY(-4px); border-color: var(--accent2); }

.panel-dot {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.panel-heat .panel-dot  { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.panel-water .panel-dot { background: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
.panel-drain .panel-dot { background: var(--drain); box-shadow: 0 0 10px var(--drain); }

.panel-icon { display: block; color: var(--accent2); margin-bottom: 1.2rem; }
.panel-heat .panel-icon { color: var(--accent); }
.panel-drain .panel-icon { color: #6FA3D6; }

.panel-title { font-size: 1.35rem; margin-bottom: 0.6rem; }
.panel-text { color: #B7C3D4; font-size: 0.95rem; margin-bottom: 1.2rem; }

.panel-link {
    display: inline-block;
    color: var(--accent2);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px dashed transparent;
}
.panel:hover .panel-link { border-bottom-color: var(--accent2); }

/* цитата */

.fs-quote {
    background-image: linear-gradient(135deg, #121A27 0%, #1A2A3F 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5rem 2.6rem;
}

.lead-quote {
    margin: 0;
    border-left: 5px solid var(--accent2);
    padding-left: 2rem;
    max-width: 62rem;
}

.lead-quote p {
    font-size: 2.4rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 1.2rem;
}

.lead-quote cite {
    display: block;
    font-style: normal;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}

.empty-note { color: var(--muted); }

/* --- карточки записей --------------------------------------------------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 6px 6px 0 var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent2); }

.card-thumb { display: block; }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem 1.5rem 1.7rem;
}

.meta {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}
.meta a { color: var(--muted); text-decoration: none; }
.meta a:hover { color: var(--accent2); }
.meta-sep { color: var(--line); margin: 0 0.2rem; }

.card-title { font-size: 1.25rem; margin-bottom: 0.7rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent2); }

.card-excerpt { color: #B7C3D4; font-size: 0.95rem; margin-bottom: 1.3rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more { align-self: flex-start; margin-top: auto; }

/* --- контент записи и страницы ------------------------------------------ */

.single-thumb { margin: 0 0 2rem; }
.single-thumb img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }

.entry { font-size: 1.02rem; }
.entry h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 0.6rem;
    margin-top: 2.2rem;
}
.entry h2::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: 0;
    width: 60%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(59, 156, 249, 0.9);
}
.entry h3 { margin-top: 1.8rem; }

.entry ul, .entry ol {
    list-style: none;
    margin: 0 0 1.4em;
    padding: 0;
    counter-reset: fndeng-item;
}

.entry ul li, .entry ol li {
    position: relative;
    padding-left: 2.6rem;
    margin-bottom: 0.6em;
}

.entry ol li::before {
    counter-increment: fndeng-item;
    content: "[" counter(fndeng-item) "]";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.entry ul li::before {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 0.72em;
    width: 9px;
    height: 9px;
    background: var(--accent2);
    transform: rotate(45deg);
}

.entry blockquote {
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    background-image: linear-gradient(135deg, #121A27 0%, #1A2A3F 100%);
    border-left: 5px solid var(--accent2);
    border-radius: 6px;
}
.entry blockquote p:last-child { margin-bottom: 0; }

.entry img { border-radius: 6px; }

.entry table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 0 0 1.6em;
    font-size: 0.94rem;
}
.entry th, .entry td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}
.entry th { background: var(--bg-alt); color: var(--text); }

.entry code {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
}
.entry pre {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.1rem 1.2rem;
    overflow: auto;
    min-width: 0;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0; }
.tag-chip {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
}
.tag-chip:hover { border-color: var(--accent2); color: var(--accent2); }

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
    margin-top: 2rem;
    font-size: 0.92rem;
}
.post-nav a { color: var(--accent2); text-decoration: none; }
.post-nav a:hover { border-bottom: 1px dashed var(--accent2); }
.post-nav-prev, .post-nav-next { min-width: 0; }

/* --- сайдбар ------------------------------------------------------------ */

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--bg-side);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.5rem 1.5rem 1.6rem;
    margin-bottom: 1.8rem;
    color: var(--text);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.02em;
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.7rem;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--text);
}
.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}
.sidebar .widget a { color: var(--accent2); text-decoration: none; }
.sidebar .widget a:hover { border-bottom: 1px dashed var(--accent2); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.78rem; }
.sidebar .widget p { color: #B7C3D4; font-size: 0.94rem; }

/* --- пагинация ---------------------------------------------------------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2.5rem 0 0;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    background: var(--bg-alt);
}
.pager a.page-numbers:hover { border-color: var(--accent2); color: var(--accent2); }
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 700;
}
.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.comments .pagination,
.comments .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }

/* --- поиск -------------------------------------------------------------- */

.search-form { margin: 1.5rem 0; }
.search-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.search-field {
    flex: 1 1 220px;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
}
.search-field:focus { outline: none; border-color: var(--accent); }
.search-field::placeholder { color: var(--muted); }

/* --- комментарии -------------------------------------------------------- */

.comments {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    padding-top: 2rem;
}
.comments-title { font-size: 1.5rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.6rem; padding-left: 1.2rem; border-left: 1px solid var(--line); }

.comment-inner {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.2rem;
}
.comment-head { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.6rem; }
.comment-author { font-weight: 700; }
.comment-date { color: var(--muted); font-size: 0.8rem; }
.comment-text { font-size: 0.97rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-hold { color: var(--muted); font-size: 0.88rem; }
.comment-actions a { color: var(--accent2); font-size: 0.85rem; text-decoration: none; }
.comment-actions a:hover { border-bottom: 1px dashed var(--accent2); }
.comments-closed { color: var(--muted); }

.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.3rem; }
.comment-form label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
}
.comment-form textarea { min-height: 150px; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form p { margin-bottom: 1rem; }
.comment-form .form-submit input[type="submit"],
.comment-form .submit {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--accent2); border-color: var(--accent2); }
.comment-form .comment-notes, .comment-form .logged-in-as { color: var(--muted); font-size: 0.85rem; }

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

.error-page { padding: 2rem 0 3rem; }
.error-code {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.6rem;
}
.error-text { color: #B7C3D4; max-width: 60ch; }
.error-actions { margin-top: 1.5rem; }

/* --- подвал ------------------------------------------------------------- */

.site-footer {
    position: relative;
    z-index: 1;
    background: var(--bg-footer);
    border-top: 1px solid var(--line);
    padding: 3.5rem 0 2rem;
    color: var(--text);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
}

.footer-col { min-width: 0; }

.footer-col .widget { margin-bottom: 1.5rem; color: var(--text); }

.footer-col-1 .widget, .footer-col-1 .widget p { color: #C3CEDD; }
.footer-col-2 .widget, .footer-col-2 .widget li { color: #C3CEDD; }
.footer-col-3 .widget, .footer-col-3 .widget p { color: #C3CEDD; }

.footer-col-1 .widget-title,
.footer-col-2 .widget-title,
.footer-col-3 .widget-title {
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}

.footer-col-1 .widget a,
.footer-col-2 .widget a,
.footer-col-3 .widget a {
    color: var(--accent2);
    text-decoration: none;
}
.footer-col-1 .widget a:hover,
.footer-col-2 .widget a:hover,
.footer-col-3 .widget a:hover { border-bottom: 1px dashed var(--accent2); }

.footer-col-1 .widget .post-date,
.footer-col-2 .widget .post-date,
.footer-col-3 .widget .post-date { color: var(--muted); font-size: 0.78rem; display: block; }

.footer-col .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-col .widget li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
    font-size: 0.93rem;
    line-height: 1.5;
}
.footer-col .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    margin-top: 2rem;
    padding-top: 1.4rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* --- cookie-баннер ------------------------------------------------------ */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--bg-header);
    border-top: 1px solid var(--accent);
    padding: 1.1rem 1.6rem;
}
.cookie-text { margin: 0; color: #C3CEDD; font-size: 0.9rem; min-width: 0; flex: 1 1 320px; }
.cookie-accept { flex: none; }

/* --- адаптив ------------------------------------------------------------ */

@media (max-width: 960px) {
    body { font-size: 16px; }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.7rem; }
    .page-title { font-size: 2rem; }
    .hero-title { font-size: 2.4rem; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }
    .layout-single { width: 100%; }
    .front-wrap { width: min(92%, 1180px); }

    .front-section { padding: 64px 0; }
    .front-section.fs-alt { padding: 64px 1.8rem; }
    .fs-quote { padding: 3.4rem 1.8rem; }
    .hero-body { padding: 3.4rem 1.8rem; flex-direction: column; align-items: flex-start; }

    .nav-toggle { display: inline-flex; }
    .main-nav { flex: 1 1 100%; display: none; }
    .main-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0.9rem; padding-top: 1rem; }

    .lead-quote p { font-size: 1.8rem; }
}

@media (max-width: 600px) {
    .front-section { padding: 48px 0; }
    .front-section.fs-alt { padding: 48px 1.3rem; }
    .fs-quote { padding: 2.6rem 1.3rem; }
    .hero-body { padding: 2.6rem 1.3rem; }
    .hero-title { font-size: 2rem; }
    .page-title { font-size: 1.7rem; }
    .error-code { font-size: 3.4rem; }

    .cards-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .panel-grid { grid-template-columns: minmax(0, 1fr); }
    .panel { padding: 1.6rem 1.3rem; }

    .tl-item { grid-template-columns: 44px minmax(0, 1fr); gap: 1.1rem; }
    .tl-num { width: 44px; height: 44px; font-size: 0.85rem; }
    .timeline::before { left: 21px; }

    .lead-quote { padding-left: 1.2rem; }
    .lead-quote p { font-size: 1.5rem; }

    .card-body { padding: 1.2rem 1.2rem 1.4rem; }
    .comment-list .children { margin-left: 0.6rem; padding-left: 0.8rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    body::after { width: 260px; height: 260px; }
}
