/*
Theme Name: Ваш Доход
Description: Дочерняя тема GeneratePress для сайта «Ваш Доход»
Author: Александр Бакин
Template: generatepress
Version: 1.1.3
Text Domain: vash-dohod
*/

/* ============================================================
   Базовый визуальный каркас дочерней темы «Ваш Доход»
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
    /* Цвета */
    --vd-bg:            #F6F8FC;
    --vd-text:          #0F172A;
    --vd-accent:        #1265F5;
    --vd-header-bg:     #07162F;
    --vd-white:         #FFFFFF;
    --vd-card-bg:       #FFFFFF;
    --vd-border:        #E5E7EB;
    --vd-hover:         #0D4FD6;
    --vd-muted:         #64748B;
    --vd-footer-bg:     #F1F5F9;

    /* Меню шапки (переопределяются из Customizer) */
    --vd-nav-color:          #FFFFFF;
    --vd-nav-hover-color:    #FFFFFF;
    --vd-nav-hover-bg:       #1265F5;
    --vd-nav-current-color:  #FFFFFF;
    --vd-nav-current-bg:     #0D4FD6;
    --vd-nav-dropdown-bg:    #0C1E3F;
    --vd-hamburger-color:        #FFFFFF;
    --vd-hamburger-hover-color:  #FFFFFF;
    --vd-hamburger-hover-bg:     transparent;
    --vd-nav-font-family:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --vd-nav-font-size:      15px;
    --vd-nav-font-weight:    500;

    /* Размеры */
    --vd-container:     1280px;
    --vd-radius:        12px;
    --vd-radius-sm:     8px;

    /* Тени */
    --vd-shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.06);
    --vd-shadow:        0 1px 4px rgba(0, 0, 0, 0.08);

    /* Типографика */
    --vd-font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --vd-line-height:   1.65;
}

/* ------------------------------------------------------------
   Базовые элементы
   ------------------------------------------------------------ */
body {
    background-color: var(--vd-bg);
    color: var(--vd-text);
    font-family: var(--vd-font);
    line-height: var(--vd-line-height);
}

a {
    color: var(--vd-accent);
    text-decoration: none;
}

a:hover {
    color: var(--vd-hover);
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--vd-text);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

/* ------------------------------------------------------------
   Контейнер
   ------------------------------------------------------------ */
.grid-container {
    max-width: var(--vd-container);
}

/*
 * Промежуточная ширина (между ПК и планшетом):
 * контейнер почти на всю ширину окна — нужны боковые поля,
 * иначе Hero, статьи и шапка прилипают к краям экрана.
 */
@media (max-width: 1400px) {
    #page.site.grid-container,
    .inside-header.grid-container,
    .inside-site-info.grid-container,
    .footer-widgets-container.grid-container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 600px) {
    #page.site.grid-container,
    .inside-header.grid-container,
    .inside-site-info.grid-container,
    .footer-widgets-container.grid-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ------------------------------------------------------------
   Шапка
   ------------------------------------------------------------ */

/*
 * Панель администратора WordPress — гарантированный отступ.
 * Стандартный margin у html иногда не отодвигает шапку;
 * переносим отступ на body через CSS-переменную ядра WP.
 */
html {
    margin-top: 0 !important;
}

body.admin-bar {
    padding-top: var(--wp-admin--admin-bar--height, 32px) !important;
}

.site-header {
    background-color: var(--vd-header-bg);
}

.inside-header {
    padding-top: 18px;
    padding-bottom: 18px;
}

/* Логотип + название в одну линию */
.vd-header-brand {
    display: flex;
    align-items: center;
    gap: var(--vd-header-logo-gap, 12px);
    min-width: 0;
}

.vd-header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.vd-header-logo__img {
    display: block;
    height: var(--vd-header-logo-height, 40px);
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.vd-header-brand .site-branding {
    min-width: 0;
}

/* Название сайта */
.main-title a,
.main-title a:hover,
.main-title a:visited {
    color: var(--vd-white);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
}

/* Описание сайта */
.site-description {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

/* ------------------------------------------------------------
   Навигация
   ------------------------------------------------------------ */

/*
 * Селекторы с .site-header сильнее динамического CSS GeneratePress,
 * чтобы цвета меню из настроек шапки не перекрывались темой-родителем.
 */
.site-header .main-navigation,
.site-header .main-navigation ul ul {
    background-color: transparent;
}

.site-header .main-navigation .main-nav ul li a {
    color: var(--vd-nav-color);
    font-family: var(--vd-nav-font-family);
    font-weight: var(--vd-nav-font-weight);
    font-size: var(--vd-nav-font-size);
    line-height: 54px;
}

.site-header .main-navigation .main-nav ul li:hover > a,
.site-header .main-navigation .main-nav ul li:focus > a,
.site-header .main-navigation .main-nav ul li.sfHover > a {
    color: var(--vd-nav-hover-color);
    background-color: var(--vd-nav-hover-bg);
}

.site-header .main-navigation .main-nav ul li[class*="current-menu-"] > a,
.site-header .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a {
    color: var(--vd-nav-current-color);
    background-color: var(--vd-nav-current-bg);
}

.menu-item-has-children .dropdown-menu-toggle {
    padding-right: 16px;
    padding-left: 6px;
}

/* Выпадающее меню */
.site-header .main-navigation ul ul {
    background-color: var(--vd-nav-dropdown-bg);
    border-radius: 0 0 var(--vd-radius-sm) var(--vd-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header .main-navigation .main-nav ul ul li a {
    color: var(--vd-nav-color);
    font-family: var(--vd-nav-font-family);
    font-weight: var(--vd-nav-font-weight);
    font-size: calc(var(--vd-nav-font-size) * 0.95);
    line-height: 1.4;
    padding: 10px 18px;
}

.site-header .main-navigation .main-nav ul ul li:hover > a,
.site-header .main-navigation .main-nav ul ul li:focus > a,
.site-header .main-navigation .main-nav ul ul li.sfHover > a {
    color: var(--vd-nav-hover-color);
    background-color: var(--vd-nav-hover-bg);
}

/* Кнопка мобильного меню */
.site-header .menu-toggle,
.site-header button.menu-toggle {
    color: var(--vd-hamburger-color, var(--vd-nav-color, #FFFFFF));
    background-color: transparent;
    font-family: var(--vd-nav-font-family);
    font-size: var(--vd-nav-font-size);
    line-height: 50px;
}

.site-header .menu-toggle:hover,
.site-header .menu-toggle:focus,
.site-header button.menu-toggle:hover,
.site-header button.menu-toggle:focus {
    color: var(--vd-hamburger-hover-color, #FFFFFF);
    background-color: var(--vd-hamburger-hover-bg, transparent);
}

.site-header .menu-toggle .gp-icon svg {
    fill: currentColor;
}

/* Пункты меню справа от логотипа; кнопку-гамбургер не трогаем */
.nav-float-right .inside-header #site-navigation {
    margin-left: auto;
}

/* ------------------------------------------------------------
   Основной контент — двухколоночная структура
   ------------------------------------------------------------ */
/*
 * GeneratePress генерирует динамический CSS с селекторами:
 *   #primary { width: ... }
 *   #right-sidebar { width: ... }
 * Переопределяем через ID-селекторы для уверенного приоритета.
 *
 * Десктоп: две колонки на экранах шире 1050px.
 */
@media (min-width: 1051px) {
    #primary {
        width: 72%;
    }

    #right-sidebar {
        width: 28%;
    }

    .right-sidebar #primary {
        padding-right: 30px;
    }

    /* Переключатель «слева»: сайдбар перед контентом */
    body.vd-sidebar-left #right-sidebar {
        order: -10;
    }

    body.vd-sidebar-left.right-sidebar #primary {
        padding-right: 0;
        padding-left: 30px;
    }

    /* Без сайдбара: контент на всю ширину, без пустой колонки справа */
    body.no-sidebar #primary,
    body.vd-sidebar-none #primary {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .separate-containers .site-main {
        margin-left: 0;
    }
}

/* Карточки записей */
.separate-containers .inside-article {
    background-color: var(--vd-card-bg);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    box-shadow: var(--vd-shadow-sm);
}

.separate-containers .site-main {
    margin-top: 20px;
    margin-bottom: 20px;
}

.separate-containers .site-main > article:not(:last-child) {
    margin-bottom: 24px;
}

/* Метаданные */
.entry-meta {
    color: var(--vd-muted);
    font-size: 0.85rem;
}

.entry-meta a {
    color: var(--vd-muted);
}

.entry-meta a:hover {
    color: var(--vd-accent);
}

/* Заголовки записей */
.entry-title a {
    color: var(--vd-text);
}

.entry-title a:hover {
    color: var(--vd-accent);
}

/* ------------------------------------------------------------
   Сайдбар
   ------------------------------------------------------------ */
.separate-containers .inside-right-sidebar {
    margin-top: 20px;
}

/*
 * КАРТОЧКИ: только ПРЯМЫЕ дети .inside-right-sidebar.
 *
 * Реальная HTML-структура GeneratePress sidebar:
 *   #right-sidebar > .inside-right-sidebar > .widget
 *   #right-sidebar > .inside-right-sidebar > .wp-block-*
 */
#right-sidebar .inside-right-sidebar > .widget,
#right-sidebar .inside-right-sidebar > .wp-block-group,
#right-sidebar .inside-right-sidebar > .wp-block-search,
#right-sidebar .inside-right-sidebar > .wp-block-categories,
#right-sidebar .inside-right-sidebar > .wp-block-archives,
#right-sidebar .inside-right-sidebar > .wp-block-latest-posts,
#right-sidebar .inside-right-sidebar > .wp-block-latest-comments,
#right-sidebar .inside-right-sidebar > .wp-block-tag-cloud,
#right-sidebar .inside-right-sidebar > .wp-block-calendar,
#right-sidebar .inside-right-sidebar > .wp-block-image,
#right-sidebar .inside-right-sidebar > .wp-block-buttons {
    background-color: var(--vd-card-bg);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    box-shadow: var(--vd-shadow-sm);
    padding: 16px;
    margin-bottom: 16px;
}

