/*
Theme Name: dds_thejimmyrexteam.com
Author: Дмитрий Рекс
Description: Информационная тема для портала о таунхаусах и дуплексах. Архитектурный минимализм с индустриальным акцентом.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: jrtown
*/

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg: #F4F7FA;
    --bg-alt: #E8EDF3;
    --paper: #FFFFFF;
    --head: #1A2A3A;
    --foot: #0F1A24;
    --ink: #1E293B;
    --ochre: #D97747;
    --ochre-dark: #BF6136;
    --cobalt: #3B82F6;
    --muted: #7A8A9E;
    --line: #CBD5E1;
    --font-head: "Arial Narrow", "Helvetica Neue", "Roboto Condensed", Arial, sans-serif;
    --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 170px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.9) 1px, transparent 1px);
    background-size: 18px 18px;
}

body::before { left: 0; }
body::after { right: 0; }

@media (max-width: 1420px) {
    body::before,
    body::after { display: none; }
}

.site-top,
.site-main,
.site-bottom { position: relative; z-index: 1; }

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
}

p { margin: 0 0 1.1em; }

a {
    color: var(--cobalt);
    text-decoration: none;
    background-image: linear-gradient(var(--cobalt), var(--cobalt));
    background-repeat: no-repeat;
    background-size: 0 1px;
    background-position: 50% 100%;
    transition: background-size 0.25s ease, color 0.2s ease;
}

a:hover { background-size: 100% 1px; }

/* =========================================================
   2. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    padding: 0.8rem 1.7rem;
    border: 2px solid var(--ochre);
    color: var(--ochre);
    background: transparent;
    background-image: none;
    font-family: var(--font-head);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    cursor: pointer;
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--ochre);
    color: #FFFFFF;
    transform: translateX(4px);
}

.btn-solid {
    background-color: var(--ochre);
    color: #FFFFFF;
}

.btn-solid:hover {
    background-color: var(--ochre-dark);
    border-color: var(--ochre-dark);
    color: #FFFFFF;
}

.btn-ghost {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-ghost:hover {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.btn-puzzle {
    border-color: var(--ochre);
    background-color: var(--ochre);
    color: #FFFFFF;
    padding: 0.95rem 2.2rem;
    clip-path: polygon(0 0, 100% 0, 100% 60%, calc(100% - 10px) 100%, 10px 100%, 0 70%);
}

.btn-puzzle:hover {
    background-color: #FFFFFF;
    color: var(--head);
    border-color: #FFFFFF;
}

/* =========================================================
   3. Шапка
   ========================================================= */

.site-top {
    background-color: var(--head);
    border-bottom: 4px solid var(--ochre);
}

.site-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 0;
}

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

.brand-mark {
    background-image: none;
    flex: 0 0 auto;
    display: block;
}

.brand-svg { width: 62px; height: 46px; display: block; }
.brand-logo { max-height: 54px; width: auto; display: block; }

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

.brand-name {
    font-family: var(--font-head);
    color: #FFFFFF;
    font-size: 0.9rem;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-tagline {
    color: #93A6BA;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid #3D5163;
    color: #FFFFFF;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ochre);
}

.nav-toggle-label { margin-left: 4px; }

.primary-nav { flex: 0 1 auto; }

.primary-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
}

.primary-menu li { position: relative; }

.primary-menu a {
    color: #DDE6EF;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.92rem;
    background-image: linear-gradient(var(--ochre), var(--ochre));
    background-size: 0 2px;
    background-position: 50% 100%;
    padding-bottom: 4px;
}

.primary-menu a:hover { color: #FFFFFF; background-size: 100% 2px; }

.primary-menu .current-menu-item > a { color: var(--ochre); }

.primary-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.6rem 0.9rem;
    background: var(--head);
    border: 1px solid #33475A;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 210px;
    display: none;
    z-index: 20;
}

.primary-menu li:hover > .sub-menu { display: block; }
.primary-menu .sub-menu li { margin-bottom: 0.4rem; }

/* =========================================================
   4. Общие секции
   ========================================================= */

.site-main { display: block; }

.page-shell { padding: 2rem 0 3.5rem; }

.front-section {
    padding: 3.6rem 0;
    position: relative;
}

.section-alt {
    background-color: var(--bg-alt);
    background-image: linear-gradient(180deg, #FFFFFF 0%, var(--bg-alt) 100%);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

.section-head { margin-bottom: 2.4rem; position: relative; }

.section-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3.4rem;
    line-height: 1;
    color: rgba(122, 138, 158, 0.28);
    letter-spacing: 0.04em;
}

.section-title {
    font-size: 2.1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-left: 4px solid var(--ochre);
    padding-left: 1rem;
    margin: 0.2rem 0 0.8rem;
    position: relative;
}

.section-title::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -12px;
    width: 22px;
    height: 12px;
    border-left: 4px solid var(--ochre);
    border-top: 4px solid var(--ochre);
}

