/* ═══════════════════════════════════════════════════════
   BookingBreb — Scroll & Interaction Animations
   ═══════════════════════════════════════════════════════ */

/* ─── Scroll Animations ─── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero content should be visible immediately (above the fold) */
.hero .animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.animate-on-scroll[data-animation="fadeInUp"] {
    transform: translateY(40px);
}

.animate-on-scroll[data-animation="fadeInDown"] {
    transform: translateY(-40px);
}

.animate-on-scroll[data-animation="fadeInLeft"] {
    transform: translateX(-60px);
}

.animate-on-scroll[data-animation="fadeInRight"] {
    transform: translateX(60px);
}

/* Disable horizontal animations on mobile to prevent overflow */
@media (max-width: 768px) {
    .animate-on-scroll[data-animation="fadeInLeft"],
    .animate-on-scroll[data-animation="fadeInRight"] {
        transform: translateY(30px);
    }
    
    .about-card.animate-on-scroll {
        transform: translateY(20px) !important;
    }
    
    .about-card.animate-on-scroll.animated {
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    .animate-on-scroll[data-animation="fadeInLeft"],
    .animate-on-scroll[data-animation="fadeInRight"] {
        transform: translateY(20px);
    }
    
    .about-card.animate-on-scroll {
        transform: translateY(15px) !important;
    }
    
    .about-card.animate-on-scroll.animated {
        transform: translateY(0) !important;
    }
}

.animate-on-scroll[data-animation="scaleIn"] {
    transform: scale(0.85);
}

.animate-on-scroll[data-animation="rotateIn"] {
    transform: rotate(-5deg) scale(0.9);
}

/* ─── Staggered Children ─── */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }

/* ─── Parallax Layers ─── */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(200, 149, 108, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 20%, rgba(45, 80, 22, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Card Hover Micro Animations ─── */
.listing-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(45, 80, 22, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.listing-card:hover .listing-card-image::before {
    opacity: 1;
}

/* ─── Pulsing Glow ─── */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 80, 22, 0.2); }
    50% { box-shadow: 0 0 0 15px rgba(45, 80, 22, 0); }
}

.btn-primary:focus {
    animation: pulseGlow 1.5s infinite;
}

/* ─── Typewriter effect for hero ─── */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-secondary); }
}

/* ─── Section Divider Wave ─── */
.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    height: 60px;
}

/* ─── Smooth Number Count Up ─── */
.stat-number {
    display: inline-block;
    min-width: 50px;
}

/* ─── Image Gallery Lightbox Feel ─── */
.gallery-zoom {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-zoom:hover {
    transform: scale(1.05);
}

/* ─── Ribbon decorator ─── */
.ribbon {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--color-secondary);
    color: white;
    padding: 6px 40px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ─── Loading Shimmer ─── */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ─── Fade in animation ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── Rotating border decoration ─── */
@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Easter Egg Hint Animation ─── */
@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logo-text {
    position: relative;
    cursor: default;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.3s ease;
}

.logo-text:hover::after {
    width: 100%;
}

/* ─── Mountain Path Animation (Preloader) ─── */
.mountain-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawMountain 1.5s ease-in-out forwards;
}

.mountain-fill {
    opacity: 0;
    animation: fillMountain 0.5s ease-in-out 1s forwards;
}

@keyframes drawMountain {
    to { stroke-dashoffset: 0; }
}

@keyframes fillMountain {
    to { opacity: 1; fill: rgba(200, 149, 108, 0.2); }
}

/* ─── Smooth page transitions ─── */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

/* ─── Interactive hover states ─── */
.interactive-hover {
    position: relative;
    overflow: hidden;
}

.interactive-hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.interactive-hover:hover::before {
    width: 300%;
    height: 300%;
}

/* ─── Smooth Section Reveal ─── */
.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    opacity: 0.3;
}

/* ─── Photo gallery hover effect ─── */
.photo-hover-effect {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.photo-hover-effect img {
    transition: transform 0.5s ease;
}

.photo-hover-effect:hover img {
    transform: scale(1.1);
}

.photo-hover-effect::after {
    content: '🔎';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 32px;
    transition: transform 0.3s ease;
    z-index: 2;
}

.photo-hover-effect:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* ─── Section Independence Animations ─── */
.section-with-video-hero {
    opacity: 0;
    animation: sectionFadeIn 1s ease-out forwards;
}

.section-with-video-hero:nth-of-type(even) {
    animation: sectionSlideInLeft 1s ease-out forwards;
}

.section-with-video-hero:nth-of-type(odd) {
    animation: sectionSlideInRight 1s ease-out forwards;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sectionSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sectionSlideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Video Hero Animations */
.section-hero-video {
    animation: videoZoomIn 20s ease-in-out infinite alternate;
}

@keyframes videoZoomIn {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.section-hero-content {
    animation: heroContentFadeIn 1.5s ease-out;
}

@keyframes heroContentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Section Entrance Stagger */
.section-with-video-hero:nth-child(1) {
    animation-delay: 0s;
}

.section-with-video-hero:nth-child(2) {
    animation-delay: 0.1s;
}

.section-with-video-hero:nth-child(3) {
    animation-delay: 0.2s;
}

.section-with-video-hero:nth-child(4) {
    animation-delay: 0.3s;
}

.section-with-video-hero:nth-child(5) {
    animation-delay: 0.4s;
}

.section-with-video-hero:nth-child(6) {
    animation-delay: 0.5s;
}

.section-with-video-hero:nth-child(7) {
    animation-delay: 0.6s;
}