/*
 * ВЛОЖЕННЫЕ блоки внутри верхнеуровневой карточки:
 * НЕ получают собственный фон / границу / тень / padding.
 */
#right-sidebar .widget .wp-block-group,
#right-sidebar .widget .wp-block-image,
#right-sidebar .widget .wp-block-buttons,
#right-sidebar .widget .wp-block-search,
#right-sidebar .widget .wp-block-categories,
#right-sidebar .widget .wp-block-archives,
#right-sidebar .widget .wp-block-latest-posts,
#right-sidebar .widget .wp-block-latest-comments,
#right-sidebar .widget .wp-block-tag-cloud,
#right-sidebar .widget .wp-block-calendar,
#right-sidebar .inside-right-sidebar > .wp-block-group .wp-block-group,
#right-sidebar .inside-right-sidebar > .wp-block-group .wp-block-image,
#right-sidebar .inside-right-sidebar > .wp-block-group .wp-block-buttons,
#right-sidebar .inside-right-sidebar > .wp-block-group .wp-block-search {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}

/* Заголовки виджетов и Gutenberg-блоков */
#right-sidebar .widget-title,
#right-sidebar .wp-block-heading,
#right-sidebar h2.wp-block-heading,
#right-sidebar h3.wp-block-heading,
#right-sidebar h4.wp-block-heading {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vd-text);
    margin-bottom: 10px;
    margin-top: 0;
}

/* Списки */
#right-sidebar .widget ul,
#right-sidebar .wp-block-latest-posts,
#right-sidebar .wp-block-categories-list,
#right-sidebar .wp-block-archives-list,
#right-sidebar .wp-block-page-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#right-sidebar .widget ul li,
#right-sidebar .wp-block-latest-posts li,
#right-sidebar .wp-block-categories-list li,
#right-sidebar .wp-block-archives-list li {
    padding: 5px 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--vd-border);
}

#right-sidebar .widget ul li:last-child,
#right-sidebar .wp-block-latest-posts li:last-child,
#right-sidebar .wp-block-categories-list li:last-child,
#right-sidebar .wp-block-archives-list li:last-child {
    border-bottom: none;
}

/* Ссылки */
#right-sidebar a {
    color: var(--vd-text);
    text-decoration: none;
}

#right-sidebar a:hover {
    color: var(--vd-accent);
}

/* Изображения: без лишних отступов */
#right-sidebar .wp-block-image {
    margin: 0;
}

#right-sidebar .wp-block-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Параграфы — компактнее */
#right-sidebar p {
    margin-bottom: 10px;
}

/* Кнопки Gutenberg */
#right-sidebar .wp-block-button__link,
#right-sidebar .wp-block-buttons .wp-block-button__link {
    background-color: var(--vd-accent);
    color: var(--vd-white);
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.15s ease;
    margin-top: 10px;
}

