/*
Theme Name: dds_lightningspiritsco.com
Author: Илья Савельев
Description: Контентный сайт о строительстве с упором на базовые принципы проектирования, возведения и эксплуатации зданий.
Version: 1.1
Text Domain: dds_lightningspiritsco
*/

/* === БАЗА === */

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1A1C1E;
    background-image:
        radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
    color: #E8E9EB;
    font-family: Georgia, 'Literata', 'Iowan Old Style', serif;
    font-size: 17px;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Trebuchet MS', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #E8E9EB;
    margin: 1.4em 0 0.6em;
    line-height: 1.25;
}

h1 { font-size: 2.1em; letter-spacing: 0.05em; }
h2 { font-size: 1.65em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.12em; }

p {
    margin: 0 0 1.05em;
    line-height: 1.7;
}

a {
    color: #FFB347;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,179,71,0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: #FFC56B;
    border-bottom-color: #FFC56B;
}

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

code, pre, .formula {
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
    background: rgba(90,125,154,0.12);
    padding: 0.1em 0.35em;
    border-radius: 0;
    font-size: 0.92em;
    color: #E8E9EB;
}

pre {
    padding: 1em;
    overflow-x: auto;
    border-left: 3px solid #5A7D9A;
}

blockquote {
    margin: 1.5em 0;
    padding: 0.6em 1.2em;
    border-left: 3px solid #FFB347;
    background: rgba(10,12,14,0.5);
    color: #C8C9CB;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid #3A3D40;
}

th, td {
    border: 1px solid #3A3D40;
    padding: 0.65em 0.85em;
    text-align: left;
}

th {
    background: rgba(90,125,154,0.18);
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    letter-spacing: 0.03em;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #5A7D9A, transparent);
    margin: 2em 0;
}

::selection {
    background: rgba(255,179,71,0.35);
    color: #1A1C1E;
}

/* === ПРАВИЛА HIDDEN (РАЗМЕЩЕНЫ ДО БАННЕРА — ПРАВИЛО A11) === */

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

/* === ИНЖЕНЕРНЫЙ ЛУЧ (ПРОГРЕСС-БАР ПРОКРУТКИ) === */

.engineering-beam {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(90,125,154,0.15);
    z-index: 200;
    pointer-events: none;
}

.engineering-beam-inner {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #FFB347, #B1624B);
    position: relative;
    transition: width 0.08s linear;
}

.engineering-beam-inner::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #FFB347;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(255,179,71,0.6);
}

/* === КОНТЕЙНЕРЫ === */

.site-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

.layout {
    display: flex;
    gap: 36px;
    margin: 30px 0 50px;
}

.layout-content {
    flex: 1 1 67%;
    min-width: 0;
}

.layout-sidebar {
    flex: 0 0 27%;
    min-width: 0;
}

.layout.layout-no-sidebar .layout-content {
    flex: 1 1 85%;
    max-width: 85%;
    margin: 0 auto;
}

.layout.layout-front .layout-content {
    flex: 1 1 85%;
    max-width: 85%;
    margin: 0 auto;
}

/* === ШАПКА === */

.site-header {
    background: linear-gradient(180deg, #15171A 0%, #1A1C1E 100%);
    border-bottom: 1px solid rgba(90,125,154,0.25);
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(to right, transparent 5%, rgba(255,179,71,0.4) 50%, transparent 95%);
}

.header-top {
    background: rgba(10,12,14,0.55);
    padding: 18px 0;
    border-bottom: 1px solid rgba(90,125,154,0.18);
}

.header-top-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

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

.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: block;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.25;
}

.brand-name a {
    color: #E8E9EB;
    border-bottom: none;
}

.brand-name a:hover {
    color: #FFB347;
}

.brand-tagline {
    font-size: 0.84em;
    color: #9A9D9F;
    margin: 4px 0 0;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.header-search {
    flex: 0 0 auto;
}

/* === МЕНЮ === */

.header-nav {
    background: #1A1C1E;
    padding: 10px 0;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #5A7D9A;
    color: #E8E9EB;
    font-family: 'Manrope', sans-serif;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95em;
    letter-spacing: 0.05em;
}

.primary-menu,
.primary-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.primary-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: block;
    padding: 12px 18px;
    color: #E8E9EB;
    border-bottom: none;
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-size: 0.96em;
    letter-spacing: 0.04em;
    position: relative;
    transition: color 0.2s ease;
}

.primary-menu a:hover {
    color: #FFB347;
}

.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    color: #FFB347;
}

