/* --- 1. Горизонтальное меню в подвале --- */
.footer-widgets .widget_nav_menu ul {
    list-style: none;     
    padding: 0;           
    margin: 0;
    text-align: center;   
}

.footer-widgets .widget_nav_menu li {
    display: inline-block; 
    margin: 0 15px;      
}

.footer-widgets .widget_nav_menu li:first-of-type {
    margin-left: 0;
}
.footer-widgets .widget_nav_menu li:last-of-type {
    margin-right: 0;
}

/* --- 2. Размер заголовков в Слайдере --- */
@media (min-width: 992px) {
    .card-slider__title {
        font-size: 1.5em;
    }
}

/* --- 3. Высота слайдера --- */
@media (min-width: 768px) {
    .card-slider-container, .card-slider__image {
        min-height: 250px !important;
    }
}

/* ==========================================================================
   4. КОМПАКТНЫЙ ПОДВАЛ
   ========================================================================== */

html body .site-footer {
    padding-top: 20px !important;   
    padding-bottom: 20px !important; 
}

html body .footer-widgets {
    padding-bottom: 15px !important; 
    margin-bottom: 0 !important;
}

html body .footer-bottom {
    padding-top: 15px !important;
    border-top: 1px solid var(--border-dim) !important; 
    margin-top: 0 !important;
}

html body .site-footer .widget {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================================================
   CONTACT FORM: FINAL FIX (Auto Colors)
   ========================================================================== */

/* 1. Макет радио-кнопок */
html body .bf-cc {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin-top: 0 !important;
}
html body .bf-cw { width: auto !important; margin-right: 0 !important; margin-bottom: 10px !important; }
html body textarea.bf-fld { min-height: 250px !important; }

/* 2. БЛОК С ЧЕКБОКСОМ (Terms & Privacy) */

/* --- СВЕТЛАЯ ТЕМА (По умолчанию) --- */
.terms-checkbox-wrapper label {
    color: #333333 !important; /* Темно-серый текст */
}
.terms-checkbox-wrapper a {
    color: #000000 !important; /* Черные ссылки */
    font-weight: 600 !important;
}

/* --- ТЕМНАЯ ТЕМА (Reboot добавляет класс .dark-mode к body) --- */
body.dark-mode .terms-checkbox-wrapper label {
    color: #b0b0b0 !important; /* Светло-серый текст */
}
body.dark-mode .terms-checkbox-wrapper a {
    color: #ffffff !important; /* Белые ссылки */
}

/* --- ОБЩИЕ СТИЛИ (Ховер и чекбокс) --- */
/* При наведении ссылки становятся оранжевыми в любой теме */
.terms-checkbox-wrapper a:hover {
    color: var(--accent) !important; 
    text-decoration: none !important;
}

/* Сам чекбокс */
.terms-checkbox-wrapper input[type="checkbox"] {
    appearance: auto !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    cursor: pointer !important;
    accent-color: var(--accent) !important;
}

/* 3. Неактивная кнопка */
.bf-btn.disabled-btn {
    opacity: 0.3 !important;
    background-color: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border: 1px solid #555 !important;
}

/* ==========================================================================
   WP DARK MODE HEADER INTEGRATION
   ========================================================================== */

/* 1. Скрываем контейнер, который держит кнопку внизу справа */
.wp-dark-mode-floating-switch {
    position: static !important; /* Убираем фиксацию */
    display: none;               /* Скрываем исходное место */
    width: auto !important;
    height: auto !important;
    bottom: auto !important;
    right: auto !important;
}

/* 2. Но саму кнопку-переключатель делаем видимой (мы её перенесем) */
.wp-dark-mode-switch {
    display: inline-block !important;
    position: relative !important;
    margin: 0 !important;
    transform: scale(0.9); /* Чуть уменьшим, если слишком большая */
    vertical-align: middle;
}

/* 3. Настраиваем ваш пункт меню (#menu-item-761), чтобы кнопка встала ровно */
#menu-item-761 a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 10px !important; /* Отступы по бокам */
    height: 100%;
    background: transparent !important; /* Убираем фон ссылки, если есть */
}

