/* Importar una fuente web moderna */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; 
}

:root {
    --primary-color: #008080; /* Verde Azulado */
    --secondary-color: #009688;
    --accent-color: #ff8c00;
    --toolbar-height: 45px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    padding-top: var(--toolbar-height); 
    overflow-y: auto; 
    display: block;
}

/* --------------------------------- */
/* BARRA DE NAVEGACIÓN (TOOLBAR) */
/* --------------------------------- */
#toolbar {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--toolbar-height);
    z-index: 1015;
}

.logo, .logo-accent {
    display: none; 
}

#toolbar a {
    color: white;
    text-decoration: none;
    padding: 0 15px;
    font-weight: 500;
    transition: background-color 0.3s;
    line-height: var(--toolbar-height);
}

#toolbar a:hover {
    background-color: #005f5f;
}

/* --------------------------------- */
/* CONTENIDO PRINCIPAL (Scroll Nativo) */
/* --------------------------------- */

main {
    max-width: 1200px; 
    margin: 20px auto; 
    padding: 0 20px;
    transition: none; 
}

/* Estilos de sección (NO full screen) */
.bienvenida, .casa, .formulario-contacto {
    height: auto; 
    min-height: auto;
    width: 100%;
    padding: 40px;
    margin-bottom: 30px; 
    
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    
    display: block; 
}

/* Ocultamos el separador */
hr {
    display: none;
}

.bienvenida {
    padding-top: 40px;
    text-align: center; 
}

.bienvenida h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

