/* ============================================
   Advanced Animations & Effects
   ============================================ */

/* Fade In Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    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);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes subtleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(15, 108, 156, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(15, 108, 156, 0.8),
                    0 0 30px rgba(15, 108, 156, 0.6);
    }
}

/* Swing Animation */
@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Left */
@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Right */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-swing {
    animation: swing 1s ease-in-out;
}

.animate-slide-left {
    animation: slideLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideRight 0.6s ease-out;
}

/* Delay Classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(15, 108, 156, 0.6);
}

/* Button Hover Effects */
.btn-hover {
    position: relative;
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-hover:active {
    transform: translateY(-1px);
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(15, 108, 156, 0.1);
    border-top-color: #0f6c9c;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0f6c9c, #f4a340);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glass Morphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Smooth Color Transition */
.color-transition {
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Transform Transitions */
.transform-transition {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger Animation Helper */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Fade In with Scale */
.animate-fade-scale {
    animation: fadeInScale 0.6s ease-out;
}

/* Gradient Background Animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Card Flip Animation */
@keyframes cardFlip {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    100% {
        transform: perspective(1000px) rotateY(10deg);
    }
}

.card-flip {
    transform-style: preserve-3d;
    animation: cardFlip 2s ease-in-out infinite;
}

/* ============================================
   Scroll-Triggered Reveal Animations
   ============================================ */

/* Soft Blur Reveal - Fade In with Blur Effect */
@keyframes blurReveal {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Smooth Slide Up with Fade */
@keyframes slideUpReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Soft Zoom In Reveal */
@keyframes softZoomReveal {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Parallax Fade - Subtle movement with fade */
@keyframes parallaxFade {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Slide In from Left */
@keyframes slideLeftReveal {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In from Right */
@keyframes slideRightReveal {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* AOS Custom Animation Classes */
[data-aos="blur-reveal"] {
    opacity: 0;
    filter: blur(10px);
}

[data-aos="blur-reveal"].aos-animate {
    animation: blurReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="slide-up-reveal"] {
    opacity: 0;
    transform: translateY(40px);
}

[data-aos="slide-up-reveal"].aos-animate {
    animation: slideUpReveal 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="soft-zoom"] {
    opacity: 0;
    transform: scale(0.9);
}

[data-aos="soft-zoom"].aos-animate {
    animation: softZoomReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="parallax-fade"] {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
}

[data-aos="parallax-fade"].aos-animate {
    animation: parallaxFade 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="slide-left-reveal"] {
    opacity: 0;
    transform: translateX(-40px);
}

[data-aos="slide-left-reveal"].aos-animate {
    animation: slideLeftReveal 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="slide-right-reveal"] {
    opacity: 0;
    transform: translateX(40px);
}

[data-aos="slide-right-reveal"].aos-animate {
    animation: slideRightReveal 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Smooth Page Transition */
@keyframes pageTransitionOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes pageTransitionIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition-out {
    animation: pageTransitionOut 0.4s ease-out forwards;
}

.page-transition-in {
    animation: pageTransitionIn 0.5s ease-out 0.1s forwards;
}

body {
    animation: pageTransitionIn 0.5s ease-out 0.1s forwards;
}

/* ============================================
   Enhanced Scroll-Triggered Animations
   Staggered Effects with AOS Integration
   ============================================ */

/* Staggered List Items */
[data-aos="list-item"] {
    opacity: 0;
}

[data-aos="list-item"].aos-animate {
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos-delay="50"].aos-animate { animation-delay: 0.05s; }
[data-aos-delay="100"].aos-animate { animation-delay: 0.1s; }
[data-aos-delay="150"].aos-animate { animation-delay: 0.15s; }
[data-aos-delay="200"].aos-animate { animation-delay: 0.2s; }
[data-aos-delay="250"].aos-animate { animation-delay: 0.25s; }
[data-aos-delay="300"].aos-animate { animation-delay: 0.3s; }
[data-aos-delay="350"].aos-animate { animation-delay: 0.35s; }
[data-aos-delay="400"].aos-animate { animation-delay: 0.4s; }

/* Staggered Grid Items */
[data-aos="grid-item"] {
    opacity: 0;
    transform: scale(0.9);
}

[data-aos="grid-item"].aos-animate {
    animation: softZoomReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Combined Animations */
[data-aos="fade-scale"] {
    opacity: 0;
    transform: scale(0.95);
}

[data-aos="fade-scale"].aos-animate {
    animation: softZoomReveal 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-aos="fade-up-zoom"] {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

[data-aos="fade-up-zoom"].aos-animate {
    animation: parallaxFade 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Dual Direction Revealing */
[data-aos="reveal-left-right"] {
    opacity: 0;
}

[data-aos="reveal-left-right"].aos-animate {
    animation: slideLeftReveal 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Flip/Rotate Effects */
@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0deg);
    }
}

[data-aos="flip-left"] {
    opacity: 0;
}

[data-aos="flip-left"].aos-animate {
    animation: flipIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Bounce In Effect */
@keyframes bounceInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    50% {
        opacity: 1;
        transform: translate3d(0, -10px, 0);
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

[data-aos="bounce-up"] {
    opacity: 0;
}

[data-aos="bounce-up"].aos-animate {
    animation: bounceInUp 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Text Reveal */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px) skewY(2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) skewY(0deg);
    }
}

[data-aos="text-reveal"] {
    opacity: 0;
}

[data-aos="text-reveal"].aos-animate {
    animation: textReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Glow Effect */
@keyframes glowPulse {
    0% {
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 30px 10px rgba(249, 115, 22, 0);
        transform: scale(1);
    }
}

[data-aos="glow-in"] {
    opacity: 0;
}

[data-aos="glow-in"].aos-animate {
    animation: glowPulse 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

