/* ===== PREMIUM UI/UX ENHANCEMENTS ===== */

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }

/* ===== BUTTON RIPPLE EFFECT ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.4) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* ===== ENHANCED 3D CARD HOVER ===== */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateX(2deg) rotateY(-2deg) translateY(-8px);
}

.card-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
    pointer-events: none;
}

.card-3d:hover::before {
    opacity: 1;
}

/* ===== GRADIENT BORDER ANIMATION ===== */
.gradient-border {
    position: relative;
    background: var(--glass-bg);
    border-radius: var(--radius-2xl);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, var(--primary), var(--cyan), var(--primary));
    background-size: 200% 100%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===== FLOATING ANIMATION ===== */
.float-animation {
    animation: floatUpDown 3s ease-in-out infinite;
}

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

/* ===== PULSE GLOW ===== */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: var(--shadow-lg);
    }
    50% { 
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.4), var(--shadow-lg);
    }
}

/* ===== SVG WAVE BACKGROUNDS ===== */
.wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: none;
    border-radius: 50%;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: none;
    border-radius: 50%;
    color: var(--dark);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: var(--primary);
    color: white;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    color: var(--dark);
    font-weight: 600;
    text-align: center;
}

/* ===== ANIMATED COUNTER ===== */
.counter-box {
    text-align: center;
    padding: 24px;
    background: var(--glass-bg);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.counter-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.counter-label {
    font-size: 0.9rem;
    color: var(--dark);
    margin-top: 8px;
}

.counter-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== STATS SECTION ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* ===== FLOATING WHATSAPP BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    animation: pulseWhatsapp 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulseWhatsapp {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: white;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    color: var(--dark);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

/* ===== INTERACTIVE CALCULATOR SLIDER ===== */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary-light) 100%);
    outline: none;
    margin: 16px 0;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-lg);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -8px;
}

.price-animated {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-animated.updating {
    transform: scale(1.2);
    color: var(--cyan-light);
}

/* ===== HEADER SCROLL EFFECT ===== */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(37, 99, 235, 0.15);
}

header.scrolled .brand img {
    transform: scale(0.9);
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ===== SKELETON LOADER ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-lg);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== LAZY LOAD IMAGE FADE ===== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== TESTIMONIAL CAROUSEL INDICATORS ===== */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: var(--primary-light);
}

/* ===== TRUST BADGES ===== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.trust-badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.trust-badge i {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trust-badge span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

/* ===== HERO TEXT ANIMATION ===== */
.hero-text-animate {
    overflow: hidden;
}

.hero-text-animate span {
    display: inline-block;
    animation: heroTextReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

@keyframes heroTextReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text-animate span:nth-child(1) { animation-delay: 0.1s; }
.hero-text-animate span:nth-child(2) { animation-delay: 0.2s; }
.hero-text-animate span:nth-child(3) { animation-delay: 0.3s; }
.hero-text-animate span:nth-child(4) { animation-delay: 0.4s; }

/* ===== SECTION DIVIDER ===== */
.section-divider {
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 0 auto;
    width: 100px;
}

/* ===== MOBILE TOUCH FEEDBACK ===== */
@media (hover: none) {
    .s-card:active,
    .gallery-item:active,
    .testimonial-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .btn-book:active {
        transform: scale(0.95);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        right: 16px;
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 70px;
        right: 12px;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .counter-number {
        font-size: 1.6rem;
    }
    
    .trust-badge {
        padding: 10px 14px;
    }
    
    .trust-badge i {
        font-size: 1.2rem;
    }
    
    .trust-badge span {
        font-size: 0.75rem;
    }
}
