:root {
    --primary: #0f1113; /* Negro Ónix: Autoridad */
    --accent: #aa894c;  /* Oro Satinado: Riqueza y éxito */
    --accentII: #d1c1a3;  /* Oro Satinado: Riqueza y éxito */
    --text-muted: #666;
    --white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
    --font-title: 'Playfair Display', serif;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--primary);
    background-color: #fdfdfd;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   NAVBAR (CORREGIDO: TRANSPARENTE + LOGO GRANDE)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%; /* Espacio original */
    position: absolute; /* VUELVE A FLOTAR SOBRE LA FOTO */
    width: 100%;
    z-index: 1000;
    top: 0;
    background-color: transparent; /* Sin fondo negro */
}

/* LOGO GRANDE */
.logo img {
    height: 50px;  /* Tamaño grande para que se lea */
    width: auto;   
    display: block;
    transition: transform 0.3s ease;
    margin-left: -18px; /* Mueve el logo 15px hacia la IZQUIERDA */
    /* margin-left: 15px; <-- Úsalo así si quieres moverlo a la DERECHA */
}

.logo img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* BOTÓN AGENDAR CITA (RESTAURADO ESTILO CRISTAL) */
#btn-agendar-nav {
    text-decoration: none;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 25px;
    border-radius: 50px; 
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    backdrop-filter: blur(5px); /* Efecto cristal */
}

#btn-agendar-nav:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

/* Ajuste Logo Móvil */
@media (max-width: 768px) {
    .logo img {
        height: 38px; 
    }
    .navbar {
        padding: 15px 5%;
    }

    
}

/* =========================================
   RESTO DEL DISEÑO (HERO, CARDS, ETC)
   ========================================= */

/* Hero: Activación Emocional */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
    text-align: center;
    background: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1920') center/cover no-repeat;
}

/* Corrección Texto Hero */
.hero h1 {
    font-family: var(--font-title);
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); 
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 15px;
    font-size: 0.9rem;
    color: va r(--primary); 
    margin-bottom: 20px; 
    display: block;
    font-weight: 900;
    text-shadow: 0 2px 10px rgb(0, 0, 0); 
}

/* Buscador: El "Call to Action" central */
.search-container {
    background: var(--white);
    border-radius: 4px; 
    display: flex;      
    align-items: stretch; 
    padding: 0;        
    overflow: hidden;   
    box-shadow: 0 15px 40px rgba(0,0,0,0.3); 
    max-width: 800px;   
    margin: 50px auto 0; 
}

.search-box {
    display: contents; 
}

.input-group {
    flex-grow: 1; 
    display: flex;
    flex-direction: column; 
    justify-content: center;
    padding: 15px 30px; 
    background: white;
}

.input-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.input-group select {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    outline: none;
    width: 100%;
}

/* El Botón del Buscador */
.btn-search {
    background: var(--accent); 
    color: var(--white);
    border: none;
    padding: 0 50px; 
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center; 
    justify-content: center;
}

.btn-search:hover {
    background: #1a1a1a; 
    color: var(--accent); 
}   

/* Grid de Propiedades */
.container { padding: 100px 6%; }

.section-header { text-align: left; margin-bottom: 60px; }

.section-header h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
}

.grid-propiedades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 40px; 
    width: 100%;
}

/* Cards */
.card {
    cursor: pointer;
    overflow: hidden;
    background: var(--white);
}

.card-img-container {
    height: 450px;
    overflow: hidden;
    position: relative;
}

.card-img {
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s var(--ease);
}

.card:hover .card-img { transform: scale(1.08); }

.card-info {
    padding: 30px 0;
}

.card-info h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-price {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 500;
}

/* =========================================
   VERSIÓN MÓVIL (CARRUSEL HORIZONTAL)
   ========================================= */
@media (max-width: 768px) {
    .container {
        padding: 50px 5%; 
    }

    .grid-propiedades {
        display: flex;             
        overflow-x: auto;          
        scroll-snap-type: x mandatory; 
        gap: 20px;
        padding-bottom: 30px;      
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
    }

    .grid-propiedades::-webkit-scrollbar {
        display: none; 
    }

    .card {
        min-width: 85%;  
        scroll-snap-align: center; 
    }
    
    .section-title {
        font-size: 2rem; 
    }
}