#right-sidebar .wp-block-button__link:hover,
#right-sidebar .wp-block-buttons .wp-block-button__link:hover {
    background-color: var(--vd-hover);
    color: var(--vd-white);
}

/* Поиск */
#right-sidebar .wp-block-search__input {
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    padding: 8px 12px;
    font-size: 0.9rem;
    width: 100%;
}

#right-sidebar .wp-block-search__button {
    background-color: var(--vd-accent);
    color: var(--vd-white);
    border: none;
    border-radius: var(--vd-radius-sm);
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Теги */
#right-sidebar .wp-block-tag-cloud a {
    display: inline-block;
    font-size: 0.85rem !important;
    padding: 2px 10px;
    border: 1px solid var(--vd-border);
    border-radius: 16px;
    margin: 0 4px 6px 0;
}

#right-sidebar .wp-block-tag-cloud a:hover {
    background-color: var(--vd-accent);
    color: var(--vd-white);
    border-color: var(--vd-accent);
}

/* Контейнер внешней формы — не создаёт карточку */
.vd-external-form {
    max-width: 100%;
    overflow: hidden;
}

/* ------------------------------------------------------------
   Hero-блок главной страницы
   ------------------------------------------------------------ */
.vd-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--vd-card-bg);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-hero-radius, 14px);
    box-shadow: var(--vd-shadow-sm);
    padding: var(--vd-hero-padding-d, 30px);
    margin-bottom: 30px;
    min-height: var(--vd-hero-height-desktop, 330px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #EBF3FE 0%, #D6E6FD 50%, #E8F0FE 100%);
}

/* Скрытие Hero */
.vd-hero { display: flex; }
:root { --vd-hero-display: flex; }
.vd-hero { display: var(--vd-hero-display, flex); }

/* Обёртка фона — всегда absolute, никогда не занимает место в потоке */
.vd-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--vd-hero-bg-image, none);
    background-size: cover;
    background-position: var(--vd-hero-img-position, center right);
    background-repeat: no-repeat;
}

/* Градиентный overlay слева направо (ПК) */
.vd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, var(--vd-hero-overlay-alpha-start, 0.95)) 0%,
        rgba(255, 255, 255, calc(var(--vd-hero-overlay-alpha-start, 0.95) * 0.97)) var(--vd-hero-overlay-mid1, 34%),
        rgba(255, 255, 255, calc(var(--vd-hero-overlay-alpha-start, 0.95) * 0.55)) var(--vd-hero-overlay-mid2, 62%),
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Текстовая часть */
.vd-hero__text {
    position: relative;
    z-index: 2;
    max-width: var(--vd-hero-text-width, 52%);
}

/* Метка */
.vd-hero__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vd-hero-accent, #1265F5);
    background-color: var(--vd-hero-badge-bg, #EAF2FF);
    padding: 4px 12px;
    border-radius: 16px;
    margin-bottom: 12px;
}

/* Заголовок */
.vd-hero__title {
    font-size: var(--vd-hero-title-size-d, 36px);
    font-weight: 700;
    line-height: var(--vd-hero-title-line-height-d, 1.10);
    margin-bottom: 10px;
    max-width: 540px;
    color: var(--vd-hero-title-color, #0F172A);
}

/* Описание */
.vd-hero__desc {
    color: var(--vd-hero-desc-color, #52637A);
    font-size: var(--vd-hero-desc-size, 15px);
    line-height: var(--vd-hero-desc-line-height, 1.60);
    margin-bottom: 14px;
    max-width: 480px;
}

/* Кнопка Hero */
.vd-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--vd-hero-button-font-size, 15px);
    color: var(--vd-hero-button-color, #FFFFFF);
    background-color: var(--vd-hero-button-bg, #1265F5);
    border-radius: var(--vd-hero-button-radius, 8px);
    padding: var(--vd-hero-button-padding-y, 11px) var(--vd-hero-button-padding-x, 20px);
    margin-top: var(--vd-hero-button-margin-top, 18px);
    width: fit-content;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.vd-hero__button:hover {
    background-color: var(--vd-hero-button-bg-hover, #0D4FD6);
    color: var(--vd-hero-button-color, #FFFFFF);
    transform: translateY(-1px);
}

.vd-hero__button:focus-visible {
    outline: 2px solid var(--vd-hero-button-bg, #1265F5);
    outline-offset: 2px;
}

/* Преимущества */
.vd-hero__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: var(--vd-hero-benefits-display, flex);
    flex-wrap: wrap;
    gap: 6px 16px;
}

/* Layout преимуществ */
.vd-hero__features {
    flex-wrap: wrap;
}
.vd-hero__features[data-layout="row"] { flex-wrap: nowrap; }
.vd-hero__features[data-layout="wrap"] { flex-wrap: wrap; }
.vd-hero__features[data-layout="column"] { flex-direction: column; }

.vd-hero__features li {
    font-size: 0.82rem;
    color: var(--vd-hero-desc-color, #52637A);
    padding-left: 18px;
    position: relative;
}

.vd-hero__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 10px;
    height: 10px;
    background-color: color-mix(in srgb, var(--vd-hero-accent, #1265F5) 12%, transparent);
    border-radius: 2px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 4l1.5 1.5 3.5-3.5' stroke='%231265F5' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ------------------------------------------------------------
   Заголовок «Свежие статьи»
   ------------------------------------------------------------ */
.vd-section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 0;
}

/* ------------------------------------------------------------
   Карточки записей (горизонтальные)
   ------------------------------------------------------------ */

/* Сбрасываем стандартные отступы внутри карточки */
.separate-containers .inside-article {
    padding: 0;
}

.vd-post-card {
    display: flex;
    gap: 0;
    background-color: var(--vd-card-bg);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-post-radius, 12px);
    box-shadow: var(--vd-shadow-sm);
    overflow: hidden;
    margin-bottom: var(--vd-post-gap, 16px);
}

/* Изображение слева */
.vd-post-card__image {
    flex: 0 0 var(--vd-post-img-width, 240px);
    align-self: stretch;
    position: relative;
    overflow: hidden;
}

.vd-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Бейдж «★ ТОП СТАТЬЯ» */
.vd-post-card__top-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    background-color: var(--vd-accent);
    padding: 3px 9px;
    border-radius: 5px;
    line-height: 1.4;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.vd-post-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(150deg, #F1F5F9 0%, #E2E8F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vd-muted);
    text-decoration: none;
}

.vd-post-card__image-placeholder svg {
    opacity: 0.35;
}

/* Контент справа */
.vd-post-card__content {
    flex: 1 1 auto;
    padding: 20px 20px 20px 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Рубрика */
.vd-post-card__category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--vd-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    text-decoration: none;
    width: fit-content;
}

.vd-post-card__category:hover {
    opacity: 0.8;
}

/* Заголовок */
.vd-post-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vd-post-card__title a {
    color: var(--vd-text);
    text-decoration: none;
}

.vd-post-card__title a:hover {
    color: var(--vd-accent);
}

/* Excerpt */
.vd-post-card__excerpt {
    color: var(--vd-muted);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Нижняя строка метаданных */
.vd-post-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--vd-muted);
}

.vd-post-card__reading-time,
.vd-post-card__date,
.vd-post-card__comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.vd-post-card__reading-time svg,
.vd-post-card__date svg,
.vd-post-card__comments svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Кнопка «Читать →» */
.vd-post-card__button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-white);
    background-color: var(--vd-accent);
    padding: 5px 14px;
    border-radius: 7px;
    margin-left: auto;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.vd-post-card__button:hover {
    color: var(--vd-white);
    background-color: var(--vd-hover);
}

/* --- Старые классы (удаляем) --- */
.vd-entry-category,
.vd-read-more {
    /* больше не используются, всё в content.php */
}

/* ------------------------------------------------------------
   Отдельная статья (single)
   ------------------------------------------------------------ */
.vd-single {
    background-color: var(--vd-card-bg);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-single-radius, 14px);
    box-shadow: var(--vd-shadow-sm);
    padding: var(--vd-single-padding-d, 36px);
    margin-bottom: 30px;
}

/* Рубрика */
.vd-single__category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--vd-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 12px;
}

.vd-single__category:hover {
    opacity: 0.8;
}

/* Заголовок */
.vd-single__title {
    font-size: var(--vd-single-title-size-d, 42px);
    line-height: var(--vd-single-title-line-height, 1.15);
    font-weight: 700;
    color: var(--vd-text);
    margin: 0 0 14px;
    max-width: 800px;
}

/* Метаданные */
.vd-single__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--vd-muted);
    margin-bottom: 24px;
}

