/* ==========================================================================
   Estilos Aislados para Modal y Carrusel (Bootstrap 5 adaptado)
   ========================================================================== */

.bootstrap-scope .modal {
    position: fixed; top: 0; left: 0; z-index: 1055; display: none;
    width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro detrás del modal */
}
.bootstrap-scope .modal.fade { transition: opacity 0.15s linear; opacity: 0; }
.bootstrap-scope .modal.show { opacity: 1; display: block; }
.bootstrap-scope .modal-dialog {
    position: relative; width: auto; margin: 0.5rem; pointer-events: none;
    transition: transform 0.3s ease-out; transform: translate(0, -50px);
}
.bootstrap-scope .modal.show .modal-dialog { transform: none; }
.bootstrap-scope .modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 1rem); }

@media (min-width: 576px) {
    .bootstrap-scope .modal-dialog { max-width: 500px; margin: 1.75rem auto; }
    .bootstrap-scope .modal-dialog-centered { min-height: calc(100% - 3.5rem); }
}
@media (min-width: 992px) { .bootstrap-scope .modal-lg { max-width: 800px; } }

.bootstrap-scope .modal-content {
    position: relative; display: flex; flex-direction: column; width: 100%;
    pointer-events: auto; background-color: #fff; background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 0.5rem; outline: 0; box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}
.bootstrap-scope .modal-header {
    display: flex; flex-shrink: 0; align-items: center; justify-content: space-between;
    padding: 1rem 1rem; border-bottom: 1px solid #dee2e6; border-top-left-radius: calc(0.5rem - 1px); border-top-right-radius: calc(0.5rem - 1px);
}
.bootstrap-scope .modal-title { margin-bottom: 0; line-height: 1.5; font-size: 1.25rem; font-weight: 500; font-family: sans-serif; color: #212529; }
.bootstrap-scope .modal-body { position: relative; flex: 1 1 auto; padding: 1rem; }

/* --- Botón Cerrar (X) --- */
.bootstrap-scope .btn-close {
    box-sizing: content-box; width: 1em; height: 1em; padding: 0.25em 0.25em; color: #000;
    background: transparent url("/img/xmark-solid.svg");
    border: 0; border-radius: 0.25rem; opacity: 0.5; cursor: pointer;
    background-repeat: no-repeat;
}
.bootstrap-scope .btn-close:hover { opacity: 0.75; }

/* --- Carrusel --- */
.bootstrap-scope .carousel { position: relative; }
.bootstrap-scope .carousel-inner { position: relative; width: 100%; overflow: hidden; }
.bootstrap-scope .carousel-item { position: relative; display: none; float: left; width: 100%; margin-right: -100%; backface-visibility: hidden; transition: transform 0.6s ease-in-out; }
.bootstrap-scope .carousel-item.active { display: block; }
.bootstrap-scope .w-100 { width: 100% !important; }
.bootstrap-scope .d-block { display: block !important; }

/* Controles del Carrusel (Flechas) */
.bootstrap-scope .carousel-control-prev, .bootstrap-scope .carousel-control-next {
    position: absolute; top: 0; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
    width: 15%; padding: 0; color: #fff; text-align: center; background: none; border: 0; opacity: 0.5; transition: opacity 0.15s ease; cursor: pointer;
}
.bootstrap-scope .carousel-control-prev:hover, .bootstrap-scope .carousel-control-next:hover { opacity: 0.9; }
.bootstrap-scope .carousel-control-prev { left: 0; }
.bootstrap-scope .carousel-control-next { right: 0; }
.bootstrap-scope .carousel-control-prev-icon, .bootstrap-scope .carousel-control-next-icon { display: inline-block; width: 2rem; height: 2rem; background-repeat: no-repeat; background-position: 50%; background-size: 100% 100%;background-color: transparent; }
.bootstrap-scope .carousel-control-prev-icon { background-image: url("/img/chevron-left-solid-full.svg"); }
.bootstrap-scope .carousel-control-next-icon { background-image: url("/img/chevron-right-solid.svg"); }

/* Altura e imagen del carrusel */
.bootstrap-scope .carousel-item img {
    height: 450px;
    object-fit: cover;
    background-color: #000;
}

/* Spinner de carga */
.bootstrap-scope .spinner-border { display: inline-block; width: 2rem; height: 2rem; vertical-align: -.125em; border: .25em solid currentColor; border-right-color: transparent; border-radius: 50%; animation: .75s linear infinite spinner-border; color: #0d6efd; }
@keyframes spinner-border { to { transform: rotate(360deg); } }
.bootstrap-scope .text-center { text-align: center !important; }
.bootstrap-scope .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
