/*
Theme Name: BVTS
Theme URI: https://elkurso.ru
Description: Тема BVTS на основе Syron
Author: Elkurso
Author URI: https://elkurso.ru
Template: syron
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bvts
*/

/* Добавляйте свои стили ниже этой строки */
/* Используем body для повышения специфичности и переопределения стилей родительской темы */

/* ===============================================
   Глобальные стили — предотвращаем горизонтальный скролл
   =============================================== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Агрессивная защита от горизонтального скролла */
html {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
}

body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Все основные контейнеры */
#site,
#site-inner,
.main-wrapper,
.rs-container,
.rs-row,
.content-container {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header — тень должна быть видна полностью */
#site-header,
body #site-header {
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
}

/* Статьи — убираем overflow, чтобы не было вертикального скролла */
.single-content,
.single-content-inner,
article,
body .main-wrapper article {
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
}

/* Все fixed и absolute элементы не должны выходить за пределы */
[style*="position: fixed"],
[style*="position:fixed"],
*[class*="fixed"],
*[class*="absolute"] {
    max-width: 100vw;
    box-sizing: border-box;
}

/* Специально для страниц блога — все элементы внутри main-wrapper */
body .main-wrapper:has(article) * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Элементы с width: 100vw могут создавать скролл из-за полосы прокрутки */
*[style*="width: 100vw"],
*[style*="width:100vw"] {
    width: 100% !important;
}

/* Элементы с отрицательными margin-left или right */
*[style*="margin-left: -"],
*[style*="margin-right: -"],
*[style*="margin-left:-"],
*[style*="margin-right:-"] {
    max-width: calc(100% + 0px);
}

/* Элементы, позиционированные за пределами экрана (screen-reader-only и т.д.) */
*[style*="left: -9999"],
*[style*="right: -9999"],
*[style*="left:-9999"],
*[style*="right:-9999"] {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
}

/* Контент статей — не выходить за пределы */
.entry-content,
.post-content,
article,
.single-post .content,
.main-wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

/* Изображения и встроенный контент — адаптивные */
.entry-content img,
.post-content img,
article img,
.entry-content iframe,
.post-content iframe,
article iframe {
    max-width: 100%;
    height: auto;
}

/* Блок уведомления о cookie — не создавать горизонтальный скролл */
.privacy-notice-wrap {
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    /* overflow: hidden; */
}

.privacy-notice {
    max-width: 100%;
    box-sizing: border-box;
}

.privacy-content-wrap,
.privacy-btn-wrap {
    max-width: 100%;
    box-sizing: border-box;
}

/* Блок "Описание внизу" на страницах архива */
body .blog-archive-bottom-description {
    text-align: left;
}

/* Заголовок блока — по центру */
body .blog-archive-bottom-description .bottom-description-title {
    text-align: center;
    margin-bottom: 20px;
    display: block;
}

/* Текст описания — по левому краю */
body .blog-archive-bottom-description .bottom-description-content {
    text-align: left;
}

body .blog-archive-title .title::before,
body .blog-archive-bottom-description .title::before {
    content: '•';
    margin: 0 5px;
    color: var(--term-color, var(--accent-color));
}

/* ===============================================
   Smart Header — sticky с auto-hide при скролле
   =============================================== */

/* Основной header становится fixed */
body #site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* max-width: 100vw; */
    z-index: 1999;
    transition: transform 0.3s ease;
    will-change: transform;
    box-sizing: border-box;
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
}

/* Элементы с изображениями — overflow: hidden для работы border-radius */
body #site-header .elementor-widget-image,
body #site-header #father-logo,
body #site-header .elementor-widget-image img {
    overflow: hidden;
}

/* Премиальная тень для плашки меню */
body #menu-bvts {
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Многослойная тень с цветным glow */
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.04),
        0 12px 40px rgba(115, 36, 255, 0.1);
    overflow: visible;
    position: relative;
}

/* Усиленная тень при скролле — эффект "парящего" меню */
body #site-header.scrolled #menu-bvts {
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 12px 32px rgba(0, 0, 0, 0.06),
        0 20px 60px rgba(115, 36, 255, 0.15);
}

/* Скрываем header при скролле вниз */
body #site-header.header-hidden {
    transform: translateY(-100%);
}

