/*
Theme Name: dds_yarko-zhivi.ru
Theme URI: https://yarko-zhivi.ru/
Author: Анна Соколова
Description: Тема для информационного портала об образовательных событиях: лекции, олимпиады, конкурсы, новости образования. Яркий поп с элементами газетной сетки.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: yarkozh
*/

/* ============ Служебные правила скрытия ============ */
.site-nav[hidden] { display: none !important; }
.cookie-banner[hidden] { display: none !important; }

/* ============ Переменные ============ */
:root {
    --bg: #121212;
    --bg-alt: #1E1E1E;
    --bg-foot: #0A0A0A;
    --bg-side: #1A1A1A;
    --text: #FFFFFF;
    --muted: #A0A0A0;
    --accent: #FFD700;
    --accent2: #00E5FF;
    --line: #333333;
}

/* ============ База ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 9px);
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: -50px;
    bottom: -50px;
    width: 400px;
    height: 400px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23FFD700' stroke-width='3'%3E%3Cpath d='M15 165 L60 105 L110 125 L165 45'/%3E%3Cpath d='M20 45 L70 65 L100 20 L175 95'/%3E%3Cpath d='M40 185 L90 135 L155 155'/%3E%3C/g%3E%3Cg fill='%2300E5FF'%3E%3Ccircle cx='60' cy='105' r='7'/%3E%3Ccircle cx='110' cy='125' r='7'/%3E%3Ccircle cx='100' cy='20' r='7'/%3E%3Ccircle cx='90' cy='135' r='7'/%3E%3Ccircle cx='175' cy='95' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

.site-wrapper { position: relative; z-index: 1; }

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

h1, h2, h3, h4 {
    font-family: "Arial Black", "Segoe UI", Impact, sans-serif;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.7em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

a { color: var(--accent); }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

/* ============ Кнопки ============ */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #121212;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
    transform: translateY(2px);
    box-shadow: 0 6px 0 rgba(0, 229, 255, 0.55);
}

.btn-cyan {
    background: var(--accent2);
    border-color: var(--accent2);
}

.btn-cyan:hover { box-shadow: 0 6px 0 rgba(255, 215, 0, 0.55); }

.btn-ghost {
    background: transparent;
    color: var(--accent);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #121212;
}

