/* --- 1. CORE VARIABLES (THEMING) --- */
:root {
    /* Dark Mode (Default) */
    --color-bg: #000428;
    --color-bg-gradient-start: #000428;
    --color-bg-gradient-end: #004e92;
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-card-bg: rgba(255, 255, 255, 0.05);
    --color-card-border: rgba(255, 255, 255, 0.1);
    --color-nav-bg: rgba(0, 4, 40, 0.8);
    --color-input-bg: rgba(255,255,255,0.05);
    --color-input-border: rgba(255,255,255,0.1);
    
    --font-main: 'Montserrat', sans-serif;
    --font-display: 'Playfair Display', serif;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --nav-height: 80px;
}

/* Light Mode Overrides */
[data-theme="light"] {
    --color-bg: #f0f7fc;
    --color-bg-gradient-start: #ffffff;
    --color-bg-gradient-end: #e1efff;
    --color-text: #0f2035;
    --color-text-muted: #4a5568;
    --color-card-bg: rgba(255, 255, 255, 0.8);
    --color-card-border: rgba(255, 255, 255, 0.6);
    --color-nav-bg: rgba(255, 255, 255, 0.9);
    --color-input-bg: rgba(255,255,255,0.9);
    --color-input-border: #cbd5e0;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(180deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--color-text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- 2. UTILITIES --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.reveal-text, .reveal-up, .reveal-scale {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--ease-out-expo);
    will-change: transform, opacity;
}
.reveal-text { transform: translateY(20px); }
.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.text-gradient {
    background: linear-gradient(to right, var(--color-accent), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background: var(--color-card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-card-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* --- 3. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--color-nav-bg);
    z-index: 100;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(128,128,128,0.1);
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto; /* Override fixed width */
}

.nav-logo .text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* The "2" with high-precision double border */
.large-2 {
    font-size: 50px; /* Adjusted for nav bar */
    color: #e65a28; /* Orange fill */
    line-height: 1;
    position: relative;
    text-shadow: 
        -1px -1px 0 #fff,  1px -1px 0 #fff, -1px  1px 0 #fff,  1px  1px 0 #fff,
        -2px 0px 0 #fff,  2px 0px 0 #fff, 0px -2px 0 #fff,  0px  2px 0 #fff,
        -2.5px -2.5px 0 #333,  2.5px -2.5px 0 #333, -2.5px  2.5px 0 #333,  2.5px  2.5px 0 #333,
        -3px 0px 0 #333,  3px 0px 0 #333, 0px -3px 0 #333,  0px  3px 0 #333;
}

.text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ocean, .pools {
    font-size: 22px; /* Adjusted for nav bar */
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -1px;
    background: linear-gradient(
        to bottom, 
        #e65a28 0%, 
        #e65a28 35%, 
        #0a4a8f 55%,
        #0a4a8f 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: waterRise 4s ease-in-out infinite;
}

.pools {
    animation-delay: 0.5s;
}

@keyframes waterRise {
    0%, 100% { background-position: 0% 10%; }
    50% { background-position: 0% 30%; }
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.8;
}

.nav-links a:hover, .nav-links a.active-link {
    color: var(--color-accent);
    opacity: 1;
}

[data-theme="light"] .cta-btn, [data-theme="light"] #mapBtn {
    background: #cc5500; /* Darker orange */
    color: white;
}

/* CTA Button */
.cta-btn {
    padding: 12px 28px;
    background: var(--color-accent-orange);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 140, 66, 0.4);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-card-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.3s ease;
    margin-left: 10px;
    z-index: 1;
}
.theme-toggle:hover {
    background: var(--color-card-border);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1021;
    background: none;
    border: none;
}
.bar {
    width: 30px;
    height: 3px;
    background-color: var(--color-text);
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); 
    z-index: 1011;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(3px);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* --- 4. HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,4,40,0.8) 0%, rgba(0,78,146,0.4) 100%);
    z-index: -1;
}

#hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fade-in-out 36s infinite;
}

#hero-slideshow .slide:nth-child(1) { animation-delay: 0s; }
#hero-slideshow .slide:nth-child(2) { animation-delay: 6s; }
#hero-slideshow .slide:nth-child(3) { animation-delay: 12s; }
#hero-slideshow .slide:nth-child(4) { animation-delay: 18s; }
#hero-slideshow .slide:nth-child(5) { animation-delay: 24s; }
#hero-slideshow .slide:nth-child(6) { animation-delay: 30s; }

@keyframes fade-in-out {
    0% { opacity: 0; }
    10% { opacity: 1; }
    20% { opacity: 1; }
    30% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-content { margin: 0 auto; position: relative; z-index: 1; }

h1 {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff; 
    text-align: center;
}
.hero-sub { 
    font-size: 1.5rem; 
    margin-bottom: 2.5rem; 
    font-weight: 300; 
    color: rgba(255,255,255,0.9); 
    text-align: center;
}

/* --- 5. SECTIONS --- */
#intro { padding: 150px 0; position: relative; text-align: center; }
.usp-text { font-size: clamp(2rem, 5vw, 4rem); font-family: var(--font-display); line-height: 1.3; }

#services { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 3rem; font-family: var(--font-display); margin-bottom: 1rem; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { padding: 40px 30px; transition: transform 0.4s ease; }
.service-card:hover { transform: translateY(-10px); border-color: var(--color-accent); }
.service-icon { font-size: 3rem; margin-bottom: 20px; color: var(--color-accent); }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 600; }
.service-card p { color: var(--color-text-muted); font-size: 0.95rem; }

