/*
Theme Name: LAV 2
Theme URI: https://likhodedov.com
Author: Senior FullStack Developer
Author URI: https://likhodedov.com
Description: Автономная, сверхбыстрая и юридически чистая тема WordPress (MVP Этап 1).
Version: 2.0.5
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lav
*/

/* ===================================
   1. СБРОС И БАЗОВЫЕ СТИЛИ
   =================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: "Syne", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4f46e5;
}

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

/* ===================================
   2. ГЛОБАЛЬНАЯ СТРУКТУРА (LAYOUT)
   =================================== */

/* Глобальный ряд 1: Sidebar + Workspace */
.lav-global-row--main {
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
}

/* Глобальный ряд 2: Футер */
.lav-global-row--footer {
    width: 100%;
    background: #0a0a0a;
    border-top: 1px solid #222;
}

/* ===================================
   3. SIDEBAR (Левая панель)
   =================================== */

.lav-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: #111111;
    border-right: 1px solid #222;
    z-index: 100;
}

/* Скрываем скроллбар для красоты, но оставляем функционал */
.lav-sidebar::-webkit-scrollbar {
    width: 4px;
}
.lav-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.lav-sidebar-inner {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100%;
}

/* Логотип */
.lav-site-branding {
    text-align: center;
    flex-shrink: 0;
}

.lav-site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.lav-site-title a {
    color: #ffffff;
}

.lav-site-description {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Социальные сети */
.lav-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.lav-social-links li {
    margin: 0;
    display: inline-block;
}

.lav-social-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    color: #ffffff; /* ← базовый цвет, наследуется SVG через currentColor */
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.lav-social-link:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1; /* ← при hover меняется color, и SVG наследует его */
}

.lav-social-link svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    flex-shrink: 0;
    display: block;
    /* fill НЕ задаём — он берётся из currentColor */
}

.lav-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

.lav-social-label {
    display: inline-block;
    line-height: 1;
}

/* Поиск */
.lav-search-form {
    flex-shrink: 0;
}

.lav-search-field {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.lav-search-field:focus {
    outline: none;
    border-color: #6366f1;
}

/* Кнопка мобильного меню (скрыта на десктопе) */
.lav-mobile-menu-toggle {
    display: none;
    width: 100%;
    padding: 0.7rem;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}

.lav-mobile-menu-toggle:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Меню навигации */
.lav-main-navigation {
    flex-shrink: 0;
}

.lav-nav-menu {
    list-style: none;
}

.lav-nav-menu li {
    margin: 0;
}

.lav-nav-menu a {
    display: block;
    padding: 0.6rem 0;
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.lav-nav-menu a:hover,
.lav-nav-menu .current-menu-item > a {
    color: #6366f1;
}

.lav-nav-menu .sub-menu {
    padding-left: 1rem;
    margin-top: 0.25rem;
}

/* ===================================
   4. WORKSPACE (Рабочая область)
   =================================== */

.lav-workspace {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Общие стили для рядов workspace */
.lav-row {
    width: 100%;
    position: relative;
}

/* ===================================
   5. РЯД 1: HERO (С частицами)
   =================================== */

.lav-row--hero {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 3rem;
    background: #0a0a0a;
    overflow: hidden; /* Чтобы частицы не вылезали */
}

.lav-hero-tag {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.lav-hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.5rem 0;
    color: #ffffff;
}

.lav-highlight {
    color: #6366f1;
    position: relative;
    display: inline-block;
}

.lav-highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #6366f1;
    border-radius: 2px;
}

.lav-hero-description {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.7;
    margin: 0 0 2rem 0;
}

.lav-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Изображение в Hero */
.lav-hero-image-wrapper {
    position: relative;
    z-index: 1;
}

.lav-hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.lav-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    /* Эффект из оригинала: белая и цветная тени */
    filter: drop-shadow(4px 4px 0px #ffffff) drop-shadow(4px 4px 0px #6366f1);
}

/* Контейнер частиц внутри Hero */
#lav-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Контент Hero должен быть выше частиц */
.lav-row--hero > .lav-hero-content,
.lav-row--hero > .lav-hero-image-wrapper {
    position: relative;
    z-index: 1;
}

/* ===================================
   6. РЯД 2: SLAVIK ЗАГОЛОВОК
   =================================== */

.lav-row--slavik {
    padding: 3rem 3rem 1rem 3rem;
}

.lav-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
}

/* ===================================
   7. РЯД 3: ЧАТБОТ (80% ширины)
   =================================== */

.lav-row--chat {
    padding: 1rem 3rem 4rem 3rem;
}

.lav-chat-wrapper {
    width: 80%;
    max-width: 900px;
    margin: 0 auto;
}

/* Переопределение стилей плагина чатбота, чтобы он вписался в 80% */
.lav-chat-wrapper .arcb-chatbot,
.lav-chat-wrapper #arcb-chatbot-root,
.lav-chat-wrapper .arcb-inner,
.lav-chat-wrapper .arcb-window {
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
}

/* ===================================
   8. РЯД 4: CTA БЛОК (В workspace, не в футере!)
   =================================== */

.lav-row--cta {
    padding: 4rem 3rem;
    background: #0d0d0d;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

.lav-cta-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lav-cta-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.lav-cta-description {
    font-size: 1.1rem;
    color: #aaa;
    margin: 0 0 2rem 0;
}

/* ===================================
   9. РЯД: СТРАНИЦЫ И ЗАПИСИ (Без частиц)
   =================================== */

.lav-row--page {
    padding: 4rem 3rem;
}

.lav-page-content,
.lav-single-content {
    max-width: 800px;
}

.lav-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.lav-page-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.lav-page-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #ccc;
}

.lav-page-body p {
    margin-bottom: 1.5rem;
}

.lav-page-body h2,
.lav-page-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.lav-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ===================================
   10. КНОПКИ
   =================================== */

.lav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.lav-btn-primary {
    background: #6366f1;
    color: #fff;
}

.lav-btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.lav-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
}