/* =========================================
   ANIMACIONES DE ENTRADA (LUXURY FEEL)
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: aparecer 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes aparecer {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detalle-info > * {
    opacity: 0;
    animation: aparecer 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.detalle-info h1 { animation-delay: 0.2s; }
.detalle-info p  { animation-delay: 0.3s; }
.detalle-info .descripcion { animation-delay: 0.4s; }
.detalle-info .btn-whatsapp { animation-delay: 0.6s; }

/* Estilos para las miniaturas de la galería */
.thumbs-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto; 
}

.thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    border: 2px solid transparent;
}

.thumb:hover, .thumb.active {
    opacity: 1;
    border-color: var(--accent); 
}

/* =========================================
   ANIMACIÓN DE SALIDA (FADE OUT)
   ========================================= */
.fade-out-active {
    opacity: 0;
    transform: translateY(20px); 
    transition: all 0.5s ease-in-out; 
    pointer-events: none; 
}

/* =========================================
   SECCIÓN ESTADÍSTICAS
   ========================================= */
.stats-section {
    background-color: #111;
    color: white;
    padding: 60px 5%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 30px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    color: #c5a059; 
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

/* =========================================
   SECCIÓN SOBRE NOSOTROS
   ========================================= */
.about-section {
    padding: 100px 5%;
    background-color: #f9f9f9;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #111;
}

.about-text p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mision-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.mv-item h4 {
    color: #c5a059;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.about-image img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .about-container { grid-template-columns: 1fr; }
    .mision-vision-grid { grid-template-columns: 1fr; }
}

/* =========================================
   CARRUSEL INFINITO DE ALIADOS
   ========================================= */
.partners-section {
    padding: 60px 0;
    background: white;
    overflow: hidden; 
}

.slider {
    background: white;
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slide-track {
    -webkit-animation: scroll 40s linear infinite;
    animation: scroll 40s linear infinite;
    display: flex;
    width: calc(250px * 10); 
}

.slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LOGOS DE CONSTRUCTORAS */
.slide img {
    width: 160px;          /* Ancho fijo para uniformidad */
    height: 90px;          /* Altura fija */
    object-fit: contain;   /* Ajusta la imagen sin deformarla */
    filter: grayscale(100%); /* Efecto blanco y negro */
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 0 15px;      
}

.slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1); 
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 5)); } 
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: #0a0a0a;
    color: #fff;
    padding: 80px 5% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    border-bottom: 1px solid #222;
    padding-bottom: 40px;
}

.footer-col h3, .footer-col h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: #c5a059;
}

.footer-col a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-col a:hover { color: white; }
.footer-bottom { text-align: center; color: #444; font-size: 0.8rem; }

/* =========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================= */
.float-whatsapp {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.float-whatsapp:hover {
    transform: scale(1.1);
    background-color: #1ebc57;
}

.float-whatsapp img {
    width: 35px;
    height: 35px;
}

/* =========================================
   ESTILOS DE VENTANAS MODALES
   ========================================= */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px); 
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: 0.3s;
}
.close-btn:hover { color: #000; }

#form-cita label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

#form-cita input, #form-cita textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
}

#form-cita input:focus, #form-cita textarea:focus {
    border-color: #c5a059;
    outline: none;
}

.btn-contact-option {
    display: block;
    padding: 15px;
    margin-bottom: 15px;
    text-decoration: none;
    background: #f4f4f4;
    color: #333;
    border-radius: 8px;
    transition: 0.3s;
    border: 1px solid #ddd;
}

.btn-contact-option:hover {
    background: #eee;
    transform: translateY(-2px);
}

.btn-contact-option.whatsapp {
    background: #e7fceb;
    color: #0b4f16;
    border-color: #25d366;
}

.btn-contact-option small {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

html {
    scroll-behavior: smooth;
}

/* Corrección del Botón "Agendar Cita" del Modal */
#form-cita button {
    background-color: #c5a059; 
    color: white;
    border: none;
    padding: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

#form-cita button:hover {
    background-color: #b08d4b; 
    transform: translateY(-2px);
}

