/*
Theme Name: dds_tvinternetbundled.com
Author: Илья Кравцов
Description: Контентный сайт о планировках квартир, ремонте и организации жилого пространства с исторически естественным уклоном в инженерную подготовку квартиры под связь, технику и домашний комфорт
Version: 1.1
Text Domain: dds_tvi
*/

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
    --color-bg: #f4f1ea;
    --color-paper: #faf8f3;
    --color-text: #2a2a2a;
    --color-text-soft: #3e3e3c;
    --color-muted: #6b6b66;
    --color-accent: #4f6b7a;
    --color-accent-dark: #3a5260;
    --color-accent-soft: rgba(79, 107, 122, 0.12);
    --color-border: #d8d3c8;
    --color-border-strong: #b8b0a0;
    --color-oak: #c9b896;
    --color-graphite: #2c2c2c;
    --color-white: #ffffff;

    --color-electric: #c4554d;
    --color-water: #4a7ba6;
    --color-vent: #6b8c5f;
    --color-media: #d4a84a;

    --font-head: 'Oswald', 'PT Sans Narrow', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
    --font-body: 'PT Serif', 'Source Serif Pro', Georgia, 'Times New Roman', serif;

    --radius: 4px;
    --shadow-card: 0 6px 14px -6px rgba(40, 40, 40, 0.22);
    --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.04);

    --container: 1200px;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        radial-gradient(rgba(90, 80, 60, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(90, 80, 60, 0.04) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-graphite);
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
}
h1 { font-size: 2.1rem; margin-top: 0.4em; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1em; }

hr {
    border: none;
    border-top: 1px dashed var(--color-border-strong);
    margin: 2em 0;
}

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid var(--color-accent);
    background: rgba(79, 107, 122, 0.05);
    font-style: italic;
    color: var(--color-text-soft);
}

code {
    background: rgba(44, 44, 44, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.92em;
}

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.3em; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--color-border-strong);
    background: var(--color-paper);
}
th, td {
    border: 1px solid var(--color-border-strong);
    padding: 0.6em 0.9em;
    text-align: left;
    vertical-align: top;
}
th {
    background: rgba(79, 107, 122, 0.08);
    font-family: var(--font-head);
    font-weight: 600;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.wrapper {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.site-main { padding: 36px 0 64px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
}

.layout-wide .content-area { max-width: 85%; margin: 0 auto; }
.layout-narrow .content-area { max-width: 85%; margin: 0 auto; }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}
.site-header::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--color-electric) 0 15%,
        transparent 15% 18%,
        var(--color-water) 18% 38%,
        transparent 38% 42%,
        var(--color-vent) 42% 65%,
        transparent 65% 68%,
        var(--color-media) 68% 100%
    );
    opacity: 0.55;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 24px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex: 0 1 auto;
    min-width: 0;
}
.site-brand:hover { color: inherit; }
.brand-logo {
    width: 52px;
    height: 52px;
    display: block;
    flex-shrink: 0;
}
.brand-text { min-width: 0; }
.site-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-graphite);
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-description {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin: 2px 0 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Primary navigation */
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 26px;
}
.primary-nav li { margin: 0; }
.primary-nav a {
    font-family: var(--font-head);
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-graphite);
    text-decoration: none;
    padding: 6px 2px;
    position: relative;
    transition: color .2s ease;
}
.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--color-accent); }
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    padding: 8px 10px;
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-graphite);
    margin: 4px 0;
}

/* ================================================================
   BREADCRUMBS
   ================================================================ */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin: 0 0 20px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-border);
}
.breadcrumbs a { color: var(--color-accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs-sep {
    display: inline-block;
    margin: 0 8px;
    color: var(--color-border-strong);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 11px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--color-graphite);
    background: var(--color-graphite);
    color: var(--color-white);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-white);
    transform: scale(1.02);
    box-shadow: 0 4px 12px -4px rgba(79, 107, 122, 0.4);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.4);
    color: var(--color-graphite);
    border-color: var(--color-graphite);
}
.btn-ghost:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ================================================================
   CARDS (post cards)
   ================================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin: 24px 0 36px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--color-paper);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 0 -4px rgba(40, 40, 40, 0.14);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
}
.card::before {
    content: "";
    position: absolute;
    top: -1px; right: -1px;
    width: 28px; height: 28px;
    background: var(--color-bg);
    border-left: 1px dashed var(--color-border-strong);
    border-bottom: 1px dashed var(--color-border-strong);
    transform: rotate(45deg) translate(8px, -14px);
    transform-origin: top right;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 0 -6px rgba(79, 107, 122, 0.3);
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e6dfd1, #cfc7b5);
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-meta {
    font-family: var(--font-head);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    margin: 0 0 8px;
}
.card-meta a { color: var(--color-accent); text-decoration: none; }
.card-meta a:hover { text-decoration: underline; }
.card-title {
    font-family: var(--font-head);
    font-size: 1.18rem;
    margin: 0 0 10px;
    line-height: 1.3;
}
.card-title a { color: var(--color-graphite); text-decoration: none; }
.card-title a:hover { color: var(--color-accent); }
.card-excerpt {
    color: var(--color-text-soft);
    font-size: 0.96rem;
    margin-bottom: 16px;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-actions { margin-top: auto; }

/* Horizontal card variant (for sidebar or wide layouts) */
.card-row {
    display: flex;
    flex-direction: row;
    background: var(--color-paper);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 0 -4px rgba(40, 40, 40, 0.14);
    margin-bottom: 20px;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: #e6dfd1;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-row .card-body { padding: 20px 24px; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar { padding-top: 4px; }
.widget {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    position: relative;
}
.widget::before {
    content: "";
    position: absolute;
    top: 0; left: 20px;
    width: 40px; height: 3px;
    background: var(--color-accent);
}
.widget-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-graphite);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--color-border);
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 6px 0;
    border-bottom: 1px dotted var(--color-border);
    margin: 0;
}
.widget li:last-child { border-bottom: none; }
.widget a { text-decoration: none; color: var(--color-text-soft); }
.widget a:hover { color: var(--color-accent); }

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-white);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.search-form button {
    font-family: var(--font-head);
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--color-graphite);
    background: var(--color-graphite);
    color: var(--color-white);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: background .2s ease, transform .2s ease;
}
.search-form button:hover { background: var(--color-accent); transform: scale(1.02); }