/* Показываем header при скролле вверх */
body #site-header.header-visible {
    transform: translateY(0);
}

/* Отступ для контента под fixed header — для блоговых страниц (без Tilda) */
body .main-wrapper {
    padding-top: calc(var(--header-height, 80px) - 40px);
}
/* Если main-wrapper содержит #allrecords (страница Tilda) — 
   убираем padding, т.к. отступ даёт сам #allrecords */
body .main-wrapper:has(#allrecords) {
    padding-top: 0;
}

/* Фикс #wpadminbar — убираем min-width, который создаёт горизонтальный скролл */
#wpadminbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    z-index: 99999;
    box-sizing: border-box;
}

/* Отключаем стандартный sticky header Syron, чтобы не было двух */
body #site-sticky-header {
    display: none !important;
}

/* Иконка в кнопке консультации */
body #bvts-consult svg {
    width: 20px;
    height: 20px;
}

@media screen and (max-width: 768px) {
    body #bvts-consult svg {
        width: 18px;
        height: 18px;
    }
}

/* ===============================================
   Tilda Page 1200 — Page Layout для страниц из Tilda
   =============================================== */

/* Контейнер для Tilda контента — ограничиваем ширину до 1200px */
.tilda-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Стили для body с классом tilda-page-layout */
body.tilda-page-layout .main-wrapper {
    background: #fff;
}

/* Tilda секции могут иметь свой фон — даём им возможность растягиваться */
body.tilda-page-layout .t-cover,
body.tilda-page-layout .t-section,
body.tilda-page-layout [class*="t-rec"] {
    max-width: 100%;
}

/* Внутренний контент Tilda секций — ограничиваем */
body.tilda-page-layout .t-container,
body.tilda-page-layout .t-width,
body.tilda-page-layout .t-col {
    /* max-width: 1200px; */
    margin-left: auto;
    margin-right: auto;
}

/* Единый отступ для всех страниц Tilda — под фиксированный хедер */
body #allrecords {  
    margin-top: 100px;
}

/* Убираем отступ на страницах без хедера (layout: Tilda No Header) */
body.tilda-no-header #allrecords {
    margin-top: 0;
}

/* ===============================================
   Стили для таблиц в контенте статей
   =============================================== */

/* Обёртка для горизонтального скролла на мобильных */
.entry-content table,
.post-content table,
article table,
.single-post .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Заголовок таблицы */
.entry-content table thead,
.post-content table thead,
article table thead,
.single-post .content table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.entry-content table th,
.post-content table th,
article table th,
.single-post .content table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

/* Ячейки таблицы */
.entry-content table td,
.post-content table td,
article table td,
.single-post .content table td {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    line-height: 1.5;
}

/* Зебра — чередование строк */
.entry-content table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even),
article table tbody tr:nth-child(even),
.single-post .content table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* Hover эффект */
.entry-content table tbody tr:hover,
.post-content table tbody tr:hover,
article table tbody tr:hover,
.single-post .content table tbody tr:hover {
    background: #f0f4ff;
    transition: background 0.2s ease;
}

/* Последняя строка без border */
.entry-content table tbody tr:last-child td,
.post-content table tbody tr:last-child td,
article table tbody tr:last-child td,
.single-post .content table tbody tr:last-child td {
    border-bottom: none;
}

/* Первая колонка — выделим жирным (обычно заголовки строк) */
.entry-content table td:first-child,
.post-content table td:first-child,
article table td:first-child,
.single-post .content table td:first-child {
    font-weight: 600;
    color: #1a1a2e;
}

/* Адаптив для мобильных */
@media screen and (max-width: 768px) {
    .entry-content table,
    .post-content table,
    article table,
    .single-post .content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.9em;
    }
    
    .entry-content table th,
    .entry-content table td,
    .post-content table th,
    .post-content table td,
    article table th,
    article table td,
    .single-post .content table th,
    .single-post .content table td {
        padding: 10px 12px;
        min-width: 120px;
    }
}

/* Blockquote стили для цитат */
.entry-content blockquote,
.post-content blockquote,
article blockquote {
    margin: 1.5em 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-left: 4px solid #667eea;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #444;
    position: relative;
}