/* Подчёркивание-молния под активным пунктом */
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after {
    content: '';
    position: absolute;
    left: 18px; right: 18px; bottom: 4px;
    height: 4px;
    background-image: linear-gradient(135deg, #FFB347 50%, transparent 50%),
                      linear-gradient(45deg, #FFB347 50%, transparent 50%);
    background-size: 8px 4px;
    background-repeat: repeat-x;
    background-position: 0 0, 4px 0;
}

.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #15171A;
    border: 1px solid rgba(90,125,154,0.3);
    min-width: 200px;
    display: none;
    z-index: 50;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    display: block;
}

.primary-menu .sub-menu a {
    padding: 9px 14px;
    font-size: 0.92em;
}

/* === КНОПКИ === */

.btn,
.button,
input[type="submit"],
button.btn {
    display: inline-block;
    background: #FFB347;
    color: #1A1C1E;
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9em;
    padding: 12px 26px;
    border: none;
    cursor: pointer;
    transform: skew(-12deg);
    transition: all 0.25s ease;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}

.btn > span,
.button > span,
input[type="submit"]::-webkit-input-placeholder {
    display: inline-block;
    transform: skew(12deg);
}

.btn:hover,
.button:hover,
input[type="submit"]:hover {
    transform: skew(-18deg);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.45), 0 0 18px rgba(255,179,71,0.35);
    color: #1A1C1E;
    background: #FFC56B;
}

.btn-secondary {
    background: transparent;
    color: #E8E9EB;
    border: 1px solid #5A7D9A;
    transform: none;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0.04em;
}

.btn-secondary:hover {
    background: rgba(90,125,154,0.3);
    color: #E8E9EB;
    transform: none;
    box-shadow: none;
}

/* === ФОРМЫ === */

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    background: rgba(10,12,14,0.6);
    border: 1px solid #5A7D9A;
    color: #E8E9EB;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95em;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #FFB347;
    box-shadow: 0 0 0 1px rgba(255,179,71,0.25);
}

.search-form {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.search-form-field {
    flex: 1 1 auto;
    min-width: 160px;
}

.search-form .btn {
    padding: 10px 18px;
    font-size: 0.85em;
}

/* === ХЛЕБНЫЕ КРОШКИ === */

.breadcrumbs {
    margin: 18px 0;
    font-size: 0.88em;
    color: #9A9D9F;
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    letter-spacing: 0.04em;
}

.breadcrumbs a {
    color: #5A7D9A;
    border-bottom: none;
}

.breadcrumbs a:hover {
    color: #FFB347;
}

.breadcrumbs-sep {
    color: #5A7D9A;
    margin: 0 8px;
}

.breadcrumbs-current {
    color: #E8E9EB;
}

/* === КАРТОЧКИ ЗАПИСЕЙ (ПРАВИЛО A8 + A10) === */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: rgba(10,12,14,0.85);
    border: 1px solid rgba(90,125,154,0.22);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease;
    position: relative;
}

.card:hover {
    border-color: rgba(255,179,71,0.4);
    transform: translateY(-2px);
}

.card-thumb-wrap {
    flex: 0 0 auto;
    overflow: hidden;
    background: #0A0C0E;
}

.card-thumb-wrap a {
    display: block;
    border-bottom: none;
}

.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.04);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.card-meta {
    font-size: 0.78em;
    color: #9A9D9F;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 8px;
}

.card-meta a {
    color: #5A7D9A;
    border-bottom: none;
}

.card-title {
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-size: 1.18em;
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: 0.03em;
}

.card-title a {
    color: #E8E9EB;
    border-bottom: none;
}

.card-title a:hover {
    color: #FFB347;
}

.card-excerpt {
    color: #C8C9CB;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

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

.card-readmore {
    display: inline-block;
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-size: 0.82em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #E8E9EB;
    border: 1px solid #5A7D9A;
    padding: 8px 16px;
    transition: background 0.2s ease;
}

.card-readmore:hover {
    background: rgba(90,125,154,0.3);
    color: #E8E9EB;
    border-color: #5A7D9A;
}

/* === ТЕМАТИЧЕСКИЕ БЛОКИ ГЛАВНОЙ === */

.front-section {
    margin: 50px 0;
    position: relative;
}

.front-section-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(90,125,154,0.22);
    padding-bottom: 10px;
}

.front-section-head .num {
    font-family: 'Manrope', sans-serif;
    color: #FFB347;
    font-size: 0.9em;
    letter-spacing: 0.1em;
    flex: 0 0 auto;
}

.front-section-head h2 {
    margin: 0;
    flex: 1;
}

.front-section-lead {
    color: #C8C9CB;
    font-size: 1.05em;
    max-width: 760px;
    margin: 0 0 24px;
}

