/*
Theme Name: dds_xiaomido.ru
Theme URI: https://xiaomido.ru
Author: Артём Ковалёв
Author URI: https://xiaomido.ru
Description: Тёмная информационная тема для блога о технологиях и экосистеме Xiaomi. Фирменные оранжевый и аквамариновый акценты, нестандартная сетка статей, анимированные элементы интерфейса.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: xmido
*/

/* =========================================================================
   1. Переменные
   ====================================================================== */
:root {
    --bg:          #0F1115;
    --surface:     #1A1D24;
    --surface-2:   #21252E;
    --orange:      #FF6900;
    --aqua:        #00C3A0;
    --text:        #E8EDF2;
    --text-dim:    #9AA5B5;
    --heading:     #FFFFFF;
    --border:      rgba(255, 255, 255, 0.08);
    --border-soft: rgba(255, 255, 255, 0.05);
    --accent-grad: linear-gradient(100deg, var(--orange) 0%, var(--aqua) 100%);
    --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 10px 28px rgba(255, 105, 0, 0.28);
    --radius:      8px;
    --radius-chip: 4px;
    --font-body:   -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Roboto", "Segoe UI", system-ui, sans-serif;
    --font-mono:   "JetBrains Mono", "SF Mono", "Roboto Mono", ui-monospace, monospace;
}

/* =========================================================================
   2. Сброс и базовые стили
   ====================================================================== */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a {
    color: var(--orange);
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}
a:hover { color: var(--aqua); }

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

ul, ol { padding-left: 1.3em; }

blockquote {
    margin: 1.6em 0;
    padding: 1em 1.3em;
    border-left: 3px solid var(--orange);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 0.96rem;
    color: var(--text);
    border-radius: 0 var(--radius) var(--radius) 0;
}

code, kbd, pre {
    font-family: var(--font-mono);
    font-size: 0.92em;
}
code {
    background: var(--surface-2);
    color: var(--orange);
    padding: 0.12em 0.4em;
    border-radius: var(--radius-chip);
}
pre {
    background: var(--surface-2);
    padding: 1.1em;
    border-radius: var(--radius);
    overflow-x: auto;
    border: 1px solid var(--border);
}
pre code { background: none; color: var(--text); padding: 0; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--border);
}
th, td {
    border: 1px solid var(--border);
    padding: 0.7em 0.9em;
    text-align: left;
}
th {
    background: var(--surface-2);
    color: var(--heading);
}

:focus-visible {
    outline: 2px solid var(--aqua);
    outline-offset: 2px;
}

/* =========================================================================
   3. Контейнер и раскладки
   ====================================================================== */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.site-main {
    display: block;
    padding: 38px 0 64px;
}

.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 38px;
    align-items: start;
}
.layout-with-sidebar .content-area { min-width: 0; }