.entry-content blockquote::before,
.post-content blockquote::before,
article blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 60px;
    color: #667eea;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ===============================================
   Адаптивные YouTube/Vimeo видео (16:9)
   =============================================== */

/* Обёртка для видео с соотношением 16:9 */
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="youtu.be"],
.entry-content iframe[src*="vimeo"],
.post-content iframe[src*="youtube"],
.post-content iframe[src*="youtu.be"],
.post-content iframe[src*="vimeo"],
article iframe[src*="youtube"],
article iframe[src*="youtu.be"],
article iframe[src*="vimeo"],
.single-post .content iframe[src*="youtube"],
.single-post .content iframe[src*="youtu.be"],
.single-post .content iframe[src*="vimeo"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.05);
    margin: 1.5em 0;
}

/* Fallback для браузеров без aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .entry-content iframe[src*="youtube"],
    .entry-content iframe[src*="youtu.be"],
    .entry-content iframe[src*="vimeo"],
    .post-content iframe[src*="youtube"],
    .post-content iframe[src*="youtu.be"],
    .post-content iframe[src*="vimeo"],
    article iframe[src*="youtube"],
    article iframe[src*="youtu.be"],
    article iframe[src*="vimeo"] {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 = 9/16 = 0.5625 */
        height: 0;
        overflow: hidden;
    }
    
    .entry-content iframe[src*="youtube"],
    .entry-content iframe[src*="youtu.be"],
    .entry-content iframe[src*="vimeo"],
    .post-content iframe[src*="youtube"],
    .post-content iframe[src*="youtu.be"],
    .post-content iframe[src*="vimeo"],
    article iframe[src*="youtube"],
    article iframe[src*="youtu.be"],
    article iframe[src*="vimeo"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Обёртка wp-block-embed для Gutenberg */
.wp-block-embed__wrapper {
    position: relative;
}

.wp-block-embed-youtube .wp-block-embed__wrapper,
.wp-block-embed-vimeo .wp-block-embed__wrapper {
    aspect-ratio: 16 / 9;
}

.wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.wp-block-embed-vimeo .wp-block-embed__wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* ===============================================
   Mave.digital подкасты
   =============================================== */

.entry-content iframe[src*="mave.digital"],
.post-content iframe[src*="mave.digital"],
article iframe[src*="mave.digital"],
.single-post .content iframe[src*="mave.digital"] {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.04);
    margin: 1.5em 0;
    border: none;
}

/* ===============================================
   Single Post — Дата обновления (badge в meta-3)
   Современный дизайн 2026
   =============================================== */

/* Выравнивание всех мета-блоков по центру */
body .single-hero-title .single-hero-meta {
    align-items: center;
}

body .single-hero-meta .meta-3 {
    align-items: center;
}

/* Дата обновления — badge-стиль как у views/comments */
.single-hero-meta .meta-3 .meta-item.date-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    font-size: 0.85em;
    color: #667eea;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: default;
}

.single-hero-meta .meta-3 .meta-item.date-updated:hover {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.15) 100%);
}

/* Пульсирующая точка */
.single-hero-meta .meta-3 .meta-item.date-updated .updated-dot {
    position: relative;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.single-hero-meta .meta-3 .meta-item.date-updated .updated-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: bvts-pulse-badge 2.5s ease-out infinite;
    opacity: 0;
}