.section-lead {
    color: var(--muted);
    max-width: 720px;
    margin: 0;
    padding-left: 1rem;
}

.section-more { margin-top: 2rem; }

.empty-note {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.4rem 1.6rem;
    color: var(--muted);
    margin: 0 0 1.4rem;
}

/* =========================================================
   5. Hero
   ========================================================= */

.hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--head);
}

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

.hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 26, 36, 0.92) 0%, rgba(26, 42, 58, 0.78) 48%, rgba(26, 42, 58, 0.42) 100%);
}

.hero-house {
    position: absolute;
    right: 3%;
    bottom: 4%;
    width: 260px;
    height: auto;
    opacity: 0.15;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-plate {
    max-width: 720px;
    background: rgba(11, 20, 29, 0.62);
    border-left: 6px solid var(--ochre);
    padding: 2.4rem 2.4rem 2.6rem;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.82rem;
    color: var(--ochre);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4.2rem;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    background: linear-gradient(120deg, #FFFFFF 0%, #A9BACB 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    color: #C6D3DF;
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
    max-width: 620px;
}

/* =========================================================
   6. Таймлайн
   ========================================================= */

.tline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2rem;
    position: relative;
}

.tline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

.tline-item {
    position: relative;
    padding: 0 0 1.9rem 1.6rem;
    min-width: 0;
}

.tline-item:last-child { padding-bottom: 0; }

.tline-dot {
    position: absolute;
    left: -2rem;
    top: 8px;
    width: 14px;
    height: 14px;
    background: var(--paper);
    border: 3px solid var(--muted);
}

.tline-item.is-active .tline-dot { border-color: var(--ochre); background: var(--ochre); }

.tline-body {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.05);
    padding: 1.3rem 1.5rem;
    min-width: 0;
}

.tline-item.is-active .tline-body { border-color: var(--ochre); }

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

.tline-title {
    font-size: 1.24rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.tline-body p { margin: 0; color: #46586C; }

/* =========================================================
   7. Плитки рубрик
   ========================================================= */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.tile {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.06);
    padding: 2rem 1.7rem 1.8rem;
    min-width: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
    transform: translateY(-4px);
    border-color: var(--ochre);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.08);
}

.tile-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.tile-graphite .tile-strip { background: #334155; }
.tile-cobalt .tile-strip { background: var(--cobalt); }
.tile-copper .tile-strip { background: var(--ochre); }

.tile-graphite { color: #334155; }
.tile-cobalt { color: var(--cobalt); }
.tile-copper { color: var(--ochre); }

.tile-icon { width: 54px; height: 54px; display: block; margin-bottom: 1.1rem; }

.tile-title {
    font-size: 1.3rem;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.tile-text { color: #46586C; margin: 0; }

/* =========================================================
   8. Цитата
   ========================================================= */

.quote-section { padding-bottom: 4.2rem; }

.quote-plate {
    position: relative;
    margin: 0;
    background: linear-gradient(135deg, #1E293B 0%, #16212E 100%);
    border-radius: 4px;
    padding: 2.8rem 2.6rem 2.4rem 5.6rem;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
}

.quote-mark {
    position: absolute;
    left: 1.4rem;
    top: 1.4rem;
    font-family: var(--font-head);
    font-size: 5.4rem;
    line-height: 1;
    color: var(--ochre);
}

.quote-body { margin: 0; }

.quote-body p {
    margin: 0;
    color: #E4ECF3;
    font-size: 1.42rem;
    line-height: 1.55;
    font-family: var(--font-head);
}

.quote-author {
    margin-top: 1.2rem;
    color: var(--ochre);
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.82rem;
}

/* =========================================================
   9. Раскладки внутренних страниц
   ========================================================= */

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2.4rem;
    align-items: start;
}

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

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

.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    font-family: var(--font-head);
    letter-spacing: 0.04em;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ochre); }
.breadcrumbs .sep { color: var(--ochre); margin: 0 0.3rem; }

.page-head { margin-bottom: 2rem; }

.page-num {
    display: block;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    color: var(--ochre);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    border-left: 4px solid var(--ochre);
    padding-left: 1rem;
    margin: 0 0 0.8rem;
}

.page-desc { color: var(--muted); margin: 0; }

/* =========================================================
   10. Карточки записей
   ========================================================= */

.card-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--ochre);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.08);
}

.card-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ochre);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
    z-index: 2;
}

.card:hover .card-strip { transform: scaleX(1); }

