/* =========================================
   Red Savia Bienes Raíces | CSS Custom Properties
   ========================================= */
   :root {
    /* Colors */
    --clr-primary: #4A6B36; /* Verde Musgo */
    --clr-primary-dark: #3A532C; /* Verde Musgo Oscuro */
    --clr-header-bg: rgba(38, 54, 28, 0.92);
    --clr-bg-global: #F9F8F6; /* Blanco lino / arena claro */
    --clr-bg-arena: #EFECE5;
    
    --clr-text-light: #F9F8F6;
    --clr-text-white: #FFFFFF;
    --clr-text-dark: #1A1A1A;
    --clr-text-dark-muted: #2A2A2A;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --bento-gap: 1.5rem;
    --bento-radius: 32px;
    --card-padding: clamp(2rem, 5vw, 3.5rem);
    
    /* Shadows & Transitions */
    --shadow-text: 0 4px 24px rgba(0, 0, 0, 0.7);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg-global);
    color: var(--clr-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

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

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0 2rem;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 768px) {
    .hero-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4rem;
    }
    
    .hero-logo-wrapper, .hero-content {
        flex: 1;
        width: 50%;
    }
    
    .hero-content {
        text-align: left;
    }
}

.hero-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(249, 248, 246, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: clamp(2rem, 3.5vw, 3rem);
    border-radius: var(--bento-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hero-logo-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.hero-logo {
    max-width: 100%;
    width: clamp(200px, 22vw, 300px);
    height: auto;
    object-fit: contain;
}

.hero-content {
    color: var(--clr-text-white);
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: var(--shadow-text);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 400;
    text-shadow: var(--shadow-text);
    max-width: 700px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-subtitle {
        margin: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--clr-text-white);
    animation: bounce 2s infinite;
    opacity: 0.8;
}

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

/* =========================================
   Bento Grid Section
   ========================================= */
.bento-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: var(--bento-gap);
    auto-rows: minmax(min-content, max-content);
}

.bento-card {
    border-radius: var(--bento-radius);
    padding: var(--card-padding);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.bento-card h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.bento-card p {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.7;
    font-weight: 400;
}

/* Image Cards (B, C, E) */
.card-image {
    padding: 0; /* Remove padding for full images */
    min-height: 350px;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.card-image:hover img {
    transform: scale(1.04);
}

/* Individual Card Styles */
.card-a {
    background-color: var(--clr-primary-dark);
    color: var(--clr-text-light);
}

.card-d {
    background-color: var(--clr-bg-arena);
    color: var(--clr-text-dark);
}

.card-f {
    background-color: var(--clr-primary);
    color: var(--clr-text-white);
    text-align: center;
    align-items: center;
}

.card-f-content {
    max-width: 700px;
    margin: 0 auto;
}

.card-f h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.card-f p {
    margin-bottom: 2.5rem;
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--clr-bg-global);
    color: var(--clr-primary);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    background-color: #FFFFFF;
}

.whatsapp-icon {
    flex-shrink: 0;
}

/* =========================================
   Desktop Grid Layout (2 Columns)
   ========================================= */
@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(350px, auto);
    }

    /* Asymmetric arrangements */
    .card-a {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .card-b {
        grid-column: 2 / 3;
        grid-row: 1 / 3; /* Spans 2 rows for vertical impact */
    }

    .card-c {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .card-d {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }

    .card-e {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .card-f {
        grid-column: 1 / -1; /* Full width */
        grid-row: 4 / 5;
    }
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--clr-text-dark-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* =========================================
   Animations (Intersection Observer)
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}
