
:root {
    --primary-red: #FF0000;
    --primary-white: #FFFFFF;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --transition: all 0.3s ease;
    --border-radius: 16px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --bg-color: var(--primary-white);
    --text-color: var(--dark-gray);
    --header-bg: var(--primary-white);
    --card-bg: var(--primary-white);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --overlay-color: rgba(255, 255, 255, 0.85);
    --mobile-menu-bg: var(--primary-white);
    --border-color: #eee;
}
.dark-theme {
    --primary-red: #FF0000;
    --bg-color: #121212;
    --text-color: #FFFFFF;
    --header-bg: #1E1E1E;
    --card-bg: #2D2D2D;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --overlay-color: rgba(30, 30, 30, 0.85);
    --mobile-menu-bg: #2D2D2D;
    --border-color: rgba(255, 255, 255, 0.1);
    --light-gray: #2D2D2D;
    --medium-gray: #CCCCCC;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}
header {
    background-color: var(--header-bg);
    box-shadow: 0 4px 20px var(--shadow-color);
    position: fixed;
    top: 15px;
    z-index: 1000;
    padding: 12px 0;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1160px; /* Максимальная ширина хедера */
}

.dark-theme header {
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 56px;
}
.logo {
    display: flex;
    align-items: center;
    transition: var(--transition);
    z-index: 10;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}
.nav-desktop {
    display: flex;
    gap: 2px;
    align-items: center;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(0 0 0 / 5%);
    padding: 6px;
    border-radius: 14px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.dark-theme .nav-desktop {
    background: rgb(255 255 255 / 9%);
}

.nav-desktop a {
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 10px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    flex-direction: column;
    min-width: 60px;
    min-height: 40px;
}
.nav-desktop a.active.clicked {
    animation: activePulse 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

@keyframes activePulse {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.nav-desktop a.active {
    background: var(--primary-red);
    color: var(--primary-white);
    font-weight: 600;
    flex-direction: row;
    padding: 10px 20px;
    gap: 12px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}
.nav-desktop a:hover {
    color: var(--text-color);
    background: none;
}

.nav-desktop a.active:hover {
    background: var(--primary-red);
    color: var(--primary-white);
}
.nav-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    display: none;
    white-space: nowrap;
}
.nav-desktop a .nav-label {
    display: none;
}
.nav-desktop a.active .nav-label {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}
.nav-desktop a.active .nav-icon {
    order: 1;
}

.nav-desktop a.active .nav-label {
    order: 2;
}

.nav-desktop a.active::after {
    content: '';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
    order: 3;
    display: none; /* Скрываем псевдоэлемент */
}
.nav-desktop a[href="#main"].active .nav-icon::before {
    content: "\f015"; /* fa-home */
}
.nav-desktop a[href="#social"].active .nav-icon::before {
    content: "\f292"; /* fa-hashtag */
}
.nav-desktop a[href="#trust"].active .nav-icon::before {
    content: "\f3ed"; /* fa-shield-alt */
}
.nav-desktop a[href="#faq"].active .nav-icon::before {
    content: "\f059"; /* fa-question-circle */
}
.nav-desktop a[href="#video-reviews"].active .nav-icon::before {
    content: "\f03d"; /* fa-video */
}
.nav-icon {
    font-size: 18px;
    display: block;
}

.nav-desktop a.active .nav-icon {
    font-size: 16px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.theme-toggle-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 18px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.theme-toggle-header:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}
.theme-toggle-header .fa-moon {
    display: block;
}

.theme-toggle-header .fa-sun {
    display: none;
}

.dark-theme .theme-toggle-header .fa-moon {
    display: none;
}

.dark-theme .theme-toggle-header .fa-sun {
    display: block;
}
.sidebar-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
    font-size: 20px;
}

.sidebar-toggle-btn:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}
.sidebar-toggle-btn .menu-icon {
    display: block;
}

.sidebar-toggle-btn .close-icon {
    display: none;
}

.sidebar-toggle-btn.active .menu-icon {
    display: none;
}

.sidebar-toggle-btn.active .close-icon {
    display: block;
}
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: var(--mobile-menu-bg);
    box-shadow: 4px 0 20px var(--shadow-color);
    z-index: 1100;
    padding: 25px 0;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}
.mobile-logo {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.logo-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-img-mobile {
    height: 38px;
    width: auto;
    object-fit: contain;
}
.sidebar-menu a:not(.logo-mobile) {
    padding: 16px 25px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
}
.sidebar-menu a:not(.logo-mobile) i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
}
.sidebar-menu a:not(.logo-mobile):hover {
    color: var(--text-color);
    background: none;
    padding-left: 25px;
}
.sidebar-menu a:not(.logo-mobile).active {
    color: var(--primary-red);
    background-color: rgba(255, 0, 0, 0.05);
    border-left: 3px solid var(--primary-red);
    padding-left: 22px;
}

