/*
Theme Name: dds_hooboard.com
Author: Роман Громов
Description: Информационная тема об электротранспорте: аккумуляторы, зарядка, хранение, безопасность и обслуживание гироскутеров и малого электротранспорта.
Version: 1.1
Text Domain: hooboard
*/

/* ==== Базовые переменные ==== */
:root {
    --hb-bg: #f4f6f8;
    --hb-surface: #ffffff;
    --hb-ink: #1b2733;
    --hb-muted: #566370;
    --hb-line: #dfe5ea;
    --hb-accent: #1f7a8c;
    --hb-accent-dark: #145460;
    --hb-energy: #2ec4b6;
    --hb-deep: #16232e;
    --hb-deep-2: #22323f;
    --hb-warn: #f2a541;
    --hb-radius: 12px;
    --hb-shadow: 0 6px 22px rgba(21, 39, 51, 0.08);
    --hb-shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--hb-ink);
    background: var(--hb-bg);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}

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

a { color: var(--hb-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--hb-ink); margin: 0 0 0.6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* ==== Контейнер ширины (единый источник) ==== */
.shell {
    width: var(--hb-shell);
    margin-inline: auto;
}

/* ==== Шапка ==== */
.site-header {
    background: var(--hb-surface);
    border-bottom: 1px solid var(--hb-line);
}
.site-header .shell {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo, .brand-logo-svg {
    width: 52px;
    height: 52px;
    display: block;
    flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hb-ink);
    display: block;
    line-height: 1.25;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--hb-muted);
    display: block;
    margin-top: 2px;
}

/* ==== Навигация ==== */
.main-nav {
    margin-left: auto;
    min-width: 0;
}
.nav-toggle {
    display: none;
    background: var(--hb-accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--hb-ink);
    font-weight: 500;
}
.main-nav a:hover {
    background: var(--hb-bg);
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    background: var(--hb-accent);
    color: #fff;
}

/* ==== Каркас страницы ==== */
.site-main { padding: 30px 0 50px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.layout-single .content-area { width: 100%; }
.layout-single.narrow {
    width: 85%;
    margin-inline: auto;
}

/* ==== Хлебные крошки ==== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--hb-muted);
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hb-line);
}
.breadcrumbs a { color: var(--hb-accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--hb-line); }

/* ==== Карточки записей ==== */
.card-list { display: grid; gap: 22px; }
.card {
    display: flex;
    flex-direction: column;
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    overflow: hidden;
    box-shadow: var(--hb-shadow);
}
.card-thumb-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--hb-deep);
}
.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}
.card-title { font-size: 1.2rem; margin: 0 0 8px; }
.card-title a { color: var(--hb-ink); }
.card-title a:hover { color: var(--hb-accent); text-decoration: none; }
.card-meta {
    font-size: 0.8rem;
    color: var(--hb-muted);
    margin-bottom: 10px;
}
.card-excerpt { color: var(--hb-muted); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--hb-accent);
}

/* Горизонтальные карточки для ленты блога */
.card-list.stream .card { flex-direction: row; }
.card-list.stream .card .card-thumb-wrap {
    flex: 0 0 300px;
    aspect-ratio: auto;
}

/* ==== Одиночная запись / страница ==== */
.entry {
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    padding: 30px 34px 34px;
    box-shadow: var(--hb-shadow);
}
.entry-title { font-size: 1.9rem; }
.entry-meta { font-size: 0.85rem; color: var(--hb-muted); margin-bottom: 18px; }
.entry-thumb { border-radius: 10px; overflow: hidden; margin: 0 0 22px; }
.entry-thumb img { display: block; width: 100%; }
.entry-content img { border-radius: 8px; display: block; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 16px 22px;
    background: var(--hb-bg);
    border-left: 4px solid var(--hb-accent);
    border-radius: 8px;
    color: var(--hb-ink);
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--hb-line);
    padding: 9px 12px;
    text-align: left;
}
.entry-content th { background: var(--hb-bg); }

/* ==== Сайдбар / виджеты ==== */
.sidebar { min-width: 0; }
.widget {
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--hb-shadow);
    color: var(--hb-ink);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hb-accent);
    color: var(--hb-ink);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--hb-line);
    color: var(--hb-ink);
}
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--hb-ink); }
.widget a:hover { color: var(--hb-accent); }
.widget .post-date,
.widget .rss-date,
.widget time { display: block; font-size: 0.78rem; color: var(--hb-muted); }

/* ==== Пагинация ==== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 34px 0 0;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    background: var(--hb-surface);
    color: var(--hb-ink);
    font-weight: 500;
}
.pagination a.page-numbers:hover {
    background: var(--hb-bg);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--hb-accent);
    color: #fff;
    border-color: var(--hb-accent);
}
.pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ==== Форма поиска ==== */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--hb-surface);
    color: var(--hb-ink);
}
.search-form button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--hb-accent);
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--hb-accent-dark); }