/* --- ESTILOS DE LA SECCIÓN BIENVENIDA CON 2 COLUMNAS --- */
.contenido-inicio {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.columna-texto {
    flex-basis: 40%; 
    padding: 10px;
    text-align: left;
}

.columna-mapa {
    flex-basis: 60%; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.columna-texto p {
    font-size: 1.1em;
    margin-top: 10px;
    line-height: 1.8;
}

/* --- ESTILOS DE LAS CASAS CON 2 COLUMNAS --- */
.casa {
    display: block;
}

.casa h2 {
    color: var(--secondary-color); 
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

.descripcion {
    font-style: italic;
    margin-bottom: 25px;
    font-size: 1.1em;
    max-width: 100%;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.contenido-casa {
    display: flex; 
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
    margin-top: 20px;
}

.columna-detalles {
    flex-basis: 40%; 
    display: flex;
    flex-direction: column;
    padding: 0;
}

.columna-carrusel {
    flex-basis: 60%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Detalles (Lista de características) */
.detalles {
    flex-grow: 1;
    margin-bottom: 20px;
}

.detalles ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; 
    gap: 15px;
}

.detalles li {
    background-color: #e0f7fa;
    color: #00796b;
    padding: 8px 15px;
    border-radius: 25px; 
    border: 1px solid #b2ebf2;
    font-size: 0.9em;
    font-weight: 500;
}

/* Carrusel de Fotos */
.carrusel-contenedor {
    position: relative;
    overflow: hidden;
    margin-bottom: 5px; 
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 400px; 
}

.carrusel {
    display: flex;
    transition: transform 0.6s ease-in-out;
    width: 100%;
    height: 100%;
}

.foto-carrusel {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ddd;
    color: transparent; 
    font-size: 0;
    text-shadow: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* NUEVOS ESTILOS DE DESCRIPCIÓN DE CARRUSEL */
.descripcion-carrusel {
    margin-top: 5px;
    font-size: 0.95em;
    color: #444; 
    text-align: center;
    font-style: italic;
    
    display: none; 
}

.descripcion-carrusel.active {
    display: block;
}


/* --------------------------------- */
/* INSERCIÓN DE IMÁGENES REALES (INTERCAMBIADAS) */
/* --------------------------------- */

/* CASA 1 (Jojua) AHORA USA FOTOS DE CASA 2 */
#casa1 .foto-carrusel:nth-child(1) { background-image: url('img/casa2/exterior.jpg'); }
#casa1 .foto-carrusel:nth-child(2) { background-image: url('img/casa2/exterior2.jpg'); }
#casa1 .foto-carrusel:nth-child(3) { background-image: url('img/casa2/exterior3.jpg'); }
#casa1 .foto-carrusel:nth-child(4) { background-image: url('img/casa2/parrilla.jpg'); }
#casa1 .foto-carrusel:nth-child(5) { background-image: url('img/casa2/parrilla2.jpg'); }
#casa1 .foto-carrusel:nth-child(6) { background-image: url('img/casa2/living.jpg'); }
#casa1 .foto-carrusel:nth-child(7) { background-image: url('img/casa2/living2.jpg'); }
#casa1 .foto-carrusel:nth-child(8) { background-image: url('img/casa2/living3.jpg'); }
#casa1 .foto-carrusel:nth-child(9) { background-image: url('img/casa2/living4.jpg'); }
#casa1 .foto-carrusel:nth-child(10) { background-image: url('img/casa2/living5.jpg'); }
#casa1 .foto-carrusel:nth-child(11) { background-image: url('img/casa2/principal.jpg'); }
#casa1 .foto-carrusel:nth-child(12) { background-image: url('img/casa2/principal2.jpg'); }
#casa1 .foto-carrusel:nth-child(13) { background-image: url('img/casa2/secundario.jpg'); }
#casa1 .foto-carrusel:nth-child(14) { background-image: url('img/casa2/secundario2.jpg'); }
#casa1 .foto-carrusel:nth-child(15) { background-image: url('img/casa2/secundario3.jpg'); }
#casa1 .foto-carrusel:nth-child(16) { background-image: url('img/casa2/baño.jpg'); }


/* CASA 2 AHORA USA FOTOS DE CASA 1 */
#casa2 .foto-carrusel:nth-child(1) { background-image: url('img/casa1/exterior.jpg'); }
#casa2 .foto-carrusel:nth-child(2) { background-image: url('img/casa1/exterior2.jpg'); }
#casa2 .foto-carrusel:nth-child(3) { background-image: url('img/casa1/exterior3.jpg'); }
#casa2 .foto-carrusel:nth-child(4) { background-image: url('img/casa1/parrilla.jpg'); }
#casa2 .foto-carrusel:nth-child(5) { background-image: url('img/casa1/parrilla2.jpg'); }
#casa2 .foto-carrusel:nth-child(6) { background-image: url('img/casa1/exterior4.jpg'); }
#casa2 .foto-carrusel:nth-child(7) { background-image: url('img/casa1/living.jpg'); }
#casa2 .foto-carrusel:nth-child(8) { background-image: url('img/casa1/principal.jpg'); }
#casa2 .foto-carrusel:nth-child(9) { background-image: url('img/casa1/principal2.jpg'); }
#casa2 .foto-carrusel:nth-child(10) { background-image: url('img/casa1/secundario.jpg'); }
#casa2 .foto-carrusel:nth-child(11) { background-image: url('img/casa1/secundario2.jpg'); }
#casa2 .foto-carrusel:nth-child(12) { background-image: url('img/casa1/cocina.jpg'); }
#casa2 .foto-carrusel:nth-child(13) { background-image: url('img/casa1/cocina2.jpg'); }
#casa2 .foto-carrusel:nth-child(14) { background-image: url('img/casa1/cocina3.jpg'); }
#casa2 .foto-carrusel:nth-child(15) { background-image: url('img/casa1/baño.jpg'); }


/* Botones del Carrusel */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.8em;
    z-index: 10;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.prev { left: 15px; }
.next { right: 15px; }

/* Botón de Contacto */
.contacto-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.2s;
    letter-spacing: 0.5px;
    text-align: center;
    border: none;
    cursor: pointer;
}

.contacto-btn:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
}

/* --------------------------------- */
/* ESTILOS DE FORMULARIO DE CONTACTO (OPTIMIZADO) */
/* --------------------------------- */
.formulario-contacto {
    background-color: #eaf6ff;
    padding: 30px; 
    text-align: center;
}

.formulario-contacto h2 {
    color: var(--primary-color);
    margin-bottom: 15px; 
}

.contenido-contacto {
    display: flex;
    gap: 30px; 
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.columna-info {
    flex-basis: 40%;
    padding: 15px; 
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.columna-info h3 {
    color: var(--primary-color);
    margin-top: 10px; 
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: 600;
}

.columna-info p {
    margin-bottom: 8px; 
    font-size: 0.95em;
}

.nota-info {
    font-size: 0.85em; 
    color: #666;
    margin-top: 10px;
}

.columna-formulario-wrapper {
    flex-basis: 60%;
}

.formulario-contacto form {
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: left;
}

.grupo-form {
    margin-bottom: 10px;
}

.grupo-form label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    color: #333;
}

.grupo-form input[type="text"],
.grupo-form input[type="email"],
.grupo-form select,
.grupo-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: 'Poppins', sans-serif;
}

.grupo-form textarea {
    resize: vertical;
    min-height: 80px; 
}

/* Estilos para el Mapa de Google */
.mapa-contenedor {
    margin-top: 0;
    padding: 0;
    text-align: center;
    width: 100%;
}

.mapa-contenedor iframe {
    width: 100%;
    height: 400px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.nota-mapa {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

footer {
    text-align: center;
    padding: 25px;
    background-color: #222;
    color: #ccc;
    margin-top: 50px;
    font-size: 0.9em;
    width: 100%;
}

/* Media Query para la responsividad (Móviles) */
@media (max-width: 900px) {
    body {
        padding-top: 0; 
    }
    
    #toolbar {
        position: static;
        height: auto;
        flex-wrap: wrap;
        justify-content: space-around;
        padding: 10px 0;
        box-shadow: none;
    }
    
    #toolbar a {
        padding: 5px 10px;
        line-height: normal;
        font-size: 0.9em;
        flex-grow: 1;
        text-align: center;
    }
    
    /* En móvil, apilamos las columnas */
    .contenido-inicio, .contenido-casa, .contenido-contacto {
        flex-direction: column;
        gap: 15px;
    }
    
    .columna-texto, .columna-mapa, .columna-detalles, .columna-carrusel, .columna-info, .columna-formulario-wrapper {
        flex-basis: auto;
        width: 100%;
    }
    
    .carrusel-contenedor {
        height: 250px; 
        width: 100%;
    }

    .foto-carrusel {
        height: 100%; 
    }
    
    .bienvenida, .casa, .formulario-contacto {
        padding: 20px;
    }
}

/* --- NUEVOS ESTILOS PARA NOTIFICACIONES --- */
#mensaje-estado {
    padding: 15px;
    margin: 20px auto;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    max-width: 800px; /* Asegura que no se estire de más */
}

.mensaje-exito {
    background-color: #d4edda; /* Verde claro */
    color: #155724; /* Verde oscuro */
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da; /* Rojo claro */
    color: #721c24; /* Rojo oscuro */
    border: 1px solid #f5c6cb;
}

/* Oculta inicialmente el mensaje */
.mensaje-oculto {
    display: none;
}