/* ============================================================
   AquaLuxe — Floating Houses CSS
   ============================================================ */

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

:root {
    --ocean-deep:    #0D2B3E;
    --ocean-mid:     #1A4A6B;
    --ocean-light:   #4A90D9;
    --seafoam:       #6EC6C0;
    --sand:          #F5EDD8;
    --sand-dark:     #E8D8B0;
    --white:         #FFFFFF;
    --text-dark:     #0D2B3E;
    --text-muted:    #5A7A8C;
    --gold:          #C9963B;
    --radius:        12px;
    --shadow:        0 4px 24px rgba(13,43,62,0.12);
    --shadow-lg:     0 8px 48px rgba(13,43,62,0.18);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--sand);
    color: var(--text-dark);
    line-height: 1.65;
}

/* ============ NAVBAR ============ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(13,43,62,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 64px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--white);
}
.logo-icon { font-size: 1.6rem; color: var(--seafoam); }
.logo-text { font-size: 1rem; letter-spacing: 0.08em; }
.logo-text strong { color: var(--seafoam); }
.nav-links {
    display: flex; align-items: center; gap: 2rem;
}
.nav-links a {
    color: rgba(255,255,255,0.8); text-decoration: none;
    font-size: 0.875rem; letter-spacing: 0.04em;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--seafoam); }
.btn-book {
    background: var(--seafoam) !important;
    color: var(--ocean-deep) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    transition: opacity 0.2s !important;
}
.btn-book:hover { opacity: 0.85 !important; }

/* ============ HERO ============ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding-top: 64px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: var(--ocean-deep);
}
.hero-img {
    width: 100%; height: 100%;
    object-fit: cover; opacity: 0.7;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(13,43,62,0.4) 0%, rgba(13,43,62,0.7) 100%);
}
/* Animated waves */
.wave {
    position: absolute; bottom: 0; left: -50%; width: 200%;
    border-radius: 45%;
    animation: wave-anim linear infinite;
    opacity: 0.15;
}
.wave1 { height: 80px; background: var(--seafoam); animation-duration: 8s; }
.wave2 { height: 60px; background: var(--ocean-light); animation-duration: 11s; bottom: 10px; opacity: 0.1; }
.wave3 { height: 50px; background: var(--white); animation-duration: 14s; bottom: 20px; opacity: 0.07; }
@keyframes wave-anim {
    0%   { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center; color: var(--white);
    padding: 2rem;
    max-width: 800px;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem; letter-spacing: 0.15em;
    padding: 0.4rem 1rem; border-radius: 999px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400; line-height: 1.15;
    margin-bottom: 1.25rem;
}
.hero-sub {
    font-size: 1.1rem; color: rgba(255,255,255,0.8);
    max-width: 560px; margin: 0 auto 2rem;
}
.btn-primary {
    display: inline-block;
    background: var(--seafoam);
    color: var(--ocean-deep);
    padding: 0.85rem 2.25rem;
    border-radius: 999px;
    font-weight: 600; font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(110,198,192,0.45);
}

/* ============ STATS BAR ============ */
.stats-bar {
    background: var(--ocean-deep);
    display: flex; justify-content: center; gap: 4rem;
    padding: 2rem;
}
.stat { text-align: center; color: var(--white); }
.stat strong { display: block; font-size: 2rem; color: var(--seafoam); font-family: 'Playfair Display', serif; }
.stat span { font-size: 0.8rem; letter-spacing: 0.08em; opacity: 0.7; text-transform: uppercase; }

/* ============ LISTINGS ============ */
.listings {
    max-width: 1200px; margin: 0 auto;
    padding: 5rem 2rem;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
    font-size: 0.75rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--seafoam);
    margin-bottom: 0.5rem;
}
.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; color: var(--ocean-deep);
    margin-bottom: 0.75rem;
}
.section-sub { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}
.house-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden; cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid rgba(13,43,62,0.08);
}
.house-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.card-photo {
    position: relative; height: 220px; overflow: hidden;
    background: var(--sand-dark);
}
.card-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.house-card:hover .card-photo img { transform: scale(1.04); }
.card-photo .card-photo-fallback {
    position: absolute; inset: 0; z-index: -1;
}
.card-photo.no-photo img { display: none; }
.card-photo.no-photo .card-photo-fallback { z-index: 0; }
.badge-available, .badge-unavailable {
    position: absolute; top: 12px; right: 12px;
    font-size: 0.72rem; font-weight: 600;
    padding: 0.25rem 0.75rem; border-radius: 999px;
    letter-spacing: 0.04em;
}
.badge-available { background: #E6F7F5; color: #1A7A6E; }
.badge-unavailable { background: #FEE2E2; color: #991B1B; }
.card-body { padding: 1.25rem; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.card-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--ocean-deep); }
.card-location { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.card-price { text-align: right; font-size: 1.1rem; font-weight: 700; color: var(--ocean-deep); white-space: nowrap; }
.card-price span { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.card-rating { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; }
.stars { color: var(--gold); font-size: 0.85rem; }
.rating-num { font-weight: 700; font-size: 0.875rem; }
.review-count { color: var(--text-muted); font-size: 0.8rem; }
.card-stats {
    display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
    font-size: 0.8rem; color: var(--text-muted);
    padding: 0.75rem 0; border-top: 1px solid rgba(13,43,62,0.07);
}
.card-cta {
    display: block; margin-top: 0.85rem;
    text-align: right; color: var(--ocean-light);
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: color 0.2s;
}
.card-cta:hover { color: var(--seafoam); }

/* ============ ABOUT ============ */
.about {
    background: var(--ocean-deep);
    padding: 5rem 2rem;
}
.about-inner {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
    align-items: center;
}
.about-text .section-label { color: var(--seafoam); }
.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem; color: var(--white);
    margin-bottom: 1.25rem; margin-top: 0.5rem;
}
.about-text p { color: rgba(255,255,255,0.75); margin-bottom: 1rem; }
.about-image img {
    width: 100%; border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ============ FOOTER ============ */
.footer { background: #07192A; color: rgba(255,255,255,0.6); }
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem; padding: 3.5rem 2rem 2.5rem;
}
.footer-brand .logo-icon { color: var(--seafoam); }
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { margin-top: 0.5rem; font-size: 0.85rem; }
.footer-links h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.footer-links a { display: block; color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.85rem; margin-bottom: 0.4rem; }
.footer-links a:hover { color: var(--seafoam); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    text-align: center; padding: 1.25rem 2rem;
    font-size: 0.8rem;
}

/* ============ DETAIL PAGE ============ */
.back-bar {
    max-width: 1200px; margin: 0 auto;
    padding: 90px 2rem 0;
}
.back-link {
    color: var(--ocean-light); text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
}
.back-link:hover { color: var(--seafoam); }
.detail-page { padding-bottom: 5rem; }
.detail-layout {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 400px;
    gap: 2.5rem; padding: 2rem;
    align-items: flex-start;
}

/* Gallery */
.gallery { margin-bottom: 2rem; }
.gallery-main {
    position: relative; border-radius: var(--radius);
    overflow: hidden; height: 420px;
    background: var(--sand-dark);
}
.gallery-main img {
    width: 100%; height: 100%;
    object-fit: cover; transition: opacity 0.3s;
}
.gallery-fallback {
    position: absolute; inset: 0; z-index: -1;
}
.gallery-main.no-photo img { display: none; }
.gallery-main.no-photo .gallery-fallback { z-index: 0; }
.gallery-thumbs {
    display: flex; gap: 0.75rem; margin-top: 0.75rem;
    overflow-x: auto; padding-bottom: 4px;
}
.thumb {
    flex-shrink: 0; width: 90px; height: 65px;
    border-radius: 8px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; transition: border-color 0.2s;
    position: relative; background: var(--sand-dark);
}
.thumb.active { border-color: var(--seafoam); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback { position: absolute; inset: 0; z-index: -1; }
.thumb img[src=''] { display: none; }

/* 3D Model */
.model-section { margin-bottom: 2rem; }
.model-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; margin-bottom: 0.25rem;
    color: var(--ocean-deep);
}
.model-hint { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.model-canvas-wrap {
    border-radius: var(--radius); overflow: hidden;
    height: 320px; background: #e8f4fd;
    border: 1px solid rgba(13,43,62,0.1);
}
#house3d { width: 100%; height: 100%; display: block; }

/* Description */
.detail-description h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; margin-bottom: 0.75rem;
    color: var(--ocean-deep);
}
.detail-description p { color: var(--text-muted); line-height: 1.75; }

/* Right card */
.detail-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
    position: sticky; top: 80px;
    border: 1px solid rgba(13,43,62,0.08);
}
.detail-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; color: var(--ocean-deep);
    margin-bottom: 0.3rem;
}
.detail-location { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.detail-rating { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.detail-price {
    font-size: 1.6rem; font-weight: 700;
    color: var(--ocean-deep);
    border-top: 1px solid rgba(13,43,62,0.08);
    border-bottom: 1px solid rgba(13,43,62,0.08);
    padding: 1rem 0; margin-bottom: 1.25rem;
}
.detail-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.btn-book-large {
    display: block; text-align: center;
    background: var(--seafoam); color: var(--ocean-deep);
    padding: 0.9rem; border-radius: var(--radius);
    font-weight: 700; font-size: 1rem;
    text-decoration: none; margin-bottom: 1.5rem;
    transition: opacity 0.2s;
}
.btn-book-large:hover { opacity: 0.85; }
.btn-unavailable {
    text-align: center; padding: 0.9rem;
    background: #f1f5f9; color: #94a3b8;
    border-radius: var(--radius); font-weight: 600;
    margin-bottom: 1.5rem; font-size: 0.95rem;
}
.characteristics h4, .amenities h4 {
    font-size: 0.8rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 0.85rem;
}
.char-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.85rem; margin-bottom: 1.5rem;
}
.char-item {
    display: flex; align-items: center; gap: 0.6rem;
    background: var(--sand); border-radius: 8px;
    padding: 0.6rem 0.75rem;
}
.char-icon { font-size: 1.1rem; }
.char-item strong { display: block; font-size: 1.1rem; color: var(--ocean-deep); line-height: 1; }
.char-item span { font-size: 0.72rem; color: var(--text-muted); }
.amenity-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.amenity-tag {
    background: rgba(74,144,217,0.1);
    color: var(--ocean-mid); border: 1px solid rgba(74,144,217,0.2);
    font-size: 0.78rem; padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

/* Not Found */
.not-found {
    min-height: 60vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1.5rem;
    padding-top: 100px;
}
.not-found h2 { font-family: 'Playfair Display', serif; font-size: 2rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .about-inner { grid-template-columns: 1fr; }
    .about-image { display: none; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-card { position: static; }
    .stats-bar { gap: 2rem; flex-wrap: wrap; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 1rem; }
    .nav-links a:not(.btn-book) { display: none; }
    .hero-title { font-size: 2.2rem; }
    .gallery-main { height: 260px; }
    .footer-inner { grid-template-columns: 1fr; }
}
