/* Mojo Music Academy - Theme Styles */

/* ===== THEME 1: GREEN & GOLD (Default) ===== */
:root.theme-green {
    --primary-color: #1a472a;
    --primary-light: #2d6a3e;
    --secondary-color: #d4af37;
    --accent-color: #f5a623;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
}

/* ===== THEME 2: BLUE & SILVER ===== */
:root.theme-blue {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #c0c0c0;
    --accent-color: #60a5fa;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
}

/* ===== THEME 3: PURPLE & GOLD ===== */
:root.theme-purple {
    --primary-color: #6b21a8;
    --primary-light: #9333ea;
    --secondary-color: #fbbf24;
    --accent-color: #ec4899;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
}

/* ===== THEME 4: ORANGE & BLACK ===== */
:root.theme-orange {
    --primary-color: #92400e;
    --primary-light: #b45309;
    --secondary-color: #f97316;
    --accent-color: #ea580c;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
}

/* Light Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
    }
}

/* Music-Specific Animations */
@keyframes musicNote {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) rotate(20deg);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Apply animations to elements */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.slide-down {
    animation: slideDown 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

.music-note-animation {
    animation: musicNote 2s ease-in-out forwards;
}

.bounce-animation {
    animation: bounce 1s ease-in-out infinite;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Disable transitions during theme switch */
.theme-switching * {
    transition: none !important;
}

/* Course Cards Animation */
.course-card {
    animation: slideUp 0.6s ease-out;
}

.course-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Animations */
.card {
    animation: slideUp 0.6s ease-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Hero Section Animation */
.hero-section {
    animation: fadeIn 0.8s ease-out;
}

.hero-section h1 {
    animation: slideDown 0.8s ease-out;
}

.hero-section p {
    animation: slideUp 0.8s ease-out 0.2s both;
}

/* Music Icon Animation */
.music-icon {
    animation: float 3s ease-in-out infinite;
}

/* Navbar Animation */
.navbar {
    animation: slideDown 0.5s ease-out;
}

/* Form Input Focus Animation */
.form-control:focus,
.form-select:focus {
    animation: scaleIn 0.3s ease-out;
}

/* Badge Animation */
.badge {
    animation: scaleIn 0.4s ease-out;
}

/* Alert Animation */
.alert {
    animation: slideDown 0.5s ease-out;
}

/* Modal Animation */
.modal.show .modal-content {
    animation: scaleIn 0.3s ease-out;
}

/* Testimonial Animation */
.testimonial-card {
    animation: slideInLeft 0.6s ease-out;
}

.testimonial-card:nth-child(2) {
    animation: slideInRight 0.6s ease-out;
}

.testimonial-card:nth-child(3) {
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

/* Gallery Image Animation */
.gallery-item {
    animation: scaleIn 0.5s ease-out;
}

.gallery-item:hover {
    animation: float 3s ease-in-out infinite;
}

/* Event Card Animation */
.event-card {
    animation: slideUp 0.6s ease-out;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Blog Post Animation */
.blog-post {
    animation: slideUp 0.6s ease-out;
}

.blog-post:hover {
    transform: translateY(-5px);
}

/* Teacher Card Animation */
.teacher-card {
    animation: scaleIn 0.5s ease-out;
}

.teacher-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Enrollment Form Animation */
.enrollment-section {
    animation: fadeIn 0.6s ease-out;
}

.enrollment-section .card {
    animation: slideInRight 0.6s ease-out;
}

.enrollment-section .sticky-top {
    animation: slideInLeft 0.6s ease-out;
}

/* Theme Selector Button Animation */
.theme-selector {
    animation: slideDown 0.5s ease-out;
}

.theme-option {
    animation: scaleIn 0.3s ease-out;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    animation: pulse 1s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slide-in-left,
    .slide-in-right {
        animation: slideUp 0.6s ease-out;
    }
    
    .testimonial-card:nth-child(2),
    .testimonial-card:nth-child(3) {
        animation: slideUp 0.6s ease-out;
    }
}

/* Smooth page transitions */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth color transitions */
.color-transition {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
