/*
Theme Name: dds_sun-news.ru
Author: Илья Громов
Description: Тема для образовательной платформы офтальмохирургов. Дизайн-концепция Lavender Tech: холодная фиолетовая гамма, стеклянные карточки, тонкие неоновые линии и оптическая графика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: optilens
*/

:root {
    --bg: #F4F6FA;
    --bg-alt: #E9EEF7;
    --header-bg: #1A1D27;
    --footer-bg: #0F111A;
    --panel: #FFFFFF;
    --text: #1B1F2B;
    --accent: #7C5CBF;
    --accent-2: #00C2D1;
    --muted: #8E99B0;
    --line: #D6DFEE;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(124, 92, 191, 0.18);
    --shadow: 0 8px 30px rgba(124, 92, 191, 0.08);
    --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- сброс и база ---------- */

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, rgba(124, 92, 191, 0.07) 0.5px, transparent 0.5px),
        linear-gradient(to bottom, rgba(124, 92, 191, 0.07) 0.5px, transparent 0.5px);
    background-size: 44px 44px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--accent-2);
    text-decoration-style: dashed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.18;
    color: var(--text);
    margin: 0 0 .7em;
    letter-spacing: -0.01em;
}

h1 { font-size: 3.75rem; letter-spacing: 0.01em; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .5em; }

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: var(--panel);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    color: #2A3040;
}

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

code, pre {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: .92em;
}

pre {
    padding: 1.1rem 1.2rem;
    background: #1A1D27;
    color: #E7EBF5;
    border-radius: 4px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid var(--line);
    background: var(--panel);
}

th, td {
    border: 1px solid var(--line);
    padding: .7rem .85rem;
    text-align: left;
}

th { background: var(--bg-alt); font-weight: 700; }

/* ---------- каркас ---------- */

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

.site-main { padding: 2.6rem 0 3.4rem; }

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

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

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

/* ---------- «хирургический свет» и шапка ---------- */

.beam-bar {
    position: relative;
    height: 2px;
    background: rgba(0, 194, 209, 0.22);
    overflow: hidden;
}

.beam-bar .beam {
    position: absolute;
    top: 0;
    left: var(--beam-x, 0px);
    width: 140px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 194, 209, 0) 0%, #00C2D1 50%, rgba(0, 194, 209, 0) 100%);
    box-shadow: 0 0 10px rgba(0, 194, 209, .8);
    transition: left .45s cubic-bezier(.22, .61, .36, 1);
}

.site-header {
    background: var(--header-bg);
    color: #E7EBF5;
    border-bottom: 1px solid rgba(0, 194, 209, .18);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}

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

.brand-link { display: block; line-height: 0; flex: 0 0 auto; }

.brand-logo { width: 54px; height: 54px; display: block; }

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

.brand-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .84rem;
    line-height: 1.4;
    color: #FFFFFF;
    font-weight: 600;
    letter-spacing: .01em;
}

.brand-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .76rem;
    line-height: 1.4;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    background: transparent;
    color: #E7EBF5;
    border: 1px solid rgba(231, 235, 245, .35);
    border-radius: 2px;
    padding: .45rem .8rem;
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
}

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

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

.nav-list li { margin: 0; }

.nav-list a {
    color: #D9DFEC;
    text-decoration: none;
    font-size: .95rem;
    letter-spacing: .02em;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

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

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

.sect-title {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 1.6rem;
}

.sect-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 34%;
    background: var(--accent-2);
}

.page-title {
    position: relative;
    padding-left: 1.1rem;
    font-size: 2.4rem;
    margin-bottom: 1.4rem;
}

.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 34%;
    background: var(--accent-2);
}

/* ---------- кнопки ---------- */

.btn {
    display: inline-block;
    padding: .82rem 1.6rem;
    border-radius: 2px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-decoration: none;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #FFFFFF;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.btn:hover {
    transform: translateY(2px);
    box-shadow: 0 0 15px rgba(124, 92, 191, 0.3);
    color: #FFFFFF;
    background: #6B4CAB;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: inset 0 0 0 3px rgba(124, 92, 191, .12);
}

.btn-ghost:hover {
    background: transparent;
    color: var(--accent-2);
    border-color: var(--accent-2);
    box-shadow: inset 0 0 0 3px rgba(0, 194, 209, .14), 0 0 15px rgba(0, 194, 209, .28);
}

.btn-light {
    background: #FFFFFF;
    color: #1A1D27;
    border-color: #FFFFFF;
}