/* =========================================================================
   4. Кнопки
   ====================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.7em 1.4em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease;
}

.btn-solid {
    background: var(--orange);
    color: #14110c;
    box-shadow: var(--shadow-glow);
}
.btn-solid:hover {
    color: #14110c;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(255, 105, 0, 0.4);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}
.btn-glass:hover {
    color: var(--heading);
    border-color: var(--aqua);
    background: rgba(0, 195, 160, 0.12);
    transform: translateY(-2px);
}

/* =========================================================================
   5. Шапка
   ====================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo-link { display: flex; flex-shrink: 0; }
.brand-logo,
.brand-logo-link > svg {
    display: block;
    width: 52px;
    height: 52px;
}
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    color: var(--heading);
    font-weight: 700;
    font-size: 1.04rem;
    line-height: 1.3;
}
.brand-desc {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 2px;
}

.main-nav {
    margin-left: auto;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5em 0.85em;
    border-radius: var(--radius);
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--heading);
    background: rgba(255, 105, 0, 0.14);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: var(--text);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 0 auto;
    position: relative;
    transition: transform 0.25s ease;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after  { content: ""; position: absolute; top: 6px; }

/* =========================================================================
   6. Хлебные крошки
   ====================================================================== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .sep { color: rgba(255, 255, 255, 0.25); }
.breadcrumbs span:last-child { color: var(--text); }

/* =========================================================================
   7. Карточки записей
   ====================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card);
    border-color: rgba(255, 105, 0, 0.35);
}

.card-thumb {
    position: relative;
    overflow: hidden;
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.card-thumb.revealed img { opacity: 1; transform: scale(1); }
.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 17, 21, 0) 45%, rgba(15, 17, 21, 0.72) 100%);
    pointer-events: none;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}

.card-cat {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #14110c;
    background: var(--orange);
    padding: 0.32em 0.7em;
    border-radius: var(--radius-chip);
    margin-bottom: 12px;
}
.card-cat:hover { color: #14110c; filter: brightness(1.1); }

.card-title {
    font-size: 1.16rem;
    margin: 0 0 8px;
}
.card-title a { color: var(--heading); }
.card-title a:hover { color: var(--orange); }

.card-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.card-excerpt {
    color: var(--text-dim);
    font-size: 0.93rem;
    margin-bottom: 16px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    align-self: flex-start;
    margin-top: auto;
}

/* Широкая (горизонтальная) карточка — «Эксклюзив» */
.card-wide {
    flex-direction: row;
    position: relative;
}
.card-wide .card-thumb {
    flex: 0 0 46%;
    position: relative;
    overflow: hidden;
}
.card-wide .card-thumb a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-wide .card-thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}
.card-wide .card-body {
    padding: 28px 30px;
    justify-content: center;
}
.card-wide .card-title { font-size: 1.6rem; }
.card-wide .card-excerpt { font-size: 1rem; }

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #14110c;
    background: var(--accent-grad);
    padding: 0.4em 0.85em;
    border-radius: var(--radius-chip);
    box-shadow: var(--shadow-glow);
}

/* =========================================================================
   8. Пагинация
   ====================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
}
.pagination a.page-numbers:hover {
    border-color: var(--aqua);
    color: var(--heading);
}
.pagination .page-numbers.current {
    background: var(--orange);
    color: #14110c;
    border-color: var(--orange);
}
.pagination .page-numbers.dots {
    background: none;
    border-color: transparent;
}

/* =========================================================================
   9. Заголовок страницы / архива
   ====================================================================== */
.page-head {
    margin-bottom: 30px;
}
.page-head h1 { margin-bottom: 6px; }
.page-head .page-sub {
    color: var(--text-dim);
    font-size: 0.98rem;
    margin: 0;
}

/* =========================================================================
   10. Лента категорий (swipe-меню)
   ====================================================================== */
.cat-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 28px;
    scrollbar-width: thin;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}
.cat-strip.dragging { cursor: grabbing; }
.cat-strip::-webkit-scrollbar { height: 4px; }
.cat-strip::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }
.cat-chip {
    flex: 0 0 auto;
    position: relative;
    padding: 0.5em 1.05em;
    border-radius: var(--radius-chip);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}
.cat-chip:hover { color: var(--heading); border-color: rgba(255, 105, 0, 0.4); }
.cat-chip.is-active {
    color: var(--heading);
    border-color: rgba(255, 105, 0, 0.5);
}
.cat-chip.is-active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    border-radius: 50%;
    background: var(--orange);
    animation: xmido-pulse 1.5s ease-in-out infinite;
}
@keyframes xmido-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 105, 0, 0.55); opacity: 1; }
    50%      { box-shadow: 0 0 0 7px rgba(255, 105, 0, 0); opacity: 0.65; }
}

/* =========================================================================
   11. Боковая колонка и виджеты
   ====================================================================== */
.sidebar { min-width: 0; }

.widget {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--text);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--heading);
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.93rem;
    color: var(--text);
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text); }
.widget a:hover { color: var(--orange); }
.widget .post-date,
.widget .rss-date {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Контраст в подвале — текст всегда светлый на тёмном фоне */
.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text);
}
.site-footer .widget-title {
    color: var(--heading);
    border-bottom-color: var(--border);
}
.site-footer .widget li,
.site-footer .widget p,
.site-footer .widget a {
    color: var(--text-dim);
}
.site-footer .widget a:hover { color: var(--orange); }