/* Убираем подчеркивания и лишние эффекты при наведении на кнопку в меню */
#menu-item-761 a:hover {
    background: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   WP DARK MODE SWITCH
   ========================================================================== */

/* 2. Настройка кнопки (Размер и положение) */
.wp-dark-mode-switch {
    display: inline-block !important;
    position: relative !important;
    margin: 0 !important;
    
    /* --- НАСТРОЙКА РАЗМЕРА --- */
    /* 1.0 = 100% (оригинал), 0.6 = 60% (маленькая), 0.5 = половина */
    transform: scale(0.6) !important; 
    
    /* Центрирование при уменьшении */
    transform-origin: center center !important; 
    vertical-align: middle !important;
}

/* 3. Контейнер меню (убираем лишние отступы, если кнопка стала визуально меньше) */
#menu-item-761 a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 5px !important; /* Чуть уменьшил отступы по бокам */
    height: 100%;
    background: transparent !important;
    min-width: 40px; /* Фиксируем минимальную ширину, чтобы кликать было удобно */
}

/* ==========================================================================
   MAGAZINE STYLE HEADERS (WP DARK MODE ONLY)
   Updated for Editor's Choice
   ========================================================================== */

/* 1. Контейнер заголовка: рисует оранжевую линию во всю ширину */
html.wp-dark-mode-active .section-block__header,
html.wp-dark-mode-active .reboot-section-header { /* <-- Добавили наш новый блок */
    /* Цвет линии */
    border-bottom: 2px solid #ff7f27 !important; 
    
    margin-bottom: 30px !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: flex-end !important; /* Выравнивание по низу, чтобы стоять на линии */
    position: relative;
}

/* 2. Сам заголовок: превращаем в цветной прямоугольник */
html.wp-dark-mode-active .section-block__title,
html.wp-dark-mode-active .reboot-section-header .h-section { /* <-- Добавили заголовок нашего блока */
    /* Фон плашки */
    background-color: #ff7f27 !important;
    
    /* Текст внутри плашки */
    color: #ffffff !important; 
    
    /* Размеры плашки */
    padding: 8px 15px !important; 
    margin-bottom: 0 !important;  
    margin-right: 0 !important;
    
    /* Типографика */
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 700 !important;
    border: none !important;
    line-height: 1.2 !important; /* Чтобы текст ровно сидел в плашке */
}

/* Ссылки внутри заголовков (если есть) */
html.wp-dark-mode-active .section-block__title a,
html.wp-dark-mode-active .reboot-section-header .h-section {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* 3. Ссылка "Смотреть все" (для стандартных блоков) */
html.wp-dark-mode-active .section-block__link {
    font-size: 0.8em !important;
    text-transform: uppercase;
    margin-left: auto; 
    color: #b0b0b0 !important;
    padding-bottom: 5px !important; 
}
html.wp-dark-mode-active .section-block__link:hover {
    color: #ff7f27 !important;
}

/* 4. Специфика для кнопки Editor's Choice в этом стиле */
/* Чтобы кнопка-таблетка тоже красиво стояла на линии */
html.wp-dark-mode-active .reboot-section-header .reboot-section-btn {
    margin-bottom: 5px !important; /* Чуть приподнять над линией */
    margin-left: auto; /* Прижать вправо */
}

/* ==========================================================================
   COMPACT SECTIONS (UPDATED FOR EDITOR'S CHOICE)
   ========================================================================== */

/* 1. Размер заголовков блоков */
/* Добавили .reboot-section-header .h-section для нашего нового блока */
html body .section-block__title,
.section-block__title,
html body .reboot-section-header .h-section {
    font-size: 16px !important; /* Единый размер для всех заголовков */
    line-height: 1.2 !important;
}

/* 2. Уменьшаем внутренние отступы у секций */
/* Добавили .reboot-native-section */
.section-block,
.section-html,
.reboot-native-section {
    padding-top: 10px !important;    /* Компактный верх */
    padding-bottom: 60px !important; /* Отступ снизу */
}

/* 3. Убираем лишние внешние отступы между блоками */
.section-block,
.section-html,
.reboot-native-section {
    margin-bottom: 0 !important; /* Прижимаем блоки друг к другу */
}

/* 4. Убираем нижний отступ у самой сетки карточек */
.post-cards {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   ALL-IN-ONE VIDEO GALLERY (УМЕНЬШЕНИЕ ШРИФТА)
   ========================================================================== */

/* Уменьшаем размер заголовка видео */
.aiovg-videos .aiovg-title,
.aiovg-videos .aiovg-link-title {
    font-size: 14px !important;  /* Поставьте 13px или 15px по вкусу */
    line-height: 1.4 !important; /* Межстрочный интервал, чтобы текст не слипался */
    margin-bottom: 5px !important; /* Отступ снизу до меты (просмотров/даты) */
}

/* Опционально: Уменьшаем размер шрифта мета-данных (просмотры, дата) */
.aiovg-videos .aiovg-meta,
.aiovg-videos .aiovg-text-small {
    font-size: 12px !important;
}

/* ==========================================================================
   FIX: ВЕРТИКАЛЬНОЕ ВЫРАВНИВАНИЕ МЕНЮ (ПО ЦЕНТРУ)
   ========================================================================== */

/* 1. Сам контейнер списка меню (ul) */
#top-menu {
    display: flex !important;
    align-items: center !important; /* Главная команда: центрировать по вертикали */
    height: 100% !important;        /* Растянуть на всю высоту шапки */
    margin-bottom: 0 !important;
}

/* 2. Пункты списка (li) - только верхнего уровня */
#top-menu > li {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    vertical-align: middle !important;
}

