/* --- NUEVO CSS PARA CARRUSEL.CSS (Definitivo y Consolidado) --- */

/* 1. Contenedor Principal del Carrusel */
.carrousel-moderno {
    position: relative;
    width: 100%;
    overflow: hidden;

    /* 1. MÁRGEN PARA BAJAR EL CARRUSEL */
    margin-top: 60px;

    /* 2. ALTURA ORIGINAL MENOS EL ESPACIO DEL NAVBAR */
    height: calc(85vh - 60px);
}

/* 2. Contenedor de Slides */
.slides-wrapper {
    position: relative;
    height: 100%;
}

/* 3. Estilos de la Diapositiva (Fade Logic) */
.slide-item {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide-item.active {
    opacity: 1;
}

/* 4. Estilos de la Imagen */
.slide-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

/* 5. Estilos del Texto (Caption - Diseño limpio) */
.caption-text {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 10px 20px;
    background-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 800px;
}

/* Título Principal (H1) */
.carrusel-titulo-principal {
    font-size: 4em !important;
    font-weight: 800 !important;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 3px solid white;
    display: inline-block;
}

/* Subtítulo (H3) */
.caption-text h3 {
    font-size: 1.5em;
    font-weight: 300;
    margin-top: 5px;
}

/* 6. Estilos de los Puntos (Dots) */
.dots-container-moderno {
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
    z-index: 10;
}

.dot-indicator {
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
    cursor: pointer;
}

.dot-indicator.active {
    background-color: #717171;
}

/* --- Responsive para Carrusel --- */
@media (max-width: 600px) {
    .carrousel-moderno {
        height: 350px;
    }

    .carrusel-titulo-principal {
        font-size: 2em !important;
        border-bottom-width: 2px;
    }

    .caption-text h3 {
        font-size: 1.2em;
    }
}


/* ****************************************************** */
/* --- ESTILOS PARA LA SECCIÓN DE VISTAS (COLUMNAS) --- */
/* ****************************************************** */
.views-section {
    padding: 40px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 40px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.views-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.view-item {
    flex-grow: 1;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.views-container .view-item:first-child {
    border-right: 1px solid #ddd;
}

.view-item:hover {
    background-color: #f0f0f0;
}

.view-item .icon {
    display: block;
    font-size: 2.5em;
    margin-bottom: 5px;
}

/* --- Responsive para Vistas --- */
@media (max-width: 600px) {
    .views-container {
        flex-direction: column;
        /* Apila las columnas en móvil */
    }

    .views-container .view-item:first-child {
        border-right: none;
        border-bottom: 1px solid #ddd;
        /* Añade línea horizontal */
    }
}


/* ****************************************************** */
/* --- ESTILOS PARA LA VENTANA MODAL Y IFRAMES --- */
/* ****************************************************** */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* ESTILO para corregir ERROR W3C: Define el tamaño del iframe (sin width/height en HTML) */

.modal-content iframe {
    /* Esto es lo que define el tamaño ahora, sin el error en HTML */
    width: 100%;
    height: 450px;
}

/* ****************************************************** */
/* --- CLASES DE ACCESIBILIDAD Y OTRAS PEQUEÑAS REGLAS --- */
/* ****************************************************** */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* --- ESTILOS PARA EL PRE-LOADER --- */
#preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* Fondo blanco */
    z-index: 9999;
    /* Asegura que esté por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    /* Animación de desvanecimiento */
}

.loader-content {
    text-align: center;
    color: #333;
    font-family: Arial, sans-serif;
}

/* Diseño del Spinner (Círculo de Carga) */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    /* Gris claro */
    border-top: 5px solid #007bff;
    /* Azul (puedes cambiar este color) */
    border-radius: 50%;
    margin: 0 auto 15px auto;
    animation: spin 1s linear infinite;
}

/* Keyframes para la animación de giro */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Clase para ocultar (añadida por JS) */
.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden;
}