.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 2fr)); /* Colunas dinâmicas ajustáveis */
    gap: 20px; /* Espaçamento entre os itens */
    padding: 10px;
    max-width: 100%; /* Limite para o container da galeria */
    margin: 0 auto;
    grid-auto-rows: 420px; /* Define uma altura base */
    justify-content: center;

}

.image-item {
    position: relative; /* Necessário para o ajuste dos elementos sobrepostos */
    overflow: hidden; /* Garante que a sombra seja apenas interna */
    border-radius: 8px;
    transition: transform 0.3s ease;
    
}

.image-item::before {
    content: "";
    position: absolute;
    bottom: 0; /* Posiciona na base da imagem */
    left: 0;
    width: 100%;
    height: 20%; /* Define a altura da sombra para cobrir apenas a parte inferior */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); /* Cria uma sombra gradiente na base da imagem */
    pointer-events: none; /* Não bloqueia a interação com os botões */
    border-radius: 0 0 8px 8px; /* Mantém a consistência do border-radius na base */
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta a imagem para cobrir o espaço do container */
    display: block;
    transition: transform 0.3s ease;
    
}

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

/* Rodapé da imagem para os botões de ação */
.image-footer {
    position: absolute;
    bottom: 10px; /* Levantado um pouco para não esconder a sombra */
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2; /* Mantém o rodapé acima da sombra */
    color: white;
    
}
.image-info p {
    color: white;
    display: none;
}


.like-btn,
.clone-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s, transform 0.3s;
}

.like-btn:hover,
.clone-btn:hover {
    color: #ff4757; /* Cor de destaque ao passar o mouse */
    transform: scale(1.1); /* Leve aumento ao passar o mouse */
}

.clone-btn {
    font-size: 14px; /* Tamanho menor para o botão de clonar */
    display: flex;
    align-items: center;
}

.clone-btn i {
    margin-right: 5px; /* Espaço entre o ícone e o texto */
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr; /* Força uma coluna para maior controle em tablets e pequenos desktops */
        gap: 15px;
        
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 2fr)); /* Colunas dinâmicas ajustáveis */
        gap: 10px; /* Menor espaçamento para telas bem pequenas */
        grid-auto-rows: 300px; /* Define uma altura base */
    }
    .image-info p {
        display: none;
    }
}


/* Estilo Geral do Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    overflow: auto;
    transition: opacity 0.3s ease;
}

/* Estilo do Conteúdo do Modal */
.modal-content {
    display: flex;
    width: 80%;
    max-width: 800px;
    margin: auto;
    background-color: #2c2f33;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Container da Imagem no Modal */
.modal-image-container {
    flex: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Container das Informações no Modal */
.modal-info-container {
    flex: 2;
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
    min-height: 300px;
    position: relative;
    height: 300px;
}

.modal-info-container h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #fff;
    padding-bottom: 5px;
}

.info-item {
    margin-bottom: 10px;
    font-size: 16px;
}

/* Ações e Botões no Modal */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.like-btn,
#like-btn-mobile {
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    background: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.like-btn:hover,
#like-btn-mobile:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
/*background: linear-gradient(to right, #48c6ef, #6f86d6); */

.clone-btn,
#clone-btn-mobile {

    color: #fff;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clone-btn:hover,
#clone-btn-mobile:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Botão de Fechar e Setas de Navegação */
.close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #f1f1f1;
    font-size: 30px;
    cursor: pointer;
    z-index: 2;
}

.close:hover {
    color: #bbb;
}

.prev-arrow, .next-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

.prev-arrow:hover, .next-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Ajustes para Responsividade */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        width: 90%;
    }

    .modal-image-container {
        padding: 10px;
    }

    .modal-info-container {
        padding: 15px;
        font-size: 14px;
    }

    /* Exibir apenas botões da versão mobile */
    .modal-actions-desktop {
        display: none;
    }

    .modal-actions-mobile {
        display: flex;
        gap: 10px;
        justify-content: center;
        padding-bottom: 10px;
    }
}

@media (min-width: 769px) {
    /* Exibir apenas botões da versão desktop */
    .modal-actions-mobile {
        display: none;
    }
}