.card-list .card:nth-child(3n+2) .card-strip { background: var(--cobalt); }
.card-list .card:nth-child(3n+3) .card-strip { background: #334155; }

.card-inner {
    display: flex;
    flex: 1;
    min-width: 0;
}

.card-thumb-wrap {
    flex: 0 0 260px;
    overflow: hidden;
    background: var(--bg-alt);
}

.card-thumb-wrap a { display: block; background-image: none; }

.card-thumb-wrap img {
    width: 100%;
    height: 212px;
    object-fit: cover;
    display: block;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-family: var(--font-head);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-term {
    border-left: 3px solid var(--ochre);
    padding-left: 0.5rem;
    color: var(--ink);
}

.card-title {
    font-size: 1.42rem;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
}

.card-title a { color: var(--ink); background-image: linear-gradient(var(--ochre), var(--ochre)); }
.card-title a:hover { color: var(--ochre); }

.card-excerpt { flex: 1; color: #46586C; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-link { align-self: flex-start; margin-top: 0.6rem; }

/* =========================================================
   11. Пагинация
   ========================================================= */

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

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: 0.55rem 0.9rem;
    border: 2px solid var(--line);
    color: var(--ink);
    background: var(--paper);
    background-image: none;
    font-family: var(--font-head);
    letter-spacing: 0.06em;
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--ochre);
    background: var(--ochre);
    color: #FFFFFF;
}

.pager .page-numbers.current {
    background: var(--head);
    border-color: var(--head);
    color: #FFFFFF;
}

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

/* =========================================================
   12. Запись и страница
   ========================================================= */

.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.05);
    padding: 2rem 2.1rem 2.2rem;
    margin-bottom: 2rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.entry-title {
    font-size: 2.4rem;
    text-transform: uppercase;
    border-left: 4px solid var(--ochre);
    padding-left: 1rem;
    margin: 0 0 1.2rem;
}

.entry-media { margin: 0 0 1.6rem; }

.entry-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    position: relative;
    padding-left: 1rem;
    margin-top: 1.9rem;
}

.entry-content h2 { font-size: 1.72rem; text-transform: uppercase; }
.entry-content h3 { font-size: 1.38rem; }
.entry-content h4 { font-size: 1.18rem; }

.entry-content h2::before,
.entry-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 12px;
    height: 12px;
    border-left: 3px solid var(--ochre);
    border-top: 3px solid var(--ochre);
}

.entry-content ul,
.entry-content ol { padding-left: 1.3rem; }

.entry-content li { margin-bottom: 0.5rem; }

.entry-content ul { list-style: none; padding-left: 0; }

.entry-content ul li {
    position: relative;
    padding-left: 1.5rem;
}

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 9px;
    height: 9px;
    border: 2px solid var(--cobalt);
}

.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 5px solid var(--ochre);
    border-radius: 4px;
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content img { border-radius: 4px; display: block; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.entry-content th { background: var(--bg-alt); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.05em; }

.entry-content pre {
    background: var(--head);
    color: #DCE6F0;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    border-radius: 4px;
}

.entry-tags {
    margin-top: 1.6rem;
    padding-top: 1rem;
    border-top: 2px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

.tags-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; }

.page-links { margin-top: 1.2rem; font-family: var(--font-head); }

/* =========================================================
   13. Сайдбар и виджеты
   ========================================================= */

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.05);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-left: 4px solid var(--ochre);
    padding-left: 0.7rem;
    margin: 0 0 1rem;
    color: var(--ink);
}

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

.sidebar .widget li {
    padding: 0.5rem 0 0.5rem 1.1rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
    color: var(--ink);
}

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 7px;
    height: 7px;
    border: 2px solid var(--ochre);
}

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

.sidebar .widget a { color: var(--ink); background-image: linear-gradient(var(--ochre), var(--ochre)); }
.sidebar .widget a:hover { color: var(--ochre); }

.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.8rem; }
.sidebar .widget p { color: #46586C; }

/* =========================================================
   14. Подвал
   ========================================================= */

.site-bottom {
    background-color: var(--foot);
    color: #C3D0DC;
    padding: 3rem 0 2rem;
    border-top: 4px solid var(--ochre);
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

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

.site-bottom .widget { margin-bottom: 1.6rem; color: #C3D0DC; }

.site-bottom .widget-title {
    color: #FFFFFF;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-left: 4px solid var(--ochre);
    padding-left: 0.7rem;
    margin-bottom: 0.9rem;
}

.site-bottom .widget p { color: #A9BACB; }

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

.site-bottom .widget li {
    padding: 0.4rem 0 0.4rem 1.1rem;
    position: relative;
    color: #C3D0DC;
}

.site-bottom .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95em;
    width: 7px;
    height: 7px;
    border: 2px solid var(--ochre);
}

.site-bottom .widget a,
.site-bottom a {
    color: #D5E0EA;
    background-image: linear-gradient(var(--ochre), var(--ochre));
}

.site-bottom .widget a:hover,
.site-bottom a:hover { color: #FFFFFF; }

.footer-line {
    position: relative;
    height: 2px;
    background: #26384A;
    margin: 1.4rem 0 1.4rem;
}

.footer-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--foot);
    border: 2px solid var(--ochre);
}

.footer-mark::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--ochre);
}