@keyframes bvts-pulse-badge {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Текст + дата */
.single-hero-meta .meta-3 .meta-item.date-updated .updated-label {
    white-space: nowrap;
}

/* Дата жирным */
.single-hero-meta .meta-3 .meta-item.date-updated .updated-label strong {
    font-weight: 700;
}

/* ===============================================
   BVTS Headings — Импортированные заголовки
   CSS-классы для управления стилями из Tilda
   =============================================== */

/* Базовый класс для всех заголовков */
.bvts-heading {
    /* Можно переопределить в дочерней теме */
}

/* Специфичные классы по уровням */
.bvts-heading--h1 {
    /* Главный заголовок (редко используется в контенте) */
}

.bvts-heading--h2 {
    /* Заголовки секций */
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.bvts-heading--h3 {
    /* Подзаголовки */
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}

.bvts-heading--h4,
.bvts-heading--h5,
.bvts-heading--h6 {
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

/* Subtitle — специальный класс для подзаголовков из Tilda */
.bvts-heading--subtitle {
    color: #555;
    font-weight: 500;
}

/* FAQ заголовок */
.bvts-heading--faq {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid #eee;
}

/* Blockquote с классом */
.bvts-blockquote {
    /* Наследует базовые стили blockquote */
}

/* ===============================================
   BVTS FAQ — Блок часто задаваемых вопросов
   =============================================== */

.bvts-faq {
    margin: 2.5em 0;
    padding: 2em;
    background: linear-gradient(135deg, #f8f9ff 0%, #fafbff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.bvts-faq__title {
    margin: 0 0 1.5em 0;
    padding: 0;
    font-size: 1.5em;
    color: #1a1a2e;
    border-top: none;
    text-align: center;
}

.bvts-faq__item {
    margin-bottom: 1.5em;
    padding: 1.25em 1.5em;
    background: #fff;
    border-radius: 12px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(102, 126, 234, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bvts-faq__item:last-child {
    margin-bottom: 0;
}

.bvts-faq__item:hover {
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.bvts-faq__question {
    margin: 0 0 0.75em 0;
    padding: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    position: relative;
    padding-left: 28px;
}

.bvts-faq__question::before {
    content: "?";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bvts-faq__answer {
    margin: 0;
    padding: 0 0 0 28px;
    color: #555;
    line-height: 1.7;
    font-size: 0.95em;
}

.bvts-faq__answer p {
    margin: 0 0 0.75em 0;
}

.bvts-faq__answer p:last-child {
    margin-bottom: 0;
}

/* FAQ — мобильная версия */
@media screen and (max-width: 768px) {
    .bvts-faq {
        margin: 1.5em -15px;
        padding: 1.25em 15px;
        border-radius: 0;
    }
    
    .bvts-faq__title {
        font-size: 1.25em;
    }
    
    .bvts-faq__item {
        padding: 1em;
    }
    
    .bvts-faq__question {
        font-size: 1em;
        padding-left: 24px;
    }
    
    .bvts-faq__question::before {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .bvts-faq__answer {
        padding-left: 24px;
        font-size: 0.9em;
    }
}

/* ===============================================
   FAQ Schema.org structured data support
   Для SEO можно добавить атрибуты itemscope
   =============================================== */

/* Пример использования с микроразметкой:
   <div class="bvts-faq" itemscope itemtype="https://schema.org/FAQPage">
     <div class="bvts-faq__item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
       <h3 class="bvts-faq__question" itemprop="name">Вопрос?</h3>
       <div class="bvts-faq__answer" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
         <div itemprop="text">Ответ</div>
       </div>
     </div>
   </div>
*/

/* ===============================================
   BVTS Footer — Тёмная версия
   Переопределение Elementor стилей
   =============================================== */

/* Основной фон футера */
body #site-footer {
    background: #1a1a1e;
}

/* Убираем отступ футера на страницах с Tilda (#allrecords) */
body:has(#allrecords) #site-footer {
    padding: 0;
    margin: 0;
}

/* Все контейнеры Elementor внутри футера — прозрачный фон */
body #site-footer .elementor-element.e-con,
body #site-footer .elementor-element[data-element_type="container"] {
    background: transparent !important;
}

/* Главная секция с контентом — чуть светлее для разделения */
body #site-footer .elementor-element-44a3800 {
    background: linear-gradient(180deg, #222226 0%, #1a1a1e 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Средняя полоса (декоративная) */
body #site-footer .elementor-element-cc0f13c {
    background: #17171a !important;
}

/* Нижняя секция с копирайтом */
body #site-footer .elementor-element-f56ac51 {
    background: #131315 !important;
}

/* === Тексты === */

/* Все тексты — светлые */
body #site-footer,
body #site-footer p,
body #site-footer .elementor-widget-text-editor,
body #site-footer .elementor-heading-title {
    color: rgba(255, 255, 255, 0.75);
}

/* Логотип — название сайта (фиолетовый акцент) */
body #site-footer .rivax-logo-title a {
    color: var(--accent-color) !important;
}

/* Логотип — описание */
body #site-footer .rivax-logo-description {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* === Заголовки секций (Links, Categories) === */
body #site-footer .rivax-divider-heading .title,
body #site-footer .rivax-divider-heading .title-text {
    color: #fff !important;
}

/* Разделители в заголовках — акцентный цвет */
body #site-footer .rivax-divider-heading .divider {
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.5) 0%, 
        rgba(118, 75, 162, 0.3) 100%) !important;
}