/* 3. Ссылки внутри пунктов (a) */
#top-menu > li > a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin-top: 0 !important; /* Убираем паразитные отступы сверху */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================================================
   CUSTOM VIDEO SWIPER (FIXED & ALIGNED)
   ========================================================================== */

/* 1. Настройка Обертки (Wrapper) */
/* Превращаем сетку плагина в гибкую ленту */
.custom-video-slider-container .aiovg-section-videos,
.custom-video-slider-container .aiovg-row {
    display: flex !important;
    flex-wrap: nowrap !important; /* Запрет переноса на новую строку */
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. Настройка Слайда (Item) */
.custom-video-slider-container .aiovg-item-video {
    /* Сбрасываем ширину плагина, пусть Swiper решает */
    width: auto !important; 
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    height: auto !important; /* Тянем по высоте */
    border: none !important;
}

/* 3. ВЫРАВНИВАНИЕ ВЫСОТЫ (FIX) */
/* Задаем жесткую высоту для блока с картинкой, чтобы они были одинаковые */
.custom-video-slider-container .aiovg-responsive-container {
    padding-bottom: 0 !important; /* Отключаем адаптивный отступ плагина */
    height: 150px !important;     /* <--- ВАЖНО: Высота картинки (меняйте, если нужно) */
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important; /* Скругление углов как в теме */
}

/* Растягиваем картинку, чтобы она заполнила блок красиво */
.custom-video-slider-container .aiovg-responsive-element {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Обрезает лишнее, не сплющивая картинку */
}

/* 4. СТРЕЛКИ (Дизайн Reboot) */
.custom-video-slider-container {
    position: relative !important; /* Чтобы стрелки позиционировались относительно блока */
}

.custom-video-slider-container .video-prev, 
.custom-video-slider-container .video-next {
    width: 44px !important;
    height: 44px !important;
    background-color: rgba(0, 0, 0, 0.5) !important; /* Чуть темнее */
    border-radius: 50% !important;
    color: #ffffff !important;
    position: absolute !important;
    top: 40% !important; /* Поднимаем повыше, на уровень картинки */
    transform: translateY(-50%) !important;
    z-index: 50 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease !important;
}

/* Галочки внутри стрелок */
.custom-video-slider-container .video-prev::after, 
.custom-video-slider-container .video-next::after {
    content: '' !important;
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    border-top: 2px solid #fff !important;
    border-right: 2px solid #fff !important;
}

/* Поворот галочек */
.custom-video-slider-container .video-prev::after {
    transform: rotate(-135deg) !important;
    margin-left: 4px !important;
}
.custom-video-slider-container .video-next::after {
    transform: rotate(45deg) !important;
    margin-right: 4px !important;
}

/* Позиция по бокам */
.custom-video-slider-container .video-prev { left: -20px !important; }
.custom-video-slider-container .video-next { right: -20px !important; }

/* Ховер */
.custom-video-slider-container .video-prev:hover, 
.custom-video-slider-container .video-next:hover {
    background-color: var(--accent) !important;
}

/* ==========================================================================
   MOBILE & TABLET LAYOUT FIX (FINAL)
   ========================================================================== */
@media (max-width: 1024px) { /* Охватываем и телефоны, и планшеты */

    /* 1. Превращаем контейнер в колонку */
    .reboot-native-section,
    .section-block {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        position: relative !important;
        padding-top: 0 !important; /* Убираем лишние отступы, если были */
    }

    /* 2. ЗАГОЛОВОК: ПРИНУДИТЕЛЬНО ВВЕРХ (Order -1 самый сильный) */
    .reboot-section-header,
    .section-block__header {
        order: -1 !important;        /* Минус 1 гарантирует первое место */
        width: 100% !important;      /* На всю ширину */
        margin-bottom: 20px !important;
        position: static !important; /* Никакого абсолютного позиционирования */
    }

    /* 3. КОНТЕНТ (Посты): ПОСЕРЕДИНЕ */
    .post-cards,
    .section-block__content {
        order: 0 !important;         /* Ноль — нейтральная позиция */
        width: 100% !important;
    }

    /* 4. КНОПКА: ВНИЗУ */
    .reboot-section-btn,
    .section-block__link {
        order: 10 !important;        /* 10 — гарантирует последнее место */
        
        position: static !important; /* Отключаем "лифт" */
        display: block !important;   /* Блочный элемент */
        margin: 25px auto 0 auto !important; /* Центруем и отступаем сверху */
        text-align: center !important;
        width: auto !important;
        max-width: 80% !important;   /* Чтобы не была слишком широкой */
    }
}

/* ==========================================================================
   CUSTOM COOKIE BANNER
   ========================================================================== */

.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1200px; /* Чтобы на больших экранах не растягивался во всю ширь */
    margin: 0 auto;    /* Центрируем, если ширина ограничена */
    background-color: rgba(30, 30, 30, 0.95); /* Темный фон, почти непрозрачный */
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px; /* Закругленные углы */
    box-shadow: 0 5px 20px rgba(0,0,0,0.3); /* Тень */
    display: none; /* Скрыт по умолчанию, JS его покажет */
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 99999; /* Поверх всего */
    backdrop-filter: blur(5px); /* Эффект размытия фона (для красоты) */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-notice__content p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #e0e0e0 !important;
}

