@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary-color: #2d4a22; /* Forest Green */
    --primary-light: #4a6d3a;
    --secondary-color: #c4a484; /* Warm Stone */
    --accent-color: #8b4513; /* Saddle Brown */
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --bg-color: #ffffff;
    --bg-alt: #f8f5f0; /* Soft Crema */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, .serif {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    background: #000;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

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

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* About Section */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
}

.about-image img,
.val-inner img {
    border-radius: 20px;
    box-shadow: 20px 20px 60px #d9d9d9, -20px -20px 60px #ffffff;
    width: 100%;
}

/* Featured Section (Bodega) */
.featured {
    background: var(--bg-alt);
}

.featured-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 4rem;
    align-items: center;
}

/* Grid Section (Apartments) */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

.card-img {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Map Section */
.map-container {
    height: 400px;
    background: #eee;
    border-radius: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 74, 34, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay span {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .overlay span {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

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

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1050;
    }

    nav.active {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    /* ── FIx Mobile Header squishing ── */
    .nav-container {
        flex-wrap: wrap; /* Allow the header to wrap, or scale it */
    }
    .lang-switcher {
        padding: 0.2rem 0.5rem;
    }
    .lang-switcher button {
        padding: 0.1rem 0.3rem;
    }
    .nav-container .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    /* Prevent hero text from colliding with header on very small screens */
    .hero-content {
        padding-top: 4rem;
    }
    .hero-content h1 {
        font-size: 2.2rem !important;
    }
    
    .apt-hero-content h1 {
        font-size: 2.2rem !important;
    }

    .gal-hero-content h1 {
        font-size: 2.2rem !important;
    }
    .logo {
        font-size: 1.4rem;
    }
}