.vd-single__author,
.vd-single__date,
.vd-single__reading-time,
.vd-single__comments {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.vd-single__meta svg {
    flex-shrink: 0;
    opacity: 0.55;
}

/* Главное изображение */
.vd-single__image {
    margin: 0 0 28px;
}

.vd-single__image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Контент */
.vd-single__content {
    font-size: var(--vd-single-content-size, 18px);
    line-height: var(--vd-single-content-line-height, 1.75);
    color: #253247;
}

.vd-single__content > *:last-child {
    margin-bottom: 0;
}

.vd-single__content p {
    margin-bottom: 1.5em;
}

.vd-single__content h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--vd-text);
    margin: 40px 0 16px;
}

.vd-single__content h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vd-text);
    margin: 32px 0 12px;
}

.vd-single__content h4 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--vd-text);
    margin: 28px 0 10px;
}

.vd-single__content a {
    color: var(--vd-accent);
    text-decoration: none;
}

.vd-single__content a:hover {
    color: var(--vd-hover);
}

.vd-single__content blockquote {
    background: #F8FAFC;
    border-left: 4px solid var(--vd-accent);
    padding: 20px 24px;
    margin: 28px 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
    color: var(--vd-muted);
}

.vd-single__content blockquote p:last-child {
    margin-bottom: 0;
}

.vd-single__content ul,
.vd-single__content ol {
    margin: 0 0 1.5em;
    padding-left: 1.5em;
    line-height: inherit;
}

.vd-single__content li {
    margin-bottom: 0.4em;
}

.vd-single__content code,
.vd-single__content pre {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
    overflow-x: auto;
}

.vd-single__content pre {
    background: #F1F5F9;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 1.5em;
}

.vd-single__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5em;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.vd-single__content th,
.vd-single__content td {
    border: 1px solid var(--vd-border);
    padding: 10px 14px;
    text-align: left;
}

.vd-single__content th {
    background: #F8FAFC;
    font-weight: 700;
}

.vd-single__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.vd-single__content figure {
    margin: 28px 0;
}

.vd-single__content figcaption,
.vd-single__content .wp-element-caption {
    font-size: 13px;
    color: var(--vd-muted);
    text-align: center;
    margin-top: 8px;
}

/* Навигация по частям длинной страницы */
.vd-page-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--vd-border, #e2e8f0);
    font-size: 14px;
}