/* ==== Главная ==== */
.home-wrap { width: 85%; margin-inline: auto; }
.front-section { padding: 40px 0; }
.front-section + .front-section { border-top: 1px solid var(--hb-line); }
.section-head { max-width: 720px; margin-bottom: 26px; }
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hb-accent);
    font-weight: 700;
    margin-bottom: 8px;
}
.section-head h2 { font-size: 1.7rem; }
.section-head p { color: var(--hb-muted); margin: 0; }

/* Блок: текст + иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.fs-split.reverse .fs-split-media { order: -1; }
.fs-split-media img,
.fs-split-media svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--hb-radius);
}
.fs-split-text h2 { font-size: 1.7rem; }
.fs-split-text p { color: var(--hb-muted); }

/* Блок: сетка тем-карточек */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 20px;
}
.topic-card {
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    padding: 24px 22px;
    box-shadow: var(--hb-shadow);
    min-width: 0;
}
.topic-card .topic-icon {
    width: 48px;
    height: 48px;
    display: block;
    margin-bottom: 14px;
}
.topic-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.topic-card p { color: var(--hb-muted); font-size: 0.94rem; margin: 0; }

/* Блок: последние записи (сетка) */
.card-list.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

/* Блок: пошаговый */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    padding: 26px 22px 22px;
    box-shadow: var(--hb-shadow);
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hb-accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--hb-muted); font-size: 0.94rem; margin: 0; }

/* Блок: CTA */
.fs-cta {
    background: var(--hb-deep);
    color: #eaf3f5;
    border-radius: 16px;
    padding: 40px 42px;
    text-align: center;
}
.fs-cta h2 { color: #fff; margin-bottom: 10px; }
.fs-cta p { color: #b9c9d1; margin: 0 auto 22px; max-width: 620px; }
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 10px;
    background: var(--hb-energy);
    color: var(--hb-deep);
    font-weight: 700;
}
.btn:hover { background: #27b3a6; text-decoration: none; }
.btn.ghost {
    background: transparent;
    border: 2px solid var(--hb-energy);
    color: var(--hb-energy);
}
.btn.ghost:hover { background: rgba(46,196,182,0.12); }

/* Последние записи на главной — заголовок ряда + ссылка */
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.latest-head h2 { margin: 0; }
.latest-head a { font-weight: 600; }

/* ==== 404 ==== */
.error-404 {
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    padding: 40px 34px;
    box-shadow: var(--hb-shadow);
    text-align: center;
}
.error-404 .code {
    font-size: 4rem;
    font-weight: 800;
    color: var(--hb-accent);
    line-height: 1;
}
.error-404 .search-form { max-width: 460px; margin: 22px auto 18px; }

/* ==== Подвал ==== */
.site-footer {
    background: var(--hb-deep);
    color: #c6d3da;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 34px;
    padding: 44px 0 30px;
}
.footer-cols .widget {
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #c6d3da;
}
.footer-cols .widget-title {
    color: #fff;
    border-bottom-color: var(--hb-energy);
}
.footer-cols .widget a { color: #c6d3da; }
.footer-cols .widget a:hover { color: var(--hb-energy); }
.footer-cols .widget ul li {
    border-bottom-color: rgba(255,255,255,0.09);
    color: #c6d3da;
}
.footer-cols .widget .post-date,
.footer-cols .widget time { color: #8ea3ad; }
.site-copy {
    border-top: 1px solid rgba(255,255,255,0.09);
    padding: 18px 0;
    font-size: 0.85rem;
    color: #94a7b0;
}

/* ==== Cookie-баннер ==== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--hb-deep-2);
    color: #e6eef2;
    border-top: 2px solid var(--hb-energy);
    box-shadow: 0 -6px 24px rgba(0,0,0,0.22);
}
.cookie-banner .shell {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 0;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 220px; }
.cookie-banner a { color: var(--hb-energy); }
.cookie-accept {
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--hb-energy);
    color: var(--hb-deep);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: #27b3a6; }

/* ==== Галерея (в записях/страницах при необходимости) ==== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 14px;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    aspect-ratio: 4 / 3;
}

/* ==== Адаптив ==== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 30px; }
    .fs-split { grid-template-columns: 1fr; gap: 26px; }
    .fs-split.reverse .fs-split-media { order: 0; }
    .home-wrap, .layout-single.narrow { width: 100%; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .main-nav {
        margin-left: auto;
        position: relative;
    }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        flex-direction: column;
        background: var(--hb-surface);
        border: 1px solid var(--hb-line);
        border-radius: 10px;
        box-shadow: var(--hb-shadow);
        padding: 8px;
        min-width: 210px;
        z-index: 50;
    }
    .main-nav ul.is-open { display: flex; }
    .main-nav a { white-space: nowrap; }

    .entry { padding: 22px 18px; }
    .entry-title { font-size: 1.5rem; }
    .fs-cta { padding: 30px 20px; }

    .card-list.stream .card { flex-direction: column; }
    .card-list.stream .card .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        aspect-ratio: 16 / 9;
    }
    .card-list.stream .card .card-thumb-wrap a { position: static; }
    .card-list.stream .card .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
