/* ============================================
   SCROLL ANIMATIONS & TRANSITIONS
   ============================================ */

/* Base animation setup */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Fade In Animations */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.animated {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-down.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animations */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.animated {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation Delays */
/* Stagger Animation Delays - Increased for better sequential effect */
.stagger-1 { transition-delay: 0.15s; }
.stagger-2 { transition-delay: 0.3s; }
.stagger-3 { transition-delay: 0.45s; }
.stagger-4 { transition-delay: 0.6s; }
.stagger-5 { transition-delay: 0.75s; }
.stagger-6 { transition-delay: 0.9s; }

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-hover:hover {
    /* transform: translateY(-8px); */
    box-shadow: 0 2px 2px -5px rgba(0, 0, 0, 0.08), 0 1px 1px -5px rgba(0, 0, 0, 0.03);
    border-color: var(--primary-color) !important;
}

/* Button Transitions */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-animate:active {
    transform: translateY(0);
}

/* Smooth Hover Scale */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Sticky Header Animation */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Marquee Animation for Partner Logos */
.marquee {
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Fade In Slow (for hero sections) */
.fade-in-slow {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-slow.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Rotate In */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.rotate-in.animated {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Slide Up */
.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.slide-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* Image Hover Zoom */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.4s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Underline Animation */
.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color, #ff6b35);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* ============================================
   VIDEO POPUP ANIMATIONS
   ============================================ */

/* Video Popup Modal Animation */
.video-popup {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-popup.active {
    opacity: 1;
    visibility: visible;
}

.video-popup-content {
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: none;
}

.video-popup.active .video-popup-content {
    animation: videoPopupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Video Popup Bounce Animation */
@keyframes videoPopupBounce {
    0% {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close Button Animation */
.close-popup {
    transition: transform 0.3s ease, color 0.3s ease;
}

.close-popup:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff6b35 !important;
}

/* Play Button Pulse Animation */
@keyframes playButtonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

.play-btn {
    position: absolute;
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: playButtonPulse 2s ease-in-out infinite;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    animation-play-state: paused;
}

/* Video Container Hover Effect */
.video-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-container:hover {
    transform: scale(1.02);
}

.video-container .video-overlay {
    transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
    opacity: 0.3;
}

/* Video Thumbnail Zoom */
.video-thumb {
    transition: transform 0.5s ease;
}

.video-container:hover .video-thumb {
    transform: scale(1.1);
}

/* Video Element Fade In */
.video-popup video {
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}

.video-popup.active video {
    opacity: 1;
}

/* Backdrop Blur Effect */
.video-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.3s ease;
}

.video-popup.active::before {
    backdrop-filter: blur(5px);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
