/* ========================================
   GLOBAL HERO SECTION - ANIMATIONS & INTERACTIONS
   ========================================
   Performance optimized animations
   ======================================== */

/* Intersection Observer for Scroll Animations */
.hero-animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-animate-on-scroll.hero-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animations */
.hero-stagger-1 { transition-delay: 0.1s; }
.hero-stagger-2 { transition-delay: 0.2s; }
.hero-stagger-3 { transition-delay: 0.3s; }
.hero-stagger-4 { transition-delay: 0.4s; }
.hero-stagger-5 { transition-delay: 0.5s; }

/* Parallax Effects */
.hero-parallax {
    transition: transform 0.1s ease-out;
}

/* Floating Animation */
.hero-float {
    animation: heroFloat 6s ease-in-out infinite;
}

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

/* Pulse Animation */
.hero-pulse {
    animation: heroPulse 2s ease-in-out infinite;
}

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

/* Glow Animation */
.hero-glow {
    animation: heroGlow 3s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    from {
        box-shadow: 0 0 20px rgba(243, 145, 137, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(243, 145, 137, 0.6), 0 0 40px rgba(243, 145, 137, 0.3);
    }
}

/* Slide In Animations */
.hero-slide-left {
    animation: heroSlideLeft 0.8s ease-out;
}

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

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

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

/* Scale In Animation */
.hero-scale-in {
    animation: heroScaleIn 0.6s ease-out;
}

@keyframes heroScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In Animation */
.hero-rotate-in {
    animation: heroRotateIn 0.8s ease-out;
}

@keyframes heroRotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Bounce In Animation */
.hero-bounce-in {
    animation: heroBounceIn 1s ease-out;
}

@keyframes heroBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Typewriter Effect */
.hero-typewriter {
    overflow: hidden;
    border-right: 3px solid var(--hero-accent-color);
    white-space: nowrap;
    animation: heroTyping 3.5s steps(40, end), heroBlink 0.75s step-end infinite;
}

@keyframes heroTyping {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes heroBlink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--hero-accent-color);
    }
}

/* Shimmer Effect */
.hero-shimmer {
    position: relative;
    overflow: hidden;
}

.hero-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: heroShimmer 2s infinite;
}

@keyframes heroShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Particle Animation */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.hero-particle {
    position: absolute;
    background: var(--hero-accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: heroParticleFloat 10s infinite linear;
}

@keyframes heroParticleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Video Background Animation */
.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    animation: heroVideoZoom 20s ease-in-out infinite alternate;
}

@keyframes heroVideoZoom {
    0% {
        transform: translateX(-50%) translateY(-50%) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(-50%) scale(1.1);
    }
}

/* Gradient Animation */
.hero-gradient-animated {
    background: linear-gradient(270deg, var(--hero-primary-color), var(--hero-secondary-color), var(--hero-accent-color));
    background-size: 600% 600%;
    animation: heroGradientShift 8s ease infinite;
}

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

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

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

/* Hover Effects */
.hero-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(26, 55, 77, 0.2);
}

.hero-hover-scale {
    transition: transform 0.3s ease;
}

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

.hero-hover-rotate {
    transition: transform 0.3s ease;
}

.hero-hover-rotate:hover {
    transform: rotate(5deg);
}

/* Micro-interactions */
.hero-micro-bounce {
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-micro-bounce:active {
    transform: scale(0.95);
}

.hero-micro-bounce:hover {
    transform: scale(1.02);
}

/* Progress Indicators */
.hero-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.hero-progress-fill {
    height: 100%;
    background: var(--hero-accent-color);
    border-radius: 3px;
    animation: heroProgress 2s ease-out;
}

@keyframes heroProgress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Success/Error States */
.hero-success {
    animation: heroSuccess 0.6s ease;
}

@keyframes heroSuccess {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hero-error {
    animation: heroError 0.6s ease;
}

@keyframes heroError {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Performance Optimizations */
.hero-will-change {
    will-change: transform, opacity;
}

.hero-will-change-end {
    will-change: auto;
}

/* GPU Acceleration */
.hero-gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Animation Classes for JavaScript Control */
.hero-animation-paused {
    animation-play-state: paused !important;
}

.hero-animation-running {
    animation-play-state: running !important;
}

/* Dynamic hero text swap */
.hero-content-fade-out {
    opacity: 0;
    transition: opacity 0.14s ease;
}

.hero-content-fade-in {
    opacity: 1;
    transition: opacity 0.28s ease;
}

.hero-empty-hidden {
    display: none;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .hero-float,
    .hero-pulse,
    .hero-glow {
        animation-duration: 8s;
    }
    
    .hero-shimmer::before {
        animation-duration: 3s;
    }
    
    .hero-particle {
        animation-duration: 15s;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .hero-float,
    .hero-pulse,
    .hero-glow,
    .hero-shimmer::before,
    .hero-particle,
    .hero-video-bg,
    .hero-gradient-animated,
    .hero-skeleton {
        animation: none;
    }
    
    .hero-hover-lift:hover,
    .hero-hover-scale:hover,
    .hero-hover-rotate:hover {
        transform: none;
    }
}

/* Battery Saving Mode */
@media (prefers-reduced-data) {
    .hero-video-bg {
        display: none;
    }
    
    .hero-particles {
        display: none;
    }
    
    .hero-shimmer::before {
        animation: none;
    }
}
