/* ===========================
   MODERN SMOOTH ANIMATIONS
   =========================== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInCenter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scale & Pop Animations */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Animations */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.6);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Rotation Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Swing Animation */
@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
}

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

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

/* Color Shift */
@keyframes colorShift {
    0%, 100% {
        color: #0066cc;
    }
    50% {
        color: #00b4d8;
    }
}

/* Float Animation */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% {
        background-color: #e0e0e0;
    }
    100% {
        background-color: #f0f0f0;
    }
}

/* Text Animation - Typewriter */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Reveal Animations */
@keyframes revealUp {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes revealLeft {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

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

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

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

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

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.slide-in-center {
    animation: slideInCenter 0.8s ease-out forwards;
}

.pop-in {
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

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

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.rotate {
    animation: rotate 8s linear infinite;
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

.swing {
    animation: swing 1s ease-in-out infinite;
    transform-origin: top center;
}

.heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

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

.float-up {
    animation: floatUp 0.8s ease-out forwards;
}

.reveal-up {
    animation: revealUp 0.8s ease-out forwards;
}

.reveal-left {
    animation: revealLeft 0.8s ease-out forwards;
}

/* Stagger Animation */
[data-delay] {
    animation-delay: var(--delay, 0);
}

.fade-in[data-delay="0.1s"] {
    animation-delay: 0.1s;
}

.fade-in[data-delay="0.2s"] {
    animation-delay: 0.2s;
}

.fade-in[data-delay="0.3s"] {
    animation-delay: 0.3s;
}

.fade-in[data-delay="0.4s"] {
    animation-delay: 0.4s;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

/* Intersection Observer - For Scroll Triggered Animations */
.intersection-observer-init {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.intersection-observer-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Animations */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

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

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.5);
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* Prevent Transition on Load */
body.no-transition * {
    transition: none !important;
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: rotate 0.8s linear infinite;
}

/* Success States */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 50;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-check {
    animation: checkmark 0.6s ease-out forwards;
}

/* Error Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.error-shake {
    animation: shake 0.4s ease-in-out;
}

/* Mobile-specific animations */
@media (max-width: 768px) {
    /* Reduce animation on mobile for better performance */
    * {
        animation-duration: 0.5s !important;
    }

    .parallax {
        background-attachment: scroll;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============ CINEMATIC ANIMATIONS ============ */

/* Cinematic Fade In */
@keyframes cinematicFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        filter: blur(10px);
    }
    50% {
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Cinematic Zoom */
@keyframes cinematicZoom {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Majestic Bounce */
@keyframes majesticBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Product Card Pop */
@keyframes productPop {
    0% {
        opacity: 0;
        transform: scale(0.7) rotateZ(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateZ(0deg);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Cart Item Slide In */
@keyframes cartItemSlide {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(15, 118, 110, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(15, 118, 110, 0.6);
    }
}

/* Category Badge Float */
@keyframes categoryFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Price Tag Blink */
@keyframes priceTagBlink {
    0%, 100% {
        color: var(--accent-strong);
        text-shadow: 0 0 0 transparent;
    }
    50% {
        text-shadow: 0 0 15px var(--accent-color);
    }
}

/* Stagger Animation */
.fade-in:nth-child(1) { animation: cinematicFadeIn 0.6s ease 0.1s both; }
.fade-in:nth-child(2) { animation: cinematicFadeIn 0.6s ease 0.2s both; }
.fade-in:nth-child(3) { animation: cinematicFadeIn 0.6s ease 0.3s both; }
.fade-in:nth-child(4) { animation: cinematicFadeIn 0.6s ease 0.4s both; }
.fade-in:nth-child(5) { animation: cinematicFadeIn 0.6s ease 0.5s both; }
.fade-in:nth-child(6) { animation: cinematicFadeIn 0.6s ease 0.6s both; }

.product-card {
    animation: productPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.product-card:hover {
    animation: pulseGlow 2s infinite;
}

.cart-item {
    animation: cartItemSlide 0.4s ease;
}

.product-price {
    animation: priceTagBlink 2s ease infinite;
}

.floating-cart .cart-toggle {
    animation: floating 3s ease-in-out infinite;
}

/* Cinematic Text Effects */
@keyframes textShineGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(215, 181, 109, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(215, 181, 109, 0.8), 0 0 40px rgba(22, 163, 74, 0.4);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(15, 118, 110, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(15, 118, 110, 0.6), 0 0 50px rgba(22, 163, 74, 0.3);
    }
}

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

@keyframes shimmerWave {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Dramatic Entrance */
@keyframes dramaticEnter {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(-20deg);
        filter: blur(10px);
    }
    50% {
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0);
        filter: blur(0);
    }
}

/* Hover Glow Effect */
.stat-card:hover {
    animation: glowPulse 1.5s ease infinite;
    transform: translateY(-5px);
}

.section-title {
    animation: textShineGlow 3s ease-in-out infinite;
}

/* ============ IMMERSIVE CINEMATIC LAYERS ============ */
body.page-cinematic {
    background: radial-gradient(circle at 10% 10%, rgba(15, 118, 110, 0.08), transparent 35%),
        radial-gradient(circle at 90% 5%, rgba(22, 163, 74, 0.05), transparent 45%),
        var(--bg-light);
}

body.cinematic-ready {
    overflow-x: hidden;
}

.page-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.page-ambient span {
    position: absolute;
    width: clamp(220px, 18vw, 360px);
    height: clamp(220px, 18vw, 360px);
    background: radial-gradient(circle, rgba(15, 118, 110, 0.28), transparent 65%);
    filter: blur(35px);
    opacity: 0.35;
    animation: orbDrift 22s ease-in-out infinite;
    animation-delay: calc(var(--index, 0) * -4s);
    top: calc(5% + (var(--index, 0) * 12%));
    left: calc(5% + (var(--index, 0) * 18%));
}

@keyframes orbDrift {
    0% {
        transform: translate3d(-10%, -5%, 0) scale(0.9);
        opacity: 0.25;
    }
    50% {
        transform: translate3d(12%, 6%, 0) scale(1.1);
        opacity: 0.45;
    }
    100% {
        transform: translate3d(-10%, -5%, 0) scale(0.9);
        opacity: 0.25;
    }
}

.hero-video,
.cinematic-video {
    animation: slowPan 32s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes slowPan {
    0% {
        transform: scale(1) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1.08) translate3d(-2%, -2%, 0);
    }
    100% {
        transform: scale(1.12) translate3d(2%, 2%, 0);
    }
}

.hero-content,
.scroll-indicator {
    position: relative;
    z-index: 3;
}

.hero-particles,
.cinematic-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(140, 245, 212, 0.15), transparent 40%),
        radial-gradient(circle at 30% 80%, rgba(215, 181, 109, 0.12), transparent 50%);
    animation: shimmerWave 18s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

.cinematic-section {
    position: relative;
    overflow: hidden;
}

.cinematic-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 32px;
}

.cinematic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 19, 17, 0.9), rgba(3, 35, 31, 0.6));
    animation: overlayPulse 12s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% {
        opacity: 0.75;
    }
    50% {
        opacity: 0.55;
    }
}

.sequence-item {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--sequence-delay, 0s);
}

.sequence-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.split-text {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    overflow: hidden;
}

.split-text .split-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(26px) skewY(6deg);
}

.split-text.split-in .split-word {
    animation: splitWordReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
}

@keyframes splitWordReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) skewY(8deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) skewY(0deg);
    }
}

.why-list li,
.visual-stats div,
.booking-form .floating-label,
.booking-steps .step {
    will-change: transform, opacity;
}

.hero-ctas .btn[data-hover-animation] {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-ctas .btn[data-hover-animation]:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Print Styles */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===========================
   UTILITY ANIMATION CLASSES
   =========================== */

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.pop-in {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Staggered Animations */
[data-stagger] > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

[data-stagger] > *:nth-child(1) { animation-delay: 0.1s; }
[data-stagger] > *:nth-child(2) { animation-delay: 0.2s; }
[data-stagger] > *:nth-child(3) { animation-delay: 0.3s; }
[data-stagger] > *:nth-child(4) { animation-delay: 0.4s; }
[data-stagger] > *:nth-child(5) { animation-delay: 0.5s; }
[data-stagger] > *:nth-child(6) { animation-delay: 0.6s; }

/* Smooth Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

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