/* ==========================================================================
   ROSEWOOD SPA — ELEGANT SCROLL & MICRO ANIMATIONS (PREMIUM THEME VIBE)
   Includes Intersection Observer triggers, image animations, and prefers-reduced-motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. KEYFRAMES
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(214, 168, 95, 0.25);
    }
    50% {
        box-shadow: 0 0 30px rgba(214, 168, 95, 0.55);
    }
}

@keyframes shimmerPass {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

/* --------------------------------------------------------------------------
   2. ANIMATED IMAGE REVEAL & HOVER EFFECTS (WORDPRESS LUXURY THEME STYLE)
   -------------------------------------------------------------------------- */
.animated-img-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.animated-img-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 5;
}

.animated-img-container:hover::before {
    animation: shimmerPass 1s ease-in-out;
}

.animated-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.8s ease;
}

.animated-img-container:hover .animated-img {
    transform: scale(1.06);
    filter: brightness(1.04);
}

.float-badge {
    animation: floatGentle 4s ease-in-out infinite;
}

.glow-card {
    animation: pulseGlow 4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   3. SCROLL REVEAL UTILITY CLASSES (INTERSECTION OBSERVER)
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-45px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(45px);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
}

/* Stagger Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Hero Sequence Stagger */
.hero-animate-1 { animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s; opacity: 0; }
.hero-animate-2 { animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.4s; opacity: 0; }
.hero-animate-3 { animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.6s; opacity: 0; }
.hero-animate-4 { animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.8s; opacity: 0; }

/* --------------------------------------------------------------------------
   4. TESTIMONIAL CAROUSEL ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes starShimmer {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px rgba(214, 168, 95, 0.4)); }
    50% { transform: scale(1.15); opacity: 0.9; filter: drop-shadow(0 0 6px rgba(214, 168, 95, 0.9)); }
}

@keyframes floatQuote {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

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

.star-shimmer span {
    display: inline-block;
    animation: starShimmer 2.5s ease-in-out infinite;
}
.star-shimmer span:nth-child(1) { animation-delay: 0s; }
.star-shimmer span:nth-child(2) { animation-delay: 0.2s; }
.star-shimmer span:nth-child(3) { animation-delay: 0.4s; }
.star-shimmer span:nth-child(4) { animation-delay: 0.6s; }
.star-shimmer span:nth-child(5) { animation-delay: 0.8s; }

.animated-quote-bg {
    animation: floatQuote 6s ease-in-out infinite;
}

.verified-badge-icon {
    animation: badgePulse 3s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   5. ACCESSIBILITY — PREFERS REDUCED MOTION
   -------------------------------------------------------------------------- */
@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;
    }
    
    .hero-bg-img, .float-badge, .glow-card, .star-shimmer span, .animated-quote-bg, .verified-badge-icon {
        animation: none !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

