/* ===== GALERIA DE IMAGENS - ESTILOS EXCLUSIVOS ===== */

/* Seção principal da galeria */
.gallery-section {
    padding: 100px 60px;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* Container da galeria */
.gallery-container {
    max-width: 1200px;
    width: 100%;
}

/* Grid principal da galeria */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 600px;
}

/* Itens individuais da galeria */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    background: var(--darker-bg);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* Imagens da galeria */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out, transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Efeito de fade para troca de imagens */
.gallery-item img.gallery-fade-out {
    opacity: 0;
}

.gallery-item img.gallery-fade-in {
    opacity: 1;
}

/* Botão "Veja Mais" */
.gallery-view-more-btn {
    background: var(--gradient-primary);
    color: var(--darker-bg);
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 600;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
    background: var(--gradient-accent);
    color: var(--dark-bg);
}

.gallery-view-more-btn:active {
    transform: translateY(0);
}

/* ===== MODAL DA GALERIA ===== */

/* Overlay do modal */
.gallery-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

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

/* Conteúdo do modal */
.gallery-modal-content {
    background: var(--dark-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.gallery-modal-overlay.gallery-modal-active .gallery-modal-content {
    transform: scale(1);
}

/* Botão de fechar do modal */
.gallery-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gallery-modal-close-btn:hover {
    background: var(--accent-color);
    color: var(--darker-bg);
    transform: rotate(90deg);
}

/* Grid do modal */
.gallery-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 colunas */
    gap: 20px;
    margin-top: 20px;
}

/* Itens do modal */
.gallery-modal-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.gallery-modal-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.gallery-modal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-modal-item:hover img {
    transform: scale(1.1);
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets */
@media (max-width: 768px) {
    .gallery-section {
        padding: 100px 15px;
        gap: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 15px;
        height: 400px;
    }
    
    .gallery-view-more-btn {
        font-size: 16px;
        padding: 14px 30px;
    }
    
    .gallery-modal-content {
        padding: 30px;
        margin: 20px;
    }
    
    .gallery-modal-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablets e Celulares: 2 colunas */
        gap: 15px;
    }
    
    .gallery-modal-close-btn {
        top: 15px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .gallery-section {
        padding: 90px 10px;
        gap: 25px;
    }
    
    .gallery-grid {
        gap: 10px;
        height: 350px;
    }
    
    .gallery-view-more-btn {
        font-size: 14px;
        padding: 12px 25px;
    }
    
    .gallery-modal-content {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }
    
    .gallery-modal-grid {
        grid-template-columns: repeat(2, 1fr); /* Celulares: 2 colunas */
        gap: 10px;
    }
    
    .gallery-modal-close-btn {
        top: 10px;
        right: 15px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
}

/* Animações personalizadas */
@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes galleryFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.gallery-item img.gallery-animate-in {
    animation: galleryFadeIn 0.8s ease-in-out;
}

.gallery-item img.gallery-animate-out {
    animation: galleryFadeOut 0.8s ease-in-out;
}

/* Scrollbar personalizada para o modal */
.gallery-modal-content::-webkit-scrollbar {
    width: 8px;
}

.gallery-modal-content::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: 4px;
}

.gallery-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.gallery-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