.copyright {
    margin: 0;
    color: #8FA1B3;
    font-size: 0.84rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   15. Формы поиска и комментариев
   ========================================================= */

.search-form { margin: 1.4rem 0; }

.search-label {
    display: block;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.search-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.72rem 0.9rem;
    border: 2px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.search-input:focus { outline: none; border-color: var(--cobalt); }

.comments-area {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.05);
    padding: 1.8rem 2rem 2rem;
}

.comments-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    border-left: 4px solid var(--ochre);
    padding-left: 0.8rem;
}

.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children { margin-left: 1.4rem; padding-left: 1rem; border-left: 2px solid var(--line); }

.comment-item {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
    background: var(--bg);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.comment-author { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; }
.comment-date { color: var(--muted); font-size: 0.82rem; }
.comment-text p:last-child { margin-bottom: 0.4rem; }
.comment-wait { color: var(--ochre); font-size: 0.9rem; }
.comment-reply a { font-size: 0.86rem; }

.comment-form label {
    display: block;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.comment-form textarea { min-height: 150px; }

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--cobalt); }

.comment-form .form-submit { margin-top: 1rem; }

/* =========================================================
   16. 404
   ========================================================= */

.notfound {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.05);
    padding: 2.4rem 2.2rem 2.6rem;
}

.notfound-code {
    display: block;
    font-family: var(--font-head);
    font-size: 4.6rem;
    line-height: 1;
    color: rgba(122, 138, 158, 0.3);
}

.notfound-text { color: #46586C; max-width: 640px; }

/* =========================================================
   17. Cookie-баннер
   ========================================================= */

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--head);
    border-top: 4px solid var(--ochre);
    padding: 1rem 0;
}

.cookie-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-text {
    margin: 0;
    color: #C9D6E2;
    font-size: 0.9rem;
    flex: 1 1 320px;
    min-width: 0;
}

/* =========================================================
   18. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    .hero-title { font-size: 3rem; }
    .hero { min-height: 460px; }

    .nav-toggle { display: inline-flex; }

    .primary-nav {
        flex: 1 1 100%;
        display: none;
    }

    .primary-nav.is-open { display: block; }

    .primary-menu {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.8rem 0 0.3rem;
        border-top: 2px solid #2C4054;
    }

    .primary-menu a { display: block; padding: 0.55rem 0; }

    .primary-menu .sub-menu { position: static; display: block; border: none; padding: 0 0 0 1rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }

    .layout-single { width: 100%; }

    .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

    .hero { min-height: 420px; }
    .hero-title { font-size: 2.2rem; }
    .hero-plate { padding: 1.7rem 1.4rem 1.8rem; }
    .hero-house { width: 150px; opacity: 0.12; }

    .front-section { padding: 2.4rem 0; }

    .section-title { font-size: 1.6rem; }
    .section-num { font-size: 2.6rem; }

    .page-title { font-size: 1.8rem; }
    .entry-title { font-size: 1.7rem; }

    .entry { padding: 1.4rem 1.2rem 1.6rem; }
    .comments-area { padding: 1.3rem 1.2rem 1.5rem; }
    .notfound { padding: 1.6rem 1.3rem 1.8rem; }
    .empty-note { padding: 1.1rem 1.2rem; }

    .quote-plate { padding: 2.4rem 1.4rem 1.8rem 1.5rem; }
    .quote-mark { position: static; display: block; font-size: 3.4rem; margin-bottom: -0.6rem; }
    .quote-body p { font-size: 1.16rem; }

    .tile-grid { grid-template-columns: minmax(0, 1fr); }
    .tile { padding: 1.7rem 1.3rem 1.5rem; }

    .footer-grid { grid-template-columns: minmax(0, 1fr); }

    .tline { padding-left: 1.5rem; }
    .tline-item { padding-left: 1rem; }
    .tline-dot { left: -1.5rem; }
    .tline-body { padding: 1.1rem 1.2rem; }

    .card-inner { flex-direction: column; }

    .card-thumb-wrap {
        flex: none;
        width: 100%;
    }

    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-body { padding: 1.2rem 1.2rem 1.3rem; }
    .card-title { font-size: 1.24rem; }

    .sidebar .widget { padding: 1.2rem 1.2rem; }

    .cookie-inner { flex-direction: column; align-items: flex-start; }
}
