/*
Theme Name: dds_all-vcc.com
Author: Артём Лавров
Description: Медиа об автотехнологиях, электромобилях и искусственном интеллекте в транспорте.
Version: 1.1
Text Domain: dds_allvcc
*/

/* ===== Базовые переменные ===== */
:root {
    --bg-deep: #0F1117;
    --bg-panel: #11131C;
    --accent-neon: #00E0FF;
    --accent-lime: #B3FF00;
    --text-primary: #F0F3F8;
    --text-muted: #9AA4BF;
    --border-soft: rgba(0, 224, 255, 0.15);
    --border-hover: rgba(0, 224, 255, 0.55);
    --radius-btn: 14px;
    --radius-card: 16px;
    --shadow-glow: 0 0 22px rgba(0, 224, 255, 0.18);
    --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 1.4em 0 0.6em;
    line-height: 1.25;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
    line-height: 1.7;
}

a {
    color: var(--accent-neon);
    text-decoration: none;
    transition: color 0.18s ease;
}
a:hover { color: var(--accent-lime); }

code, pre, kbd, samp { font-family: var(--font-mono); }
code {
    background: rgba(0, 224, 255, 0.08);
    padding: 0.12em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
    color: var(--accent-neon);
}
pre {
    background: #0a0c13;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 14px 16px;
    overflow-x: auto;
    margin: 1.2em 0;
}
pre code { background: none; padding: 0; color: var(--text-primary); }

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, var(--accent-neon), transparent);
    margin: 2em 0;
}

blockquote {
    margin: 1.2em 0;
    padding: 14px 20px;
    border-left: 3px solid var(--accent-neon);
    background: rgba(0, 224, 255, 0.05);
    border-radius: 0 10px 10px 0;
    color: var(--text-muted);
    font-style: italic;
}

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

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--border-soft);
}
th, td {
    border: 1px solid var(--border-soft);
    padding: 10px 14px;
    text-align: left;
}
th {
    background: rgba(0, 224, 255, 0.08);
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Разметка сайта ===== */
.site-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    width: 92%;
    max-width: 1240px;
    margin: 0 auto;
}
.main-area {
    padding: 40px 0 60px;
    flex: 1;
}

/* ===== Шапка ===== */
.topbar {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(8px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
}
.brand-logo {
    width: 44px;
    height: 44px;
    display: block;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.brand-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.primary-nav {
    margin-left: auto;
}
.primary-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.primary-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}
.primary-nav a:hover {
    color: var(--accent-lime);
    background: rgba(0, 224, 255, 0.06);
}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    color: var(--accent-neon);
}
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    background: var(--accent-neon);
    box-shadow: 0 0 8px var(--accent-neon);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
}

/* ===== Основная разметка с сайдбаром ===== */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
}
.layout.no-aside {
    grid-template-columns: minmax(0, 85%);
    justify-content: center;
}
.layout.full {
    grid-template-columns: minmax(0, 100%);
}

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

/* ===== Хлебные крошки ===== */
.crumbs {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 22px;
    padding: 10px 14px;
    background: rgba(17, 19, 28, 0.55);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
}
.crumbs a {
    color: var(--text-muted);
}
.crumbs a:hover { color: var(--accent-neon); }
.crumbs .sep { margin: 0 6px; color: var(--accent-neon); opacity: 0.5; }
.crumbs .current { color: var(--text-primary); }