.vd-page-links__label {
    color: var(--vd-muted, #64748b);
    margin-right: 4px;
}

.vd-page-links a,
.vd-page-links > span:not(.vd-page-links__label) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--vd-border, #e2e8f0);
    background: #fff;
    color: var(--vd-text, #0F172A);
    text-decoration: none;
    font-weight: 600;
    box-sizing: border-box;
}

.vd-page-links a:hover {
    background: #EAF2FF;
    border-color: #c7dbff;
    color: var(--vd-accent, #1265F5);
}

.vd-page-links > span:not(.vd-page-links__label) {
    background: var(--vd-accent, #1265F5);
    border-color: var(--vd-accent, #1265F5);
    color: #fff;
}

/* Блок «Поделиться» */
.vd-share-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.vd-share-buttons__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--vd-text);
    white-space: nowrap;
}

.vd-share-buttons__items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vd-share-buttons__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    border: 0;
    font-family: inherit;
    line-height: 1.4;
}

.vd-share-buttons__btn--vk {
    background-color: #E7EDF8;
    color: #2787F5;
}

.vd-share-buttons__btn--vk:hover {
    background-color: #2787F5;
    color: #fff;
}

.vd-share-buttons__btn--tg {
    background-color: #E6F3FA;
    color: #27A6E5;
}

.vd-share-buttons__btn--tg:hover {
    background-color: #27A6E5;
    color: #fff;
}

.vd-share-buttons__btn--email {
    background-color: #F1F5F9;
    color: var(--vd-muted);
}

.vd-share-buttons__btn--email:hover {
    background-color: var(--vd-accent);
    color: #fff;
}

/* ------------------------------------------------------------
   Комментарии
   ------------------------------------------------------------ */
.vd-comments.comments-area {
    background: var(--vd-card-bg, #fff);
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: var(--vd-single-radius, 14px);
    box-shadow: var(--vd-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
    padding: var(--vd-single-padding-d, 36px);
    margin: 28px 0 30px;
}

.vd-comments__title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: var(--vd-text, #0F172A);
}

.vd-comments__empty,
.vd-comments__closed,
.vd-comments__notes {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--vd-muted, #64748b);
    line-height: 1.5;
}

.vd-comments__list,
.vd-comments__list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vd-comments__list .children {
    margin: 16px 0 0 20px;
    padding-left: 16px;
    border-left: 2px solid #E2E8F0;
}

.vd-comment__body {
    padding: 18px 0;
    border-bottom: 1px solid #F1F5F9;
}

.vd-comments__list > .vd-comment:last-child > .vd-comment__body,
.vd-comments__list > .comment:last-child > .vd-comment__body {
    border-bottom: 0;
}

.vd-comment__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.vd-comment__avatar,
.vd-comment__meta img.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    float: none;
    margin: 0;
}

.vd-comment__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vd-comment__name,
.vd-comment__name a {
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    color: var(--vd-text, #0F172A);
    text-decoration: none;
}

.vd-comment__name a:hover {
    color: var(--vd-accent, #1265F5);
}

.vd-comment__date {
    font-size: 13px;
    color: var(--vd-muted, #64748b);
    text-decoration: none;
}

.vd-comment__date:hover {
    color: var(--vd-accent, #1265F5);
}

.vd-comment__moderation {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #FFF7ED;
    color: #9A3412;
    font-size: 13px;
}

.vd-comment__content {
    font-size: 15px;
    line-height: 1.65;
    color: var(--vd-text, #0F172A);
    margin: 0;
    padding: 0;
    border: 0;
}

.vd-comment__content p:last-child {
    margin-bottom: 0;
}

.vd-comment__reply {
    margin-top: 10px;
}

.vd-comment__reply a {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-accent, #1265F5);
    text-decoration: none;
}

.vd-comment__reply a:hover {
    text-decoration: underline;
}

.vd-comments__nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 24px;
    font-size: 14px;
    font-weight: 600;
}

.vd-comments__respond {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--vd-border, #e2e8f0);
}

.vd-comments__respond .comment-reply-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--vd-text, #0F172A);
}

.vd-comments__respond .comment-reply-title small a {
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-accent, #1265F5);
    margin-left: 8px;
}

.vd-comments__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.vd-comments__field {
    margin: 0;
}

.vd-comments__field--comment,
.vd-comments__form .comment-form-cookies-consent,
.vd-comments__form .form-submit,
.vd-comments__submit-wrap {
    grid-column: 1 / -1;
}

.vd-comments__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-text, #0F172A);
}

.vd-comments__required {
    color: #DC2626;
}

.vd-comments__input,
.vd-comments__textarea,
.vd-comments__form input[type="text"],
.vd-comments__form input[type="email"],
.vd-comments__form input[type="url"],
.vd-comments__form textarea {
    width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    color: var(--vd-text, #0F172A);
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vd-comments__textarea,
.vd-comments__form textarea {
    min-height: 140px;
    resize: vertical;
}

.vd-comments__input:focus,
.vd-comments__textarea:focus,
.vd-comments__form input:focus,
.vd-comments__form textarea:focus {
    outline: none;
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(18, 101, 245, 0.15);
}

.vd-comments__form .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--vd-muted, #64748b);
    margin: 0;
}

.vd-comments__form .comment-form-cookies-consent input {
    margin-top: 3px;
}

.vd-comments__submit,
.vd-comments__form .submit,
.vd-comments__form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--vd-accent, #1265F5);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.vd-comments__submit:hover,
.vd-comments__form .submit:hover,
.vd-comments__form button[type="submit"]:hover {
    background: #0D4FD6;
}

@media (max-width: 768px) {
    .vd-comments.comments-area {
        padding: var(--vd-single-padding-m, 20px);
    }

    .vd-comments__form {
        grid-template-columns: 1fr;
    }

    .vd-comments__list .children {
        margin-left: 8px;
        padding-left: 12px;
    }
}

/* Сброс стандартного GP для single */
.single .inside-article {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}
.site-footer,
.site-footer .site-info {
    background-color: var(--vd-footer-bg);
}

.inside-site-info {
    padding: 20px 40px;
}

.site-info,
.vd-footer-bar,
.vd-footer-bar__left,
.vd-footer-bar__right {
    color: var(--vd-footer-text, var(--vd-muted));
    font-size: 0.85rem;
}

/* Настраиваемая полоса подвала */
.vd-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    width: 100%;
    flex-wrap: wrap;
}

.vd-footer-bar__left,
.vd-footer-bar__right {
    color: var(--vd-footer-text, var(--vd-muted));
    line-height: 1.45;
}

.vd-footer-bar__right {
    margin-left: auto;
    text-align: right;
}

.site-info a,
.vd-footer-bar a {
    color: var(--vd-footer-link, var(--vd-accent));
    text-decoration: none;
}

.site-info a:hover,
.vd-footer-bar a:hover {
    color: var(--vd-hover, #0D4FD6);
}

/* Старый copyright-bar GP — растягиваем под наш flex */
.site-info .copyright-bar {
    display: block;
    width: 100%;
}

@media (max-width: 600px) {
    .vd-footer-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .vd-footer-bar__right {
        margin-left: 0;
        text-align: left;
    }

    .inside-site-info {
        padding: 16px 12px;
    }
}

/* ------------------------------------------------------------
   Адаптивность
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   Планшет и мобильные: ≤ 1050px — одна колонка
   ------------------------------------------------------------ */
@media (max-width: 1050px) {
    /* Переводим основной контейнер в колонку */
    .site-content {
        flex-direction: column;
    }

    #primary {
        width: 100%;
    }

    #right-sidebar {
        width: 100%;
    }

    .right-sidebar #primary {
        padding-right: 0;
    }

    /* Горизонтальные поля даёт padding у #page — здесь только вертикаль */
    .separate-containers .site-main,
    .separate-containers.right-sidebar .site-main,
    .separate-containers.left-sidebar .site-main,
    .separate-containers.both-right .site-main,
    .separate-containers.both-left .site-main {
        margin-left: 0;
        margin-right: 0;
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .separate-containers .inside-right-sidebar,
    .separate-containers .inside-left-sidebar {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .sidebar .widget {
        padding: 24px;
    }

    /* Hero — фон за текстом, картинка едва видна */
    .vd-hero {
        flex-direction: column;
        align-items: stretch;
        padding: var(--vd-hero-padding-t, 26px);
        min-height: auto;
        background: linear-gradient(135deg, #EBF3FE 0%, #D6E6FD 50%, #E8F0FE 100%);
        /* Внешние поля даёт .site-main — здесь только отступ снизу */
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 24px;
    }

    .vd-hero__media {
        position: absolute;
        inset: 0;
        opacity: 0.28;
    }

    /* Плотный светлый слой — текст читается, фон едва просвечивает */
    .vd-hero__overlay {
        display: block;
        background: rgba(255, 255, 255, 0.82);
    }

    .vd-hero__text {
        max-width: none;
    }

    .vd-hero__title {
        font-size: var(--vd-hero-title-size-t, 34px);
        line-height: var(--vd-hero-title-line-height-t, 1.15);
        max-width: none;
    }

    .vd-hero__desc {
        max-width: 620px;
    }

    /* Карточки — вертикальные */
    .vd-post-card {
        flex-direction: column;
        gap: 0;
    }

    .vd-post-card__image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }

    .vd-post-card__content {
        padding: 18px;
    }

    .vd-post-card__title {
        font-size: 17px;
    }

    .vd-section-title {
        font-size: 24px;
    }

    .vd-post-card__meta {
        gap: 10px;
    }

    /* Single */
    .vd-single {
        padding: 28px;
    }

    .vd-single__title {
        font-size: var(--vd-single-title-size-t, 36px);
    }

    /* Шапка */
    .inside-header {
        flex-direction: column;
        text-align: center;
    }

    .vd-header-brand {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Полноценное меню на планшете; кнопку-гамбургер не сдвигаем */
    .nav-float-right .inside-header #site-navigation {
        margin-left: 0;
        margin-top: 12px;
    }
}

/* ------------------------------------------------------------
   Мобильное меню: ≤ 768px — гамбургер справа и крупнее
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    /* Логотип слева, кнопка меню справа в одной строке */
    .has-inline-mobile-toggle .inside-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
        flex-wrap: wrap;
    }

    .has-inline-mobile-toggle .vd-header-brand {
        justify-content: flex-start;
        margin-left: 0;
        margin-right: 0;
    }

    .nav-float-right .inside-header .mobile-menu-control-wrapper {
        margin-left: auto;
        margin-top: 0;
    }

    /* Крупнее и удобнее нажимать пальцем */
    .site-header .menu-toggle {
        font-size: 28px;
        line-height: 1;
        padding: 8px 10px;
        min-width: 44px;
        min-height: 44px;
        width: auto;
        flex-grow: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-header .menu-toggle .gp-icon svg {
        width: 28px;
        height: 28px;
        top: 0;
    }
}

/* ------------------------------------------------------------
   Телефоны: ≤ 600px — компактные размеры
   ------------------------------------------------------------ */
@media (max-width: 600px) {
    .separate-containers .site-main,
    .separate-containers.right-sidebar .site-main,
    .separate-containers.left-sidebar .site-main,
    .separate-containers.both-right .site-main,
    .separate-containers.both-left .site-main {
        margin-left: 0;
        margin-right: 0;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .separate-containers .inside-right-sidebar,
    .separate-containers .inside-left-sidebar {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .vd-hero {
        padding: var(--vd-hero-padding-m, 20px);
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .vd-hero__title {
        font-size: var(--vd-hero-title-size-m, 29px);
        line-height: var(--vd-hero-title-line-height-m, 1.20);
    }

    /* На телефоне фон ещё тише */
    .vd-hero__media {
        opacity: 0.22;
    }

    .vd-hero__overlay {
        background: rgba(255, 255, 255, 0.86);
    }

    .vd-hero__features {
        flex-direction: column;
        gap: 4px;
    }

    .vd-post-card__image {
        height: 190px;
    }

    .vd-post-card__content {
        padding: 16px;
    }

    .vd-post-card__title {
        font-size: 16px;
    }

    .vd-post-card__button {
        font-size: 12px;
        padding: 4px 12px;
    }

    /* Single */
    .vd-single {
        padding: var(--vd-single-padding-m, 20px);
    }

    .vd-single__title {
        font-size: var(--vd-single-title-size-m, 30px);
    }

    .vd-single__meta {
        gap: 10px;
        font-size: 12px;
    }

    /* Share */
    .vd-share-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .vd-share-buttons__btn span {
        display: none;
    }

    .vd-share-buttons__btn {
        padding: 8px 12px;
    }
}

/* ============================================================
   Архивные страницы (рубрики, метки, автор, поиск)
   ============================================================ */

.vd-archive-hero {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: var(--vd-shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.06));
    overflow: hidden;
    margin-bottom: 24px;
    min-height: 0;
}

.vd-archive-hero__text {
    flex: 1 1 auto;
    padding: 28px 32px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.vd-archive-hero--has-media .vd-archive-hero__text {
    flex: 1 1 58%;
}

.vd-archive-hero--no-media .vd-archive-hero__text {
    flex: 1 1 100%;
    width: 100%;
}

.vd-archive-hero__badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--vd-accent, #1265F5);
    background: #EAF2FF;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.vd-archive-hero__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--vd-text, #0F172A);
    margin: 0 0 12px;
}

.vd-archive-hero__desc {
    color: var(--vd-muted, #52637A);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.vd-archive-hero__desc p {
    margin: 0 0 8px;
}

.vd-archive-hero__desc p:last-child {
    margin-bottom: 0;
}

.vd-archive-hero__count {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-accent, #1265F5);
}

.vd-archive-hero__media {
    flex: 0 0 38%;
    position: relative;
    min-height: var(--vd-archive-cat-img-height, 220px);
    padding: 14px;
    box-sizing: border-box;
}

.vd-archive-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: calc(var(--vd-archive-cat-img-height, 220px) - 28px);
    object-fit: cover;
    border-radius: var(--vd-archive-cat-img-radius, 12px);
}

/* Список / сетка */
.vd-archive-list {
    display: flex;
    flex-direction: column;
    gap: var(--vd-archive-gap, 16px);
}

.vd-archive-list .vd-post-card {
    margin-bottom: 0;
    border-radius: var(--vd-archive-radius, 12px);
}

.vd-archive-list--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vd-archive-gap, 16px);
}

.vd-archive-list--grid .vd-post-card {
    flex-direction: column;
    height: 100%;
}

.vd-archive-list--grid .vd-post-card__image {
    flex: 0 0 auto;
    width: 100%;
    height: 180px;
}

.vd-archive-list--grid .vd-post-card__content {
    flex: 1 1 auto;
}

/* Без изображений */
.vd-archive--no-images .vd-post-card__image {
    display: none !important;
}

.vd-archive--no-images .vd-post-card {
    display: block;
}

.vd-archive--no-images .vd-archive-list--grid .vd-post-card {
    display: flex;
    flex-direction: column;
}

/* Пустой архив */
.vd-archive-empty {
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: var(--vd-shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.06));
    padding: 40px 28px;
    text-align: center;
}

.vd-archive-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--vd-text, #0F172A);
    margin: 0 0 8px;
}

.vd-archive-empty__text {
    color: var(--vd-muted, #52637A);
    margin: 0 0 18px;
}

.vd-archive-empty__button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--vd-accent, #1265F5);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
}

.vd-archive-empty__button:hover {
    background: #0D4FD6;
    color: #fff !important;
}

/* Пагинация */
.vd-pagination {
    margin-top: 28px;
}

.vd-pagination__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.vd-pagination__item {
    margin: 0;
}

.vd-pagination a.page-numbers,
.vd-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 10px;
    color: var(--vd-text, #0F172A);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--vd-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vd-pagination a.page-numbers:hover {
    background: #EAF2FF;
    border-color: #c7dbff;
    color: var(--vd-accent, #1265F5);
}

.vd-pagination span.page-numbers.current {
    background: var(--vd-accent, #1265F5);
    border-color: var(--vd-accent, #1265F5);
    color: #fff;
}

.vd-pagination span.page-numbers.dots {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    min-width: 24px;
}

@media (max-width: 1024px) {
    .vd-archive-hero {
        flex-direction: column;
        min-height: 0;
    }

    .vd-archive-hero__text {
        padding: 24px;
    }

    .vd-archive-hero__title {
        font-size: 28px;
    }

    .vd-archive-hero--has-media .vd-archive-hero__media {
        flex: 0 0 auto;
        width: 100%;
        min-height: var(--vd-archive-cat-img-height, 220px);
        padding: 0 24px 24px;
    }

    .vd-archive-hero__img {
        min-height: var(--vd-archive-cat-img-height, 220px);
    }
}

@media (max-width: 768px) {
    .vd-archive-list--grid {
        grid-template-columns: 1fr;
    }

    .vd-archive-hero__title {
        font-size: 24px;
    }

    .vd-archive-hero__text {
        padding: 20px;
    }

    .vd-pagination a.page-numbers,
    .vd-pagination span.page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ============================================================
   Похожие статьи (single)
   ============================================================ */

.vd-related {
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: var(--vd-single-radius, 14px);
    box-shadow: var(--vd-shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.06));
    padding: 28px;
    margin: 28px 0 0;
}

.vd-related__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--vd-text, #0F172A);
    margin: 0 0 20px;
    line-height: 1.25;
}

.vd-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--vd-related-gap, 16px);
}

.vd-related .vd-post-card--related {
    flex-direction: column;
    margin-bottom: 0;
    height: 100%;
    border-radius: var(--vd-related-radius, 12px);
}

.vd-related .vd-post-card--related .vd-post-card__image {
    flex: 0 0 auto;
    width: 100%;
    height: 140px;
}

.vd-related .vd-post-card--related .vd-post-card__image img,
.vd-related .vd-post-card--related .vd-post-card__image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-related .vd-post-card--related .vd-post-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: #94A3B8;
}