.lav-btn-outline:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* ===================================
   11. МОДАЛКА ФОРМЫ (Поверх всего)
   =================================== */

.lav-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999; /* Максимальный z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lav-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.lav-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
}

.lav-modal-content {
    position: relative;
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    z-index: 1;
}

.lav-modal.is-active .lav-modal-content {
    transform: translateY(0);
}

.lav-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 2;
}

.lav-modal-close:hover {
    color: #fff;
}

.lav-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-right: 2rem;
}

/* Форма внутри модалки */
.lav-form {
    width: 100%;
}

.lav-form-group {
    margin-bottom: 1rem;
}

.lav-form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.lav-form-input:focus {
    outline: none;
    border-color: #6366f1;
}

textarea.lav-form-input {
    resize: vertical;
    min-height: 120px;
}

.lav-form-legal {
    font-size: 0.75rem;
    color: #888;
    margin-top: 1rem;
    line-height: 1.4;
}

.lav-form-legal a {
    color: #888;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.lav-form-response {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===================================
   12. COOKIE BANNER
   =================================== */

.lav-cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 1rem 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.lav-cookie-notice.visible {
    transform: translateY(0);
}

.lav-cookie-notice__content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #aaa;
}

/* ===================================
   13. ФУТЕР
   =================================== */

.lav-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.lav-footer-legal {
    text-align: center;
}

.lav-footer-legal-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.lav-age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #444;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.lav-footer-links {
    font-size: 0.75rem;
    color: #666;
}

.lav-footer-links a {
    color: #888;
}

.lav-divider {
    margin: 0 0.5rem;
    color: #444;
}

/* ===================================
   14. МОБИЛЬНАЯ АДАПТАЦИЯ
   =================================== */

@media (max-width: 1024px) {
    /* Глобальный ряд 1: вертикально */
    .lav-global-row--main {
        flex-direction: column;
    }

    /* Sidebar: не sticky, идёт сверху */
    .lav-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #222;
    }

    .lav-sidebar-inner {
        padding: 1.5rem;
    }

    /* Кнопка мобильного меню видна */
    .lav-mobile-menu-toggle {
        display: block;
    }

    /* Меню скрыто по умолчанию */
    .lav-main-navigation {
        display: none;
        margin-top: 0.5rem;
    }

    .lav-main-navigation.is-open {
        display: block;
    }

    /* Workspace без отступа */
    .lav-workspace {
        width: 100%;
    }

    /* Hero: одна колонка */
    .lav-row--hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .lav-hero-image-wrapper {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }

    /* Ряды workspace */
    .lav-row--slavik,
    .lav-row--chat,
    .lav-row--cta,
    .lav-row--page {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Чатбот на мобильном на всю ширину */
    .lav-chat-wrapper {
        width: 100%;
    }

    /* Футер */
    .lav-footer-inner {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .lav-hero-title {
        font-size: 1.8rem;
    }

    .lav-hero-buttons {
        flex-direction: column;
    }

    .lav-btn {
        width: 100%;
        justify-content: center;
    }

    .lav-social-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .lav-cookie-notice__content {
        flex-direction: column;
        text-align: center;
    }

    .lav-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .lav-cta-title {
        font-size: 1.5rem;
    }
}