.cookie-notice__content a {
    color: #fff !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.cookie-notice__content a:hover {
    color: #ff7f27 !important; /* Ваш оранжевый */
    text-decoration: none !important;
}

/* Контейнер для кнопок */
.cookie-notice__actions {
    display: flex;
    gap: 10px; /* Расстояние между кнопками */
}

/* Основная кнопка (Accept) - оставляем как было */
.cookie-btn {
    background-color: #ff7f27 !important;
    color: #fff !important;
    border: 2px solid #ff7f27 !important; /* Добавили рамку */
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap;
}

.cookie-btn:hover {
    background-color: #ff9f5e !important;
    border-color: #ff9f5e !important;
    transform: translateY(-1px);
}

/* Второстепенная кнопка (Reject) - Прозрачная */
.cookie-btn--outline {
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important; /* Светлая полупрозрачная рамка */
    color: #e0e0e0 !important;
}

.cookie-btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Чуть светлеет фон */
    border-color: #fff !important;
    color: #fff !important;
}


/* Стиль для кнопки-ссылки "Settings" */
.cookie-btn--text {
    background: none !important;
    border: none !important;
    color: #b0b0b0 !important; /* Светло-серый */
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn--text:hover {
    color: #ffffff !important; /* Белеет при наведении */
    text-decoration: underline !important;
}

/* На мобильных выстраиваем порядок: Accept -> Reject -> Settings */
@media (max-width: 768px) {
    .cookie-notice__actions {
        flex-direction: column-reverse; 
        gap: 10px;
    }
    /* Settings будет в самом низу */
    .cookie-btn--text {
        margin-top: 5px;
    }
}

/* ==========================================================================
   EDITOR'S CHOICE: FINAL FIX (Elevator Method)
   ========================================================================== */

/* 1. База - пусть будет, на всякий случай */
.section-block, .section-html {
    position: relative !important; 
}

/* 2. СТИЛЬ КНОПКИ (Read More) */
.reboot-section-btn {
    /* Визуал */
    background-color: var(--accent, #ff7f27);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 22px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 127, 39, 0.2);
    z-index: 99; /* Чтобы была поверх всего */

    /* --- ПОЗИЦИЯ НА ПК (ИСПРАВЛЕНО) --- */
    position: absolute !important;
    
    /* "Лифт": Тянем кнопку вверх из контента в заголовок.
       Если кнопка слишком высоко - меняйте -60px на -50px.
       Если слишком низко - ставьте -70px. */
    top: -70px !important; 
    
    right: 0 !important; /* Прижимаем вправо */
}

/* Ховер */
.reboot-section-btn:hover {
    background-color: #ff9f5e;
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(255, 127, 39, 0.3);
}

/* 3. МОБИЛЬНАЯ ВЕРСИЯ (Сбрасываем лифт, ставим вниз) */
@media (max-width: 768px) {
    
    .reboot-native-section {
        display: flex !important;
        flex-direction: column !important;
    }

    .reboot-native-section .post-cards {
        order: 1 !important;
    }

    .reboot-section-btn {
        /* Отменяем десктопные настройки */
        position: static !important; 
        top: auto !important;
        
        order: 2 !important;
        display: block !important;
        margin: 20px auto 0 auto !important;
        text-align: center !important;
        width: 100% !important;
        box-shadow: none !important;
    }
}

/* ==========================================================================
   CATEGORY SHOWCASE STYLES
   ========================================================================== */

/* Фиксируем высоту картинок, чтобы карточки были одинаковыми */
.post-card__thumbnail img {
    height: 180px !important; /* Высота картинки */
    object-fit: cover !important; /* Обрезает лишнее, не сплющивая */
    width: 100%;
}

/* Сделаем лейбл категории более заметным */
.post-card__cat {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 5;
}

/* Ховер эффект для всей карточки */
.post-card__thumbnail:hover img {
    transform: scale(1.05); /* Легкое увеличение при наведении */
    transition: transform 0.3s ease;
}

/* ==========================================================================
   CATEGORY SHOWCASE: ADVANCED LAYOUTS
   ========================================================================== */

/* 1. БАЗА ДЛЯ СЕТКИ */
.reboot-showcase-container {
    display: grid;
    gap: 30px; /* Расстояние между карточками */
    margin-bottom: 40px;
}

/* 2. КОЛОНКИ (Для параметра cols="...") */
.showcase-grid-1 { grid-template-columns: 1fr; }
.showcase-grid-2 { grid-template-columns: repeat(2, 1fr); }
.showcase-grid-3 { grid-template-columns: repeat(3, 1fr); }
.showcase-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 3. ОБЩИЕ СТИЛИ КАРТОЧКИ */
.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Лейбл категории */
.post-card__cat {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px; font-weight: bold; text-transform: uppercase;
    z-index: 5;
}

/* --- ВАРИАНТ 1: ВЕРТИКАЛЬНЫЙ (layout="vertical") --- */
.showcase-card-vertical {
    display: flex;
    flex-direction: column;
}
.showcase-card-vertical .showcase-thumb-wrapper {
    height: 180px; /* Высота картинки */
    position: relative;
    margin-bottom: 15px;
}

/* --- ВАРИАНТ 2: ГОРИЗОНТАЛЬНЫЙ (layout="horizontal") --- */
.showcase-card-horizontal {
    display: flex;
    flex-direction: row; /* В ряд */
    align-items: center; /* Центровка по вертикали */
    background: #fff; /* Фон (если нужен) */
    /* border: 1px solid #eee; можно добавить рамку */
}

/* Картинка в горизонтальном режиме (слева) */
.showcase-card-horizontal .showcase-thumb-wrapper {
    width: 40%; /* Картинка занимает 40% ширины */
    height: 120px; /* Фиксированная высота */
    position: relative;
    flex-shrink: 0; /* Не сжиматься */
    margin-right: 20px;
}

/* Контент в горизонтальном режиме (справа) */
.showcase-card-horizontal .post-card__content {
    width: 60%;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    /* На телефоне всегда 1 колонка, независимо от настроек */
    .reboot-showcase-container {
        grid-template-columns: 1fr !important;
    }
}
/* Темная тема для горизонтальных карточек */
body.dark-mode .showcase-card-horizontal {
    background: transparent;
}

/* ==========================================================================
   CATEGORY SHOWCASE: VISUAL NAVIGATION (Images Only)
   ========================================================================== */

/* 1. СЕТКА */
.reboot-showcase-container {
    display: grid;
    gap: 20px; /* Аккуратный отступ */
    margin-bottom: 40px;
}

/* Колонки */
.showcase-grid-1 { grid-template-columns: 1fr; }
.showcase-grid-2 { grid-template-columns: repeat(2, 1fr); }
.showcase-grid-3 { grid-template-columns: repeat(3, 1fr); }
.showcase-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 2. ССЫЛКА-ОБЕРТКА */
.showcase-item-link {
    display: block;
    position: relative; /* Чтобы позиционировать лейбл внутри */
    border-radius: 12px; /* Скругление углов */
    overflow: hidden;    /* Чтобы картинка не вылезала за углы */
    text-decoration: none !important;
    transform: translateZ(0); /* Фикс для Safari */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Легкая тень */
}

/* 3. КАРТИНКА */
.showcase-img-wrap {
    height: 180px; /* ФИКСИРОВАННАЯ ВЫСОТА БАННЕРА */
    width: 100%;
    position: relative;
}

.showcase-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезка по центру */
    display: block;
    transition: transform 0.5s ease; /* Плавный зум */
}

/* 4. ОВЕРЛЕЙ (ТЕМНЕНИЕ) */
/* Добавляем легкую тень на картинку, чтобы белый текст читался лучше */
.showcase-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    transition: background 0.3s ease;
}