.vd-related .vd-post-card--related .vd-post-card__content {
    padding: 14px 16px 16px;
    gap: 8px;
}

.vd-related .vd-post-card--related .vd-post-card__title {
    font-size: 16px;
    margin: 0;
    line-height: 1.35;
}

.vd-related .vd-post-card--related .vd-post-card__excerpt {
    display: none;
}

.vd-related .vd-post-card--related .vd-post-card__meta {
    margin-top: auto;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.vd-related .vd-post-card--related .vd-post-card__button {
    margin-left: auto;
    padding: 6px 14px;
    font-size: 12px;
}

@media (max-width: 1024px) {
    .vd-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .vd-related {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .vd-related__title {
        font-size: 19px;
        margin-bottom: 14px;
    }

    .vd-related__grid {
        grid-template-columns: 1fr;
    }

    .vd-related .vd-post-card--related .vd-post-card__image {
        height: 160px;
    }
}

/* ============================================================
   Страница «Все рубрики»
   ============================================================ */

.vd-categories-page__header {
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: var(--vd-shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.06));
    padding: 28px 32px;
    margin-bottom: 24px;
}

.vd-categories-page__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--vd-text, #0F172A);
    margin: 0 0 10px;
}

.vd-categories-page__intro {
    color: var(--vd-muted, #64748B);
    font-size: 15px;
    line-height: 1.6;
}

.vd-categories-page__intro > *:last-child {
    margin-bottom: 0;
}

.vd-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.vd-category-card {
    background: #fff;
    border: 1px solid var(--vd-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: var(--vd-shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.06));
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.vd-category-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.vd-category-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.vd-category-card__media {
    height: 160px;
    background: #F1F5F9;
    overflow: hidden;
}

.vd-category-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-category-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94A3B8;
}

.vd-category-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
    flex: 1 1 auto;
}

