/* ========== ШРИФТЫ ========== */
body {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    color: #1E1B4B;
    background-color: #F5F3FF;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
}
.stat-label { font-weight: 500; }

.navbar-brand {
    font-family: 'Miratrix', 'Rubik', sans-serif !important;
    font-weight: normal;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ========== ФИРМЕННЫЕ ЦВЕТА ========== */
:root {
    --primary: #6C3CE1;
    --primary-dark: #4A1A9E;
    --primary-light: #8B5CF6;
    --gradient-start: #6C3CE1;
    --gradient-end: #4A1A9E;
    --accent-blue: #6db8da;
    --accent-yellow: #fae924;
    --white: #ffffff;
    --bg-light: #F5F3FF;
    --text-dark: #1E1B4B;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(108, 60, 225, 0.2);
}

/* ========== НАВБАР ========== */
.navbar {
    background: #6C3CE1 !important;
    background: linear-gradient(135deg, #6C3CE1, #4A1A9E) !important;
}
.navbar .nav-link { color: #ffffff !important; }
.navbar .nav-link:hover { color: #fae924 !important; }
.navbar-brand { color: #ffffff !important; }

/* ========== HERO ========== */
.hero {
    min-height: 80vh;
    background: #6C3CE1 !important;
    background: linear-gradient(135deg, #6C3CE1, #4A1A9E) !important;
    position: relative;
}
.hero h1, .hero p, .hero .lead { color: #ffffff !important; }
.hero .btn-light {
    color: #6C3CE1 !important;
    background-color: #ffffff !important;
    border-color: #ffffff !important;
}
.hero .btn-light:hover {
    background-color: #fae924 !important;
    border-color: #fae924 !important;
    color: #1E1B4B !important;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Ccircle fill='rgba(255,255,255,0.05)' cx='50' cy='50' r='40'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 8s ease-in-out infinite;
}
.shape-1 { width: 150px; height: 150px; background: #fff; top: 10%; left: 5%; }
.shape-2 { width: 80px; height: 80px; background: #fff; top: 60%; left: 80%; animation-delay: -2s; }
.shape-3 { width: 120px; height: 120px; background: #fff; top: 30%; left: 50%; animation-delay: -4s; }
.shape-4 { width: 60px; height: 60px; background: #fff; top: 70%; left: 10%; animation-delay: -6s; }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* ========== КНОПКИ ========== */
.btn-primary, .badge.bg-primary {
    background-color: #6C3CE1 !important;
    border-color: #4A1A9E !important;
    color: #ffffff !important;
}
.btn-primary:hover { background-color: #4A1A9E !important; }
.btn-outline-primary {
    color: #6C3CE1;
    border-color: #6C3CE1;
}
.btn-outline-primary:hover {
    background-color: #6C3CE1;
    color: #ffffff;
}

/* ========== КАРТОЧКИ ========== */
.card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 60, 225, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-3d:hover {
    transform: rotateX(2deg) rotateY(2deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ========== КУРСЫ ========== */
.course-icon {
    height: 200px;
    background: linear-gradient(45deg, #8B5CF6, #4A1A9E);
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-placeholder {
    font-size: 4rem;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

/* ========== ОТЗЫВЫ ========== */
.reviews-wrapper { position: relative; }
.reviews-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.reviews-slider::-webkit-scrollbar { display: none; }
.review-card {
    min-width: 280px;
    max-width: 350px;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(108, 60, 225, 0.2);
    transition: transform 0.3s;
}
.review-card:hover { transform: translateY(-5px); }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-avatar, .review-avatar-placeholder {
    width: 45px; height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #6C3CE1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.review-source { font-size: 0.8rem; color: #888; }
.review-stars { color: #fae924; }
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
}
.scroll-btn.left { left: -15px; }
.scroll-btn.right { right: -15px; }

/* ========== FAQ ========== */
.accordion-button:not(.collapsed) {
    background-color: #8B5CF6;
    color: white;
}
.accordion-button { font-weight: 700; color: #1E1B4B; }
.accordion-body { color: #555; }
.accordion-item {
    margin-bottom: 10px;
    border: 1px solid rgba(108, 60, 225, 0.2);
    border-radius: 10px !important;
    overflow: hidden;
}

/* ========== БАННЕР ========== */
.top-banner { padding: 10px 0; font-size: 0.95rem; }
.top-banner .btn-close { filter: invert(1); }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .scroll-btn { display: none; }
    .review-card { min-width: 85vw; }
    .hero h1 { font-size: 2rem; }
    .course-icon { height: 150px; }
    .carousel-scroll-btn { display: none; }
}
@media (min-width: 992px) {
    .hero { background-attachment: fixed; }
}

/* ========== ЗАЩИТА ОТ РАЗМЫТИЯ КАРТОЧЕК ========== */
.course-card-wrapper:hover .card-text,
.course-card-wrapper:hover .card-title,
.course-card-wrapper:hover .badge,
.course-card-wrapper:hover .btn,
.course-card-wrapper:hover .mt-auto,
.course-card-wrapper:hover .text-muted {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ========== СЕЗОННЫЕ ДЕКОРАЦИИ ========== */
body.theme-autumn::before {
    content: '🍂🍁🍃';
    position: fixed; top: -10%; left: 0; width: 100%; height: 120%;
    pointer-events: none; z-index: 9999;
    font-size: 2rem; animation: fall 10s linear infinite;
    white-space: pre; opacity: 0.7;
}
body.theme-winter::before {
    content: '❄️❅❆';
    animation: snow 8s linear infinite; font-size: 1.8rem; opacity: 0.8;
}
body.theme-spring::before {
    content: '🌸🌺🌷';
    animation: fall 12s linear infinite; font-size: 1.8rem; opacity: 0.7;
}
body.theme-summer::before {
    content: '☀️✨🌻';
    animation: float-up 6s ease-in-out infinite; font-size: 2rem; opacity: 0.6;
}
body.theme-halloween::before {
    content: '🎃🕸️🦇';
    animation: fall 8s linear infinite; font-size: 2rem; opacity: 0.8;
}
body.theme-newyear::before {
    content: '❄️🎄✨';
    animation: snow 6s linear infinite; font-size: 2rem; opacity: 0.9;
}
body.theme-feb23::before {
    content: '⭐🌟✨';
    animation: float-up 7s ease-in-out infinite; font-size: 1.5rem; opacity: 0.7;
}
body.theme-march8::before {
    content: '🌷🌹💐';
    animation: fall 10s linear infinite; font-size: 1.8rem; opacity: 0.8;
}
body.theme-victory::before {
    content: '🎖️✨🎆';
    animation: float-up 5s ease-in-out infinite; font-size: 1.5rem; opacity: 0.8;
}
body.theme-summer_holidays::before {
    content: '🏖️⚽🍦';
    animation: float-up 6s ease-in-out infinite; font-size: 2rem; opacity: 0.6;
}

@keyframes fall {
    0% { transform: translateY(-100px) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}
@keyframes snow {
    0% { transform: translateY(-100px) translateX(0); }
    50% { transform: translateY(50vh) translateX(30px); }
    100% { transform: translateY(100vh) translateX(-30px); }
}
@keyframes float-up {
    0%, 100% { transform: translateY(100vh) scale(0.5); opacity: 0; }
    10% { opacity: 1; } 90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
/* Скрываем стандартный блок с подсказкой, так как используем title */
.helptext {
    display: none;
}

/* ========== ПРОМО-БАННЕР ========== */
.promo-banner-wrapper {
    position: relative;
    width: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    margin-top: -8px;
}
.promo-banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 20px;
}
.promo-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.promo-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 5px;
}

/* Анимированные эмодзи */
.theme-icon-left,
.theme-icon-right {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    z-index: 1;
}
.theme-icon-left { left: 5%; }
.theme-icon-right { right: 5%; }

.theme-symbols {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
}
.theme-symbol {
    position: absolute;
    font-size: 1.5rem;
    animation: themeFloat 8s ease-in-out infinite;
    opacity: 0.25;
}
.theme-symbol:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.theme-symbol:nth-child(2) { top: 70%; left: 20%; animation-delay: -2s; }
.theme-symbol:nth-child(3) { top: 20%; left: 80%; animation-delay: -4s; }
.theme-symbol:nth-child(4) { top: 60%; left: 70%; animation-delay: -6s; }
.theme-symbol:nth-child(5) { top: 40%; left: 50%; animation-delay: -1s; }

@keyframes themeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}

/* Блеск */
.rainbow-shine {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.25) 45%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.25) 55%, transparent 60%);
    animation: shine 3s infinite;
    z-index: 1;
}
@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(25deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(25deg); }
}

/* Конфетти (простая версия) */
.confetti {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.confetti-piece {
    position: absolute;
    width: 8px; height: 8px;
    background: #fff;
    opacity: 0;
    animation: confettiFall 3s linear infinite;
}
.confetti-piece:nth-child(1) { left: 10%; animation-delay: 0s; background: #fae924; }
.confetti-piece:nth-child(2) { left: 25%; animation-delay: 0.5s; background: #6db8da; }
.confetti-piece:nth-child(3) { left: 40%; animation-delay: 1s; background: #FF5722; }
.confetti-piece:nth-child(4) { left: 55%; animation-delay: 1.5s; background: #8BC34A; }
.confetti-piece:nth-child(5) { left: 70%; animation-delay: 2s; background: #E91E63; }
.confetti-piece:nth-child(6) { left: 85%; animation-delay: 2.5s; background: #FF9800; }
.confetti-piece:nth-child(7) { left: 15%; animation-delay: 0.8s; background: #03A9F4; }
.confetti-piece:nth-child(8) { left: 60%; animation-delay: 1.2s; background: #FFC107; }

@keyframes confettiFall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(150px) rotate(360deg); opacity: 0; }
}

/* Пузырьки */
.promo-bubbles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.bubble {
    position: absolute;
    bottom: -30px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: rise 6s infinite ease-in;
}
.bubble:nth-child(1) { left: 10%; width: 20px; height: 20px; animation-duration: 8s; }
.bubble:nth-child(2) { left: 30%; width: 30px; height: 30px; animation-duration: 5s; animation-delay: 1s; }
.bubble:nth-child(3) { left: 55%; width: 15px; height: 15px; animation-duration: 7s; animation-delay: 2s; }
.bubble:nth-child(4) { left: 75%; width: 25px; height: 25px; animation-duration: 6s; animation-delay: 0.5s; }

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.5; }
    100% { transform: translateY(-150px) scale(1.5); opacity: 0; }
}

/* Конфетти */
.confetti-piece {
    position: absolute;
    width: 8px; height: 8px;
    background: #fff;
    opacity: 0;
    animation: confettiFall 3s linear infinite;
}
/* Уже есть @keyframes confettiFall, но если нет – добавится */

@keyframes confettiFall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(150px) rotate(360deg); opacity: 0; }
}

.theme-symbol {
    position: absolute;
    font-size: 1.5rem;
    animation: themeFloat 8s ease-in-out infinite;
    opacity: 0.25;
}
@keyframes themeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}
