/* --- Fuentes y Estilos Globales --- */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ebd3bc; /* Color de respaldo */
    /* Degradado vertical con tus colores */
    background-image: linear-gradient(to bottom, #c9a383, #9c602d);
    color: #333;
    overflow-x: hidden;
}
.font-serif { 
    font-family: 'Playfair Display', serif; 
}

/* --- Estructura y Layout --- */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 0; /* El canvas 3D siempre va al fondo */
}

.content-section {
    position: relative;
    z-index: 1; /* El contenido siempre va sobre el canvas 3D */
    width: 100%;
    padding: 12vh 2rem;
    background-color: rgba(253, 251, 248, 0.85); /* Fondo semitransparente para las secciones */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: transparent; /* El hero es transparente para mostrar el 3D */
    backdrop-filter: none;
}

.hero-text {
    background: rgba(0,0,0,0.4);
    padding: 2rem;
    border-radius: 1rem;
}

/* --- Componentes UI Personalizados --- */
.btn-primary {
    background-color: #8A6E59; /* Color de acento principal (marrón tierra) */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #6b5645; /* Tono más oscuro para el hover */
}

.form-input {
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #8A6E59; /* Color de acento al enfocar */
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 400px;
}
@media (min-width: 768px) {
    .chart-container {
        height: 350px;
    }
}


/* --- Estilos para Mapa Interactivo (Leaflet) --- */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    background-color: #FDFBF8;
}

.leaflet-popup-content {
    font-family: 'Montserrat', sans-serif;
}


/* --- Precargador (Loader) --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FDFBF8;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader img {
    width: 250px;
    animation: pulse-loader 1.5s infinite ease-in-out;
}

@keyframes pulse-loader {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(0.95); }
}


/* --- Botón Flotante de WhatsApp (Integrado del sitio actual) --- */
.whatsapp-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    background-color: #25D366; /* Color oficial de WhatsApp */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.whatsapp-button i {
    color: white;
    font-size: 36px;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
/* --- Nuevos Estilos para Video de Fondo --- */
.hero-section {
    position: relative; /* Necesario para posicionar elementos hijos de forma absoluta */
    overflow: hidden;   /* Oculta cualquier parte del video que se salga del contenedor */
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Detrás de todo el contenido */
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que el video cubra todo el espacio sin deformarse */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Capa oscura para mejorar legibilidad del texto */
    z-index: 2;
}

.hero-text {
    position: relative; /* Asegura que el texto esté sobre el video y el overlay */
    z-index: 3;
}
/* --- Nuevos Estilos para Contenido del Hero --- */

/* Contenedor principal que usa Flexbox para alinear logo y texto */
.hero-content-wrapper {
    display: flex;
    align-items: center;      /* Centra los elementos verticalmente */
    justify-content: center;  /* Centra los elementos horizontalmente */
    gap: 2rem;                /* Espacio entre el logo y el texto */
}

/* Estilo para el logo dentro del Hero */
.hero-logo {
    width: 200px; /* Tamaño del logo en el hero */
    height: auto;
}

/* Contenedor para los títulos, para alinearlos a la izquierda */
.hero-title-wrapper {
    text-align: center;
}

/* Estilos para el Título Principal (H1) */
.hero-title-wrapper h1 {
    font-size: 3.5rem; /* Tamaño de la fuente */
    font-weight: 700;
    letter-spacing: 1.5px; /* Añade espacio entre letras para un look más refinado */
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

/* Estilos para el Subtítulo (p) */
.hero-title-wrapper p {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9; /* Lo hacemos ligeramente más sutil que el título */
}

@media (max-width: 768px) {
    .hero-content-wrapper {
        flex-direction: column; /* Apila el logo y el texto verticalmente */
        gap: 1.5rem;
    }

    .hero-title-wrapper {
        text-align: center; /* Centra el texto cuando está apilado */
    }
    .hero-logo {
        width: 120px;
    } /* <--- ESTA LLAVE FALTABA */

    .hero-title-wrapper h1 {
        font-size: 2.5rem; /* Reduce el tamaño de la fuente en móviles */
    }

    .hero-title-wrapper p {
        font-size: 1rem;
    }
}
/* --- Estilos para el Carrusel (Swiper) --- */
#galeria .swiper {
    width: 100%;
    height: 800px; /* Puedes ajustar esta altura si lo deseas */
    border-radius: 0.5rem;
}

/* Seleccionamos específicamente los slides que tienen un estilo de background-image */
#galeria .swiper-slide {
    /* Estas 3 propiedades aseguran que la imagen de fondo se vea perfecta */
    background-size: contain;     /* <--- ESTE ES EL CAMBIO CLAVE */
    background-position: center;  /* Centra la imagen */
    background-repeat: no-repeat; /* Evita que la imagen se repita */
}