/* === Ссылки в списках === */
body #site-footer .elementor-icon-list-items a,
body #site-footer .elementor-icon-list-text {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.2s ease;
}

body #site-footer .elementor-icon-list-items a:hover,
body #site-footer .elementor-icon-list-items a:hover .elementor-icon-list-text {
    color: #667eea !important;
}

/* === Теги (Tag Cloud) === */
body #site-footer .rivax-tag-cloud-item {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    transition: all 0.2s ease;
}

body #site-footer .rivax-tag-cloud-item:hover {
    background: transparent !important;
    color: var(--accent-color) !important;
}

/* === Соцсети === */
body #site-footer .rivax-social-icons .social-item .social-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease;
}

body #site-footer .rivax-social-icons .social-item .social-icon svg {
    fill: rgba(255, 255, 255, 0.8) !important;
}

body #site-footer .rivax-social-icons .social-item:hover .social-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

body #site-footer .rivax-social-icons .social-item:hover .social-icon svg {
    fill: #fff !important;
}

/* Заголовок "Ищите меня в соцсетях" */
body #site-footer .rivax-advanced-heading-tag,
body #site-footer .rivax-advanced-heading-two {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* === Нижняя часть: юридическая информация === */

/* ИНН, ОГРНИП */
body #site-footer .elementor-element-3fbff2f .elementor-heading-title {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85em;
}

/* Ссылки на политику конфиденциальности */
body #site-footer .elementor-element-4bbc7ae a {
    color: rgba(255, 255, 255, 0.5) !important;
}

body #site-footer .elementor-element-4bbc7ae a:hover {
    color: #667eea !important;
}

/* Копирайт */
body #site-footer .elementor-element-10e1266 .elementor-heading-title {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Уменьшаем zoom при наведении на картинки постов */
 body .rivax-post-modern-widget .post-wrapper .image-wrapper:hover > img {
    transform: scale(1.08);
}

/* ===============================================
   BVTS Button — Шорткод кнопки [button]
   =============================================== */

/* Базовые стили кнопки */
.bvts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

/* Primary — основной стиль (градиент) */
.bvts-btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 
        0 4px 14px rgba(102, 126, 234, 0.35),
        0 2px 6px rgba(118, 75, 162, 0.2);
}

.bvts-btn--primary:hover {
    background: linear-gradient(135deg, #5a72d9 0%, #6a4291 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.45),
        0 4px 10px rgba(118, 75, 162, 0.3);
}

.bvts-btn--primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.3),
        0 1px 4px rgba(118, 75, 162, 0.15);
}

/* Outline — контурная кнопка */
.bvts-btn--outline {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.bvts-btn--outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.35),
        0 3px 8px rgba(118, 75, 162, 0.2);
}

.bvts-btn--outline:active {
    transform: translateY(0);
}

/* Ghost — прозрачная с подчёркиванием */
.bvts-btn--ghost {
    background: transparent;
    color: #667eea;
    padding: 10px 4px;
    border-radius: 0;
    position: relative;
}

.bvts-btn--ghost::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.bvts-btn--ghost:hover {
    color: #764ba2;
}

.bvts-btn--ghost:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Размеры */
.bvts-btn--small {
    padding: 10px 18px;
    font-size: 0.875em;
    border-radius: 8px;
}

.bvts-btn--normal {
    /* Стандартный размер, уже задан в базовых стилях */
}

.bvts-btn--large {
    padding: 18px 36px;
    font-size: 1.125em;
    border-radius: 14px;
}