/* =========================================
   CALCULADORA DE PRÉSTAMOS
   ========================================= */
.calculator-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.calc-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.calc-item input, .calc-item select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333;
    transition: 0.3s;
}

.calc-item input:focus {
    border-color: #c5a059;
    outline: none;
}

.calc-result {
    background-color: #111;
    color: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
}

.calc-result h4 {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 400;
}

.calc-result .monthly-payment {
    color: #c5a059; /* Dorado */
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.calc-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

@media (max-width: 768px) {
    .navbar {
        display: flex !important;
        flex-direction: row !important; /* Fuerza a que se mantengan en la misma fila */
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap; /* Evita que el botón baje */
    }

    .logo img {
        height: 50px !important; /* Reducimos un poco el logo en móvil para dar espacio al botón */
    }

    #btn-volver {
        font-size: 0.7rem;
        padding: 6px 12px;
        margin-left: 10px; /* Separación mínima del logo */
    }
}

/* Ajuste específico para el logo del footer */
.footer-logo img {
    height: 40px; /* Un poco más pequeño que el del nav para que encaje en el bloque de texto */
    width: auto;
    filter: brightness(0) invert(1); /* Asegura que sea blanco puro si usas la versión a color */
    opacity: 0.9;
    transition: 0.3s;
}

.footer-logo img:hover {
    opacity: 1;
    transform: translateY(-3px); /* Un ligero salto al pasar el mouse */
}

/* =========================================
   REDISEÑO DE ARMONÍA TOTAL (LIMPIEZA FINAL)
   ========================================= */

/* 1. LIMPIEZA DE "CINTAS AZULES" Y SUBRAYADOS */
.navbar a, 
.navbar a:visited, 
.navbar a:active,
.logo a {
    text-decoration: none !important;
    color: white !important;
    border-bottom: none !important;
    outline: none !important;
}

/* 2. BOTONES DE NAVEGACIÓN (ELEGANCIA UNIFICADA) */
#btn-agendar-nav, #btn-volver {
    background: rgba(255, 255, 255, 0.1) !important; /* Transparencia de lujo */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    backdrop-filter: blur(8px) !important; /* Efecto cristal real */
    font-size: 0.7rem !important;
    transition: all 0.3s ease !important;
}

#btn-agendar-nav:hover {
    background: white !important;
    color: #111 !important;
}

/* 3. REFINAMIENTO DE LA FRASE "EXCLUSIVIDAD" (MÓVIL) */
@media (max-width: 768px) {
    .eyebrow {
        background: rgba(17, 17, 17, 0.6) !important; /* Más oscuro y elegante */
        color: #c5a059 !important;
        font-size: 0.6rem !important;
        letter-spacing: 3px !important;
        padding: 6px 16px !important;
        border-radius: 30px !important;
        border: 1px solid rgba(197, 160, 89, 0.3) !important; /* Bordecito dorado sutil */
        margin-bottom: 20px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    }

    .hero h1 {
        font-size: 2.3rem !important;
        line-height: 1.2 !important;
        text-shadow: 0 5px 15px rgba(0,0,0,0.6) !important;
    }
    
    /* Buscador más limpio */
    .search-container {
        border-radius: 12px !important;
        margin-top: 30px !important;
    }
}
/* =========================================
   MEJORA DE FRASE "EXCLUSIVIDAD" (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .eyebrow {
        /* Tamaño más pequeño y agrupado */
        font-size: 0.65rem !important;
        letter-spacing: 4px !important; 
        
        /* Cápsula con sombra para contraste total */
        background: rgba(0, 0, 0, 0.45) !important; /* Fondo oscuro translúcido */
        color: #c5a059 !important; /* Dorado característico */
        
        padding: 5px 15px !important;
        border-radius: 50px !important;
        display: inline-block !important;
        
        /* Sombra externa para despegar del fondo blanco */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
        text-shadow: none !important; /* Limpiamos sombras de texto previas */
        
        margin-bottom: 15px !important;
        text-transform: uppercase !important;
    }
}