/* 5. ЛЕЙБЛ КАТЕГОРИИ */
.showcase-cat-label {
    position: absolute;
    bottom: 15px;      /* Прижали к низу */
    left: 15px;        /* Прижали к левому краю */
    
    background-color: var(--accent, #ff7f27); /* Оранжевый фон */
    color: #fff;
    
    font-size: 14px;   /* Чуть крупнее шрифт */
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --- ЭФФЕКТЫ ПРИ НАВЕДЕНИИ --- */
.showcase-item-link:hover .showcase-img-wrap img {
    transform: scale(1.08); /* Картинка приближается */
}

.showcase-item-link:hover .showcase-overlay {
    background: rgba(0,0,0,0.2); /* Тень чуть светлеет или меняется */
}

.showcase-item-link:hover .showcase-cat-label {
    background-color: #ff9f5e; /* Лейбл становится ярче */
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
@media (max-width: 768px) {
    .reboot-showcase-container {
        /* На телефоне можно сделать 2 колонки для компактности 
           или 1 для крупных баннеров. 
           Давайте сделаем 1 колонку, но картинки пониже. */
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .showcase-img-wrap {
        height: 160px; /* Чуть меньше высота на телефоне */
    }
}

/* ==========================================================================
   UNIVERSAL BUTTON STYLE (Custom + Standard Reboot Blocks)
   ========================================================================== */

/* 1. База для позиционирования */
.section-block, .section-html, .reboot-native-section {
    position: relative !important;
}

/* 2. ПРИМЕНЯЕМ СТИЛЬ КНОПКИ КО ВСЕМУ */
/* .reboot-section-btn - наш шорткод */
/* .section-block__link - стандартная ссылка Reboot */
.reboot-section-btn,
.section-block__link {
    /* Визуал (Оранжевая таблетка) */
    background-color: var(--accent, #ff7f27) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 6px 22px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(255, 127, 39, 0.2) !important;
    z-index: 99;
    
    /* ПОЗИЦИЯ НА ПК ("Лифт" вверх) */
    position: absolute !important;
    top: -65px !important; /* Подберите высоту (-60px, -70px) чтобы встало ровно */
    right: 0 !important;
    
    /* Сброс стандартных отступов темы */
    margin: 0 !important;
    display: inline-block !important;
    line-height: normal !important;
}

/* Ховер эффект */
.reboot-section-btn:hover,
.section-block__link:hover {
    background-color: #ff9f5e !important;
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(255, 127, 39, 0.3) !important;
}

/* 3. МОБИЛЬНАЯ ВЕРСИЯ (Кнопка падает вниз) */
@media (max-width: 768px) {
    /* Для нашего шорткода */
    .reboot-native-section {
        display: flex !important;
        flex-direction: column !important;
    }
    .reboot-native-section .post-cards { order: 1 !important; }
    
    /* Для стандартного блока Reboot */
    .section-block {
        display: flex !important;
        flex-direction: column !important;
    }
    .section-block__header { order: 1 !important; } /* Заголовок */
    .post-cards { order: 2 !important; }            /* Посты */
    /* Ссылка (которая была в хедере) вылетит из потока хедера из-за order */

    /* ОБЩИЙ СТИЛЬ МОБИЛЬНОЙ КНОПКИ */
    .reboot-section-btn,
    .section-block__link {
        position: static !important; /* Отменяем абсолют */
        order: 3 !important;         /* Ставим в самый низ */
        
        display: block !important;
        margin: 20px auto 0 auto !important;
        text-align: center !important;
        width: 100% !important;
        box-shadow: none !important;
    }
    
    /* Коррекция для стандартного хедера, чтобы он не ломался без ссылки */
    .section-block__header {
        display: block !important; 
        margin-bottom: 20px !important;
    }
}

/* ==========================================================================
   CATEGORY SHOWCASE: CLEAN GRID
   ========================================================================== */

.reboot-showcase-container {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

/* Настройки колонок для ПК */
.showcase-grid-3 { grid-template-columns: repeat(3, 1fr); }
.showcase-grid-4 { grid-template-columns: repeat(4, 1fr); }
.showcase-grid-5 { grid-template-columns: repeat(5, 1fr); }
.showcase-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Карточка */
.showcase-item-link {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.showcase-item-link:hover {
    transform: translateY(-5px); /* Легкое всплытие при наведении */
}

/* Картинка */
.showcase-img-wrap {
    height: 140px; /* Компактная высота */
    width: 100%;
    position: relative;
}

.showcase-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showcase-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
}

/* Лейбл */
.showcase-cat-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px; /* Чтобы текст не вылезал */
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    text-align: left;
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
@media (max-width: 768px) {
    .reboot-showcase-container {
        /* На телефоне делаем 2 колонки - это стандарт индустрии */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px;
    }
    
    .showcase-img-wrap {
        height: 100px; /* Более компактно на телефоне */
    }
    
    .showcase-cat-label {
        font-size: 11px; /* Чуть меньше шрифт */
    }
}

/* ===== FIX: не ломаем section-html (Wiki) на мобилке/планшете ===== */
@media (max-width: 1024px) {

  /* flex-колонку применяем только к обычным секциям, НЕ к section-html */
  .section-block.section-html {
    display: block !important;
  }

  .section-block.section-html .section-block__header,
  .section-block.section-html .section-html__body,
  .section-block.section-html .post-cards,
  .section-block.section-html .section-block__link {
    order: initial !important;
    position: static !important;
  }

  /* небольшой нормальный отступ между заголовком и карточками */
  .section-block.section-html .section-block__header {
    margin-bottom: 12px !important;
  }
}

/* вместо глобального */
.reboot-showcase-container .post-card__thumbnail img {
  height: 180px !important;
  object-fit: cover !important;
}