/* Адаптив для мобильных */
@media screen and (max-width: 768px) {
    .bvts-btn {
        padding: 12px 22px;
        font-size: 0.95em;
    }
    
    .bvts-btn--small {
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    .bvts-btn--large {
        padding: 14px 28px;
        font-size: 1em;
    }
}

/* ===============================================
   BVTS Testimonials — Кнопка "Загрузить ещё"
   =============================================== */

.bvts-testimonials__load-more {
    margin-bottom: 2em;
}

article .bvts-testimonials {
    margin-bottom: 2em;
}

/* ===============================================
   Mobile Navigation — Компактное меню на мобильных
   Используем высокую специфичность вместо !important
   =============================================== */

/* ===============================================
   BVTS Fullscreen Menu — полноэкранное меню
   =============================================== */

/* Wrapper не должен создавать горизонтальный скролл */
html body .footer-canvas-menu-wrapper {
    max-width: 100vw;
    overflow: hidden;
}

/* Скрываем стандартную кнопку бургера — используем свою в pill */
html body .footer-canvas-menu-btn-container {
    display: none;
}

/* Кнопка закрытия — скрыта по умолчанию */
html body .footer-canvas-menu-btn-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease 0.15s, visibility 0.3s ease 0.15s;
}

/* Показываем кнопку закрытия когда меню открыто */
html.footer-canvas-menu-active body .footer-canvas-menu-btn-container {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
    z-index: 999999999;
    opacity: 1;
    visibility: visible;
}

/* Стили кнопки закрытия */
html.footer-canvas-menu-active body .footer-canvas-menu-btn {
    width: 50px;
    height: 50px;
    background: transparent;
    color: #333;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

html.footer-canvas-menu-active body .footer-canvas-menu-btn:hover {
    transform: scale(1.1);
}

/* Фон меню — полностью скрыт по умолчанию */
html body .footer-canvas-menu-bg {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background: #fff;
    max-width: 100vw;
    overflow: hidden;
}

/* Фон меню когда открыто */
html.footer-canvas-menu-active body .footer-canvas-menu-bg {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Стили полноэкранного меню — полностью скрыто по умолчанию */
html body .footer-canvas-menu {
    display: none;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease 0.1s, visibility 0.3s ease 0.1s;
    flex-direction: column;
}

html.footer-canvas-menu-active body .footer-canvas-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Пункты меню — тёмный текст на светлом фоне */
html body .footer-canvas-menu .rivax-header-v-nav li a {
    color: #333;
    font-size: 1.4rem;
    font-weight: 500;
    padding: 12px 0;
    transition: color 0.2s ease;
}

html body .footer-canvas-menu .rivax-header-v-nav li a:hover {
    color: var(--accent-color, #667eea);
}

html body .footer-canvas-menu .rivax-header-v-nav li.current-menu-item > a,
html body .footer-canvas-menu .rivax-header-v-nav li.current_page_item > a {
    color: var(--accent-color, #667eea);
}

/* Подменю */
html body .footer-canvas-menu .rivax-header-v-nav .sub-menu li a {
    font-size: 1.1rem;
    color: #666;
}

/* Кнопка закрытия — тёмная */
html body .footer-canvas-menu-wrapper .footer-canvas-menu-btn {
    color: #333;
}

html body .footer-canvas-menu-wrapper .footer-canvas-menu-btn span.bar,
html body .footer-canvas-menu-wrapper .footer-canvas-menu-btn .inner::before,
html body .footer-canvas-menu-wrapper .footer-canvas-menu-btn .inner::after {
    background-color: #333;
}

/* Иконка бургера в pill */
html body #bvts-burger-menu {
    cursor: pointer;
}

html body #bvts-burger-menu .elementor-icon {
    color: #333;
    transition: color 0.2s ease;
}

html body #bvts-burger-menu .elementor-icon:hover {
    color: var(--accent-color, #667eea);
}

/* Иконка поиска в полноэкранном меню */
html body .footer-canvas-menu .bvts-fullscreen-menu-search {
    display: block;
    width: 100%;
    margin-top: 40px;
    text-align: center;
    clear: both;
}

html body .footer-canvas-menu .bvts-search-opener {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 30px;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

html body .footer-canvas-menu .bvts-search-opener:hover {
    background: var(--accent-color, #667eea);
    color: #fff;
}

html body .footer-canvas-menu .bvts-search-opener i {
    font-size: 1.2em;
}

/* Скрываем пункты меню с классом .menu-mobile-hide на мобильных */
@media screen and (max-width: 1023px) {
    html body li.menu-mobile-hide,
    html body .menu-item.menu-mobile-hide {
        display: none;
    }
}

/* Мобильная версия навигации (до 1023px) */
@media screen and (max-width: 1023px) {
    
    /* Навигация внутри pill — компактная и красивая */
    html body #menu-bvts .rivax-header-nav-wrapper .rivax-header-nav,
    html body #menu-bvts .rivax-header-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 0px;
        padding: 8px 0;
    }
    
    /* Пункты меню — pill-стиль */
    html body #menu-bvts .rivax-header-nav > li > a {
        display: inline-block;
        padding: 8px 5px;
        font-size: 0.85em;
        font-weight: 500;
        color: #333;
        background: transparent;
        border-radius: 20px;
        transition: all 0.2s ease;
        text-decoration: none;
    }
    
    /* Hover эффект */
    html body #menu-bvts .rivax-header-nav > li > a:hover {
        background: rgba(102, 126, 234, 0.1);
        color: var(--accent-color, #667eea);
    }
    
    /* Активный пункт меню */
    html body #menu-bvts .rivax-header-nav > li.current-menu-item > a,
    html body #menu-bvts .rivax-header-nav > li.current_page_item > a {
        background: #333;
        color: #fff;
    }
    
    /* Скрываем стрелки подменю если есть */
    html body #menu-bvts .rivax-header-nav > li > a::after {
        display: none;
    }
}

