/*
Theme Name: Meili Resort
Theme URI: https://meiliresort.com
Description: A bespoke theme for Meili Resort Hotel - The Fluid Sanctuary.
Author: Top Tier Designer
Version: 1.8 (Fixed Fish)
*/

:root {
    --c-canvas-white: #F9F9F9; 
    --c-ironwood: #2C241B; 
    --c-roof-blue: #4A6C85; 
    --c-safety-orange: #FF6B35;
    --c-turquoise: #3EB5C6;
    --c-gold: #D4AF37; 
    --w-panel: 100vw; 
}

body {
    background-color: var(--c-canvas-white);
    color: var(--c-ironwood);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Cinzel', serif; 
    font-weight: 400;
    margin: 0;
}

/* Layout Helpers */
.flex-nowrap { display: flex; flex-wrap: nowrap; }
.w-screen { width: 100vw; }
.h-screen { height: 100vh; }
.flex-shrink-0 { flex-shrink: 0; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.object-cover { object-fit: cover; width: 100%; height: 100%; }
.bg-ironwood { background-color: var(--c-ironwood); }
.bg-canvas-white { background-color: var(--c-canvas-white); }
.text-white { color: #fff; }
.border-r { border-right: 1px solid rgba(44, 36, 27, 0.1); }

/* 1. Loading Mask */
#loader {
    position: fixed;
    inset: 0;
    background: var(--c-ironwood);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
}

/* 2. Hero Section */
.hero-title { text-align: center; color: white; z-index: 20; }
.hero-animate { opacity: 0; transform: translateY(30px); }
.hero-subtitle { font-family: "Helvetica Neue", sans-serif; letter-spacing: 4px; text-transform: uppercase; font-size: 14px; margin-top: 15px; opacity: 0.8; }
.hero-logo { width: 120px; margin-bottom: 30px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); }

