/*
Theme Name: dds_wark3d.com
Theme URI: https://wark3d.com/
Author: Alex Mercer
Description: Dark glassmorphism theme for a blog about 3D visualization of real estate and architecture: tutorials, trend analysis and project stories.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wark3d
*/

/* ---------- Токены ---------- */
:root {
    --bg: #14181f;
    --bg-alt: #1b212b;
    --bg-head: #10141a;
    --bg-foot: #0d1015;
    --bg-side: #181d25;
    --text: #e8edf2;
    --accent: #2ec4b6;
    --accent-2: #7b8cde;
    --muted: #7d8a99;
    --soft: #a3aebb;
    --line: rgba(255, 255, 255, 0.08);
    --glass: rgba(27, 33, 43, 0.62);
    --glow: rgba(46, 196, 182, 0.35);
    --font-head: "Space Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --grid-line: rgba(255, 255, 255, 0.02);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 420'%3E%3Cg fill='none' stroke='%232ec4b6' stroke-opacity='0.055' stroke-width='1.2'%3E%3Cpath d='M40 300 L260 190 L480 300 L260 410 Z'/%3E%3Cpath d='M40 300 L40 110 L260 0 L260 190'/%3E%3Cpath d='M480 300 L480 110 L260 0'/%3E%3Cpath d='M40 110 L260 190 L480 110'/%3E%3Cpath d='M95 272 L315 382 M150 245 L370 355 M205 218 L425 328 M95 272 L95 82 M150 245 L150 55 M205 218 L205 27 M315 382 L480 300 M370 355 L480 300'/%3E%3Cpath d='M40 205 L260 300 L480 205 M40 158 L260 245 L480 158'/%3E%3C/g%3E%3Cg fill='%232ec4b6' fill-opacity='0.08'%3E%3Ccircle cx='260' cy='0' r='3'/%3E%3Ccircle cx='40' cy='110' r='3'/%3E%3Ccircle cx='480' cy='110' r='3'/%3E%3Ccircle cx='260' cy='190' r='3'/%3E%3Ccircle cx='40' cy='300' r='3'/%3E%3Ccircle cx='480' cy='300' r='3'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 560px auto, 40px 40px, 40px 40px;
    background-position: right -80px top 70px, 0 0, 0 0;
    background-repeat: no-repeat, repeat, repeat;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
figure { margin: 0; }
p, li, dd, blockquote, h1, h2, h3, h4, h5, h6, .card-title, .brand-text {
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1.15em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 1.6em 0 0.6em;
    color: var(--text);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); text-shadow: 0 0 26px rgba(46, 196, 182, 0.22); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-shadow: 0 0 18px rgba(46, 196, 182, 0.14); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

/* ---------- Ссылки ---------- */
a {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.3s ease, text-shadow 0.3s ease, color 0.2s ease;
}
a:hover {
    background-size: 100% 1px;
    text-shadow: 0 0 12px var(--glow);
}
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--accent);
    color: #0d1015;
    background-image: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Контейнер ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.front .shell { width: min(85%, 1180px); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    background-image: none;
    border: 1.5px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: scale(1.03); background-size: auto; text-shadow: none; }