/* --- NEW GALLERY SECTION --- */
#gallery { padding: 100px 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3; /* Consistent aspect ratio */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out-expo);
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 210, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-icon {
    color: white;
    font-size: 2rem;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reviews { padding: 100px 0; background: rgba(0,0,0,0.02); }
.reviews-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.review-card { flex: 1 1 300px; max-width: 400px; padding: 30px; }
.stars { color: #FFD700; margin-right: 15px; }
.reviewer-name { font-weight: 700; margin-bottom: 5px; display:block; color: var(--color-text); }
.reviewer-meta { font-size: 0.8rem; color: var(--color-accent); margin-bottom: 15px; display:block; }
.review-text { font-style: italic; color: var(--color-text-muted); }

/* --- FAQ SECTION --- */
#faq { padding: 100px 0; }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--color-card-border);
    padding: 20px 0;
}
.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    color: var(--color-text-muted);
    padding-top: 0;
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust as needed */
    padding-top: 15px;
}

#contact { padding: 100px 0 50px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { font-size: 2rem; margin-bottom: 20px; font-family: var(--font-display); }
.info-item { margin-bottom: 30px; }
.info-label { color: var(--color-accent); text-transform: uppercase; font-size: 0.85rem; margin-bottom: 8px; display: block; }
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.9rem; color: var(--color-text-muted); margin-top: 10px; }
.hours-grid div span:first-child { color: var(--color-text); display: inline-block; width: 80px; }

.social-media-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-media-links a {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.social-media-links a:hover {
    color: var(--color-accent);
}

.social-media-links svg {
    width: 24px;
    height: 24px;
}

form { display: flex; flex-direction: column; gap: 20px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 15px; background: var(--color-input-bg);
    border: 1px solid var(--color-input-border); color: var(--color-text); border-radius: 8px;
    font-family: var(--font-main); font-size: 1rem; transition: 0.3s;
}
.form-group input:focus { border-color: var(--color-accent); outline: none; background: var(--color-bg); }

[data-theme="dark"] .form-group select, [data-theme="dark"] .form-group option {
    background: #333;
    color: white;
}

/* --- 6. FOOTER --- */
footer {
    border-top: 1px solid var(--color-card-border); padding: 40px 0; margin-top: 60px;
    text-align: center; color: var(--color-text-muted); font-size: 0.9rem;
    display: flex; flex-direction: column; gap: 10px;
}
.footer-links a { margin: 0 10px; color: var(--color-accent); }
.footer-links a:hover { color: var(--color-text); text-decoration: underline; }

/* --- 7. MODALS & LIGHTBOX --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px);
    z-index: 2000; display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: var(--color-bg); border: 1px solid var(--color-card-border);
    padding: 40px; width: 90%; max-height: 80vh;
    overflow-y: auto; border-radius: 16px; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    color: var(--color-text);
}
/* Specific modal sizing */
.modal-content.small { max-width: 700px; }
.modal-content.large { max-width: 900px; }

.close-modal { position: absolute; top: 20px; right: 20px; font-size: 2rem; color: var(--color-accent); cursor: pointer; background: none; border: none; z-index: 10; }
.modal-body h4 { margin-top: 15px; color: var(--color-text); }
.modal-body p, .modal-body li { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 8px; }

/* Lightbox Specifics */
#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#lightbox.active { display: flex; opacity: 1; }

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
#lightbox.active .lightbox-img { transform: scale(1); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.2s;
    z-index: 3001;
}
.lightbox-nav:hover { background: rgba(0, 210, 255, 0.3); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.lightbox-close {
    position: absolute; top: 20px; right: 20px;
    color: white; background: none; border: none;
    font-size: 3rem; cursor: pointer; z-index: 3002;
    line-height: 1;
}

/* Map Iframe Specifics */
.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
    margin-top: 20px;
}

/* --- 8. TOAST --- */
#toast {
    visibility: hidden; min-width: 250px; background-color: var(--color-accent);
    color: #000; text-align: center; border-radius: 50px; padding: 16px;
    position: fixed; z-index: 3000; left: 50%; bottom: 30px;
    transform: translateX(-50%); font-weight: 600; opacity: 0; transition: 0.5s;
}
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* --- WHATSAPP WIDGET --- */
.whatsapp-widget {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    display: flex;
    align-items: center;
}
.whatsapp-btn {
    background-color: #25D366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
}
.whatsapp-btn:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}
.whatsapp-btn svg {
    width: 35px;
    height: 35px;
    fill: white;
}
.whatsapp-tooltip {
    position: absolute;
    right: 80px;
    background-color: #fff;
    color: #333;
    padding: 8px 15px;
    border-radius: 50px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.whatsapp-widget:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 90px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .contact-layout { grid-template-columns: 1fr; }
    .hamburger { display: flex; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%; width: 75%; height: 100vh;
        background-color: var(--color-nav-bg); 
        flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1015; box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        border-left: 1px solid var(--color-card-border);
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }
    .hamburger.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
    
    .map-container iframe { height: 300px; }
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
}
