/* ===== Animations CSS ===== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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 fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Rotation Animations */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* 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 Animations */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes bounceIn {
    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);
    }
}

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 139, 122, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 139, 122, 0.8);
    }
}

/* Gradient Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientFloat {
    0%, 100% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
}

/* Text Animations */
@keyframes typeWriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 139, 122, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 139, 122, 0.8);
    }
}

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

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

/* Zoom Animations */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
    }
    50% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    to {
        opacity: 0;
    }
}

/* ===== Animation Classes ===== */

/* Basic Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out forwards;
    opacity: 0;
}

.zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Continuous Animations */
.pulse {
    animation: pulse 2s infinite;
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

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

.float-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

.bounce {
    animation: bounce 2s infinite;
}

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

.gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.gradient-float {
    background-size: 200% 200%;
    animation: gradientFloat 6s ease infinite;
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

/* Hover Animations */
.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(255, 139, 122, 0.6);
    transition: box-shadow 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* Animation Delays */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Animation Durations */
.duration-fast {
    animation-duration: 0.3s;
}

.duration-normal {
    animation-duration: 0.6s;
}

.duration-slow {
    animation-duration: 1s;
}

.duration-slower {
    animation-duration: 1.5s;
}

/* Animation Fill Modes */
.fill-forwards {
    animation-fill-mode: forwards;
}

.fill-backwards {
    animation-fill-mode: backwards;
}

.fill-both {
    animation-fill-mode: both;
}

/* Intersection Observer Animation Triggers */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

.animate-on-scroll.from-left {
    transform: translateX(-50px);
}

.animate-on-scroll.from-left.in-view {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(50px);
}

.animate-on-scroll.from-right.in-view {
    transform: translateX(0);
}

.animate-on-scroll.scale {
    transform: scale(0.8);
}

.animate-on-scroll.scale.in-view {
    transform: scale(1);
}

/* Stagger Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-children.animate > *:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.animate > *:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.animate > *:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.animate > *:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.animate > *:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.animate > *:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading-dots::after {
    content: '';
    animation: loading 1.4s infinite ease-in-out;
    animation-fill-mode: both;
    display: inline-block;
    margin-left: 0.5rem;
}

.loading-dots::before {
    content: '•••';
    animation: loading 1.4s infinite ease-in-out;
    animation-fill-mode: both;
    animation-delay: -0.16s;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgb(255, 248, 245) 0%, 
        rgb(249, 240, 230) 50%, 
        rgb(245, 232, 219) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-logo {
    font-size: 3rem;
    color: #FF8B7A;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

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

.btn-animated::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 ease;
}

.btn-animated:hover::before {
    left: 100%;
}

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

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

/* Navigation Animation */
.nav-slide-in {
    transform: translateY(-100%);
    animation: slideInDown 0.5s ease-out forwards;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s ease-out;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 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;
    }

    .fade-in,
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .bounce-in,
    .slide-in-up,
    .slide-in-down,
    .zoom-in {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