.btn-solid { background-color: var(--accent); color: #0d1015; border-color: var(--accent); }
.btn-solid:hover { color: #0d1015; box-shadow: 0 0 24px rgba(46, 196, 182, 0.45); }
.btn-ghost { background-color: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background-color: var(--accent); color: #0d1015; box-shadow: 0 0 24px rgba(46, 196, 182, 0.4); }

/* ---------- Шапка ---------- */
.horizon { height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.masthead {
    background: var(--bg-head);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 20;
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text);
    background-image: none;
    flex: 1 1 auto;
    min-width: 0;
}
.brand:hover { text-shadow: none; }
.brand-mark { flex: 0 0 auto; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 640px; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand:hover .brand-name { color: var(--accent); }
.brand-desc {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.primary-nav { flex: 0 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.nav-list li { position: relative; }
.nav-list a {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 500;
    background-image: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
    color: var(--accent);
    background-color: rgba(46, 196, 182, 0.08);
}
.nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: none;
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu { display: block; }
.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font: 600 0.95rem var(--font-head);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    position: relative;
    transition: transform 0.25s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Заголовки секций ---------- */
.sec-head { margin-bottom: 2.6rem; }
.sec-head-split { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.sec-title {
    position: relative;
    margin: 0;
    padding: 0.1em 0 0.1em 1.7rem;
    border-left: 3px solid var(--accent);
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0.7rem;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px 2px var(--glow);
}
.sec-lead { margin: 0.9rem 0 0; max-width: 640px; color: var(--soft); }
.entry-content h2 { position: relative; padding-left: 1.1rem; }
.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px 2px var(--glow);
}
@keyframes wark3d-vertex {
    0%, 100% { box-shadow: 0 0 6px 1px var(--glow); transform: scale(1); }
    50% { box-shadow: 0 0 16px 5px rgba(46, 196, 182, 0.55); transform: scale(1.35); }
}
.sec-title:hover::before,
.entry-content h2:hover::before { animation: wark3d-vertex 1.3s ease-in-out infinite; }

/* ---------- Координатная ось-разделитель ---------- */
.axis-rule {
    position: relative;
    width: min(85%, 1180px);
    height: 12px;
    margin: 0 auto;
    background: repeating-linear-gradient(90deg, rgba(125, 138, 153, 0.45) 0 6px, transparent 6px 13px) center / calc(100% - 20px) 1px no-repeat;
}
.axis-rule::before, .axis-rule::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
}
.axis-rule::before { left: 0; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.axis-rule::after { right: 0; background: var(--accent-2); box-shadow: 0 0 8px rgba(123, 140, 222, 0.4); }

/* ---------- Секции главной ---------- */
.band { padding: 90px 0; }
.band-alt, .band-glow {
    background-color: var(--bg-alt);
    background-image:
        linear-gradient(180deg, rgba(46, 196, 182, 0.05), rgba(46, 196, 182, 0) 200px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
}
.band-glow {
    background-image:
        radial-gradient(ellipse 60% 70% at 50% 50%, rgba(46, 196, 182, 0.13), rgba(46, 196, 182, 0) 70%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(480px, 74vh, 720px);
    display: flex;
    align-items: center;
    background: #0d1015;
    border-bottom: 1px solid var(--line);
}
.hero-media {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(13, 16, 21, 0.92) 0%, rgba(13, 16, 21, 0.72) 45%, rgba(13, 16, 21, 0.25) 100%),
        linear-gradient(0deg, rgba(20, 24, 31, 1) 0%, rgba(20, 24, 31, 0) 35%);
}
.hero-wire {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 300px;
    opacity: 0.14;
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: 6rem 0 5rem; }
.hero-title {
    margin: 0 0 1.2rem;
    max-width: 760px;
    font-size: clamp(2.3rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.08;
    text-shadow: 0 0 30px rgba(46, 196, 182, 0.35);
}
.hero-lead { max-width: 580px; margin: 0 0 2rem; color: var(--soft); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Статистика */
.facts-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fact {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.5rem 1.8rem;
    min-width: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.2rem, 3.6vw, 2.9rem);
    line-height: 1;
    white-space: nowrap;
    color: var(--accent);
    text-shadow: 0 0 22px rgba(46, 196, 182, 0.45);
}
.fact-label { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* Zigzag */
.zig { display: block; }
.zig-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
}
.zig-row-flip .zig-media { order: 2; }
.zig-media {
    padding: 0.6rem;
    border-radius: 16px;
    background: rgba(20, 24, 31, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 32px rgba(46, 196, 182, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    min-width: 0;
}
.zig-media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 10px; }
.zig-text { min-width: 0; }
.zig-text h3 { margin-top: 0; font-size: 1.55rem; }
.zig-text p { color: var(--soft); }
.zig-text p:last-child { margin-bottom: 0; }
.zig-link {
    position: relative;
    width: 1px;
    height: 72px;
    margin: 1.6rem auto;
    background: repeating-linear-gradient(180deg, rgba(125, 138, 153, 0.5) 0 5px, transparent 5px 11px);
}
.zig-link::before, .zig-link::after {
    content: "";
    position: absolute;
    left: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--glow);
}
.zig-link::before { top: -4px; }
.zig-link::after { bottom: -4px; background: var(--accent-2); }

/* FAQ */
.faq-list { max-width: 880px; }
.faq-item {
    margin-bottom: 0.9rem;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-left: 3px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item[open] {
    border-left-color: var(--accent);
    box-shadow: 0 0 28px rgba(46, 196, 182, 0.12);
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1.35; min-width: 0; }
.faq-icon { position: relative; flex: 0 0 18px; width: 18px; height: 18px; transition: transform 0.3s ease; }
.faq-icon::before, .faq-icon::after {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 6px var(--glow);
    transition: transform 0.3s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding: 0 1.4rem 1.3rem; color: var(--soft); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Карточки записей ---------- */
.card-grid { display: grid; gap: 1.6rem; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 30px rgba(46, 196, 182, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(46, 196, 182, 0.5);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 34px rgba(46, 196, 182, 0.18);
}
.card-thumb { position: relative; overflow: hidden; }
.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(10, 13, 18, 0) 50%, rgba(10, 13, 18, 0.65) 100%);
}
.card-thumb a { display: block; background-image: none; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.4rem;
}
.card-tag {
    display: inline-block;
    margin-bottom: 0.7rem;
    padding: 0.18rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(123, 140, 222, 0.45);
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 500;
    background-image: none;
}
.card-tag:hover { color: #0d1015; background-color: var(--accent-2); text-shadow: none; }
.card-title { margin: 0 0 0.6rem; font-size: 1.22rem; line-height: 1.3; width: 100%; }
.card-title a { color: var(--text); background-image: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: rgba(232, 237, 242, 0.76); font-size: 0.97rem; line-height: 1.6; width: 100%; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: 0.9rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}
.card-date { color: var(--muted); }
.card-more { font-weight: 600; }
.empty-note { color: var(--soft); }
.empty-block .search-form { margin-top: 1rem; }

/* ---------- Раскладки внутренних страниц ---------- */
.site-main { display: block; }
.site-main:not(.front) { padding-bottom: 90px; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.crumbs {
    padding: 1.6rem 0 1.4rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.crumbs a { color: var(--accent); }
.crumbs-sep { margin: 0 0.35rem; color: var(--muted); }
.crumbs-current { color: var(--soft); }

.page-head { margin-bottom: 2.2rem; }
.page-title { margin: 0 0 0.6rem; }
.page-lead { color: var(--soft); max-width: 680px; margin: 0; }

/* ---------- Запись и страница ---------- */
.entry-head { margin-bottom: 1.8rem; }
.entry-title { margin: 0 0 0.8rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; color: var(--muted); font-size: 0.92rem; }
.entry-meta .card-tag { margin: 0; }
.entry-cover { margin: 0 0 2rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.entry-cover img { width: 100%; height: auto; }
.entry-content { font-size: 1.07rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--accent); }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); }
.entry-content blockquote,
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote {
    margin: 1.8em 0;
    padding: 1.3rem 1.6rem;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.1), rgba(46, 196, 182, 0));
    color: var(--text);
    font-size: 1.1rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content cite { display: block; margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); font-style: normal; }
.entry-content pre {
    overflow-x: auto;
    padding: 1.1rem 1.3rem;
    border-radius: 10px;
    background: #0d1015;
    border: 1px solid var(--line);
    font-size: 0.92rem;
}
.entry-content code { font-size: 0.92em; padding: 0.1em 0.35em; border-radius: 5px; background: rgba(255, 255, 255, 0.06); }
.entry-content pre code { padding: 0; background: none; }
.entry-content hr { border: 0; height: 1px; margin: 2.4em 0; background: repeating-linear-gradient(90deg, rgba(125, 138, 153, 0.45) 0 6px, transparent 6px 13px); }
.entry-content .wp-block-table, .entry-content .table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.97rem; border: 1px solid rgba(255, 255, 255, 0.16); }
th, td { padding: 0.65rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.16); text-align: left; vertical-align: top; }
th { background: rgba(46, 196, 182, 0.08); font-family: var(--font-head); font-weight: 600; }
.page-links { margin-top: 1.6rem; color: var(--muted); }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.entry-tags a { padding: 0.25rem 0.7rem; border-radius: 6px; border: 1px solid rgba(123, 140, 222, 0.4); color: var(--accent-2); font-size: 0.88rem; background-image: none; }
.entry-tags a:hover { background-color: rgba(123, 140, 222, 0.12); }
.entry-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2.8rem;
}
.entry-nav-link {
    display: block;
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--glass);
    color: var(--text);
    background-image: none;
    font-family: var(--font-head);
    font-weight: 600;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.entry-nav-link span { display: block; margin-bottom: 0.3rem; font: 500 0.82rem var(--font-body); color: var(--muted); }
.entry-nav-link:hover { border-color: rgba(46, 196, 182, 0.5); box-shadow: 0 0 24px rgba(46, 196, 182, 0.14); text-shadow: none; }
.entry-nav-next { text-align: right; grid-column: 2; }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    border-radius: 14px;
    background: var(--bg-side);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
}
.widget { margin-bottom: 2rem; }
.widget:last-child { margin-bottom: 0; }
.widget-title {
    margin: 0 0 1rem;
    padding-left: 0.9rem;
    border-left: 3px solid var(--accent);
    font-size: 1.1rem;
    color: var(--text);
    text-shadow: none;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.55rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); line-height: 1.45; }
.widget li:last-child { border-bottom: 0; }
.sidebar .widget, .sidebar .widget p { color: var(--text); }
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .post-date, .sidebar .rss-date { display: block; color: var(--muted); font-size: 0.82rem; }

/* ---------- Подвал ---------- */
.basement {
    background: var(--bg-foot);
    border-top: 1px solid var(--line);
    padding-top: 2.2rem;
    color: #c4ccd5;
}
.basement .axis-rule { margin-bottom: 3rem; }
.basement-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding-bottom: 2.6rem;
}
.basement-col { min-width: 0; }
.basement .widget-title { color: var(--text); }
.basement .widget, .basement .widget p, .basement .textwidget { color: #c4ccd5; font-size: 0.95rem; }
.basement .widget a { color: #c4ccd5; }
.basement .widget a:hover { color: var(--accent); }
.basement .widget li { border-bottom-color: rgba(255, 255, 255, 0.07); }
.basement .post-date { color: var(--muted); }
.basement-legal {
    padding: 1.3rem 0 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.88rem;
}
.basement-legal p { margin: 0; }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.8rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--glass);
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 500;
    background-image: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px rgba(46, 196, 182, 0.2); text-shadow: none; }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #0d1015; box-shadow: 0 0 18px rgba(46, 196, 182, 0.35); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.3rem; color: var(--muted); }

/* ---------- Поиск ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 520px; }
.search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(13, 16, 21, 0.7);
    color: var(--text);
    font: inherit;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { border-color: var(--accent); }

/* ---------- 404 ---------- */
.lost { text-align: left; }
.lost-code {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    text-shadow: 0 0 40px rgba(46, 196, 182, 0.25);
}
.lost .search-form { margin: 1.8rem 0; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 3.2rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.comments-title { margin-top: 0; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 1.6rem; border-left: 1px dashed rgba(255, 255, 255, 0.12); }
.note-body {
    margin-bottom: 1rem;
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--line);
}
.note-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.note-head img { border-radius: 50%; }
.note-who { display: flex; flex-direction: column; line-height: 1.3; }
.note-author { font-family: var(--font-head); font-weight: 600; }
.note-date { font-size: 0.82rem; color: var(--muted); }
.note-pending { color: var(--accent-2); font-size: 0.9rem; }
.note-text p:last-child { margin-bottom: 0.4rem; }
.note-reply a { font-size: 0.88rem; font-weight: 600; }
.comment-respond {
    margin-top: 2rem;
    padding: 1.6rem 1.7rem;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--line);
}
.comment-reply-title { margin-top: 0; font-size: 1.4rem; }
.comment-reply-title small { margin-left: 0.6rem; font-size: 0.85rem; }
.comment-notes, .logged-in-as { color: var(--muted); font-size: 0.9rem; }
.comment-form label { display: block; margin-bottom: 0.35rem; font-size: 0.92rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(13, 16, 21, 0.7);
    color: var(--text);
    font: inherit;
}
.comment-form-cookies-consent { display: flex; gap: 0.6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; color: var(--soft); }
.comment-form .submit {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #0d1015;
    font: 600 1rem var(--font-head);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.comment-form .submit:hover { transform: scale(1.03); box-shadow: 0 0 24px rgba(46, 196, 182, 0.45); }
.req { color: var(--accent); }
.comments .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 1.4rem;
    border-radius: 14px;
    background: rgba(16, 20, 26, 0.9);
    border: 1px solid rgba(46, 196, 182, 0.35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(46, 196, 182, 0.12);
}
.cookie-text { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text); min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- WordPress ---------- */
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, .gallery-caption { font-size: 0.88rem; color: var(--muted); }
.sticky .card-title a::before { content: "★ "; color: var(--accent); }
.bypostauthor > .note-body { border-color: rgba(46, 196, 182, 0.3); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .primary-nav { display: none; flex: 1 1 100%; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0.2rem; padding: 0.4rem 0 0.6rem; border-top: 1px solid var(--line); }
    .nav-list .sub-menu { position: static; display: block; border: 0; padding-left: 1rem; background: none; }

    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
    .fact:nth-child(3) { border-left: 0; padding-left: 0; }
    .zig-row { gap: 2.2rem; }

    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 3rem; }
    .layout-single .content-area { width: 100%; }
    .basement-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .band { padding: 80px 0; }
    .hero-wire { width: 220px; }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .front .shell, .axis-rule { width: min(92%, 1180px); }
    .brand-desc { display: none; }
    .brand-logo { width: 44px; height: 44px; }
    .band { padding: 64px 0; }
    .hero { min-height: 0; }
    .hero-inner { padding: 4.5rem 0 3.5rem; }
    .hero-wire { display: none; }
    .hero-lead { font-size: 1.05rem; }
    .card-grid-3, .card-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .facts-row { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .fact, .fact:first-child, .fact:nth-child(3) {
        border-left: 0;
        padding: 1.3rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .fact:first-child { border-top: 0; padding-top: 0; }
    .zig-row { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .zig-row-flip .zig-media { order: 0; }
    .zig-link { height: 48px; margin: 1.2rem auto; }
    .faq-item summary { padding: 1rem 1.1rem; }
    .faq-a { padding: 0 1.1rem 1.1rem; }
    .faq-q { font-size: 1.05rem; }
    .card-body { padding: 1.1rem 1.15rem 1.2rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .basement-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-next { grid-column: auto; text-align: left; }
    .comment-respond { padding: 1.3rem 1.2rem; }
    .comment-list .children { padding-left: 0.8rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .card:hover, .btn:hover { transform: none; }
}
