/**
 * Gallery Styles
 *
 * @package VfxProdutos
 */

.vfx-gallery-wrapper {
    margin: 20px 0;
}

.vfx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Tablet - 2 colunas */
@media (max-width: 1024px) {
    .vfx-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile - 1 coluna */
@media (max-width: 640px) {
    .vfx-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.vfx-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vfx-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.vfx-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.vfx-gallery-item:hover::after {
    opacity: 1;
}

/* Ícone de lupa removido conforme solicitado */

.vfx-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Modal */
.vfx-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    z-index: 2147483647; /* Máximo valor seguro de 32-bit integer */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(8px);
}

.vfx-gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.vfx-gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vfx-gallery-modal-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vfx-gallery-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: vfx-zoom-in 0.3s ease;
}

@keyframes vfx-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vfx-gallery-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.vfx-gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.vfx-gallery-modal-prev,
.vfx-gallery-modal-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 42px;
    line-height: 0; /* Remove altura de linha extra */
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100000;
    user-select: none;
    backdrop-filter: blur(4px);
    padding: 0; /* Garante sem padding */
    padding-bottom: 6px; /* Ajuste fino visual para subir a seta */
}

.vfx-gallery-modal-prev {
    left: 20px; /* Posicionado na lateral esquerda da tela */
}

.vfx-gallery-modal-next {
    right: 20px; /* Posicionado na lateral direita da tela */
}

.vfx-gallery-modal-prev:hover,
.vfx-gallery-modal-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.vfx-gallery-modal-prev:active,
.vfx-gallery-modal-next:active {
    transform: translateY(-50%) scale(0.95);
}

.vfx-gallery-modal-counter {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .vfx-gallery-modal-prev,
    .vfx-gallery-modal-next {
        width: 50px;
        height: 50px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.3); /* Mais contraste no mobile */
    }
    
    .vfx-gallery-modal-prev {
        left: 10px;
    }
    
    .vfx-gallery-modal-next {
        right: 10px;
    }
    
    .vfx-gallery-modal-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.3);
    }
}

