﻿/* Estilos para el modo inmersivo de la galería */

/* Reset para el modo inmersivo */
body.immersive-mode {
    overflow: hidden;
    background-color: #000;
}

    body.immersive-mode .main-content,
    body.immersive-mode .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.immersive-mode header,
    body.immersive-mode footer,
    body.immersive-mode .breadcrumb,
    body.immersive-mode .gallery-meta-container,
    body.immersive-mode .related-galleries,
    body.immersive-mode .patrocinadores-container,
    body.immersive-mode .gallery-description,
    body.immersive-mode .gallery-tags {
        display: none !important;
    }

/* Contenedor inmersivo */
.immersive-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
}

    .immersive-gallery.active {
        display: flex;
        flex-direction: column;
    }

/* Barra superior con controles */
.immersive-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

    .immersive-header:hover {
        opacity: 1;
    }

.gallery-title {
    font-size: 18px;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.immersive-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.immersive-control {
    background: transparent;
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .immersive-control:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .immersive-control.active {
        background: rgba(255, 255, 255, 0.3);
    }

.immersive-close {
    font-size: 22px;
}

.immersive-fullscreen {
    font-size: 18px;
}

/* Barra de progreso para el tiempo */
.immersive-progress-container {
    display: none;
}

/* Indicador de tiempo circular */
.immersive-time-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

    .immersive-time-indicator.active {
        display: flex;
    }

    /* Círculo de progreso SVG */
    .immersive-time-indicator svg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

.immersive-time-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 3;
}

.immersive-time-circle {
    fill: none;
    stroke: #3498db;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* Número contador en el centro */
.immersive-time-count {
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 2;
}

/* Animación sutil de pulso */
@keyframes subtle-pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

.immersive-time-indicator.active {
    animation: subtle-pulse 3s infinite ease-in-out;
}

/* Contenedor principal de la imagen */
.immersive-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.immersive-image {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, opacity 0.5s ease;
}

    .immersive-image.fade {
        opacity: 0;
    }

    .immersive-image.appear {
        opacity: 1;
        transform: scale(1.02);
    }

    .immersive-image.zoomable {
        cursor: zoom-in;
    }

    .immersive-image.zoomed {
        cursor: zoom-out;
        transform: scale(1.5);
    }

/* Navegación */
.immersive-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

    .immersive-nav:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.immersive-prev {
    left: 20px;
}

.immersive-next {
    right: 20px;
}

/* Pie con información y miniaturas */
.immersive-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

    .immersive-footer:hover {
        opacity: 1;
    }

.immersive-caption {
    padding: 10px 0;
    font-size: 16px;
    max-width: 80%;
    margin: 0 auto;
    text-align: center;
}

.immersive-metadata {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.immersive-meta-item {
    display: flex;
    align-items: center;
}

    .immersive-meta-item i {
        margin-right: 5px;
    }

/* Temporizador y barra de progreso */
.immersive-timer {
    display: flex;
    align-items: center;
    position: relative;
    display: none; /* Oculto por defecto */
}

    .immersive-timer.active {
        display: flex;
    }

.time-remaining {
    margin-left: 5px;
    font-weight: bold;
}

/* Animación para mostrar el temporizador */
@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

.immersive-timer.active {
    animation: pulse 1s infinite;
}

/* Miniaturas */
.immersive-thumbs {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

    .immersive-thumbs.hidden {
        opacity: 0;
        transform: translateY(50px);
        pointer-events: none;
    }

    .immersive-thumbs::-webkit-scrollbar {
        height: 6px;
    }

    .immersive-thumbs::-webkit-scrollbar-track {
        background: transparent;
    }

    .immersive-thumbs::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 6px;
    }

.immersive-thumb {
    display: inline-block;
    width: 60px;
    height: 45px;
    margin: 0 5px;
    border: 2px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .immersive-thumb.active {
        border-color: #3498db;
    }

    .immersive-thumb:hover {
        transform: translateY(-3px);
    }

    .immersive-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Botón para entrar en modo inmersivo */
.enter-immersive {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

    .enter-immersive:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: scale(1.1);
    }

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.immersive-gallery.active {
    animation: fadeIn 0.3s ease forwards;
}

/* Estilos para diferentes estados */
.image-transition {
    transition: opacity 0.3s ease;
}

    .image-transition.fade {
        opacity: 0;
    }

/* Estilos mejorados para los botones de compartir */

/* Contenedor para los botones de compartir */
.immersive-share-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

    .immersive-share-container.hidden {
        opacity: 0;
        transform: translateY(50px);
        pointer-events: none;
    }

/* Botones individuales */
.immersive-share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

    .immersive-share-button i {
        font-size: 18px;
    }

/* Estilos para cada red social */
.immersive-share-facebook {
    background-color: #3b5998;
    color: white;
}

.immersive-share-x {
    background-color: #000000;
    color: white;
}

.immersive-share-whatsapp {
    background-color: #25d366;
    color: white;
}

.immersive-share-pinterest {
    background-color: #bd081c;
    color: white;
}

.immersive-share-link {
    background-color: #4285f4;
    color: white;
    position: relative;
}

.immersive-share-download {
    background-color: #4CAF50;
    color: white;
}

.immersive-share-x i.fa-times {
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: bold;
}

    .immersive-share-x i.fa-times:before {
        content: "𝕏";
    }

/* Efectos hover */
.immersive-share-button:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.immersive-share-x:hover {
    background-color: #1a1a1a;
}

.immersive-share-download:hover {
    background-color: #45a049;
}

/* Tooltip para la copia de enlace */
.immersive-link-tooltip {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.immersive-share-link.copied .immersive-link-tooltip {
    opacity: 1;
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    .immersive-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .immersive-prev {
        left: 10px;
    }

    .immersive-next {
        right: 10px;
    }

    .gallery-title {
        font-size: 16px;
        max-width: 50%;
    }

    .immersive-controls {
        gap: 10px;
    }

    .immersive-image {
        max-width: 95%;
        max-height: 75vh;
    }

    .immersive-share-container {
        bottom: 15px;
        right: 15px;
        gap: 8px;
        padding: 8px;
    }

    .immersive-share-button {
        width: 35px;
        height: 35px;
    }

        .immersive-share-button i {
            font-size: 16px;
        }
}
