/* Estilos Globales */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#mapa {
    width: 100vw;
    height: 100vh;
    background-color: #222;
}

/* El Fondo Oscuro del Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Animación del fondo */
}

.modal-overlay.activo {
    opacity: 1;
    pointer-events: auto;
}

/* La Ventana del Modal */
.modal-contenido {
    width: 85vw;
    max-width: 1200px;
    height: 75vh;
    background: white;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    /* Animación de entrada de la ventana (sube y se agranda un poquito) */
    transform: translateY(40px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.activo .modal-contenido {
    transform: translateY(0) scale(1);
}

/* Diseño a dos columnas (Flexbox) */
.modal-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Columna de Fotos */
.modal-media {
    width: 65%;
    background: #000;
    position: relative;
}

/* Columna de Texto */
.modal-texto {
    width: 35%;
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
    background: #fff;
}

.modal-texto h2 {
    margin-top: 0;
    color: #222;
    font-size: 28px;
}

.modal-texto p {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

/* Botón de Cerrar Flotante */
.btn-cerrar-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f1f1;
    color: #333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.btn-cerrar-modal:hover {
    background: #ff4d4d;
    color: white;
}

/* Ajustes del Swiper */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.swiper,
.swiper-slide,
.swiper-button-next,
.swiper-button-prev {
    user-select: none;
    -webkit-user-select: none;
}

.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(3, 175, 243, 0.9);
    transform: scale(1.1);
}
#logo-empresa {
    position: absolute;
    top: 20px;
    left:5px;
    z-index: 1000; 
    
    background: rgba(0, 0, 0, 0); 
    padding: 5px 5px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0); 
}

#logo-empresa img {
    height: 60px; 
    width: auto;
    display: block;
}
.modal-texto p {
    white-space: pre-wrap;
}

@media (min-width: 1600px) {
    .modal-contenido {
        max-width: 1500px; 
        height: 80vh;
    }
    .modal-texto {
        padding: 60px; 
    }
    .modal-texto h2 {
        font-size: 36px; 
    }
    .modal-texto p {
        font-size: 20px;
    }
    #logo-empresa img {
        height: 70px; 
    }
}

@media (max-width: 1024px) {
    .modal-contenido {
        width: 90vw;
    }
    .modal-texto {
        padding: 30px;
    }
    .modal-texto h2 {
        font-size: 24px;
    }
    #logo-empresa img {
        height: 55px; 
    }
}

@media (max-width: 768px) {
    .modal-contenido {
        width: 95vw;
        height: 90vh;
    }
    
    .modal-layout {
        flex-direction: column;
    }
    
    .modal-media {
        width: 100%;
        height: 45%;
    }
    
    .modal-texto {
        width: 100%;
        height: 55%;
        padding: 20px;
    }
    
    .modal-texto h2 {
        font-size: 22px;
    }
    
    .modal-texto p {
        font-size: 15px;
    }

    #logo-empresa img {
        height: 40px; 
    }

    .btn-cerrar-modal {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
        z-index: 3000; 
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 14px !important;
    }
}

@media (max-height: 850px) {
    .modal-contenido {
        height: 88vh; 
    }
    .modal-texto {
        padding: 25px 30px; 
    }
    .modal-texto h2 {
        font-size: 24px; 
        margin-bottom: 10px;
    }
    .modal-texto p {
        font-size: 15px; 
    }
    #logo-empresa {
        top: 15px;
        left: 15px;
    }
    #logo-empresa img {
        height: 55px; 
    }
}

.modal-texto::-webkit-scrollbar {
    width: 8px; 
}

.modal-texto::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}

.modal-texto::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

.modal-texto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}