/* --- 1. ГЛОБАЛЬНЫЕ СТИЛИ И НОВАЯ ПАЛИТРА --- */
:root {
    --light-bg: #F5F5F7;
    --dark-bg: #1A2035;
    --text-dark: #212529;
    --text-light: #F0F6FC;
    --text-muted-dark: #8B949E;
    --text-muted-light: #6c757d;
    --border-light: #dee2e6;
    --gradient-start: #388BFD;
    --gradient-end: #A371F7;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* --- 2. ШАПКА --- */
header.sticky-top .navbar {
    background-color: rgba(13, 17, 23, 0.85) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.navbar-brand {
    color: var(--text-light) !important;
}

.navbar .nav-link {
    color: var(--text-muted-dark) !important;
    transition: color 0.2s ease;
}

    .navbar .nav-link:hover {
        color: var(--text-light) !important;
    }

/* --- 3. ГРАДИЕНТНАЯ КНОПКА --- */
.btn-gradient {
    background-image: linear-gradient(45deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    padding: 12px 28px;
    font-weight: 500;
    border-radius: 0.5rem;
}

    .btn-gradient:hover {
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 10px 20px -10px rgba(163, 113, 247, 0.5);
    }

/* --- 4. ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    overflow: hidden;
    clip-path: url(#wave-clip);
    margin-bottom: -1px;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

    .hero-content h1 {
        font-size: 3.5rem;
        font-weight: 700;
        color: var(--text-light);
    }

/* --- 5. ОБЩИЕ СТИЛИ СЕКЦИЙ --- */
.section {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* --- 6. КОНТРАСТНАЯ ТЕМНАЯ СЕКЦИЯ --- */
.section-dark {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

    .section-dark h2, .section-dark h5 {
        color: var(--text-light);
    }

    .section-dark .text-muted {
        color: var(--text-muted-dark) !important;
    }

/* --- 7. КАРТОЧКИ ТОВАРОВ --- */
.card {
    border: none;
    border-radius: 1rem;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px -10px rgba(0,0,0,0.1);
    }

    .card .btn-outline-primary {
        border-color: var(--border-light);
        color: var(--text-muted-light);
        border-radius: 0.5rem;
        font-weight: 500;
    }

        .card .btn-outline-primary:hover {
            background-color: var(--gradient-start);
            color: white;
            border-color: var(--gradient-start);
        }

/* --- 8. ФОРМЫ И МОДАЛЬНЫЕ ОКНА --- */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
}

#contact form {
    background-color: white;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
}

.modal-header, .modal-footer {
    border: none;
}

.form-control {
    background-color: #F8F9FA;
    border: 1px solid #E9ECEF;
    padding: 12px 16px;
    border-radius: 0.5rem;
}

    .form-control:focus {
        background-color: white;
        border-color: var(--gradient-start);
        box-shadow: none;
    }

.form-check-label a {
    color: var(--gradient-start);
    text-decoration: none;
}

    .form-check-label a:hover {
        text-decoration: underline;
    }

/* --- 9. АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    .navbar .d-flex {
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    #contact form {
        padding: 1.5rem;
    }
}

/* --- 10. ИСПРАВЛЕНИЕ ЧИТАЕМОСТИ ФУТЕРА --- */
.footer.section-dark .container {
    color: rgba(255, 255, 255, 0.6);
}

.footer.section-dark a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease;
}

    .footer.section-dark a:hover {
        color: #FFFFFF !important;
    }

/* --- 11. СТИЛИ ДЛЯ ИКОНОК ПРЕИМУЩЕСТВ --- */
.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--gradient-start);
    transition: background-color 0.3s ease;
}

#features .col-md-3:hover .feature-icon {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- 12. УЛУЧШЕННЫЕ СТИЛИ ДЛЯ КАРУСЕЛЕЙ С ПЛАВНОЙ АНИМАЦИЕЙ --- */

/* ПЛАВНАЯ АНИМАЦИЯ ДЛЯ ВСЕХ КАРУСЕЛЕЙ */
.carousel-item {
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

    .carousel-fade .carousel-item.active,
    .carousel-fade .carousel-item-next.carousel-item-start,
    .carousel-fade .carousel-item-prev.carousel-item-end {
        opacity: 1;
        z-index: 1;
    }

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Плавная прокрутка для обычной карусели (slide) */
.carousel.slide .carousel-inner {
    overflow: visible; /* Важно для плавности */
}

.carousel.slide .carousel-item {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Общие стили для всех кнопок каруселей */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        opacity: 1;
    }

/* КАРУСЕЛИ В КАРТОЧКАХ ТОВАРОВ */
.card .carousel {
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.card .carousel-control-prev,
.card .carousel-control-next {
    width: 25px;
    height: 25px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.card .carousel-control-prev {
    left: 10px;
}

.card .carousel-control-next {
    right: 10px;
}

.card .carousel-control-prev-icon,
.card .carousel-control-next-icon {
    width: 12px;
    height: 12px;
}

/* Темные стрелки для карточек */
.card .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.card .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* --- ИСПРАВЛЕНИЕ ИНДИКАТОРОВ КАРУСЕЛИ В КАРТОЧКАХ (КРУГЛЫЕ) --- */
.card .carousel-indicators {
    bottom: 5px;
    margin-bottom: 0;
}

    .card .carousel-indicators [data-bs-target] {
        width: 8px !important; /* Жесткая ширина */
        height: 8px !important; /* Жесткая высота */
        border-radius: 50% !important; /* Делаем круг */
        background-color: rgba(0, 0, 0, 0.2);
        border: none;
        opacity: 1;
        margin: 0 4px;
        transition: all 0.3s ease;
    }

    .card .carousel-indicators .active {
        background-color: var(--gradient-start) !important;
        width: 8px !important; /* ВАЖНО: Повторяем ширину, чтобы не растягивался */
        height: 8px !important;
    }

/* КАРУСЕЛЬ В МОДАЛЬНОМ ОКНЕ ТОВАРА */
#productModal .carousel-control-prev,
#productModal .carousel-control-next {
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

#productModal .carousel-control-prev {
    left: 10px;
}

#productModal .carousel-control-next {
    right: 10px;
}

#productModal .carousel-control-prev-icon,
#productModal .carousel-control-next-icon {
    width: 18px;
    height: 18px;
}

/* Темные стрелки для модального окна */
#productModal .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

#productModal .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Индикаторы для модального окна (здесь можно оставить полоски, либо тоже сделать круглые) */
#productModal .carousel-indicators {
    bottom: 10px;
}

    #productModal .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        background-color: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    #productModal .carousel-indicators .active {
        background-color: var(--gradient-start);
        border-color: var(--gradient-start);
        width: 24px;
        border-radius: 4px;
    }

/* Убираем резкие переходы при загрузке */
.carousel-item img {
    transition: opacity 0.3s ease;
}

/* Плавное появление при первой загрузке */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.carousel-item.active img {
    animation: fadeIn 0.5s ease-in;
}

/* --- БЕЙДЖИК В ФУТЕРЕ (LegionGo) --- */
.legion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Полупрозрачная рамка */
    border-radius: 50px; /* Овальная форма */
    color: rgba(255, 255, 255, 0.7) !important; /* Цвет текста */
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05); /* Едва заметный фон */
}

    .legion-badge:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.5);
        color: #ffffff !important;
        transform: translateY(-2px);
    }

    .legion-badge .heart {
        color: #ff4757;
        margin: 0 6px;
        font-size: 1.1em;
        animation: heartbeat 1.5s infinite;
    }

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}