/* ==========================================================================
   ESTILOS PARA EL MODAL / VENTANA EMERGENTE
   ========================================================================== */

/* --- Contenedor Principal --- */
.modal {
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    animation: modal-fade 1.2s 1.5s forwards; 
    opacity: 0; 
    visibility: hidden;
}

/* --- Caja de Contenido --- */
.contenido {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    width: 95%;
    max-width: 1050px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

/* --- Botón de Cierre (La X) --- */
#btn-cerrar {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #e74c3c;
    color: #fff !important;
    width: 40px; 
    height: 40px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 7000;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
#btn-cerrar:hover { transform: scale(1.1); }

/* --- Estructura del Carrusel --- */
.carrusel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 200%; /* 2 imágenes = 200% */
}

.slide {
    width: 50%; /* Cada imagen toma la mitad del contenedor slides */
    padding: 10px 45px; /* Padding para que las flechas no tapen contenido */
    box-sizing: border-box; 
    background: #fff;
}

/* --- Flechas Visibles --- */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white !important;
    width: 45px;
    height: 45px;
    line-height: 45px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 22px;
    z-index: 6000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    user-select: none; /* Evita que se seleccione el texto al hacer muchos clics */
}

.arrow:hover { 
    background: #0056b3; 
    transform: translateY(-50%) scale(1.1); 
}

.next { right: 10px; }
.prev { left: 10px; }

/* --- Imagen --- */
.imgtam {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

/* --- Botón Inferior --- */
.btn-monitoreo {
    display: inline-block;
    margin-top: 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white !important;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
    transition: 0.3s;
}
.btn-monitoreo:hover { transform: translateY(-2px); }

@keyframes modal-fade { 100% { visibility: visible; opacity: 1; } }

@media (max-width: 768px) {
    .slide { padding: 10px 35px; }
    .arrow { width: 35px; height: 35px; line-height: 35px; font-size: 18px; }
    #btn-cerrar { top: -10px; right: -10px; }
}