/* Royal Academy - Main Styles */

:root {
    --royal-red: #B91C1C;
    --royal-red-dark: #991B1B;
}

/* RTL/LTR Support */
.rtl {
    direction: rtl;
}

.ltr {
    direction: ltr;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-30px) translateX(10px);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Utility Classes */
.floating-particle {
    position: absolute;
    border-radius: 50%;
    animation: floatSlow 6s ease-in-out infinite;
}

.gradient-animated {
    background: linear-gradient(-45deg, #B91C1C, #991B1B, #DC2626, #B91C1C);
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-image-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: linear-gradient(135deg, var(--royal-red), transparent);
    border-radius: 2rem;
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

.delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
}

.delay-500 {
    animation-delay: 0.5s;
    opacity: 0;
}

.delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* Course Card Styles */
.course-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  z-index: 1;
}

.course-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.course-card:hover::before {
    opacity: 1;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(185, 28, 28, 0.15);
}

.course-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

/* Modal Styles */
.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header Scroll Effect */
#header {
    background-color: rgba(255, 255, 255, 0);
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

/* Certification Cards */
.certification-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.certification-card:hover {
    transform: translateY(-8px);
}

/* Certification Carousel */
.carousel-viewport {
    overflow: hidden;
    width: 100%;
}
.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
    transform: translateX(0);
}

.carousel-track:hover {
    animation-play-state: paused;
}