.btn-light:hover { background: #FFFFFF; color: var(--accent); }

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

.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(142, 153, 176, .5); }
.breadcrumbs a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.breadcrumbs .sep { margin: 0 .35rem; color: var(--accent-2); }

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}

.card-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.4rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-bottom: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--accent-2);
    box-shadow: 0 14px 36px rgba(124, 92, 191, 0.14);
}

.card-thumb {
    position: relative;
    display: block;
    line-height: 0;
}

.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 29, 39, .38) 0%, rgba(26, 29, 39, 0) 55%);
    pointer-events: none;
}

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

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

.card-meta {
    font-size: .78rem;
    color: var(--accent-2);
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: .55rem;
}

.card-title {
    font-size: 1.22rem;
    line-height: 1.3;
    margin: 0 0 .6rem;
}

.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }

.card-excerpt { color: #4A5468; font-size: .95rem; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt p:last-child { margin-bottom: 0; }

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}

.card-more:hover { color: var(--accent-2); border-bottom-style: dashed; border-bottom-color: var(--accent-2); }

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2.2rem 0 .5rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-size: .92rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}

.pager a.page-numbers:hover {
    transform: translateY(2px);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(124, 92, 191, .3);
}

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

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

/* ---------- главная страница ---------- */

.front-body {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.front-section {
    position: relative;
    padding: 3.2rem 2.2rem;
    border-radius: 4px;
}

.front-section + .front-section { margin-top: 0; }

.front-alt { background: var(--bg-alt); }

.sect-divider {
    height: 12px;
    margin: 0;
    border: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 12 L10 1 L20 12 L30 1 L40 12' fill='none' stroke='%237C5CBF' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    opacity: .1;
}

.sect-rule {
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

/* Блок 1 — hero */

.hero {
    position: relative;
    overflow: hidden;
    padding: 4.6rem 2.6rem 4.2rem;
    background-color: #171A24;
    background-image:
        linear-gradient(to right, rgba(0, 194, 209, .10) 0.5px, transparent 0.5px),
        linear-gradient(to bottom, rgba(0, 194, 209, .10) 0.5px, transparent 0.5px);
    background-size: 26px 26px;
    border-radius: 4px;
    color: #EAEEF7;
}

.hero::before {
    content: "";
    position: absolute;
    right: -6%;
    top: 50%;
    transform: translateY(-50%);
    width: 620px;
    height: 420px;
    background: radial-gradient(ellipse at center, rgba(124, 92, 191, .85) 0%, rgba(124, 92, 191, 0) 68%);
    filter: blur(26px);
    opacity: .5;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    width: 460px;
    height: 300px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 460 300'%3E%3Cpath d='M230 20c130 0 220 110 220 130s-90 130-220 130S10 170 10 150 100 20 230 20z' fill='none' stroke='%2300C2D1' stroke-width='1.2'/%3E%3Ccircle cx='230' cy='150' r='78' fill='none' stroke='%237C5CBF' stroke-width='1.2'/%3E%3Ccircle cx='230' cy='150' r='40' fill='none' stroke='%2300C2D1' stroke-width='1'/%3E%3Cpath d='M0 150h460M230 10v280' stroke='%237C5CBF' stroke-width='.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .35;
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; max-width: 640px; min-width: 0; }

.hero-kicker {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 1.1rem;
}

.hero h1 {
    color: #FFFFFF;
    margin-bottom: 1.1rem;
}

.hero-sub {
    font-size: 1.08rem;
    color: #C3CBDC;
    margin-bottom: 1.9rem;
}

.hero-sub .term { color: var(--accent-2); font-weight: 600; }

/* Блок 2 — статистика */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}

.stat-cell {
    min-width: 0;
    padding: 1.6rem 1.3rem;
    background: var(--glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: left;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--accent);
    letter-spacing: -0.02em;
    padding-bottom: .7rem;
    margin-bottom: .7rem;
    border-bottom: 1px solid var(--accent-2);
}

.stat-label { font-size: .9rem; color: #4A5468; line-height: 1.5; }

/* Блок 3 — текст + оптическая схема */

.duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}

.duo-text p:last-child { margin-bottom: 0; }

.lens-scheme {
    position: relative;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-image:
        repeating-radial-gradient(circle at 50% 50%, rgba(124, 92, 191, .28) 0 1px, rgba(124, 92, 191, 0) 1px 34px),
        repeating-radial-gradient(circle at 50% 50%, rgba(0, 194, 209, .22) 0 1px, rgba(0, 194, 209, 0) 1px 11px),
        conic-gradient(from 0deg, rgba(124, 92, 191, .10) 0deg 1deg, rgba(124, 92, 191, 0) 1deg 30deg, rgba(124, 92, 191, .10) 30deg 31deg, rgba(124, 92, 191, 0) 31deg 60deg);
}

.lens-scheme::before,
.lens-scheme::after {
    content: "";
    position: absolute;
    background: rgba(0, 194, 209, .45);
}

.lens-scheme::before { left: 0; right: 0; top: 50%; height: 1px; }
.lens-scheme::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.duo-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }

