/* ============================================
   ANIMATION STYLES (Framer Motion inspired)
   Bookedout BNB Website
   ============================================ */

/* ===== Scroll-Triggered Animation Base ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Staggered Children Animations ===== */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ===== Fade In Variants ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
}

.fade-in-up.animated,
.fade-in-left.animated,
.fade-in-right.animated,
.fade-in-scale.animated {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ===== Pulse Animation ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== Shine Effect ===== */
@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 3s infinite;
}

/* ===== Bounce Effect ===== */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 0.8; }
    70% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== Slide In ===== */
@keyframes slideInFromLeft {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* ===== Number Counter Animation ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Glow Effect on Hover ===== */
.glow-hover:hover {
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.3);
}

/* ===== Calendar Day Stagger Animation ===== */
.cal-day.booked {
    animation: calDayPop 0.3s ease forwards;
    opacity: 0;
}

@keyframes calDayPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Apply stagger delays to calendar days */
.cal-day:nth-child(1) { animation-delay: 0.02s; }
.cal-day:nth-child(2) { animation-delay: 0.04s; }
.cal-day:nth-child(3) { animation-delay: 0.06s; }
.cal-day:nth-child(4) { animation-delay: 0.08s; }
.cal-day:nth-child(5) { animation-delay: 0.10s; }
.cal-day:nth-child(6) { animation-delay: 0.12s; }
.cal-day:nth-child(7) { animation-delay: 0.14s; }
.cal-day:nth-child(8) { animation-delay: 0.16s; }
.cal-day:nth-child(9) { animation-delay: 0.18s; }
.cal-day:nth-child(10) { animation-delay: 0.20s; }
.cal-day:nth-child(11) { animation-delay: 0.22s; }
.cal-day:nth-child(12) { animation-delay: 0.24s; }
.cal-day:nth-child(13) { animation-delay: 0.26s; }
.cal-day:nth-child(14) { animation-delay: 0.28s; }
.cal-day:nth-child(15) { animation-delay: 0.30s; }
.cal-day:nth-child(16) { animation-delay: 0.32s; }
.cal-day:nth-child(17) { animation-delay: 0.34s; }
.cal-day:nth-child(18) { animation-delay: 0.36s; }
.cal-day:nth-child(19) { animation-delay: 0.38s; }
.cal-day:nth-child(20) { animation-delay: 0.40s; }
.cal-day:nth-child(21) { animation-delay: 0.42s; }
.cal-day:nth-child(22) { animation-delay: 0.44s; }
.cal-day:nth-child(23) { animation-delay: 0.46s; }
.cal-day:nth-child(24) { animation-delay: 0.48s; }
.cal-day:nth-child(25) { animation-delay: 0.50s; }
.cal-day:nth-child(26) { animation-delay: 0.52s; }
.cal-day:nth-child(27) { animation-delay: 0.54s; }
.cal-day:nth-child(28) { animation-delay: 0.56s; }
.cal-day:nth-child(29) { animation-delay: 0.58s; }
.cal-day:nth-child(30) { animation-delay: 0.60s; }

/* ===== Smooth Page Transitions ===== */
.page-transition {
    animation: pageIn 0.5s ease;
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Hover Lift Effect ===== */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* ===== Text Reveal Animation ===== */
@keyframes textReveal {
    0% { 
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    100% { 
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.text-reveal {
    animation: textReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== Reduce motion for accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}