/* ===== Карточки записей ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin: 0 0 30px;
}

.card {
    display: flex;
    flex-direction: column;
    background: rgba(17, 19, 28, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(18px);
}
.card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.card-thumb {
    display: block;
    overflow: hidden;
    background: #0a0c13;
}
.card-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
}
.card-meta {
    display: flex;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    font-family: var(--font-mono);
}
.card-meta .read-badge {
    color: var(--accent-neon);
}
.card-title {
    margin: 0 0 10px;
    font-size: 1.18rem;
    line-height: 1.35;
}
.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--accent-neon); }
.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 14px;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-footer {
    margin-top: auto;
    padding-top: 10px;
}

/* ===== Single / Page ===== */
.post-single {
    background: rgba(17, 19, 28, 0.65);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 34px 38px;
}
.post-head {
    margin: 0 0 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-soft);
}
.post-head h1 {
    margin: 0 0 12px;
    font-size: 2.1rem;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.post-thumb {
    margin: 0 0 24px;
    border-radius: 12px;
    overflow: hidden;
}
.post-thumb img { display: block; width: 100%; height: auto; }
.post-body p { margin: 0 0 1.1em; line-height: 1.8; }
.post-body img { border-radius: 10px; margin: 1em 0; }

.post-categories {
    margin: 22px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-chip {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(0, 224, 255, 0.08);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.cat-chip:hover {
    border-color: var(--accent-neon);
    box-shadow: 0 2px 10px rgba(0, 224, 255, 0.2);
    color: var(--accent-lime);
}
.cat-chip.is-active {
    border-bottom: 2px solid var(--accent-neon);
    color: var(--accent-neon);
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--accent-neon);
    color: #0a0c13;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn:hover {
    color: var(--accent-lime);
    background: rgba(0, 224, 255, 0.9);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--accent-neon);
    border: 1px solid var(--accent-neon);
}
.btn-outline:hover {
    background: rgba(0, 224, 255, 0.08);
    color: var(--accent-lime);
    transform: translateY(-2px);
}
.btn-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-neon);
    font-weight: 600;
    padding: 0;
    background: none;
}
.btn-readmore::after {
    content: "→";
    transition: transform 0.2s ease;
}
.btn-readmore:hover {
    color: var(--accent-lime);
    text-decoration: underline;
}
.btn-readmore:hover::after { transform: translateX(4px); }

/* ===== Сайдбар и виджеты ===== */
.widget {
    background: rgba(17, 19, 28, 0.65);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    margin: 0 0 22px;
}
.widget h2, .widget .widget-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: var(--accent-neon);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 7px 0;
    border-bottom: 1px dashed var(--border-soft);
}
.widget li:last-child { border-bottom: none; }
.widget a {
    color: var(--text-primary);
    transition: color 0.2s ease;
}
.widget a:hover { color: var(--accent-neon); }

/* AI-индекс виджет */
.ai-index {
    background: linear-gradient(135deg, rgba(0, 224, 255, 0.06), rgba(179, 255, 0, 0.04));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    margin: 0 0 22px;
}
.ai-index-title {
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--accent-neon);
    margin: 0 0 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ai-index-emoji {
    font-size: 2.2rem;
    line-height: 1;
    margin: 6px 0;
}
.ai-index-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Пагинация ===== */
.paginator {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 40px 0 10px;
    flex-wrap: wrap;
}
.paginator a, .paginator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.paginator a:hover {
    border-color: var(--accent-neon);
    color: var(--accent-neon);
    background: rgba(0, 224, 255, 0.05);
}
.paginator .current {
    background: var(--accent-neon);
    color: #0a0c13;
    border-color: var(--accent-neon);
    font-weight: 600;
}

/* ===== Комментарии ===== */
.comments-area {
    margin: 36px 0 0;
    padding: 26px 30px;
    background: rgba(17, 19, 28, 0.55);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
}
.comments-area h2 {
    margin: 0 0 20px;
    font-size: 1.3rem;
}
.comment-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.comment-list li {
    padding: 16px 0;
    border-bottom: 1px dashed var(--border-soft);
}
.comment-list li:last-child { border-bottom: none; }
.comment-author {
    font-weight: 600;
    color: var(--accent-neon);
    margin: 0 0 4px;
}
.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin: 0 0 8px;
}
.comment-body p { margin: 0 0 0.5em; }
.comment-children {
    list-style: none;
    margin: 12px 0 0 22px;
    padding: 0 0 0 16px;
    border-left: 2px solid var(--border-soft);
}

/* ===== Формы ===== */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], textarea, select {
    width: 100%;
    padding: 10px 14px;
    background: #0a0c13;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-neon);
    box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.1);
}
label {
    display: block;
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.form-row { margin: 0 0 14px; }

.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
}
.search-form button {
    white-space: nowrap;
}