.duo-list li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: .8rem;
    font-size: .97rem;
}

.duo-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .38em;
    width: 24px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Ccircle cx='9' cy='8' r='6' fill='none' stroke='%237C5CBF' stroke-width='1.2'/%3E%3Ccircle cx='15' cy='8' r='6' fill='none' stroke='%2300C2D1' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

/* Блок 4 — рубрикатор */

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

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.5rem 1.5rem 1.6rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
    text-decoration: none;
    color: var(--text);
    clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}

.topic-tile:hover {
    transform: translateY(2px);
    color: #FFFFFF;
    background-image: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(124, 92, 191, .3);
}

.topic-tile svg { display: block; width: 40px; height: 26px; margin-bottom: .9rem; }
.topic-tile:hover svg circle { stroke: #FFFFFF; }

.topic-name { display: block; font-weight: 700; font-size: 1.08rem; margin-bottom: .3rem; }
.topic-note { display: block; font-size: .86rem; color: var(--muted); }
.topic-tile:hover .topic-note { color: rgba(255, 255, 255, .85); }

/* CTA */

.fs-cta {
    position: relative;
    overflow: hidden;
    padding: 2.8rem 2.4rem;
    border-radius: 4px;
    color: #FFFFFF;
    background-color: #2C2350;
    background-image:
        linear-gradient(120deg, rgba(124, 92, 191, .92) 0%, rgba(0, 194, 209, .82) 100%),
        linear-gradient(to right, rgba(255, 255, 255, .16) 0.5px, transparent 0.5px),
        linear-gradient(to bottom, rgba(255, 255, 255, .16) 0.5px, transparent 0.5px);
    background-size: auto, 26px 26px, 26px 26px;
}

.fs-cta h2 { color: #FFFFFF; }
.fs-cta .sect-title::before { background: #FFFFFF; }
.fs-cta p { color: rgba(255, 255, 255, .9); max-width: 720px; }

/* ---------- запись и страница ---------- */

.entry-header { margin-bottom: 1.6rem; }

.entry-meta {
    font-size: .82rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: .7rem;
}

.entry-thumb { margin: 0 0 1.8rem; line-height: 0; }
.entry-thumb img { display: block; width: 100%; border-radius: 12px; }

.entry-content { font-size: 1.03rem; }
.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 1.6rem; }
.entry-content img { border-radius: 8px; display: block; }

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

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

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .38em;
    width: 24px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Ccircle cx='9' cy='8' r='6' fill='none' stroke='%237C5CBF' stroke-width='1.2'/%3E%3Ccircle cx='15' cy='8' r='6' fill='none' stroke='%2300C2D1' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

.entry-tags { margin-top: 2rem; font-size: .9rem; color: var(--muted); }
.entry-tags a { margin-right: .4rem; }

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.4rem;
}

.post-nav a {
    display: block;
    min-width: 0;
    padding: 1.1rem 1.3rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: .95rem;
    transition: border-color .2s ease, transform .2s ease;
}

.post-nav a:hover { border-color: var(--accent-2); transform: translateY(-3px); color: var(--accent); }
.post-nav span { display: block; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }

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

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 1rem 0 0 1.5rem; padding: 0; }

.comment-body {
    padding: 1.2rem 1.4rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.comment-head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: baseline; margin-bottom: .5rem; }
.comment-author { font-weight: 700; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: .6rem; font-size: .88rem; }
.comment-hold { font-size: .85rem; color: var(--muted); }

.comment-respond { margin-top: 1.6rem; }

.comment-form label { display: block; font-size: .88rem; margin-bottom: .3rem; color: #4A5468; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    font: inherit;
    font-size: .95rem;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px rgba(124, 92, 191, .2); }

.comment-form .form-submit input[type="submit"] {
    padding: .8rem 1.6rem;
    font: inherit;
    font-weight: 600;
    letter-spacing: .03em;
    color: #FFFFFF;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 2px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.comment-form .form-submit input[type="submit"]:hover { transform: translateY(2px); box-shadow: 0 0 15px rgba(124, 92, 191, .3); }

/* ---------- форма поиска ---------- */

.search-form { display: flex; gap: .5rem; }

.search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: .7rem .85rem;
    font: inherit;
    font-size: .95rem;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }

