/* ==========================================================================
   Página galería
   ========================================================================== */

.rn-camaras-page {
    padding: 32px 0 64px;
    background: #f4f4f5;
    min-height: 60vh;
    overflow: hidden;
}

.rn-camaras-page__header {
    text-align: center;
    padding: 0 16px 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.rn-camaras-page__title {
    font-size: 36px;
    font-weight: 700;
    margin: 30px 0 16px;
    color: #111;
}

.rn-camaras-page__empty {
    text-align: center;
    color: #666;
    padding: 40px 16px;
}

/* ==========================================================================
   Pills de navegación
   ========================================================================== */

.rn-cam-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 16px 28px;
}

.rn-cam-pill {
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.rn-cam-pill:hover {
    background: #de0303;
    color: #fff;
}

.rn-cam-pill--active {
    background: #de0303;
    color: #fff;
}

/* ==========================================================================
   Swiper coverflow
   ========================================================================== */

.rn-camaras-swiper {
    width: 100%;
    padding: 20px 0 !important;
    overflow: visible !important;
    clip-path: inset(-100% -100vw -100% -100vw);
}

/* ==========================================================================
   Slide individual
   ========================================================================== */

.rn-cam-slide {
    width: 640px !important;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

@media (max-width: 700px) {
    .rn-cam-slide {
        width: 80vw !important;
    }
}

.rn-cam-slide:not(.swiper-slide-active) {
    filter: brightness(0.55);
    cursor: pointer;
}

.rn-cam-slide:not(.swiper-slide-active) .rn-cam-slide__overlay,
.rn-cam-slide:not(.swiper-slide-active) .rn-cam-slide__fullscreen-btn,
.rn-cam-slide:not(.swiper-slide-active) .rn-cam-slide__exit-fullscreen-btn {
    pointer-events: none;
}

.rn-cam-slide__inner {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right {
    display: none;
}

/* Videos */
.rn-cam-slide__clip,
.rn-cam-slide__stream {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rn-cam-slide__stream {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s;
}

.rn-cam-slide--streaming .rn-cam-slide__stream {
    opacity: 1;
}

/* Overlay centrado — play siempre visible, pause solo al hover cuando streaming */
.rn-cam-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
}

/* Botones play / pause compartidos */
.rn-cam-slide__play-btn,
.rn-cam-slide__close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.2s;
}

.rn-cam-slide__play-btn:hover,
.rn-cam-slide__close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.08);
}

.rn-cam-slide__play-btn svg,
.rn-cam-slide__close-btn svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* Estado normal: play visible, pause oculto */
.rn-cam-slide__close-btn {
    display: none;
}

/* Estado streaming: overlay invisible por defecto, aparece solo en hover */
.rn-cam-slide--streaming .rn-cam-slide__overlay {
    opacity: 0;
    pointer-events: none;
}

.rn-cam-slide--streaming:hover .rn-cam-slide__overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Streaming: ocultar play, mostrar pause */
.rn-cam-slide--streaming .rn-cam-slide__play-btn {
    display: none;
}

.rn-cam-slide--streaming .rn-cam-slide__close-btn {
    display: flex;
}

/* ==========================================================================
   Mobile / touch: controles siempre visibles en esquinas
   ========================================================================== */

@media (hover: none) {
    /* Overlay siempre visible, alineado a esquina inferior izquierda */
    .rn-cam-slide__overlay {
        justify-content: flex-start;
        align-items: flex-end;
        padding: 12px;
    }

    /* Streaming: overlay siempre visible (no requiere hover) */
    .rn-cam-slide--streaming .rn-cam-slide__overlay {
        opacity: 1;
        pointer-events: auto;
    }

    /* Botones más chicos para touch (mínimo táctil 44px) */
    .rn-cam-slide__play-btn,
    .rn-cam-slide__close-btn {
        width: 44px;
        height: 44px;
    }

    .rn-cam-slide__play-btn svg,
    .rn-cam-slide__close-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Fullscreen siempre visible en mobile */
    .swiper-slide-active .rn-cam-slide__fullscreen-btn {
        opacity: 1;
    }
}

/* ==========================================================================
   Fullscreen
   ========================================================================== */

/* Llenar la pantalla sin importar el aspect-ratio del monitor */
.rn-cam-slide__inner:fullscreen,
.rn-cam-slide__inner:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: unset;
    border-radius: 0;
}

/* Videos: contain para ver el frame completo sin recorte */
.rn-cam-slide__inner:fullscreen .rn-cam-slide__clip,
.rn-cam-slide__inner:fullscreen .rn-cam-slide__stream,
.rn-cam-slide__inner:-webkit-full-screen .rn-cam-slide__clip,
.rn-cam-slide__inner:-webkit-full-screen .rn-cam-slide__stream {
    object-fit: contain;
}

/* Overlay: mostrar en hover dentro de fullscreen */
.rn-cam-slide__inner:fullscreen:hover .rn-cam-slide__overlay,
.rn-cam-slide__inner:-webkit-full-screen:hover .rn-cam-slide__overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Botón salir fullscreen: solo visible en fullscreen, esquina superior derecha */
.rn-cam-slide__exit-fullscreen-btn {
    display: none;
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.rn-cam-slide__exit-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.rn-cam-slide__inner:fullscreen .rn-cam-slide__exit-fullscreen-btn,
.rn-cam-slide__inner:-webkit-full-screen .rn-cam-slide__exit-fullscreen-btn {
    display: flex;
}

/* Botón fullscreen — esquina inferior derecha, aparece en hover */
.rn-cam-slide__fullscreen-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.rn-cam-slide__fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.swiper-slide-active:hover .rn-cam-slide__fullscreen-btn {
    opacity: 1;
}

.rn-cam-slide__fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
   Navegación (flechas)
   ========================================================================== */

.rn-cam-nav-wrap {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.rn-cam-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #111;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.rn-cam-nav:hover {
    background: #de0303;
    color: #fff;
}

.rn-cam-nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.rn-cam-nav svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