/* ============ Текстовые ссылки ============ */
.entry-content a,
.crumbs a,
.card-excerpt a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    background-image: linear-gradient(var(--accent2), var(--accent2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.28s ease, color 0.22s ease, border-color 0.22s ease;
}

.entry-content a:hover,
.crumbs a:hover,
.card-excerpt a:hover {
    color: var(--accent2);
    border-bottom-color: var(--accent2);
    background-size: 100% 2px;
}

/* ============ Газетная полоса и шапка ============ */
.press-bar {
    background: var(--accent2);
    color: #06131A;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}

.press-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.press-bar a {
    color: #06131A;
    text-decoration: none;
    border-bottom: 1px solid rgba(6, 19, 26, 0.6);
}

.press-bar a:hover { border-bottom-color: #06131A; }

.site-header {
    background: rgba(18, 18, 18, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.6rem;
    padding: 1.2rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}

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

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

.brand-name {
    display: block;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text);
    max-width: 460px;
}

.brand-desc {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: 460px;
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.55rem 1rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
}

.site-nav { margin-left: auto; }

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

.site-nav a {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.94rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

/* ============ Общий каркас страниц ============ */
.site-main { padding: 2.4rem 0 3.2rem; }

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

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

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

/* ============ Хлебные крошки ============ */
.crumbs {
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.crumbs a { font-weight: 600; }

.crumbs-sep { color: var(--accent); margin: 0 0.3rem; }

/* ============ Заголовки секций ============ */
.section-title {
    display: inline-block;
    position: relative;
    margin: 0 0 1.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 4px solid var(--accent);
    font-size: 1.75rem;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 0.6rem;
    background: var(--accent);
    vertical-align: 0.08em;
}

.section-title.on-light,
.section-title.on-light::before { border-color: #121212; }

.section-lead {
    color: var(--muted);
    max-width: 62ch;
    margin-top: -0.6rem;
}

/* ============ Разделители ============ */
.sec-rule {
    width: 70%;
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 2.6rem auto 0;
}

.dot-divider {
    width: 55%;
    height: 6px;
    margin: 1.6rem auto 2.6rem;
    background-image: radial-gradient(var(--accent) 2.2px, transparent 2.4px);
    background-size: 18px 6px;
    background-repeat: repeat-x;
}

/* ============ Карточки записей ============ */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 1.8rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0, 229, 255, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 0 var(--accent2);
}

.card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    background: var(--accent);
    transition: height 0.2s ease;
}

.card:hover::after { height: 6px; }

.card-thumb { display: block; overflow: hidden; }

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

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.2rem 1.35rem 1.6rem;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.6rem;
}

.card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.card-excerpt { color: #D6D6D6; font-size: 0.95rem; }

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

.card img { display: block; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}

.post-tag {
    color: #06131A;
    background: var(--accent2);
    padding: 0.1rem 0.55rem;
    text-decoration: none;
    font-weight: 700;
}

.post-tag:hover { background: var(--accent); }

.card-more {
    display: inline-block;
    margin-top: 0.9rem;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
}

.card-more:hover { color: var(--accent2); border-bottom-color: var(--accent2); }

/* Избранная (горизонтальная) карточка */
.card-featured {
    flex-direction: row;
    align-items: stretch;
    grid-column: 1 / -1;
}

.card-featured .card-thumb {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
}

.card-featured .card-thumb a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-featured .card-thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
}

.card-featured .card-body { padding: 1.6rem 1.8rem 1.9rem; }

.card-featured .card-title { font-size: 1.5rem; }

/* ============ Пагинация ============ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.95rem;
    border: 2px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: 0.18s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

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

/* ============ Главная: секции ============ */
.front-section { padding: 2.8rem 2.2rem; }

.front-section.plain { padding-left: 0; padding-right: 0; }

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

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

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 2.4rem;
}

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

.hero-overlay {
    position: relative;
    z-index: 2;
    padding: 4.5rem 2.4rem;
    background: linear-gradient(115deg, rgba(18, 18, 18, 0.92) 0%, rgba(18, 18, 18, 0.72) 55%, rgba(0, 229, 255, 0.22) 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background-image: linear-gradient(92deg, var(--accent) 0%, var(--accent2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    max-width: 20ch;
}

.hero-sub {
    max-width: 56ch;
    color: #E6E6E6;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.6rem;
}

/* Таймлайн */
.timeline { margin-top: 0.6rem; }

.tl-item {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    gap: 1.4rem;
    padding-bottom: 1.9rem;
}

.tl-date {
    text-align: right;
    color: var(--accent2);
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 1.2rem;
    line-height: 1.3;
    min-width: 0;
}

.tl-body {
    position: relative;
    min-width: 0;
    padding-left: 1.7rem;
    border-left: 2px dashed var(--accent);
}

.tl-body::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 0.45rem;
    width: 16px;
    height: 16px;
    background: var(--accent2);
}

.tl-body h3 { margin-bottom: 0.35rem; font-size: 1.15rem; }

.tl-body p { margin: 0; color: #D6D6D6; }

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

/* Статистика */
.stats {
    background-image: linear-gradient(100deg, var(--accent) 0%, var(--accent2) 100%);
    color: #121212;
    padding: 2.8rem 2.2rem;
    margin: 0 0 2.4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1.6rem;
}

.stat { min-width: 0; text-align: center; }

.stat-num {
    display: block;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 3.2rem;
    line-height: 1;
    color: #121212;
}

.stat-label {
    display: inline-block;
    margin-top: 0.7rem;
    padding: 0.25rem 0.7rem;
    background: #121212;
    color: #FFFFFF;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Рубрикатор */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.5rem;
}

.topic-card {
    display: block;
    min-width: 0;
    padding: 1.7rem 1.4rem;
    border: 2px solid #FFFFFF;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.topic-card svg { display: block; margin: 0 auto 0.9rem; }

.topic-card .topic-name {
    display: block;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.topic-card .topic-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.topic-card:hover {
    background: var(--accent);
    color: #121212;
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 var(--accent2);
}

.topic-card:hover .topic-note { color: #2A2400; }

.topic-card:hover svg path,
.topic-card:hover svg rect,
.topic-card:hover svg circle,
.topic-card:hover svg line,
.topic-card:hover svg polyline { stroke: #121212; }

/* Нумерованные списки с крупными номерами */
.num-list {
    counter-reset: numlist;
    list-style: none;
    margin: 0;
    padding: 0 0 0 3.2rem;
}

.num-list li {
    counter-increment: numlist;
    position: relative;
    min-width: 0;
    margin-bottom: 1.3rem;
}

.num-list li::before {
    content: counter(numlist) ".";
    position: absolute;
    left: -3.2rem;
    top: -0.55rem;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 2.3rem;
    line-height: 1;
    color: var(--accent2);
}

/* ============ Контент записи/страницы ============ */
.entry-header { margin-bottom: 1.4rem; }

.entry-title { font-size: 2.2rem; }

.entry-thumb { margin: 0 0 1.7rem; }

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

.entry-content { font-size: 1.02rem; }

.entry-content h2,
.entry-content h3 { margin-top: 1.9rem; }

.entry-content h2 {
    padding-bottom: 0.3rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

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

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

.entry-content blockquote {
    margin: 1.7rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 6px solid var(--accent2);
    color: #E6E6E6;
    font-size: 1.1rem;
}

.entry-content img { display: block; height: auto; }

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

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

.entry-content th { background: var(--bg-alt); }

.entry-content code {
    background: var(--bg-alt);
    padding: 0.1rem 0.35rem;
    font-size: 0.92rem;
}

.entry-content pre {
    background: var(--bg-alt);
    padding: 1rem;
    overflow-x: auto;
    min-width: 0;
}

/* ============ Сайдбар ============ */
.sidebar {
    min-width: 0;
    background: var(--bg-side);
    border-left: 1px solid var(--line);
    padding: 1.5rem 1.4rem;
}

.sidebar .widget { margin-bottom: 2rem; }

.sidebar .widget:last-child { margin-bottom: 0; }

.widget-title {
    display: inline-block;
    font-size: 1.05rem;
    margin: 0 0 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 3px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: #E4E4E4; }

.sidebar .widget-title { color: #FFFFFF; }

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

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}

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

.sidebar .widget a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.sidebar .widget a:hover { color: var(--accent2); border-bottom-color: var(--accent2); }

.sidebar .widget .post-date,
.sidebar .widget .rss-date { color: var(--muted); font-size: 0.8rem; display: block; }

/* ============ Подвал ============ */
.site-footer {
    background: var(--bg-foot);
    border-top: 3px solid var(--accent);
    padding: 2.8rem 0 1.6rem;
    color: #E4E4E4;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
}

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

.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #E4E4E4; }

.site-footer .widget-title { color: #FFFFFF; }

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

.site-footer .widget li {
    padding: 0.35rem 0;
    font-size: 0.94rem;
}

.site-footer .widget a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-footer .widget a:hover { color: var(--accent2); border-bottom-color: var(--accent2); }

.site-footer .widget .post-date { color: var(--muted); font-size: 0.8rem; display: block; }

.footer-bottom {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-mail a { color: var(--accent2); text-decoration: none; }

.footer-mail a:hover { color: var(--accent); }

/* ============ Комментарии ============ */
.comments-area {
    margin-top: 3rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--line);
}

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

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0 1.2rem;
    padding: 0 0 0 1rem;
    border-left: 2px dashed var(--line);
}

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

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

.comment-author { font-weight: 800; color: var(--accent); }

.comment-date { color: var(--muted); font-size: 0.8rem; }

.comment-actions a {
    color: var(--accent2);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 700;
}

.comment-respond {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    padding: 1.5rem 1.6rem;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

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

.comment-form .submit {
    padding: 0.7rem 1.9rem;
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 4px;
    color: #121212;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.18s ease;
}

.comment-form .submit:hover {
    transform: translateY(2px);
    box-shadow: 0 6px 0 rgba(0, 229, 255, 0.55);
}

/* ============ Форма поиска ============ */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: 0;
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
}

.search-form button {
    padding: 0.65rem 1.5rem;
    background: var(--accent2);
    border: 2px solid var(--accent2);
    border-radius: 4px;
    color: #06131A;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.search-form button:hover { background: var(--accent); border-color: var(--accent); }

/* ============ 404 ============ */
.page-404 {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.code-404 {
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 6rem;
    line-height: 1;
    background-image: linear-gradient(92deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-404 .search-form { max-width: 480px; margin: 1.6rem auto; }

/* ============ Cookie-баннер ============ */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.9rem 1.4rem;
    padding: 1rem 1.4rem;
    background: #0A0A0A;
    border-top: 3px solid var(--accent2);
    color: #E4E4E4;
    font-size: 0.9rem;
}

.cookie-banner p { margin: 0; max-width: 70ch; }

.cookie-banner .btn { padding: 0.55rem 1.5rem; }

/* ============ Адаптив ============ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.2rem;
    }
    .sidebar { border-left: 0; border-top: 1px solid var(--line); }
    .layout-single,
    .front-wrap,
    .page-404 { width: 100%; }
    .hero h1 { font-size: 2.4rem; }
    .hero-overlay { padding: 3rem 1.6rem; }
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .site-nav {
        flex-basis: 100%;
        margin-left: 0;
    }
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--line);
        margin-top: 0.8rem;
    }
    .site-nav li { border-bottom: 1px dashed var(--line); }
    .site-nav a { display: block; padding: 0.7rem 0; border-bottom: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    .section-title { font-size: 1.4rem; }
    .front-section { padding: 2rem 1.2rem; }
    .front-section.plain { padding-left: 0; padding-right: 0; }
    .stats { padding: 2rem 1.3rem; }
    .stat-num { font-size: 2.5rem; }
    .hero h1 { font-size: 1.95rem; }
    .hero-overlay { padding: 2.4rem 1.2rem; }
    .tl-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }
    .tl-date { text-align: left; }
    .num-list { padding-left: 2.6rem; }
    .num-list li::before { font-size: 1.9rem; left: -2.6rem; }
    .card-featured { flex-direction: column; }
    .card-featured .card-thumb {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-featured .card-thumb a { position: static; }
    .card-featured .card-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-featured .card-title { font-size: 1.25rem; }
    .comment-respond { padding: 1.1rem 1rem; }
    .code-404 { font-size: 4rem; }
}