.sidebar-menu a:not(.logo-mobile).active:hover {
    color: var(--primary-red);
    padding-left: 22px;
}

.sidebar-menu a:not(.logo-mobile):last-child {
    border-bottom: none;
}
.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 25px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.sidebar-theme-toggle button {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.sidebar-theme-toggle button:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.sidebar-theme-toggle .fa-sun {
    display: none;
}

.dark-theme .sidebar-theme-toggle .fa-moon {
    display: none;
}

.dark-theme .sidebar-theme-toggle .fa-sun {
    display: inline-block;
}
@media (max-width: 1200px) {
    header {
        width: calc(100% - 30px);
        max-width: calc(100% - 30px);
    }
    
    .nav-desktop a {
        padding: 9px 14px;
        font-size: 14px;
    }
    
    .nav-desktop a.active {
        padding: 9px 16px;
        min-width: 110px;
    }
    
    .nav-label {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }
    
    header {
        top: 12px;
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 768px) {
    header {
        top: 10px;
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        padding: 10px 0;
    }
    
    .logo-img {
        height: 38px;
    }
    
    .theme-toggle-header,
    .sidebar-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .sidebar-menu {
        width: 260px;
    }
}

@media (max-width: 576px) {
    header {
        top: 8px;
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
    }
    
    .logo-img {
        height: 36px;
    }
    
    .theme-toggle-header,
    .sidebar-toggle-btn {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .sidebar-menu {
        width: 260px;
        left: -260px;
    }
    
    .mobile-logo {
        padding: 15px 20px;
    }
    
    .sidebar-menu a:not(.logo-mobile) {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (min-width: 993px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

@media (max-width: 400px) {
    header {
        top: 6px;
        width: calc(100% - 12px);
        max-width: calc(100% - 12px);
    }
    
    .logo-img {
        height: 34px;
    }
    
    .theme-toggle-header,
    .sidebar-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .sidebar-menu {
        width: 240px;
        left: -240px;
    }
    
    .mobile-logo {
        padding: 12px 16px;
    }
    
    .logo-img-mobile {
        height: 34px;
    }
    
    .sidebar-menu a:not(.logo-mobile) {
        padding: 12px 16px;
        font-size: 14px;
    }
}
@media (min-width: 1921px) {
    header {
        width: calc(100% - 40px);
        max-width: 1160px; /* Фиксированная максимальная ширина */
    }
}

@media (min-width: 2560px) {
    header {
        max-width: 1160px; /* Ограничиваем 1160px на экранах 2560px */
    }
}
/* ===== КНОПКА НА ГЛАВНУЮ В ХЕДЕРЕ ===== */
.home-button-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-red);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.home-button-header:hover {
    background: #d40000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    color: white;
}

.home-button-header i {
    font-size: 16px;
}

.home-button-header span {
    font-size: 15px;
}

@media (max-width: 768px) {
    .home-button-header {
        padding: 8px 16px;
    }
    
    .home-button-header span {
        font-size: 14px;
    }
    
    .home-button-header i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .home-button-header {
        padding: 8px 12px;
    }
    
    .home-button-header span {
        display: none; /* Скрываем текст на очень маленьких экранах */
    }
    
    .home-button-header i {
        font-size: 16px;
        margin: 0;
    }
}

/* Стили для кнопки "На главную" в сайдбаре */
.sidebar-home-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 25px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-home-button:hover {
    color: var(--primary-red);
    background: rgba(255, 0, 0, 0.05);
}

.sidebar-home-button i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.sidebar-home-button.active {
    color: var(--primary-red);
    background-color: rgba(255, 0, 0, 0.05);
    border-left: 3px solid var(--primary-red);
    padding-left: 22px;
}

/* ===== ПЛАВАЮЩАЯ КНОПКА ТЕМЫ ===== */
.floating-theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 24px;
}

.floating-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.4);
}

.floating-theme-toggle:active {
    transform: scale(0.95);
}

.floating-theme-toggle .fa-moon {
    display: block;
}

.floating-theme-toggle .fa-sun {
    display: none;
}

.dark-theme .floating-theme-toggle .fa-moon {
    display: none;
}

.dark-theme .floating-theme-toggle .fa-sun {
    display: block;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .floating-theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .floating-theme-toggle {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}