/* ================================================================
   FRONT PAGE
   ================================================================ */
.hero {
    background:
        linear-gradient(135deg, rgba(79, 107, 122, 0.1), rgba(201, 184, 150, 0.1)),
        var(--color-paper);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
    padding: 48px 44px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px dashed rgba(79, 107, 122, 0.3);
    pointer-events: none;
}
.hero-tag {
    display: inline-block;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--color-accent);
    padding: 5px 12px;
    background: var(--color-accent-soft);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.hero h1 {
    margin: 0 0 14px;
    font-size: 2.4rem;
    max-width: 780px;
}
.hero p {
    font-size: 1.08rem;
    max-width: 700px;
    color: var(--color-text-soft);
    margin-bottom: 22px;
}

.section-block {
    margin: 44px 0;
    padding: 36px 32px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    position: relative;
}
.section-block.block-marked::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    width: 4px;
    height: 34px;
    background: var(--color-accent);
}
.section-title {
    font-family: var(--font-head);
    font-size: 1.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 10px;
    color: var(--color-graphite);
}
.section-lede {
    color: var(--color-muted);
    font-size: 1rem;
    margin: 0 0 24px;
    max-width: 780px;
}

/* Engineering grid (planning blocks) */
.eng-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.eng-cell {
    position: relative;
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
    padding: 22px 20px;
    background: var(--color-bg);
    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.eng-cell:hover {
    border-color: var(--color-accent);
    background: var(--color-white);
    transform: translateY(-2px);
}
.eng-cell-marks {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; gap: 4px;
    opacity: 0;
    transition: opacity .25s ease;
}
.eng-cell:hover .eng-cell-marks { opacity: 1; }
.eng-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block;
}
.eng-dot-e { background: var(--color-electric); }
.eng-dot-w { background: var(--color-water); }
.eng-dot-v { background: var(--color-vent); }
.eng-dot-m { background: var(--color-media); }
.eng-cell h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}
.eng-cell p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: 0.96rem;
}

/* Steps */
.steps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    counter-reset: step;
}
.step-item {
    counter-increment: step;
    padding: 20px 20px 20px 54px;
    position: relative;
    border-left: 2px solid var(--color-accent);
    background: rgba(79, 107, 122, 0.04);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.step-item::before {
    content: counter(step);
    position: absolute;
    left: 14px; top: 18px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--color-graphite);
    color: var(--color-white);
    font-family: var(--font-head);
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
}
.step-item h4 { margin: 0 0 6px; font-size: 1rem; }
.step-item p { margin: 0; color: var(--color-text-soft); font-size: 0.93rem; }

/* Material legend */
.legend-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.legend-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.legend-chip-mark {
    width: 14px; height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}
.legend-chip strong {
    display: block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-graphite);
}
.legend-chip span {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ================================================================
   SINGLE POST
   ================================================================ */
.post-header {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px dashed var(--color-border-strong);
}
.post-title {
    font-size: 2.1rem;
    margin: 0 0 12px;
    line-height: 1.2;
}
.post-meta {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.post-meta a { color: var(--color-accent); text-decoration: none; }
.post-thumbnail {
    margin: 0 0 26px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}
.post-content {
    font-size: 1.05rem;
}
.post-content img {
    border-radius: var(--radius);
    margin: 1.2em 0;
}
.post-footer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px dashed var(--color-border-strong);
}

/* Reading progress (Wi-Fi bars) */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 50;
    pointer-events: none;
}
.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        to right,
        var(--color-vent),
        var(--color-media),
        var(--color-accent)
    );
    transition: width .05s linear;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 10px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-family: var(--font-head);
    font-size: 0.95rem;
    color: var(--color-graphite);
    background: var(--color-paper);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pagination .page-numbers:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    transform: scale(1.04);
}
.pagination .page-numbers.current {
    background: var(--color-graphite);
    color: var(--color-white);
    border-color: var(--color-graphite);
}
.pagination .page-numbers.dots { border: none; background: transparent; }

