/* ===================================
   FULLSCREEN VIEWER - INMOBILIARIA
   Colores: Negro y Verde Transparente
   =================================== */

/* Botón de pantalla completa en las tarjetas */
.fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(15, 38, 29, 0.9);
    border: 2px solid rgba(202, 165, 96, 0.8);
    border-radius: 8px;
    color: #CAA560;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.fullscreen-btn:hover {
    background: rgba(26, 58, 46, 0.95);
    border-color: #CAA560;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(202, 165, 96, 0.5);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-btn i {
    pointer-events: none;
}

/* Modal de pantalla completa */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenedor del visor */
.fullscreen-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenedor de medios en pantalla completa (imágenes y videos) */
.fullscreen-media-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

#fullscreenImage img,
#fullscreenImage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Animación de zoom para imágenes y videos */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botón cerrar */
.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(15, 38, 29, 0.9);
    border: 2px solid rgba(202, 165, 96, 0.8);
    border-radius: 50%;
    color: #CAA560;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fullscreen-close:hover {
    background: rgba(26, 58, 46, 0.95);
    border-color: #CAA560;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(202, 165, 96, 0.8);
}

/* Botones de navegación */
.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(15, 38, 29, 0.85);
    border: 2px solid rgba(202, 165, 96, 0.6);
    border-radius: 50%;
    color: #CAA560;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fullscreen-nav:hover {
    background: rgba(26, 58, 46, 0.95);
    border-color: #CAA560;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 25px rgba(202, 165, 96, 0.7);
}

.fullscreen-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.fullscreen-prev {
    left: 30px;
}

.fullscreen-next {
    right: 30px;
}

/* Contador de imágenes */
.fullscreen-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 38, 29, 0.9);
    color: #CAA560;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 10001;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(202, 165, 96, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Efecto de carga */
.fullscreen-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(202, 165, 96, 0.3);
    border-top-color: #CAA560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

/* Tablets */
@media (max-width: 968px) {
    .fullscreen-close {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        top: 15px;
        right: 15px;
    }
    
    .fullscreen-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .fullscreen-prev {
        left: 20px;
    }
    
    .fullscreen-next {
        right: 20px;
    }
    
    .fullscreen-counter {
        bottom: 25px;
        padding: 8px 20px;
        font-size: 1rem;
    }
}

/* Móviles */
@media (max-width: 640px) {
    .fullscreen-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 12px;
        right: 12px;
    }
    
    .fullscreen-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }
    
    .fullscreen-nav {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .fullscreen-prev {
        left: 10px;
    }
    
    .fullscreen-next {
        right: 10px;
    }
    
    .fullscreen-counter {
        bottom: 20px;
        padding: 6px 16px;
        font-size: 0.9rem;
    }
    
    .fullscreen-content {
        width: 95%;
        height: 95%;
    }
    
    #fullscreenImage img,
    #fullscreenImage video {
        max-width: 95vw;
        max-height: 80vh;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .fullscreen-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .fullscreen-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .fullscreen-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .fullscreen-counter {
        padding: 5px 12px;
        font-size: 0.85rem;
        bottom: 15px;
    }
}

/* Prevenir scroll en body cuando el modal está activo */
body.fullscreen-active {
    overflow: hidden;
}

/* Soporte para orientación horizontal en móviles */
@media (max-width: 968px) and (orientation: landscape) {
    #fullscreenImage img,
    #fullscreenImage video {
        max-height: 85vh;
    }
    
    .fullscreen-counter {
        bottom: 15px;
    }
    
    .fullscreen-nav {
        width: 45px;
        height: 45px;
    }
}