/* =========================================================================
   12. Подвал
   ====================================================================== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding: 46px 0;
}
.footer-col { min-width: 0; }

.footer-bar {
    background: #0B0C0F;
    border-top: 1px solid var(--border);
}
.footer-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
}
.digital-clock {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--aqua);
    letter-spacing: 0.06em;
    background: rgba(0, 195, 160, 0.08);
    border: 1px solid rgba(0, 195, 160, 0.2);
    padding: 0.3em 0.8em;
    border-radius: var(--radius);
}
.digital-clock .clock-sep { animation: xmido-blink 1s steps(1) infinite; }
@keyframes xmido-blink { 50% { opacity: 0.25; } }

/* =========================================================================
   13. Главная страница
   ====================================================================== */
.section { margin-bottom: 56px; }
.section-head {
    margin-bottom: 26px;
}
.section-head h2 { margin-bottom: 6px; }
.section-head .section-sub {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.98rem;
}

/* Hero с анимированным заголовком */
.hero {
    position: relative;
    text-align: center;
    padding: 60px 20px 64px;
    margin-bottom: 56px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 105, 0, 0.14), transparent 62%),
                var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
.mi-flower {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    position: relative;
}
.mi-flower .petal {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--orange);
    top: 50%;
    left: 50%;
    transform-origin: center;
    opacity: 0;
    animation: xmido-petal-in 0.6s ease forwards,
               xmido-petal-glow 3.4s ease-in-out infinite;
}
.mi-flower .petal:nth-child(1) { transform: translate(-50%, -50%) translateY(-30px); animation-delay: 0.05s, 1s; }
.mi-flower .petal:nth-child(2) { transform: translate(-50%, -50%) translateX(30px);  animation-delay: 0.15s, 1.3s; }
.mi-flower .petal:nth-child(3) { transform: translate(-50%, -50%) translateY(30px);  animation-delay: 0.25s, 1.6s; }
.mi-flower .petal:nth-child(4) { transform: translate(-50%, -50%) translateX(-30px); animation-delay: 0.35s, 1.9s; }
.mi-flower .petal:nth-child(5) {
    width: 22px; height: 22px;
    background: var(--aqua);
    transform: translate(-50%, -50%);
    animation-delay: 0.45s, 2.2s;
}
@keyframes xmido-petal-in { to { opacity: 1; } }
@keyframes xmido-petal-glow {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.35); }
}
.hero-title {
    position: relative;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0 0 14px;
    letter-spacing: 0.02em;
}
.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px);
    animation: xmido-word-in 0.5s ease forwards;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@keyframes xmido-word-in { to { opacity: 1; transform: translateY(0); } }
.hero-sub {
    position: relative;
    max-width: 620px;
    margin: 0 auto 26px;
    color: var(--text-dim);
    font-size: 1.04rem;
}
.hero-actions {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Пульс экосистемы */
.pulse-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}
.pulse-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 12px;
    text-align: center;
}
.pulse-item svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: xmido-device-pulse 3s ease-in-out infinite;
}
.pulse-item:nth-child(2) svg { animation-delay: 0.5s; }
.pulse-item:nth-child(3) svg { animation-delay: 1s; }
.pulse-item:nth-child(4) svg { animation-delay: 1.5s; }
.pulse-item:nth-child(5) svg { animation-delay: 2s; }
.pulse-item:nth-child(6) svg { animation-delay: 2.5s; }
@keyframes xmido-device-pulse {
    0%, 100% { stroke: var(--orange); filter: drop-shadow(0 0 0 transparent); }
    50%      { stroke: var(--aqua);   filter: drop-shadow(0 0 6px rgba(0, 195, 160, 0.6)); }
}
.pulse-label {
    display: block;
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* Сетка возможностей */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 105, 0, 0.4);
}
.feature-card .feature-num {
    font-family: var(--font-mono);
    color: var(--orange);
    font-size: 0.85rem;
    font-weight: 700;
}
.feature-card h3 { margin: 8px 0 8px; }
.feature-card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-grad);
    color: #14110c;
    font-family: var(--font-mono);
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--text-dim); margin: 0; font-size: 0.92rem; }

/* Блок контактов */
.contact-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 38px 32px;
    text-align: center;
}
.contact-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6em 1.1em;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
}
.contact-links a:hover { color: var(--heading); border-color: var(--aqua); }

/* =========================================================================
   14. Контент записи / страницы
   ====================================================================== */
