/* ============================================
   VILLA PRECIOSA RESORT - Premium 2026 Enhancements
   Advanced animations, video hero, lightbox, 
   enhanced components
   ============================================ */

/* ============================================
   PREMIUM PRELOADER
   ============================================ */
#preloader {
    background: linear-gradient(135deg, #0a1628 0%, #0d2847 50%, #0a1628 100%);
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-wave {
    width: 120px;
    height: 28px;
    margin: 0 auto 32px;
    opacity: 0.8;
}

.wave-path {
    animation: waveAnim 2s ease-in-out infinite;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: waveDash 2s ease-in-out infinite;
}

.wave-2 {
    animation-delay: 0.5s;
}

@keyframes waveDash {
    0% { stroke-dashoffset: 200; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

.loader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.loader-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    animation: loaderPulse 2s ease-in-out infinite;
}

.loader-icon {
    font-size: 2rem;
    color: var(--color-gold);
    animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loader-brand {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--color-white);
    letter-spacing: 2px;
}

.loader-tagline {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.loader-bar {
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light), var(--color-gold));
    background-size: 200% 100%;
    border-radius: 2px;
    animation: loaderProgress 2.2s ease-in-out forwards, shimmerBar 1.5s ease infinite;
}

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

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   VIDEO HERO
   ============================================ */
.hero-video-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-fallback-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(10, 22, 40, 0.5) 0%,
        rgba(10, 22, 40, 0.3) 40%,
        rgba(10, 22, 40, 0.6) 100%
    );
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(201, 168, 76, 0.4);
    border-radius: 50%;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    padding: 20px 32px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 60px;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold-light);
    display: block;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
    display: block;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.15);
}

/* Scroll Mouse Animation */
.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 3px;
    margin-top: 6px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* Button Glow Effect */
.btn-glow {
    position: relative;
    overflow: visible;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-gold));
    z-index: -1;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}

.btn-glow:hover::after {
    opacity: 0.6;
}

/* Button Shimmer */
.btn-shimmer {
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: btnShimmer 3s ease infinite;
}

@keyframes btnShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   GALLERY FILTERS — Premium Pills
   ============================================ */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1.5px solid rgba(0,0,0,0.06);
    border-radius: 40px;
    background: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.gallery-filter .filter-icon {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.gallery-filter .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(0,0,0,0.04);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-text-light);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-filter:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: translateY(-1px);
}

.gallery-filter:hover .filter-icon {
    opacity: 1;
}

.gallery-filter:hover .filter-count {
    background: rgba(201,168,76,0.1);
    color: var(--color-gold);
}

.gallery-filter.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #fff;
    box-shadow: 0 4px 20px rgba(201,168,76,0.35);
    transform: translateY(-1px);
}

.gallery-filter.active .filter-icon {
    opacity: 1;
}

.gallery-filter.active .filter-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ============================================
   LIGHTBOX — Modern Fullscreen
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                visibility 0.4s;
}

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

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg) scale(1.05);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    opacity: 0.7;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(201,168,76,0.2);
    border-color: rgba(201,168,76,0.4);
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.lightbox-content {
    position: relative;
    max-width: 88vw;
    max-height: 78vh;
    text-align: center;
    z-index: 5;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox.active .lightbox-content img {
    animation: lightboxImageIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes lightboxImageIn {
    from { transform: scale(0.9) translateY(12px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Lightbox Footer ── */
.lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    z-index: 10;
}

.lightbox-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lightbox-caption {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

.lightbox-category {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lightbox-counter {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-body);
    color: rgba(255,255,255,0.7);
}

.lightbox-counter #lightboxCurrentIndex {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.lightbox-sep {
    font-size: 0.8rem;
    opacity: 0.4;
}

.lightbox-counter #lightboxTotalCount {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ── Progress Bar ── */
.lightbox-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 11;
}

.lightbox-progress-bar {
    height: 100%;
    background: var(--color-gold);
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 0 3px 3px 0;
}

/* ============================================
   PREMIUM NAVBAR ENHANCEMENTS
   ============================================ */
.header-nav {
    position: relative;
}

/* Subtle glow on pill hover */
.header-nav::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), transparent 40%, transparent 60%, rgba(201, 168, 76, 0.08));
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
    z-index: -1;
}

.header-nav:hover::before {
    opacity: 1;
}

/* ============================================
   FOOTER ENHANCEMENTS (premium layer)
   ============================================ */
.footer-newsletter {
    position: relative;
    overflow: visible;
}

.footer-newsletter::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(201,168,76,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.footer-decoration {
    display: none;
}

/* ============================================
   ADVANCED CARD HOVER EFFECTS
   ============================================ */
.room-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.room-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow: 0 24px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(201,168,76,0.1);
}

.amenity-item {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.amenity-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

/* Glassmorphism Cards */
.activity-category {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.activity-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.08);
    border-color: rgba(201,168,76,0.2);
}

/* ============================================
   PREMIUM TEXT ANIMATIONS
   ============================================ */
.section-title {
    overflow: hidden;
}

.hero-title {
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* Gradient text for emphasis */
.hero-title em {
    background: linear-gradient(
        135deg,
        var(--color-gold-light) 0%,
        #fff 30%,
        var(--color-gold) 60%,
        var(--color-gold-light) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 5s ease infinite;
}

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

/* ============================================
   DEPTH & 3D EFFECTS
   ============================================ */
.about-img-main {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.about-img-main:hover {
    transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
}

.yacht-image img {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.yacht-image:hover img {
    transform: perspective(800px) rotateY(3deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* ============================================
   FORM PREMIUM STYLES
   ============================================ */
.booking-container {
    position: relative;
    overflow: visible;
}

.booking-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(135deg, rgba(201,168,76,0.2), transparent, rgba(26,107,138,0.2));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

.booking-container:hover::after {
    opacity: 1;
}

/* Input Focus Glow */
.booking-form-grid input:focus,
.booking-form-grid select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(201,168,76,0.08), inset 0 1px 2px rgba(0,0,0,0.02);
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

/* Icon bounce on hover */
.amenity-icon:hover,
.pillar-icon:hover {
    animation: iconBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes iconBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Social link ripple */
.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(201,168,76,0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    border-radius: 50%;
}

.social-link:hover::before {
    transform: scale(2);
}

/* Activity chip magnetic hover */
.activity-chip {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.activity-chip::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-gold));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.activity-chip:hover::after {
    opacity: 0.15;
}

/* ============================================
   RESPONSIVE PREMIUM ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        border-radius: 20px;
        margin-top: 32px;
    }
    
    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .footer-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .newsletter-field {
        width: 100%;
    }
    
    .newsletter-field input {
        min-width: 0;
        width: 100%;
    }
    
    .gallery-filters {
        gap: 5px;
    }
    
    .gallery-filter {
        padding: 7px 12px;
        font-size: 0.68rem;
    }
    
    .gallery-filter .filter-icon { display: none; }
    .gallery-filter .filter-count { min-width: 16px; height: 16px; font-size: 0.6rem; }
    
    .lightbox-prev, .lightbox-next {
        width: 36px;
        height: 36px;
    }
    
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
}

@media (max-width: 480px) {
    .hero-stats {
        display: none;
    }
    
    .scroll-mouse {
        display: none;
    }
}

/* ============================================
   SMOOTH PAGE TRANSITIONS
   ============================================ */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure hero is always visible */
.hero {
    opacity: 1 !important;
    transform: none !important;
}