.vd-category-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vd-text, #0F172A);
    margin: 0;
}

.vd-category-card__link:hover .vd-category-card__title {
    color: var(--vd-accent, #1265F5);
}

.vd-category-card__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--vd-muted, #64748B);
    flex: 1 1 auto;
}

.vd-category-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.vd-category-card__count {
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-accent, #1265F5);
}

.vd-category-card__more {
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-text, #0F172A);
}

.vd-category-card__link:hover .vd-category-card__more {
    color: var(--vd-accent, #1265F5);
}

@media (max-width: 1024px) {
    .vd-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vd-categories-page__title {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .vd-categories-grid {
        grid-template-columns: 1fr;
    }

    .vd-categories-page__header {
        padding: 20px;
    }

    .vd-categories-page__title {
        font-size: 24px;
    }

    .vd-category-card__media {
        height: 180px;
    }
}

/* ------------------------------------------------------------
   Виджет: случайные статьи (vd-random-posts)
   Стили только внутри .vd-random-posts — без влияния на другие виджеты.
   ------------------------------------------------------------ */
.vd-random-posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Сброс общих стилей списков сайдбара только для этого виджета */
#right-sidebar .widget_vd_random_posts .vd-random-posts li,
.widget_vd_random_posts .vd-random-posts li {
    padding: 0;
    margin: 0;
    border-bottom: none;
}

.vd-random-posts__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

#right-sidebar .vd-random-posts__link,
#right-sidebar .vd-random-posts__link:hover {
    color: inherit;
    text-decoration: none;
}

.vd-random-posts__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--vd-radius-sm, 8px);
    overflow: hidden;
    background: var(--vd-border, #E5E7EB);
}

.vd-random-posts__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-random-posts__thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E5E7EB 0%, #F1F5F9 100%);
}