/* ===== Главная страница — блоки ===== */
.hero-block {
    padding: 60px 40px;
    margin: 0 0 40px;
    background: linear-gradient(135deg, rgba(0, 224, 255, 0.08), rgba(179, 255, 0, 0.04));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    text-align: center;
}
.hero-block h1 {
    font-size: 2.5rem;
    margin: 0 0 14px;
    background: linear-gradient(90deg, var(--accent-neon), var(--accent-lime));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-block p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 22px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.topic-block {
    padding: 36px 32px;
    margin: 0 0 40px;
    background: rgba(17, 19, 28, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
}
.topic-block h2 {
    margin: 0 0 8px;
    font-size: 1.6rem;
}
.topic-lede {
    color: var(--text-muted);
    margin: 0 0 22px;
    max-width: 780px;
}
.topic-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.topic-tile {
    padding: 18px 20px;
    background: rgba(10, 12, 19, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.topic-tile:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}
.topic-tile h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--accent-neon);
}
.topic-tile p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.topic-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    counter-reset: step;
}
.topic-step {
    padding: 22px 20px 20px;
    background: rgba(10, 12, 19, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    position: relative;
}
.topic-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 1.8rem;
    color: var(--accent-neon);
    display: block;
    margin: 0 0 6px;
    opacity: 0.8;
}
.topic-step h3 { margin: 0 0 6px; font-size: 1rem; }
.topic-step p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
}
.section-title h2 {
    margin: 0;
    font-size: 1.5rem;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--accent-neon), transparent);
}

/* Категории как чипы */
.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

/* ===== 404 ===== */
.not-found-box {
    text-align: center;
    padding: 70px 30px;
    background: rgba(17, 19, 28, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
}
.not-found-box .code {
    font-family: var(--font-mono);
    font-size: 5rem;
    color: var(--accent-neon);
    margin: 0 0 8px;
    line-height: 1;
    text-shadow: 0 0 30px rgba(0, 224, 255, 0.4);
}
.not-found-box h1 {
    margin: 0 0 14px;
}
.not-found-box p {
    max-width: 540px;
    margin: 0 auto 22px;
    color: var(--text-muted);
}
.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

/* ===== Подвал ===== */
.site-foot {
    margin-top: 60px;
    padding: 46px 0 26px;
    border-top: 1px solid var(--border-soft);
    background: rgba(10, 12, 19, 0.6);
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 0 30px;
}
.foot-col .widget {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}
.foot-col .widget-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-neon);
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 8px;
    margin: 0 0 14px;
}
.foot-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-family: var(--font-mono);
}

/* ===== Cookie ===== */
.cookie-notice {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    padding: 16px 22px;
    background: rgba(17, 19, 28, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 224, 255, 0.08);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 860px;
    margin: 0 auto;
}
.cookie-notice p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
    min-width: 240px;
}
.cookie-notice.is-hidden { display: none; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .layout.no-aside, .layout.full {
        grid-template-columns: 1fr;
    }
    .foot-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .hero-block { padding: 40px 20px; }
    .hero-block h1 { font-size: 1.8rem; }
    .topic-block { padding: 24px 20px; }
    .post-single { padding: 22px 20px; }
    .topbar-inner { gap: 12px; }
    .nav-toggle { display: inline-block; }
    .primary-nav {
        display: none;
        flex-basis: 100%;
        margin-left: 0;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul {
        flex-direction: column;
        gap: 2px;
    }
    .primary-nav a {
        display: block;
        padding: 10px 14px;
    }
    .foot-cols {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .cookie-notice {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 14px 16px;
    }
}

/* ===== Выравнивания контента Gutenberg ===== */
.alignleft { float: left; margin: 0.4em 1.2em 0.6em 0; max-width: 50%; }
.alignright { float: right; margin: 0.4em 0 0.6em 1.2em; max-width: 50%; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Плавная прокрутка анкоров */
.anchor-offset { scroll-margin-top: 80px; }
