/* Galería inmersiva v424: sin barras visibles, adaptada a teclado, ratón y gestos táctiles. */
.ra-photo-lightbox{overscroll-behavior:contain;overflow:hidden;}
.ra-gallery-dialog{min-height:0;padding:3.25rem 2.75rem 0;}
.ra-gallery-stage{position:relative;min-height:0;overflow:hidden;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;}
.ra-gallery-main-image{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;pointer-events:none;-webkit-user-drag:none;}
.ra-gallery-thumbs{flex:0 0 auto;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;scroll-snap-type:x proximity;touch-action:pan-x;}
.ra-gallery-thumbs::-webkit-scrollbar{display:none;width:0;height:0;}
.ra-gallery-thumbs .gallery-thumb{scroll-snap-align:center;flex:0 0 auto;}
.ra-gallery-thumbs .gallery-thumb img{pointer-events:none;}
.ra-gallery-arrow,.ra-gallery-fullscreen{transition:background-color .18s ease,transform .18s ease;}
.ra-gallery-arrow:hover,.ra-gallery-fullscreen:hover{transform:scale(1.06);}
.ra-gallery-count{font-variant-numeric:tabular-nums;letter-spacing:.08em;}
.ra-photo-lightbox:fullscreen{padding:1.5rem;background:#050505;}
.ra-photo-lightbox:fullscreen .ra-gallery-main-image{max-height:calc(100vh - 190px);}
@media(max-width:640px){
 .ra-photo-lightbox{padding:0!important;}
 .ra-gallery-dialog{width:100%;height:100%;height:100dvh;padding:4.25rem .75rem max(.65rem,env(safe-area-inset-bottom));justify-content:center;gap:.15rem;}
 .ra-gallery-stage{width:100%;flex:1 1 auto;min-height:0;}
 .ra-gallery-main-image{max-width:100%;max-height:100%;border-radius:.35rem;}
 .ra-gallery-caption-live{font-size:.78rem;line-height:1.25rem;margin-top:.35rem;padding:0 2.5rem;max-height:2.5rem;overflow:hidden;}
 .ra-gallery-count{margin-top:.2rem;font-size:.68rem;}
 .ra-gallery-thumbs{width:100%;max-width:none;justify-content:flex-start;padding:.55rem .25rem max(.55rem,env(safe-area-inset-bottom));gap:.45rem;}
 .ra-gallery-thumbs .gallery-thumb{width:3.8rem;height:2.85rem;border-radius:.55rem;}
 .ra-gallery-arrow{width:2.35rem;height:2.35rem;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.13);backdrop-filter:blur(8px);}
 .ra-gallery-arrow:hover{transform:translateY(-50%);}
 #prev{left:.45rem;}#next{right:.45rem;}
 .ra-gallery-fullscreen{top:max(.65rem,env(safe-area-inset-top));right:3.8rem;width:2.5rem;height:2.5rem;}
 #modalClose{top:max(.65rem,env(safe-area-inset-top));right:.7rem;width:2.5rem;height:2.5rem;}
}
@media(prefers-reduced-motion:reduce){.ra-gallery-arrow,.ra-gallery-fullscreen{transition:none;}}

/* v426: el visor de fotos siempre queda por encima del mapa Leaflet y del resto de la ficha. */
#photoModal.ra-photo-lightbox{z-index:10000!important;isolation:isolate;}
#placeMap{position:relative;z-index:0;isolation:isolate;}
#photoModal[aria-modal="true"]{overscroll-behavior:contain;}