.vd-random-posts__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vd-random-posts__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--vd-text, #0F172A);
    transition: color 0.15s ease;
}

.vd-random-posts__link:hover .vd-random-posts__title {
    color: var(--vd-accent, #1265F5);
}

.vd-random-posts__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--vd-muted, #64748B);
}

.vd-random-posts__cat {
    color: var(--vd-accent, #1265F5);
    font-weight: 500;
}

/* ------------------------------------------------------------
   Виджет: рубрики (vd-categories)
   ------------------------------------------------------------ */
.widget_vd_categories .vd-cats__heading,
#right-sidebar .widget_vd_categories .widget-title.vd-cats__heading {
    margin: 0 0 14px;
    padding: 0;
    font-size: var(--vd-cats-title-size, 18px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--vd-cats-title-color, #0F172A);
}

.vd-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#right-sidebar .widget_vd_categories .vd-cats,
#right-sidebar .widget_vd_categories .vd-cats li,
.widget_vd_categories .vd-cats,
.widget_vd_categories .vd-cats li {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.vd-cats__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--vd-cats-item-bg, #EAF2FF);
    color: var(--vd-cats-item-color, #1265F5) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    transition: background-color 0.2s ease, padding-left 0.25s ease;
}

#right-sidebar .vd-cats__link,
#right-sidebar .vd-cats__link:hover {
    color: var(--vd-cats-item-color, #1265F5) !important;
    text-decoration: none !important;
}

.vd-cats__arrow {
    position: absolute;
    left: 12px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: translate(-8px, -50%);
    transition: opacity 0.22s ease, transform 0.25s ease;
    pointer-events: none;
    color: currentColor;
}

.vd-cats__label {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.vd-cats__name {
    font-weight: 600;
}

.vd-cats__count {
    font-weight: 500;
    opacity: 0.75;
}

.vd-cats__link:hover,
.vd-cats__link:focus-visible {
    background: var(--vd-cats-item-hover-bg, #D6E6FD);
    padding-left: 34px;
}

.vd-cats__link:hover .vd-cats__arrow,
.vd-cats__link:focus-visible .vd-cats__arrow {
    opacity: 1;
    transform: translate(0, -50%);
}

.vd-cats__link:hover .vd-cats__label,
.vd-cats__link:focus-visible .vd-cats__label {
    transform: translateX(2px);
}

/* ------------------------------------------------------------
   Страница 404
   ------------------------------------------------------------ */
.vd-404 {
    background: var(--vd-card-bg, #FFFFFF);
    border: 1px solid var(--vd-border, #E5E7EB);
    border-radius: var(--vd-radius, 12px);
    box-shadow: var(--vd-shadow-sm);
    padding: 48px 40px 40px;
}

.vd-404__hero {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
}

.vd-404__code {
    margin: 0 0 8px;
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--vd-accent, #1265F5);
}

.vd-404__title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--vd-text, #0F172A);
}

.vd-404__text {
    margin: 0 0 24px;
    color: var(--vd-muted, #64748B);
    font-size: 16px;
    line-height: 1.6;
}

.vd-404__search {
    display: flex;
    width: 100%;
    margin: 0 0 20px;
}

.vd-404__search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--vd-border, #E5E7EB);
    border-right: 0;
    border-radius: var(--vd-radius-sm, 8px) 0 0 var(--vd-radius-sm, 8px);
    background: #FFFFFF;
    color: var(--vd-text, #0F172A);
    font-size: 15px;
    font-family: inherit;
}

.vd-404__search-input:focus {
    outline: none;
    border-color: var(--vd-accent, #1265F5);
    box-shadow: 0 0 0 3px rgba(18, 101, 245, 0.15);
}

.vd-404__search-submit {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 0 var(--vd-radius-sm, 8px) var(--vd-radius-sm, 8px) 0;
    background: var(--vd-accent, #1265F5);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.vd-404__search-submit:hover,
.vd-404__search-submit:focus-visible {
    background: var(--vd-hover, #0D4FD6);
}

.vd-404__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.vd-404__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--vd-radius-sm, 8px);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.vd-404__button--primary {
    background: var(--vd-accent, #1265F5);
    color: #FFFFFF;
}

.vd-404__button--primary:hover,
.vd-404__button--primary:focus-visible {
    background: var(--vd-hover, #0D4FD6);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.vd-404__button--secondary {
    background: #EAF2FF;
    color: var(--vd-accent, #1265F5);
}

.vd-404__button--secondary:hover,
.vd-404__button--secondary:focus-visible {
    background: #D6E6FD;
    color: var(--vd-hover, #0D4FD6);
}

.vd-404__section {
    padding-top: 28px;
    border-top: 1px solid var(--vd-border, #E5E7EB);
}

.vd-404__section + .vd-404__section {
    margin-top: 8px;
}

.vd-404__section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--vd-text, #0F172A);
}

.vd-404__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vd-404__cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 16px;
    background: #EAF2FF;
    color: var(--vd-accent, #1265F5);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.vd-404__cat:hover,
.vd-404__cat:focus-visible {
    background: #D6E6FD;
    color: var(--vd-hover, #0D4FD6);
}

.vd-404__cat-count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(18, 101, 245, 0.12);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.vd-404__posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.vd-404__post {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--vd-border, #E5E7EB);
    border-radius: var(--vd-radius-sm, 8px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vd-404__post:hover,
.vd-404__post:focus-visible {
    border-color: #C7D7FE;
    box-shadow: var(--vd-shadow-sm);
}

.vd-404__post-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--vd-radius-sm, 8px);
    overflow: hidden;
    background: linear-gradient(135deg, #E5E7EB 0%, #F1F5F9 100%);
}

.vd-404__post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-404__post-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vd-404__post-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--vd-text, #0F172A);
}

.vd-404__post:hover .vd-404__post-title,
.vd-404__post:focus-visible .vd-404__post-title {
    color: var(--vd-accent, #1265F5);
}

.vd-404__post-date {
    font-size: 13px;
    color: var(--vd-muted, #64748B);
}

@media (max-width: 600px) {
    .vd-404 {
        padding: 32px 20px 24px;
    }

    .vd-404__code {
        font-size: 56px;
    }

    .vd-404__title {
        font-size: 22px;
    }

    .vd-404__search {
        flex-direction: column;
    }

    .vd-404__search-input,
    .vd-404__search-submit {
        width: 100%;
        border-radius: var(--vd-radius-sm, 8px);
        border-right: 1px solid var(--vd-border, #E5E7EB);
    }

    .vd-404__search-input {
        margin-bottom: 8px;
    }
}