.entry {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 32px 36px;
}
.entry-header { margin-bottom: 22px; }
.entry-title { margin-bottom: 10px; }
.entry-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.entry-meta a { color: var(--text-dim); }
.entry-meta a:hover { color: var(--orange); }
.entry-thumb {
    margin: 0 0 24px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.entry-thumb img { display: block; width: 100%; }
.entry-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,17,21,0) 60%, rgba(15,17,21,0.55) 100%);
    pointer-events: none;
}
.entry-content {
    min-width: 0;
}
.entry-content img { border-radius: var(--radius); }
.entry-content h2,
.entry-content h3 { margin-top: 1.4em; }
.entry-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-dim);
}
.entry-footer a {
    display: inline-block;
    margin: 3px 4px 3px 0;
    padding: 0.25em 0.7em;
    background: var(--surface-2);
    border-radius: var(--radius-chip);
    color: var(--text-dim);
    font-size: 0.84rem;
}
.entry-footer a:hover { color: var(--orange); }

/* Карточка параметров обзора */
.spec-card {
    background: var(--surface-2);
    border: 1px solid rgba(255, 105, 0, 0.25);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 0 0 26px;
    box-shadow: 0 0 28px rgba(255, 105, 0, 0.12);
}
.spec-card h3 { margin-top: 0; }
.spec-rating {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}
.spec-rating > span {
    display: block;
    height: 100%;
    background: var(--accent-grad);
}

/* =========================================================================
   15. Комментарии
   ====================================================================== */
.comments-area {
    margin-top: 30px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px 32px;
}
.comments-title { margin-bottom: 20px; }
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list .children {
    list-style: none;
    margin: 14px 0 0;
    padding-left: 26px;
    border-left: 2px solid var(--border);
}
.comment-item { margin-bottom: 18px; }
.comment-body {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.comment-avatar img { border-radius: 50%; display: block; }
.comment-author { font-weight: 700; color: var(--heading); }
.comment-date { font-size: 0.78rem; color: var(--text-dim); }
.comment-text { font-size: 0.95rem; }
.comment-pending { font-size: 0.82rem; color: var(--orange); }
.comment-reply a {
    font-size: 0.82rem;
    font-weight: 600;
}

.comment-respond {
    margin-top: 26px;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.7em 0.9em;
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.comment-respond label { font-size: 0.88rem; color: var(--text-dim); }
.comment-respond .form-submit input {
    background: var(--orange);
    color: #14110c;
    border: 0;
    font-weight: 700;
    padding: 0.7em 1.5em;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

/* =========================================================================
   16. Форма поиска
   ====================================================================== */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.65em 0.9em;
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.search-form .search-submit {
    background: var(--orange);
    color: #14110c;
    border: 0;
    font-weight: 700;
    padding: 0 1.3em;
    border-radius: var(--radius);
    cursor: pointer;
}
.widget .search-form { margin-top: 4px; }

/* =========================================================================
   17. 404
   ====================================================================== */
.error-404 {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 56px 28px;
}
.error-404 .err-code {
    font-family: var(--font-mono);
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 700;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 10px;
}
.error-404 .search-form {
    max-width: 420px;
    margin: 24px auto;
}

/* =========================================================================
   18. Cookie-баннер
   ====================================================================== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 14px 22px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}
.cookie-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dim);
    max-width: 720px;
}
.cookie-banner a { color: var(--orange); }

/* =========================================================================
   19. Адаптив
   ====================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pulse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .layout-single .content-area { width: 100%; }

    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { padding: 0.7em 0.9em; }

    .card-wide { flex-direction: column; }
    .card-wide .card-thumb {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-wide .card-thumb a { position: static; }
    .card-wide .card-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-wide .card-body { padding: 20px 22px; }
    .card-wide .card-title { font-size: 1.3rem; }

    .entry { padding: 26px 22px; }
    .comments-area { padding: 22px 20px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .site-main { padding: 26px 0 48px; }
    .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { padding: 44px 16px 48px; }
    .footer-bar-inner { justify-content: center; text-align: center; }

    .btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.85em 1.4em;
    }
    .hero-actions .btn,
    .contact-links a { width: 100%; }
    .contact-links a { justify-content: center; }
    .search-form .btn,
    .search-form .search-submit { width: auto; }

    .brand-desc { display: none; }
}

@media (max-width: 420px) {
    .card-grid,
    .feature-grid,
    .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
    html { scroll-behavior: auto; }
    .card-thumb img { opacity: 1; transform: none; }
}