/* Блок: Промышленные объекты — тяжёлая штриховка */
.front-section-industrial {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 12px,
        rgba(90,125,154,0.06) 12px,
        rgba(90,125,154,0.06) 14px
    );
    padding: 30px 26px;
    border-left: 3px solid #5A7D9A;
}

/* Блок: Проектирование — миллиметровка */
.front-section-design {
    background-image:
        linear-gradient(rgba(90,125,154,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90,125,154,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 30px 26px;
}

/* Блок: Эксплуатация — жёлтые маркеры */
.front-section-operation {
    padding: 30px 26px;
    border-left: 3px solid #FFB347;
    background: rgba(10,12,14,0.4);
}

/* Блок: Общестроительные — оштукатуренная стена */
.front-section-general {
    background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 4px 4px;
    padding: 30px 26px;
    border-left: 3px solid #9E5A4A;
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.feature-card {
    background: rgba(26,28,30,0.6);
    padding: 18px 20px;
    border: 1px solid rgba(90,125,154,0.18);
    position: relative;
}

.feature-card h3 {
    font-size: 1.1em;
    margin: 0 0 8px;
    color: #FFB347;
    letter-spacing: 0.04em;
}

.feature-card p {
    margin: 0;
    color: #C8C9CB;
    font-size: 0.95em;
}

.front-steps {
    counter-reset: stepnum;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.front-step {
    counter-increment: stepnum;
    background: rgba(26,28,30,0.55);
    padding: 22px 22px 18px;
    border-top: 2px solid #FFB347;
    position: relative;
}

.front-step::before {
    content: counter(stepnum, decimal-leading-zero);
    position: absolute;
    top: -2px;
    right: 14px;
    font-family: 'Manrope', sans-serif;
    color: #5A7D9A;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    background: #1A1C1E;
    padding: 0 6px;
}

.front-step h3 {
    font-size: 1.05em;
    margin: 0 0 8px;
    color: #E8E9EB;
}

.front-step p {
    margin: 0;
    color: #C8C9CB;
    font-size: 0.93em;
}

.front-cta {
    text-align: center;
    margin: 18px 0 0;
}

/* === САЙДБАР === */

.sidebar-widget {
    background: rgba(10,12,14,0.7);
    border: 1px solid rgba(90,125,154,0.2);
    padding: 18px 20px;
    margin-bottom: 22px;
}

.sidebar-widget .widget-title,
.sidebar-widget h2.widget-title,
.sidebar-widget h3 {
    font-family: 'Manrope', 'Trebuchet MS', sans-serif;
    font-size: 0.95em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFB347;
    border-bottom: 1px solid rgba(90,125,154,0.22);
    padding-bottom: 8px;
    margin: 0 0 14px;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    padding: 7px 0;
    border-bottom: 1px dashed rgba(90,125,154,0.12);
    font-size: 0.95em;
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: #E8E9EB;
    border-bottom: none;
}

.sidebar-widget a:hover {
    color: #FFB347;
}

/* === ПАГИНАЦИЯ === */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 35px 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: linear-gradient(180deg, rgba(90,125,154,0.18) 0%, rgba(90,125,154,0.08) 100%);
    border: 1px solid #5A7D9A;
    color: #E8E9EB;
    font-family: 'Manrope', sans-serif;
    font-size: 0.92em;
    letter-spacing: 0.05em;
    border-radius: 0;
    transition: all 0.2s ease;
}

.pagination a.page-numbers:hover {
    background: linear-gradient(180deg, rgba(255,179,71,0.3) 0%, rgba(255,179,71,0.1) 100%);
    border-color: #FFB347;
    color: #FFB347;
}

.pagination .page-numbers.current {
    background: #FFB347;
    color: #1A1C1E;
    border-color: #FFB347;
    font-weight: 700;
}

.pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* === ЗАГОЛОВКИ СТРАНИЦ И АРХИВОВ === */

.page-title-block {
    margin: 26px 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(90,125,154,0.22);
}

.page-title-block h1 {
    margin: 0 0 6px;
}

.page-title-block .subtitle {
    color: #9A9D9F;
    font-size: 0.95em;
    letter-spacing: 0.02em;
    margin: 0;
}

/* === ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА === */

.single-article,
.page-article {
    margin-bottom: 40px;
}

.single-article header,
.page-article header {
    margin: 14px 0 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(90,125,154,0.22);
}

.single-article h1,
.page-article h1 {
    margin: 8px 0 10px;
}

.single-article .post-meta {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85em;
    color: #9A9D9F;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.single-article .post-meta a {
    color: #5A7D9A;
    border-bottom: none;
}

.single-article .featured-image,
.page-article .featured-image {
    margin: 18px 0 22px;
    overflow: hidden;
}

.single-article .featured-image img,
.page-article .featured-image img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content {
    font-size: 1.02em;
    line-height: 1.78;
}

.entry-content img {
    display: block;
    margin: 1.4em auto;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4em;
    margin: 1em 0;
}

.entry-content li {
    margin-bottom: 0.4em;
}

.post-tags {
    margin: 22px 0;
    font-size: 0.9em;
    color: #9A9D9F;
}

.post-tags a {
    display: inline-block;
    background: rgba(90,125,154,0.18);
    color: #E8E9EB;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    border-bottom: none;
    font-family: 'Manrope', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.04em;
}

.post-tags a:hover {
    background: rgba(255,179,71,0.25);
    color: #FFB347;
}

/* === КОММЕНТАРИИ === */

.comments-area {
    margin: 40px 0;
    padding-top: 24px;
    border-top: 1px solid rgba(90,125,154,0.22);
}

.comments-area h2,
.comments-area h3 {
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.05em;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.comment-list li {
    background: rgba(10,12,14,0.55);
    border: 1px solid rgba(90,125,154,0.18);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.comment-list .children {
    list-style: none;
    padding-left: 24px;
    margin-top: 12px;
}

.comment-author {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: #FFB347;
    margin-bottom: 6px;
}

.comment-meta {
    font-size: 0.82em;
    color: #9A9D9F;
    margin-bottom: 8px;
}

.comment-form label {
    display: block;
    margin: 12px 0 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.88em;
    letter-spacing: 0.04em;
}

/* === ПОДВАЛ === */

.site-footer {
    background: linear-gradient(180deg, #15171A 0%, #0A0C0E 100%);
    border-top: 1px solid rgba(90,125,154,0.3);
    margin-top: auto;
    padding: 40px 0 20px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 5%, rgba(255,179,71,0.4) 50%, transparent 95%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 30px;
}

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

.footer-col .widget-title,
.footer-col h2.widget-title,
.footer-col h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 0.92em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFB347;
    border-bottom: 1px dashed rgba(90,125,154,0.3);
    padding-bottom: 8px;
    margin: 0 0 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    padding: 5px 0;
}

.footer-col a {
    color: #C8C9CB;
    border-bottom: none;
}

.footer-col a:hover {
    color: #FFB347;
}

.footer-bottom {
    border-top: 1px solid rgba(90,125,154,0.2);
    padding-top: 18px;
    text-align: center;
    color: #9A9D9F;
    font-size: 0.86em;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.04em;
}

/* === COOKIE-БАННЕР === */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 500;
    background: rgba(15,17,20,0.96);
    border: 1px solid #5A7D9A;
    padding: 16px 18px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
    max-width: 920px;
    margin: 0 auto;
}

.cookie-banner-text {
    flex: 1 1 240px;
    color: #E8E9EB;
    font-size: 0.92em;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: #FFB347;
}

.cookie-banner button {
    flex: 0 0 auto;
}

/* === 404 === */

.not-found-block {
    text-align: center;
    padding: 50px 20px;
    background: rgba(10,12,14,0.5);
    border: 1px dashed rgba(90,125,154,0.3);
    margin: 30px 0;
}

.not-found-code {
    font-family: 'Manrope', sans-serif;
    font-size: 5em;
    color: #FFB347;
    letter-spacing: 0.1em;
    margin: 0 0 6px;
    line-height: 1;
}

.not-found-block h1 {
    margin: 0 0 14px;
}

.not-found-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === АДАПТИВ === */

@media (max-width: 960px) {
    .layout {
        flex-direction: column;
        gap: 28px;
    }
    .layout-content,
    .layout-sidebar,
    .layout.layout-no-sidebar .layout-content,
    .layout.layout-front .layout-content {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7em; }
    h2 { font-size: 1.35em; }
    h3 { font-size: 1.15em; }

    .header-top-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .header-search { width: 100%; }

    .menu-toggle { display: inline-block; }

    .primary-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
        width: 100%;
    }

    .primary-menu.is-open { display: flex; }

    .primary-menu li { width: 100%; }

    .primary-menu a {
        padding: 11px 8px;
        border-bottom: 1px solid rgba(90,125,154,0.15);
    }

    .primary-menu .sub-menu {
        position: static;
        border: none;
        padding-left: 16px;
        display: block;
        background: transparent;
    }

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

    .posts-grid {
        grid-template-columns: 1fr;
    }

    /* Сброс position: absolute в карточках на мобильных (правило A10) */
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a {
        position: static;
    }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cookie-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 14px;
    }

    .not-found-code {
        font-size: 3.2em;
    }
}
