/* ============================================================
   VISITA VIRTUAL — ESTILO CLÍNICO
   ============================================================ */

.visita-virtual,
.visita-virtual-sala {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: clamp(5rem, 8vw, 7rem);
}

/* CABECERA */
.vv-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.vv-header p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1.5rem;
}

.vv-back {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: #0056a3;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.vv-back:hover {
    background: #003f75;
}

/* ============================================================
   SLIDER (RESTAURADO)
   ============================================================ */

.vv-slider {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 2rem;
}

.vv-arrow-left,
.vv-arrow-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.vv-arrow {
    background: rgba(0, 86, 163, 0.8);
    color: #fff;
    border: none;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.4rem;
}

.vv-arrow:hover {
    background: #003f75;
}

.vv-slider-window {
    overflow: hidden;
    width: 100%;
}

.vv-track {
    display: flex;
    transition: transform 0.4s ease;
}

.vv-slide {
    min-width: 300px;
    max-width: 300px;
    background: #fff;
    border: 1px solid #eee;
    padding: 1rem;
    text-align: center;
    margin-right: 2rem;
    border-radius: 4px;
}

.vv-slide img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.vv-btn {
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;
    background: #0056a3;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.vv-btn:hover {
    background: #003f75;
}

/* ============================================================
   FOTO + HOTSPOTS
   ============================================================ */

.foto-sala {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.foto-sala img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

@keyframes hotspotPulse {
    0% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

.hotspot {
    position: absolute;
    width: 32px;
    height: 32px;
    background: rgba(0, 86, 163, 0.85);
    border-radius: 50%;
    cursor: pointer;
    animation: hotspotPulse 2.2s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 14px rgba(255,255,255,0.45);
}

.hotspot-icon {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
}

/* ============================================================
   MODAL — CORREGIDO Y CENTRADO EN TODOS LOS DISPOSITIVOS
   ============================================================ */

.modal-info {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;   /* ⭐ CENTRADO HORIZONTAL */
    align-items: center;       /* ⭐ CENTRADO VERTICAL */
    z-index: 9999;
    padding: 0;                /* ⭐ SIN EMPUJES */
}

.modal-content {
    background: #fff;
    padding: 1rem;
    max-width: 700px;
    width: 90%;
    border-radius: 4px;
    transform: none;           /* ⭐ SIN DESPLAZAMIENTO */
    transition: transform 0.25s ease;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.modal-content video {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.cerrar {
    float: right;
    font-size: 2rem;
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE — MÓVIL (RESTAURADO Y CENTRADO)
   ============================================================ */

@media (max-width: 768px) {

    .visita-virtual,
    .visita-virtual-sala {
        padding: 1.5rem;
        padding-top: clamp(6rem, 10vw, 8rem);
    }

    .foto-sala {
        margin-top: 2rem;
    }

    .hotspot {
        width: 40px;
        height: 40px;
        box-shadow: 0 0 20px rgba(255,255,255,0.55);
        top: var(--top-mobile) !important;
    }

    .modal-info {
        padding: 0; /* ⭐ CENTRADO REAL EN MÓVIL */
    }

    .modal-content {
        transform: none; /* ⭐ SIN DESCUADRE */
        max-width: 95%;
    }

    /* SLIDER MÓVIL RESTAURADO */
    .vv-slider {
        grid-template-columns: 1fr;
        margin-top: 1.5rem;
    }

    .vv-arrow-left,
    .vv-arrow-right {
        display: none;
    }

    .vv-slider-window {
        overflow: visible;
        width: 100%;
    }

    .vv-track {
        display: block;
        transform: none !important;
        transition: none !important;
    }

    .vv-slide {
        max-width: 100%;
        min-width: 100%;
        margin-right: 0;
        margin-bottom: 2rem;
    }
}