.search-form button {
    padding: .7rem 1.2rem;
    font: inherit;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 2px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.search-form button:hover { transform: translateY(2px); box-shadow: 0 0 15px rgba(124, 92, 191, .3); }

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

.sidebar {
    min-width: 0;
    position: relative;
}

.sidebar .widget {
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow);
    color: var(--text);
}

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

.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { margin-bottom: .7rem; font-size: .95rem; color: var(--text); }
.sidebar .widget li:last-child { margin-bottom: 0; }
.sidebar .widget a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(124, 92, 191, .35); }
.sidebar .widget a:hover { color: var(--accent); border-bottom-color: var(--accent-2); border-bottom-style: dashed; }
.sidebar .widget .post-date { display: block; font-size: .78rem; color: var(--muted); }
.sidebar .widget p { color: #4A5468; font-size: .94rem; }

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

.site-footer {
    background: var(--footer-bg);
    color: #C3CBDC;
    padding: 3rem 0 1.6rem;
    border-top: 2px solid rgba(124, 92, 191, .35);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(214, 223, 238, .12);
}

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

.site-footer .widget { margin-bottom: 1.4rem; color: #C3CBDC; }
.site-footer .widget:last-child { margin-bottom: 0; }

.site-footer .widget-title {
    font-size: .92rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 1rem;
    padding-left: .9rem;
    position: relative;
}

.site-footer .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 60%;
    background: var(--accent-2);
}

.site-footer .widget p { color: #A9B3C7; font-size: .93rem; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { margin-bottom: .6rem; font-size: .93rem; color: #C3CBDC; }
.site-footer .widget a { color: #C3CBDC; text-decoration: none; border-bottom: 1px solid rgba(124, 92, 191, .5); }
.site-footer .widget a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); border-bottom-style: dashed; }
.site-footer .widget .post-date { display: block; font-size: .78rem; color: #8E99B0; }

.footer-bottom {
    padding-top: 1.4rem;
    font-size: .82rem;
    color: #8E99B0;
    line-height: 1.6;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: rgba(15, 17, 26, .96);
    border-top: 1px solid rgba(0, 194, 209, .35);
    color: #D9DFEC;
    font-size: .88rem;
}

.cookie-banner p { margin: 0; max-width: 820px; }
.cookie-banner a { color: var(--accent-2); }

.cookie-accept {
    flex: 0 0 auto;
    padding: .6rem 1.4rem;
    font: inherit;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 2px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.cookie-accept:hover { transform: translateY(2px); box-shadow: 0 0 15px rgba(124, 92, 191, .3); }

/* ---------- 404 и служебное ---------- */

.notice-block {
    padding: 2rem 2.2rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.error-code {
    font-size: 5.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: .04em;
    margin-bottom: .6rem;
}

.section-head { margin-bottom: 1.8rem; }
.section-head p { color: #4A5468; max-width: 760px; }

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

/* ---------- служебные классы WordPress ---------- */

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.alignleft { float: left; margin: .4rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-block-image figcaption { font-size: .85rem; color: var(--muted); text-align: center; }

.sticky .card-meta::after { content: " · закреплено"; }

.comments-pagination { margin: 1.6rem 0; }

.comments-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .7rem;
    margin-right: .4rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
}

.comments-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

.entry-content .wp-block-table table,
.entry-content table { border: 1px solid var(--line); }

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

@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    h2 { font-size: 1.8rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single { width: 100%; }
    .front-body { width: 100%; }

    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .duo { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .lens-scheme { max-width: 420px; }
    .hero::after { display: none; }
    .hero-inner { max-width: none; }
}

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

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .header-inner { padding: .9rem 0; }
    .nav-toggle { display: inline-block; margin-left: auto; }

    .main-nav { flex: 1 1 100%; display: none; }
    .main-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: .2rem; padding-top: .8rem; }
    .nav-list a { display: block; padding: .55rem 0; }

    .site-main { padding: 1.8rem 0 2.6rem; }

    .hero { padding: 2.6rem 1.4rem; }
    .front-section { padding: 2.2rem 1.4rem; }
    .fs-cta { padding: 1.9rem 1.4rem; }

    .stats-grid { grid-template-columns: minmax(0, 1fr); }
    .topic-grid { grid-template-columns: minmax(0, 1fr); }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }

    .stat-num { font-size: 2.1rem; }
    .error-code { font-size: 3.8rem; }

    .cookie-banner { padding: .9rem 1rem; font-size: .84rem; }
    .comment-list .children { margin-left: .8rem; }
}
