/* ===== CSS Reset & Variables ===== */
:root {
    /* Colors */
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Layout */
    --max-width: 1200px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    /* Animation */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Ambient Background ===== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-color);
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #1e1b4b;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #022c22;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: #0f172a;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* ===== Typography ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.text-center { text-align: center; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-lg { max-width: 600px; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* ===== Navigation ===== */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--max-width);
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.glass-nav.scrolled {
    width: 100%;
    top: 0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: #4ade80;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

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

.btn-primary-sm {
    background: var(--text-primary);
    color: var(--bg-color) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600 !important;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Menu Active State */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding-top: 6rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* ===== Layout ===== */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* ===== Glass Elements ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-glass {
    background: rgba(0, 0, 0, 0.4);
}

.glass-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
}

.glass-image::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.glass-btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-weight: 600;
    transition: var(--transition-smooth);
    width: 100%;
}

.glass-btn-social:hover {
    transform: translateY(-3px);
}

.glass-btn-social.phone:hover { background: rgba(0, 0, 0, 0.5); }
.glass-btn-social.whatsapp:hover { background: rgba(39, 208, 97, 0.8); }
.glass-btn-social.instagram:hover { background: rgba(240, 0, 117, 0.8); }
.glass-btn-social.facebook:hover { background: rgba(59, 89, 152, 0.8); }

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    animation: zoomInOut 20s infinite alternate ease-in-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.9));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.glass-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.125rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition-smooth);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
    color: rgba(255,255,255,0.7);
}

/* ===== Grid Layouts ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    text-align: center;
}

.feature-card .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    color: #4ade80;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== Carousel ===== */
.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    pointer-events: none;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.nav-btn {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* ===== Photo Grid ===== */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.photo-large {
    aspect-ratio: 4 / 3;
}

.photo-small-group {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    height: 100%;
}

.photo-small {
    height: 100%;
    min-height: 0; /* allows flex/grid children to shrink properly */
}

.photo-large img, .photo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    cursor: zoom-in;
}

.glass-image:hover img {
    transform: scale(1.05);
}

/* ===== Parallax Section ===== */
.section-parallax {
    position: relative;
    padding: 8rem 0;
    background-attachment: fixed;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,1), rgba(5,77,31,0.5));
    z-index: 2;
}

.invest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.invest-grid h3 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.25rem;
}

.invest-grid ul {
    list-style-type: none;
    padding-left: 0;
}

.invest-grid ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.invest-grid ul li::before {
    content: '•';
    color: #4ade80;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* ===== Social Links ===== */
.social-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== Plans & Map ===== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    aspect-ratio: 3 / 4;
    background: #000; /* For floor plans that have white/black bars */
}

.plan-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Don't crop the plans */
    cursor: zoom-in;
    background: #000; /* Match background */
}

.video-container {
    aspect-ratio: 16 / 9;
    padding: 0;
    overflow: hidden;
}

.video-wrapper {
    width: 100%;
    height: 100%;
}

.map-container {
    height: 500px;
    padding: 0;
    overflow: hidden;
}

/* ===== Footer ===== */
.glass-footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    text-align: center;
}

.glass-footer .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Text Content ===== */
.text-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

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

/* ===== Animations (Scroll Reveal) ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@keyframes zoomInOut {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* ===== Media Queries ===== */
@media (max-width: 992px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    .photo-large {
        aspect-ratio: 16 / 9;
    }
    .photo-small-group {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        aspect-ratio: 16 / 9;
    }
    .social-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
    /* .nav-links rules handled above */
    .section {
        padding: 4rem 0;
    }
    .glass-panel {
        padding: 1.5rem;
    }
    .carousel-container {
        aspect-ratio: 4 / 3;
        max-height: none;
    }
    .section-parallax {
        background-attachment: scroll; /* Better performance on mobile */
    }
    .social-links-grid {
        grid-template-columns: 1fr;
    }
    .photo-small-group {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        aspect-ratio: auto;
    }
    .photo-small {
        aspect-ratio: 16 / 9;
    }
}
