/* Custom CSS for ICBM Training Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Hero section background animation */
.hero-bg {
    background: linear-gradient(-45deg, #2563eb, #1d4ed8, #7c3aed, #6d28d9);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Custom button hover effects */
.btn-hover-scale {
    transition: all 0.3s ease;
}

.btn-hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Course filter animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Loading animation for images */
.img-loading {
    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;
    }
}

/* Navigation active state */
.nav-active {
    color: #2563eb !important;
    font-weight: 600;
}

/* Navigation hover effects */
nav a:not(.bg-blue-600) {
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav a:not(.bg-blue-600):hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    transform: translateY(-1px);
}

/* Mobile menu hover effects */
#mobile-menu a:not(.bg-blue-600) {
    border-radius: 6px;
    transition: all 0.3s ease;
}

#mobile-menu a:not(.bg-blue-600):hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    padding-left: 16px;
}

/* Testimonial slider styles */
.testimonial-slide {
    transition: all 0.5s ease-in-out;
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide.prev {
    opacity: 0;
    transform: translateX(-100%);
}

.testimonial-slide.next {
    opacity: 0;
    transform: translateX(100%);
}

/* Slider dot active state */
.slider-dot.active {
    background-color: #2563eb !important;
    transform: scale(1.2);
}

/* FAQ accordion styles */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.active {
    max-height: 200px;
}

.faq-arrow {
    transition: transform 0.3s ease;
}

.faq-arrow.rotated {
    transform: rotate(180deg);
}

/* Course card special effects */
.course-card {
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.course-card:hover::before {
    left: 100%;
}

/* Stats counter animation */
.stat-counter {
    font-variant-numeric: tabular-nums;
}

/* Parallax effect for hero section */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateY(0);
}

/* Custom focus styles */
.focus-ring:focus {
    outline: none;
    ring: 2px solid #2563eb;
    ring-offset: 2px;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive text sizing */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }
}

@media (min-width: 769px) {
    .hero-title {
        font-size: 4rem;
        line-height: 1;
    }
}

/* Custom gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Interactive elements */
.interactive {
    cursor: pointer;
    user-select: none;
}

.interactive:active {
    transform: scale(0.98);
}

/* Custom shadows */
.shadow-custom {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-custom-lg {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Course category filter */
.course-filter {
    transition: all 0.3s ease;
}

.course-filter.active {
    background-color: #2563eb;
    color: white;
}

/* Notification toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* Form styles */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.3s ease;
}

/* Hero Carousel Styles */
.hero-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.8) !important;
}

.hero-dot.active {
    background: white !important;
    transform: scale(1.3);
}

/* Hero carousel button hover effects */
#hero-prev:hover,
#hero-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-50%) scale(1.1);
}

/* Hero carousel slide animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-slide-enter {
    animation: fadeInUp 0.8s ease-out;
}

.hero-slide-enter-right {
    animation: slideInFromRight 0.8s ease-out;
}

.hero-slide-enter-left {
    animation: slideInFromLeft 0.8s ease-out;
}

/* Hero progress bar animation */
#hero-progress {
    transition: width 8s linear;
}

/* Hero carousel overlay effects */
.hero-carousel-overlay {
    background: linear-gradient(45deg, rgba(0,0,0,0.1), rgba(0,0,0,0.05));
}

/* Background image optimization */
.hero-slide-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Enhanced text shadow for better readability over images */
.hero-text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Smooth background image transitions */
.hero-slide {
    transition: background-image 0.5s ease-in-out;
}

/* Mobile optimization for background images */
@media (max-width: 768px) {
    .hero-slide-bg {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* Logo Carousel Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: scroll 20s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* FAQ Accordion Styles */
.faq-content {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.faq-content.active {
    max-height: 300px;
    opacity: 1;
}

.faq-content.hidden {
    display: none;
}

.faq-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}

.faq-toggle.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Features Carousel Styles */
.features-carousel-slide {
    transition: all 0.5s ease-in-out;
}

.features-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.features-dot:hover {
    transform: scale(1.1);
}

.features-dot.active {
    background-color: #2563eb !important;
    transform: scale(1.2);
}

/* Carousel button hover effects */
#features-prev:hover,
#features-next:hover {
    background: white !important;
    transform: translateY(-50%) scale(1.1);
}

.features-slide-enter-right {
    animation: slideInFromRight 0.6s ease-out;
}

.features-slide-enter-left {
    animation: slideInFromLeft 0.6s ease-out;
}

/* Custom utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