/* 3. Sunset Plaza (Day/Night) */
.sunset-section {
    position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: background 1s ease; color: var(--c-ironwood);
}
.is-daytime { background: linear-gradient(180deg, #4a90e2 0%, #a1c4fd 100%); position: relative; z-index: 1; }
.is-daytime::before, .is-daytime::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.is-daytime::before {
    background-image: radial-gradient(circle 35vw at 20% 110%, rgba(255, 255, 255, 0.95) 0%, transparent 60%), radial-gradient(circle 40vw at 50% 120%, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
    filter: blur(20px); opacity: 0.9;
}
.is-daytime::after {
    background-image: radial-gradient(circle 20vw at 10% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 60%), radial-gradient(circle 25vw at 75% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 60%);
    filter: blur(40px); opacity: 0.7;
}
.is-sunset { background: linear-gradient(to bottom, #ffecd2 0%, #fcb69f 100%); color: #4A2C5E; }
.is-sunset::before, .is-sunset::after { opacity: 0; transition: opacity 1s ease; }

.sunset-timer-box {
    position: relative; z-index: 10; text-align: center; border: 1px solid rgba(255,255,255, 0.5); padding: 60px 40px; background: rgba(255,255,255,0.3);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 200px 200px 0 0; min-width: 300px; box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
.big-timer { font-family: 'Cinzel', serif; font-size: 6vw; line-height: 1; margin: 20px 0; font-variant-numeric: tabular-nums; text-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.sunset-label { text-transform: uppercase; letter-spacing: 4px; font-size: 12px; opacity: 0.8; font-weight: 600; }

/* 4. Villa Card */
.villa-card { width: 60vw; height: 70vh; position: relative; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.05); background: #fff; display: flex; flex-direction: column; }
.villa-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; flex-grow: 1; }
.villa-card:hover img { transform: scale(1.05); }
.villa-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: white; z-index: 5; }

/* 5. Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 80px; background: rgba(255,255,255,0.85); backdrop-filter: blur(10px); border-top: 1px solid rgba(44,36,27,0.1); z-index: 100; display: flex; align-items: center; padding: 0 50px; justify-content: space-between; box-sizing: border-box; }
.nav-logo { font-family: 'Cinzel', serif; font-weight: 700; font-size: 20px; color: var(--c-ironwood); }
.progress-container { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40%; height: 2px; }
.progress-line { width: 100%; height: 1px; background: rgba(44, 36, 27, 0.2); position: relative; }
.progress-marker { width: 30px; height: 30px; background-image: url('assets/images/logo.png'); background-size: contain; background-repeat: no-repeat; background-position: center; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); transition: transform 0.1s linear; }

.dining-text-area button:hover, .panel button:hover { background: white !important; color: var(--c-safety-orange) !important; }

/* Mobile Responsive */
@media (max-width: 800px) {
    #horizontal-scroll-container { width: 100% !important; flex-wrap: wrap !important; flex-direction: column !important; }
    .panel { width: 100vw !important; height: auto !important; min-height: 100vh; border-right: none !important; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .bottom-nav { display: none !important; }
    h1 { font-size: 12vw !important; }
    .text-6xl { font-size: 3rem !important; }
    .big-timer { font-size: 15vw !important; margin: 10px 0 !important;}
    .villa-card { width: 90vw !important; height: 60vh !important; margin: 40px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
    section.panel.flex { flex-direction: column-reverse !important; }
    .dining-text-area { width: 100% !important; padding: 60px 30px !important; }
    .panel h2 { font-size: 8vw !important; }
    .panel p { font-size: 16px !important; padding: 0 20px; }
    .sunset-timer-box { width: 90%; border-radius: 30px; }
}

/* Single Villa Page */
.single-hero { height: 85vh; }
.single-hero-bg img { transform: scale(1.1); width: 100%; height: 100%; object-fit: cover; }
.entry-content p { margin-bottom: 20px; }
.entry-content h2, .entry-content h3 { font-family: 'Cinzel', serif; color: var(--c-ironwood); margin-top: 40px; margin-bottom: 20px; }
.next-villa-nav { display: flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 800px) { .single-hero h1 { font-size: 12vw !important; } .single-content > div { flex-direction: column; gap: 30px !important; } .next-villa-nav { height: 30vh !important; } }

/* Global Menu */
.hamburger { width: 30px; height: 10px; position: relative; }
.line { display: block; width: 100%; height: 2px; background-color: var(--c-ironwood); position: absolute; transition: all 0.3s ease; }
.line:first-child { top: 0; } .line:last-child { bottom: 0; }
body.menu-open .line:first-child { top: 4px; transform: rotate(45deg); background-color: white; }
body.menu-open .line:last-child { bottom: 4px; transform: rotate(-45deg); background-color: white; }
body.menu-open .menu-text { color: white !important; opacity: 0; }
#fullscreen-menu { position: fixed; inset: 0; z-index: 9050; pointer-events: none; visibility: hidden; }
.menu-bg { position: absolute; inset: 0; background: rgba(44, 36, 27, 0.95); backdrop-filter: blur(10px); transform: translateY(-100%); transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); }
.menu-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; }
.menu-links { list-style: none; padding: 0; text-align: center; }
.menu-links li { overflow: hidden; margin-bottom: 20px; }
.menu-links a { display: block; font-family: 'Cinzel', serif; font-size: 4vh; color: white; text-decoration: none; transform: translateY(100%); transition: color 0.3s; }
.menu-links a:hover { color: var(--c-safety-orange); }
.menu-links .sub { display: block; font-family: "Helvetica Neue", sans-serif; font-size: 12px; letter-spacing: 2px; opacity: 0.5; text-transform: uppercase; margin-top: 5px; }
.group-title { font-size: 12px; opacity: 0.4; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.villa-mini-links a { font-size: 16px !important; font-family: "Helvetica Neue", sans-serif !important; opacity: 0.7; margin-bottom: 5px; }
body.menu-open #fullscreen-menu { pointer-events: auto; visibility: visible; }
body.menu-open .menu-bg { transform: translateY(0); }
.menu-footer { position: absolute; bottom: 50px; text-align: center; opacity: 0; }
.book-btn { padding: 15px 40px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: white; border-radius: 30px; margin-bottom: 20px; cursor: pointer; transition: all 0.3s; }
.book-btn:hover { background: var(--c-safety-orange); border-color: var(--c-safety-orange); }
body.single-villa .header-logo { opacity: 1 !important; visibility: visible !important; }

/* Booking Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 9999; visibility: hidden; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.5s ease; }
.modal-panel { position: relative; width: 90%; max-width: 500px; background: white; padding: 50px; border-radius: 4px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); transform: translateY(50px); opacity: 0; transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
body.modal-open .modal-overlay { visibility: visible; pointer-events: auto; }
body.modal-open .modal-backdrop { opacity: 1; }
body.modal-open .modal-panel { transform: translateY(0); opacity: 1; }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 30px; cursor: pointer; color: #999; line-height: 1; }
.modal-close:hover { color: var(--c-ironwood); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #999; margin-bottom: 8px; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; font-family: "Helvetica Neue", sans-serif; font-size: 16px; color: var(--c-ironwood); border-radius: 0; background: #fafafa; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--c-safety-orange); background: white; }
.submit-btn { width: 100%; padding: 15px; background: var(--c-ironwood); color: white; border: none; font-size: 14px; letter-spacing: 2px; margin-top: 10px; cursor: pointer; transition: background 0.3s; }
.submit-btn:hover { background: var(--c-safety-orange); }

/* =========================================
   DIGITAL OCEAN (Fixed & Tamed)
   ========================================= */
.digital-ocean {
    background: linear-gradient(180deg, #006994 0%, #003366 30%, #001a33 60%, #000510 100%);
    min-height: 400vh; position: relative; overflow: hidden; color: white; font-family: "Helvetica Neue", sans-serif;
}
.ocean-caustics {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.005' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.2; mix-blend-mode: overlay; pointer-events: none; z-index: 1; animation: causticsFlow 20s infinite alternate;
}
@keyframes causticsFlow { from { transform: scale(1); } to { transform: scale(1.1); } }
.ocean-rays {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(255,255,255,0.05) 20deg, transparent 40deg, rgba(255,255,255,0.08) 60deg, transparent 80deg);
    animation: rotateRays 60s linear infinite; pointer-events: none; z-index: 0;
}
@keyframes rotateRays { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.marine-life { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

.manta-container { position: absolute; top: 20%; left: -200px; animation: mantaSwim 30s infinite linear; }
.manta { color: rgba(0, 0, 0, 0.6); filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5)); animation: mantaFly 4s infinite ease-in-out alternate; }
@keyframes mantaSwim { 0% { transform: translateX(-20vw) translateY(0) rotate(10deg); } 50% { transform: translateX(60vw) translateY(100px) rotate(-5deg); } 100% { transform: translateX(120vw) translateY(0) rotate(10deg); } }
@keyframes mantaFly { 0% { transform: scaleY(1); } 100% { transform: scaleY(0.8); } }

.school-of-fish { position: absolute; top: 50%; right: -20%; width: 500px; height: 500px; animation: schoolCircle 40s infinite linear; pointer-events: none; }
.fish-s { position: absolute; color: rgba(255, 255, 255, 0.7); width: 30px; height: 15px; }
.fish-0 { top: 10%; left: 10%; animation: fishDart 2s infinite; }
.fish-1 { top: 20%; left: 40%; animation: fishDart 3s infinite; }
.fish-2 { top: 50%; left: 20%; animation: fishDart 2.5s infinite; }
.fish-3 { top: 70%; left: 60%; animation: fishDart 3.5s infinite; }
.fish-s:nth-child(odd) { animation-delay: 0.5s; }
.fish-s:nth-child(even) { animation-delay: 1s; }
@keyframes schoolCircle { 0% { transform: translateX(0) rotate(0deg); } 100% { transform: translateX(-150vw) rotate(-360deg); } }
@keyframes fishDart { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }

.shark-container { position: absolute; top: 85%; right: -400px; opacity: 0.4; animation: sharkPatrol 40s infinite linear; }
.shark { color: #000; animation: sharkTail 2s infinite ease-in-out alternate; }
@keyframes sharkPatrol { 0% { transform: translateX(0); } 100% { transform: translateX(-200vw); } }
@keyframes sharkTail { 0% { transform: rotate(0deg); } 100% { transform: rotate(5deg); } }

.depth-zone { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 10; padding: 0 10vw; }
.zone-content { max-width: 800px; opacity: 0; transform: translateY(50px); transition: all 1s ease; }
.zone-active .zone-content { opacity: 1; transform: translateY(0); }
.depth-label { font-size: 12px; letter-spacing: 4px; color: var(--c-turquoise); margin-bottom: 20px; display: block; font-weight: bold; }
.fluid-title { font-family: 'Cinzel', serif; font-size: 8vw; line-height: 1; margin-bottom: 20px; -webkit-text-stroke: 1px rgba(255,255,255,0.8); color: transparent; }
.fluid-text { font-size: 1.5rem; line-height: 1.6; color: rgba(255,255,255,0.8); }
.bubble-particle { position: absolute; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.1)); border-radius: 50%; pointer-events: none; animation: floatUp linear forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 0; } 10% { opacity: 0.6; } 100% { transform: translateY(-100vh) scale(1.2); opacity: 0; } }
.digital-depth-gauge { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); height: 300px; border-right: 1px solid rgba(255,255,255,0.3); z-index: 50; }
.gauge-indicator { position: absolute; right: -3px; top: 0; width: 5px; height: 5px; background: var(--c-turquoise); box-shadow: 0 0 10px var(--c-turquoise); transition: top 0.1s ease; }
@media (max-width: 800px) { .depth-gauge { display: none; } }