/* ================================================================
   COMMENTS
   ================================================================ */
.comments-section {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 2px dashed var(--color-border-strong);
}
.comments-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 20px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.comment-list li { margin: 0 0 18px; }
.comment-body {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 20px;
}
.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-graphite);
}
.comment-date {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-left: 8px;
}
.comment-text { margin: 8px 0 0; }
.comment-children {
    list-style: none;
    margin: 14px 0 0 22px;
    padding-left: 16px;
    border-left: 2px dashed var(--color-border);
}
.comment-form p { margin-bottom: 14px; }
.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
    color: var(--color-muted);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-white);
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--color-text);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.comment-form .submit {
    font-family: var(--font-head);
    padding: 11px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--color-graphite);
    background: var(--color-graphite);
    color: var(--color-white);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: background .2s ease, transform .2s ease;
}
.comment-form .submit:hover { background: var(--color-accent); transform: scale(1.02); }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: var(--color-graphite);
    color: #d0cdc7;
    padding: 50px 0 22px;
    margin-top: 48px;
    position: relative;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--color-electric) 0 22%,
        transparent 22% 26%,
        var(--color-water) 26% 48%,
        transparent 48% 52%,
        var(--color-vent) 52% 74%,
        transparent 74% 78%,
        var(--color-media) 78% 100%
    );
}
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 32px;
}
.site-footer .widget {
    background: transparent;
    border: none;
    padding: 0;
}
.site-footer .widget::before { display: none; }
.site-footer .widget-title {
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1rem;
}
.site-footer .widget a { color: #d0cdc7; }
.site-footer .widget a:hover { color: var(--color-oak); }
.site-footer .widget li { border-bottom: 1px dotted rgba(255, 255, 255, 0.1); }
.site-footer .widget li:last-child { border-bottom: none; }

.site-copy {
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 18px;
    font-size: 0.85rem;
    color: #a8a49d;
    text-align: center;
}

/* ================================================================
   COOKIE BANNER
   ================================================================ */
.cookie-banner {
    position: fixed;
    left: 20px; right: 20px; bottom: 20px;
    background: var(--color-graphite);
    color: var(--color-white);
    border-radius: var(--radius);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text {
    flex: 1;
    font-size: 0.93rem;
    line-height: 1.5;
}
.cookie-banner-text a { color: var(--color-oak); }
.cookie-banner-btn {
    font-family: var(--font-head);
    padding: 9px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--color-white);
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.cookie-banner-btn:hover {
    background: var(--color-white);
    color: var(--color-graphite);
    transform: scale(1.02);
}

/* ================================================================
   404
   ================================================================ */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}
.error-404 .error-code {
    font-family: var(--font-head);
    font-size: 7rem;
    color: var(--color-accent);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}
.error-404 h1 {
    font-size: 1.8rem;
    margin: 10px 0 16px;
}
.error-404 p {
    color: var(--color-text-soft);
    max-width: 540px;
    margin: 0 auto 26px;
}
.error-404 .search-form {
    max-width: 420px;
    margin: 0 auto 22px;
}

/* ================================================================
   UTIL
   ================================================================ */
.alignleft { float: left; margin: 0.3em 1.2em 0.8em 0; }
.alignright { float: right; margin: 0.3em 0 0.8em 1.2em; }
.aligncenter { display: block; margin: 1em auto; }
.clear::after { content: ""; display: table; clear: both; }
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px,1px,1px,1px);
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .header-inner { flex-wrap: wrap; }
    .nav-toggle { display: block; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
        padding-top: 14px;
        border-top: 1px dashed var(--color-border);
        margin-top: 14px;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul {
        flex-direction: column;
        gap: 4px;
    }
    .primary-nav a {
        display: block;
        padding: 10px 4px;
        border-bottom: 1px dotted var(--color-border);
    }

    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .layout-wide .content-area,
    .layout-narrow .content-area { max-width: 100%; }

    .hero { padding: 34px 24px; }
    .hero h1 { font-size: 1.8rem; }
    .section-block { padding: 26px 22px; }
    .section-title { font-size: 1.35rem; }

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

@media (max-width: 600px) {
    body { font-size: 16px; }
    .wrapper { padding: 0 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.3rem; }

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

    .card-row {
        flex-direction: column;
    }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a {
        position: static;
    }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .hero { padding: 26px 18px; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 1rem; }

    .eng-grid { grid-template-columns: 1fr; }
    .steps-row { grid-template-columns: 1fr; }

    .cookie-banner {
        flex-direction: column;
        left: 12px; right: 12px; bottom: 12px;
        padding: 14px 16px;
    }
    .cookie-banner-btn { width: 100%; }

    .btn {
        padding: 10px 18px;
        font-size: 0.88rem;
    }

    .error-404 .error-code { font-size: 5rem; }

    .site-brand { gap: 10px; }
    .brand-logo { width: 42px; height: 42px; }
    .site-title { font-size: 1rem; }
    .site-description { font-size: 0.75rem; }
}
