/*
Theme Name: Site Builder Generated Theme
Description: Сгенерирована плагином Site Builder. Шапка: my-custom, футер: columns, стиль: royal-purple.
Version: 1.1.10
Author: Site Builder Plugin
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ===== Reset & base layout ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sb-font-body, "Segoe UI", system-ui, -apple-system, sans-serif);
    font-size: var(--sb-font-size, 16px);
    line-height: var(--sb-line-height, 1.6);
    color: var(--sb-color-text, #222);
    background: var(--sb-color-bg, #fff);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--sb-color-link, #2271b1); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Site wrapper ===== */
.sb-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.sb-site-content {
    flex: 1;
    padding: 32px 20px;
    max-width: var(--sb-content-max-width, 920px);
    width: 100%;
    margin: 0 auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sb-font-heading, var(--sb-font-body, sans-serif));
    line-height: 1.3;
    margin: 1.4em 0 0.6em;
}
h1 { font-size: 2.2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }

/* ===== Content elements ===== */
.sb-content figure { margin: 24px 0; }
.sb-content figure img { border-radius: 4px; }
.sb-content figcaption {
    font-size: 0.9em;
    color: var(--sb-color-muted, #666);
    text-align: center;
    margin-top: 6px;
}
.sb-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.sb-content th, .sb-content td {
    padding: 8px 12px;
    border: 1px solid var(--sb-color-border, #e2e8f0);
    text-align: left;
}
.sb-content th {
    background: var(--sb-color-bg-alt, #f8f9fa);
    font-weight: 600;
}
.sb-content blockquote {
    border-left: 4px solid var(--sb-color-accent, #2271b1);
    margin: 20px 0;
    padding: 12px 20px;
    background: var(--sb-color-bg-alt, #f8f9fa);
    color: var(--sb-color-muted, #555);
}
.sb-content code {
    background: var(--sb-color-bg-alt, #f0f0f1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.sb-content pre {
    background: var(--sb-color-bg-alt, #f0f0f1);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
}

/* ===== Variant-specific styles (header, footer, color scheme) injected below ===== */

/* Royal Purple — тёмная схема, насыщенный фиолетовый + золото */
:root {
    --sb-color-bg:              #17121f;    /* deep aubergine */
    --sb-color-bg-alt:          #221a2e;    /* lighter aubergine */
    --sb-color-text:            #ede9f2;    /* soft lilac-white */
    --sb-color-muted:           #9b8bb0;    /* muted lavender */
    --sb-color-link:            #a855f7;    /* vivid violet */
    --sb-color-link-hover:      #c084fc;    /* lighter violet */
    --sb-color-border:          #362b47;    /* muted separator */
    --sb-color-accent:          #e9c46a;    /* soft gold */

    --sb-font-body:             -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    --sb-font-heading:          'Georgia', 'Times New Roman', serif;
    --sb-font-size:             16px;
    --sb-line-height:           1.7;
    --sb-content-max-width:     920px;
}

body.sb-site {
    background: var(--sb-color-bg);
    color: var(--sb-color-text);
    font-family: var(--sb-font-body);
    font-size: var(--sb-font-size);
    line-height: var(--sb-line-height);
}
body.sb-site h1, body.sb-site h2, body.sb-site h3, body.sb-site h4 {
    font-family: var(--sb-font-heading);
    color: var(--sb-color-text);
    letter-spacing: -0.01em;
}
body.sb-site a {
    color: var(--sb-color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
body.sb-site a:hover {
    color: var(--sb-color-link-hover);
    border-bottom-color: currentColor;
}
body.sb-site strong { color: var(--sb-color-accent); }
body.sb-site blockquote {
    border-left: 3px solid var(--sb-color-accent);
    padding: 12px 20px;
    background: var(--sb-color-bg-alt);
    border-radius: 0 6px 6px 0;
    color: var(--sb-color-muted);
    font-style: italic;
}
body.sb-site code {
    background: var(--sb-color-bg-alt);
    color: var(--sb-color-link);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--sb-color-border);
    font-size: 0.9em;
    font-family: ui-monospace, 'SF Mono', Monaco, monospace;
}


/* ===== Header variant: my-custom ===== */
/* =========================================
   1. ПЕРЕМЕННЫЕ ДЛЯ СВЕТЛОЙ И ТЕМНОЙ ТЕМЫ
   ========================================= */
:root {
    /* Светлая тема (по умолчанию) */
    --header-bg: #ffffff;
    --header-border: #e2e8f0;
    --burger-color: #111827;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-shadow: -10px 0 50px rgba(0, 0, 0, 0.08);
    --menu-text: #1f2937;
    --menu-text-hover: #0081c9;
    --close-color: #111827;
    --logo-color: #0081c9;
    --scrollbar-thumb: #cbd5e1;
    --underline-glow: rgba(0, 129, 201, 0.4);
}

/* 
   Темная тема. 
   Поддерживаются самые популярные классы WordPress-тем. 
   Если у вас другой класс, просто добавьте его в этот список (например, .my-dark-theme)
*/
body.dark-mode,
body.dark,
body.theme-dark,
:root[data-theme="dark"] {
    --header-bg: #0f172a;
    --header-border: #1e293b;
    --burger-color: #f1f5f9;
    --panel-bg: rgba(30, 41, 59, 0.97);
    --panel-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    --menu-text: #e2e8f0;
    --menu-text-hover: #38bdf8;
    --close-color: #f1f5f9;
    --logo-color: #38bdf8;
    --scrollbar-thumb: #334155;
    --underline-glow: rgba(56, 189, 248, 0.4);
}

/* Автопереключение, если в настройках системы включена темная тема (и тема WP это поддерживает) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not(.light-mode) {
        --header-bg: #0f172a;
        --header-border: #1e293b;
        --burger-color: #f1f5f9;
        --panel-bg: rgba(30, 41, 59, 0.97);
        --panel-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
        --menu-text: #e2e8f0;
        --menu-text-hover: #38bdf8;
        --close-color: #f1f5f9;
        --logo-color: #38bdf8;
        --scrollbar-thumb: #334155;
        --underline-glow: rgba(56, 189, 248, 0.4);
    }
}

/* =========================================
   2. ОБЩИЕ СТИЛИ КОНТЕЙНЕРА ШАПКИ
   ========================================= */
.sb-header-my-custom {
    width: 100%;
    background: var(--header-bg);
    border-bottom: 2px solid var(--header-border);
    position: relative;
    z-index: 100;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.sb-header-my-custom .pe-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

/* =========================================
   3. ЛОГОТИП
   ========================================= */
.sb-header-my-custom .burger-logo {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.burger-logo h1 {
    margin: 0;
}

.sb-header-my-custom .logo-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sb-header-my-custom .logo-wrapper:hover {
    opacity: 0.8;
}

.custom-logo-link {
    display: block;
    width: 179px;
}

.sb-header-my-custom .logo-text {
    color: var(--logo-color);
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: system-ui, -apple-system, sans-serif;
    text-transform: uppercase;
    transition: color 0.4s ease;
}

/* =========================================
   4. КНОПКА БУРГЕРА (Премиум анимация)
   ========================================= */
.sb-header-my-custom .burger-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sb-header-my-custom .burger-btn:hover {
    border-color: var(--header-border);
    background: var(--panel-bg);
    transform: scale(1.05);
}

.sb-header-my-custom .burger-btn span,
.sb-header-my-custom .burger-btn span::before,
.sb-header-my-custom .burger-btn span::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--burger-color);
    position: absolute;
    border-radius: 2px;
    /* Эффект пружины для плавного преобразования в крестик */
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6); 
}

.sb-header-my-custom .burger-btn span::before { top: -8px; }
.sb-header-my-custom .burger-btn span::after { top: 8px; }

/* Анимация крестика */
.sb-header-my-custom .js-burger.active {
    border-color: transparent;
    background: transparent;
}

.sb-header-my-custom .js-burger.active span {
    background-color: transparent !important;
}

.sb-header-my-custom .js-burger.active span::before {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--menu-text-hover);
}

.sb-header-my-custom .js-burger.active span::after {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--menu-text-hover);
}

/* =========================================
   5. ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ МЕНЮ (Glassmorphism)
   ========================================= */
.sb-header-my-custom .main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    padding: 100px 50px 50px;
    box-shadow: var(--panel-shadow);
    visibility: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    /* Скрытое состояние: немного сдвинуто и уменьшено */
    transform: translateX(50px) scale(0.95);
    opacity: 0;
    border-left: 1px solid var(--header-border);
    /* Плавная физическая анимация выезда */
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                opacity 0.4s ease, 
                visibility 0.5s ease,
                background 0.4s ease,
                border-color 0.4s ease;
}

.sb-header-my-custom .main-navigation.active {
    visibility: visible;
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Красивый скроллбар внутри панели */
.sb-header-my-custom .main-navigation::-webkit-scrollbar {
    width: 4px;
}
.sb-header-my-custom .main-navigation::-webkit-scrollbar-track {
    background: transparent;
}
.sb-header-my-custom .main-navigation::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}

/* =========================================
   6. СПИСОК И ПУНКТЫ МЕНЮ
   ========================================= */
@keyframes menuItemSlideIn {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
        filter: blur(4px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
        filter: blur(0);
    }
}

.sb-header-my-custom .main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.sb-header-my-custom .main-menu li {
    opacity: 0;
    width: 100%; /* Чтобы ссылка занимала всю ширину для клика */
    animation: menuItemSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-play-state: paused;
}

.sb-header-my-custom .main-navigation.active .main-menu li {
    animation-play-state: running;
}

/* Каскадная задержка */
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(1) { animation-delay: 0.1s; }
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(2) { animation-delay: 0.15s; }
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(3) { animation-delay: 0.2s; }
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(4) { animation-delay: 0.25s; }
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(5) { animation-delay: 0.3s; }
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(6) { animation-delay: 0.35s; }
/* Для пунктов ниже 6-го */
.sb-header-my-custom .main-navigation.active .main-menu li:nth-child(n+7) { animation-delay: 0.4s; }

/* Ссылки */
.sb-header-my-custom .main-menu a {
    text-decoration: none;
    color: var(--menu-text);
    font-size: 1.4rem;
    font-weight: 500;
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
    display: inline-block;
    padding: 10px 0;
    /* Плавные переходы */
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Анимированная линия снизу */
.sb-header-my-custom .main-menu a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--menu-text-hover);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--underline-glow);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Эффект при наведении */
.sb-header-my-custom .main-menu a:hover {
    color: var(--menu-text-hover);
    transform: translateX(8px);
}

.sb-header-my-custom .main-menu a:hover::after {
    width: 100%;
}

/* =========================================
   7. КНОПКА ЗАКРЫТИЯ ВНУТРИ ПАНЕЛИ
   ========================================= */
.sb-header-my-custom .btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    line-height: 1;
    color: var(--close-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sb-header-my-custom .btn-close:hover {
    background: var(--header-border);
    color: var(--menu-text-hover);
    transform: rotate(90deg);
}

/* =========================================
   8. АКТИВНЫЙ ПУНКТ МЕНЮ
   ========================================= */
.sb-header-my-custom .main-menu li.current-menu-item > a,
.sb-header-my-custom .main-menu li.current_page_item > a {
    color: var(--menu-text-hover);
    font-weight: 700 !important;
}

/* Если пункт активен, линия всегда видна */
.sb-header-my-custom .main-menu li.current-menu-item > a::after,
.sb-header-my-custom .main-menu li.current_page_item > a::after {
    width: 100%;
}

/* =========================================
   9. БОНУС: Размытие фона при открытом меню
   (Работает в современных браузерах без изменения PHP)
   ========================================= */
body:has(.sb-header-my-custom .main-navigation.active) main,
body:has(.sb-header-my-custom .main-navigation.active) footer,
body:has(.sb-header-my-custom .main-navigation.active) .site-content {
    filter: blur(2px);
    transition: filter 0.5s ease;
    pointer-events: none;
    user-select: none;
}

/* =========================================
   10. АДАПТИВНОСТЬ (Мобильные устройства)
   ========================================= */
@media (max-width: 640px) {
    .sb-header-my-custom .main-navigation {
        width: 100vw;
        max-width: 100%;
        padding: 90px 25px 40px;
        border-left: none;
        border-top: 1px solid var(--header-border);
    }

    .sb-header-my-custom .main-menu a {
        font-size: 1.25rem;
    }
    
    /* Убираем размытие фона на мобилках для производительности */
    body:has(.sb-header-my-custom .main-navigation.active) main {
        filter: none;
        pointer-events: auto;
        user-select: auto;
    }
}




/* ===== Footer variant: columns ===== */
/* columns — Колонки */
.sb-footer-columns { background: var(--sb-color-bg-alt, #f8f9fa); border-top: 1px solid var(--sb-color-border, #e5e7eb); padding: 40px 20px 20px; color: var(--sb-color-text); margin-top: 40px; } .sb-footer-columns .sb-footer-inner { max-width: var(--sb-content-max-width, 920px); margin: 0 auto; } .sb-footer-columns .sb-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 28px; } .sb-footer-columns .sb-footer-col { font-size: 0.9em; } .sb-footer-columns .sb-footer-heading { margin: 0 0 12px; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sb-color-muted, #6b7280); font-weight: 600; } .sb-footer-columns .sb-footer-brand img { max-height: 40px; width: auto; margin-bottom: 8px; } .sb-footer-columns .sb-footer-brand-text { font-weight: 700; font-size: 1.1em; color: var(--sb-color-text); } .sb-footer-columns .sb-footer-tagline { margin: 6px 0 0; color: var(--sb-color-muted); font-size: 0.92em; line-height: 1.55; } .sb-footer-columns .sb-menu, .sb-footer-columns .sb-footer-info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; } .sb-footer-columns .sb-menu a, .sb-footer-columns .sb-footer-info-list a { color: var(--sb-color-text); text-decoration: none; } .sb-footer-columns .sb-menu a:hover, .sb-footer-columns .sb-footer-info-list a:hover { color: var(--sb-color-link); text-decoration: underline; } .sb-footer-columns .sb-footer-copyright { padding-top: 18px; border-top: 1px solid var(--sb-color-border, #e5e7eb); color: var(--sb-color-muted, #6b7280); font-size: 0.85em; text-align: center; } @media (max-width: 700px) { .sb-footer-columns .sb-footer-grid { grid-template-columns: 1fr; gap: 24px; } }

