/* ===================================
   IPTC Professional Animations System
   ================================== */

/* Base Animation Settings */
:root {
    --animation-duration-fast: 0.3s;
    --animation-duration-normal: 0.6s;
    --animation-duration-slow: 1s;
    --animation-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Scroll Animation Base Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

/* Fade Animations */
.fade-in {
    opacity: 0;
    transition: opacity var(--animation-duration-normal) var(--animation-easing);
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.fade-in-down {
    opacity: 0;
    transform: translateY(-40px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

/* Scale Animations */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--animation-duration-normal) var(--animation-easing-bounce);
}

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

.scale-in-center {
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--animation-duration-normal) var(--animation-easing-bounce);
}

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

/* Slide Animations */
.slide-in-up {
    opacity: 0;
    transform: translateY(100%);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.slide-in-down {
    opacity: 0;
    transform: translateY(-100%);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-100%);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

.slide-in-right {
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

/* Rotation Animations */
.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
    transition: all var(--animation-duration-slow) var(--animation-easing);
}

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

/* Flip Animations */
.flip-in-x {
    opacity: 0;
    transform: perspective(400px) rotateX(-90deg);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.flip-in-x.animated {
    opacity: 1;
    transform: perspective(400px) rotateX(0deg);
}

.flip-in-y {
    opacity: 0;
    transform: perspective(400px) rotateY(-90deg);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.flip-in-y.animated {
    opacity: 1;
    transform: perspective(400px) rotateY(0deg);
}

/* Bounce Animations */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
    transition: all var(--animation-duration-slow) var(--animation-easing-bounce);
}

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

/* Stagger Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* Hover Animations */
.hover-lift {
    transition: transform var(--animation-duration-fast) var(--animation-easing);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-scale {
    transition: transform var(--animation-duration-fast) var(--animation-easing);
}

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

.hover-rotate {
    transition: transform var(--animation-duration-fast) var(--animation-easing);
}

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

.hover-glow {
    transition: box-shadow var(--animation-duration-fast) var(--animation-easing);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

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

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

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

/* Wobble Animation */
@keyframes wobble {
    0% { transform: translateX(0%); }
    15% { transform: translateX(-25%) rotate(-5deg); }
    30% { transform: translateX(20%) rotate(3deg); }
    45% { transform: translateX(-15%) rotate(-3deg); }
    60% { transform: translateX(10%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
    100% { transform: translateX(0%); }
}

.wobble {
    animation: wobble 1s;
}

/* Gradient Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* Text Animations */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform var(--animation-duration-slow) var(--animation-easing);
}

.text-reveal.animated::after {
    transform: translateX(100%);
}

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

.spin {
    animation: spin 1s linear infinite;
}

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

/* Section-Specific Animations */
.hero-section .hero-title {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--animation-easing);
}

.hero-section.loaded .hero-title {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Logo Animations */
.hero-logo {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: all 1.5s var(--animation-easing-bounce);
}

.hero-section.loaded .hero-logo {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.hero-logo img {
    transition: all 0.3s var(--animation-easing);
}

.hero-logo:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.1);
}

/* Logo Entrance Animation */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-360deg) translateY(-100px);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(-180deg) translateY(-20px);
        filter: blur(2px);
    }
    80% {
        opacity: 0.9;
        transform: scale(0.9) rotate(-30deg) translateY(10px);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0px);
        filter: blur(0px);
    }
}

.logo-entrance {
    animation: logoEntrance 2s var(--animation-easing-bounce) forwards;
}

/* Logo Glow Effect */
@keyframes logoGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(220, 53, 69, 0.6), 0 0 60px rgba(220, 53, 69, 0.4);
    }
}

.logo-glow {
    animation: logoGlow 3s ease-in-out infinite;
    border-radius: 50%;
}

/* Logo Bounce Animation */
@keyframes logoBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-20px) scale(1.05);
    }
    60% {
        transform: translateY(-10px) scale(1.02);
    }
}

.logo-bounce {
    animation: logoBounce 2s ease-in-out;
}

/* Logo Pulse with Scale */
@keyframes logoPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Logo Floating Effect */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(2deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.logo-float {
    animation: logoFloat 4s ease-in-out infinite;
}

.hero-section .hero-subtitle {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--animation-easing) 0.2s;
}

.hero-section.loaded .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-section .hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s var(--animation-easing) 0.4s;
}

.hero-section.loaded .hero-buttons {
    opacity: 1;
    transform: translateY(0);
}

.hero-section .hero-image {
    opacity: 0;
    transform: scale(0.8) translateX(50px);
    transition: all 1.2s var(--animation-easing) 0.3s;
}

.hero-section.loaded .hero-image {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* Video Section Animations */
.video-section .video-container {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--animation-duration-slow) var(--animation-easing);
}

.video-section.animated .video-container {
    opacity: 1;
    transform: scale(1);
}

/* Partners Section Animations */
.partners-section .partner-logo {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.partners-section.animated .partner-logo {
    opacity: 1;
    transform: translateY(0);
}

/* Blog Section Animations */
.blog-section .blog-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.blog-section.animated .blog-title {
    opacity: 1;
    transform: translateY(0);
}

.blog-section .blog-slide {
    opacity: 0;
    transform: translateY(40px);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

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

/* Team Section Animations */
.team-section .team-member {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.team-section.animated .team-member {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    .fade-in-up, .fade-in-down {
        transform: translateY(20px);
    }
    
    .fade-in-left, .fade-in-right {
        transform: translateX(20px);
    }
    
    .slide-in-up, .slide-in-down {
        transform: translateY(50%);
    }
    
    .slide-in-left, .slide-in-right {
        transform: translateX(50%);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll,
    .fade-in,
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .scale-in-center,
    .slide-in-up,
    .slide-in-down,
    .slide-in-left,
    .slide-in-right,
    .rotate-in,
    .flip-in-x,
    .flip-in-y,
    .bounce-in {
        opacity: 1;
        transform: none;
    }
}

/* RTL Support */
[dir="rtl"] .fade-in-left {
    transform: translateX(40px);
}

[dir="rtl"] .fade-in-right {
    transform: translateX(-40px);
}

[dir="rtl"] .slide-in-left {
    transform: translateX(100%);
}

[dir="rtl"] .slide-in-right {
    transform: translateX(-100%);
}

/* Print Styles */
@media print {
    .animate-on-scroll,
    .fade-in,
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .scale-in-center,
    .slide-in-up,
    .slide-in-down,
    .slide-in-left,
    .slide-in-right,
    .rotate-in,
    .flip-in-x,
    .flip-in-y,
    .bounce-in {
        opacity: 1 !important;
        transform: none !important;
    }
}