/* Компактнее на маленьких экранах */
@media screen and (max-width: 480px) {

    /* Уменьшаем аватарку/логотип */
    html body #menu-bvts .elementor-widget-image img {
        max-width: 50px;
        max-height: 50px;
    }

    body .main-wrapper {
        padding-top: calc(var(--header-height, 80px) - 40px);
    }

    /* Уменьшаем название сайта */
    html body #menu-bvts .rivax-logo-title,
    html body #menu-bvts .rivax-logo-title a {
        font-size: 1.4em;
    }

    /* Уменьшаем описание */
    html body #menu-bvts .rivax-logo-description {
        font-size: 0.7em;
    }
    
    html body #menu-bvts .rivax-header-nav {
        gap: 2px 4px;
        padding: 6px 0;
    }
    
    html body #menu-bvts .rivax-header-nav > li > a {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Очень маленькие экраны (320-380px) — максимально компактно */
@media screen and (max-width: 380px) {
    
    /* Уменьшаем аватарку/логотип */
    html body #menu-bvts .elementor-widget-image img {
        max-width: 50px;
        max-height: 50px;
    }
    
    body .main-wrapper {
        padding-top: calc(var(--header-height, 80px) - 40px);
    }
    
    body #menu-bvts {
        padding: 4px 10px 4px 8px;
    }

    body .single-page-outside {
        margin-top: 40px;
    }
    
    /* Уменьшаем название сайта */
    html body #menu-bvts .rivax-logo-title,
    html body #menu-bvts .rivax-logo-title a {
        font-size: 1.2em;
    }
    
    /* Уменьшаем описание */
    html body #menu-bvts .rivax-logo-description {
        font-size: 0.5em;
    }
    
    /* Ещё компактнее меню */
    html body #menu-bvts .rivax-header-nav {
        gap: 2px 4px;
        padding: 4px 0;
    }
    
    html body #menu-bvts .rivax-header-nav > li > a {
        padding: 4px 8px;
        font-size: 0.75em;
    }

    body .privacy-notice p {
        font-size: 10px;
    }
    
    .single-hero-meta .meta-3 .meta-item.date-updated {
        font-size: 8px;
    }

    body .rivax-toc-anchor {
        font-size: 0.8rem;
    }

    .rivax-toc-items.toc-hierarchically.toc-counter  {
        font-size: 0.8rem;
    }

}

.rivax-breadcrumb .current {
    white-space: break-spaces;
}

body .privacy-notice {
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, .3);
}

body .privacy-btn {
    font-size: 10px;
    background-color: var(--button-bg);

}

article li a:not(.button) {
    position: relative;
    color: var(--accent-color);
    background-image: linear-gradient(90deg, currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: 0% bottom;
    transition: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline;
    padding: 2px 0;
}