/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #e8e8e8;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    height: 40px;
    width: auto;
}

/* Configuração da galeria */
.gallery-config {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-config h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #0066cc;
}

.config-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.form-group {
    flex: 1 1 300px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0055aa;
}

/* Estilo do mosaico */
.mosaic-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #fff;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e0e0e0;
    min-height: 400px;
}

/* Estilos para a galeria com máscara */
.masked-gallery-container {
    position: relative;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
    min-height: 800px; /* Altura mínima para garantir espaço suficiente */
}

.banner-container {
    position: relative;
    width: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
}

/* Estilos para a logo central */
.central-logo-container {
    position: absolute;
    top: 50%; /* Centralizado verticalmente */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3; /* Acima de tudo */
    pointer-events: none; /* Permite cliques nas imagens abaixo */
}

.central-logo {
    max-width: 300px;
    height: auto;
    opacity: 0.9; /* Aumentada a opacidade */
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)); /* Efeito de brilho mais forte */
}

.mosaic-masked {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 500px; /* Altura da faixa central aumentada */
    transform: translateY(-50%); /* Centraliza verticalmente */
    mask-image: linear-gradient(to bottom, 
        transparent 0%, 
        black 15%, 
        black 85%, 
        transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, 
        transparent 0%, 
        black 15%, 
        black 85%, 
        transparent 100%);
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center center;
    -webkit-mask-position: center center;
    z-index: 1;
    overflow: hidden; /* Impede que as imagens saiam da máscara */
}

.mosaic-strip {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    width: 100%;
    padding: 10px;
    position: relative;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    /* Removido margin-top para alinhar com a máscara */
}

/* Estilo para mensagem de carregamento */
.loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.mosaic-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 5px;
}

.mosaic-item {
    width: 100%; /* Ocupa toda a largura da coluna */
    height: auto; /* Altura automática baseada no conteúdo */
    min-height: 203px; /* Altura mínima */
    overflow: visible; /* Permite que a imagem seja exibida completamente */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0; /* Sem borda arredondada */
    position: relative;
    background-color: #ffffff; /* Cor de fundo enquanto carrega */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; /* Espaçamento interno */
}

.mosaic-item::before {
    content: 'Carregando...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    z-index: 0;
}

.mosaic-item.loaded::before,
.mosaic-item.fallback::before {
    display: none;
}

.mosaic-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Removido o pseudo-elemento after para alinhamento completo */

/* Estilo específico para imagens de fallback */
.mosaic-item.fallback {
    background-color: #333;
}

.mosaic-item.fallback img {
    opacity: 0.9;
}


/* Rodapé */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
    margin-top: 30px;
}

/* Animações para movimento das colunas */
@keyframes moveUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes moveDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Aplicando animações às colunas ímpares (movimento para cima) */
.mosaic-column:nth-child(odd) {
    animation: moveUp 500s linear infinite;
    will-change: transform;
}

/* Aplicando animações às colunas pares (movimento para baixo) */
.mosaic-column:nth-child(even) {
    animation: moveDown 500s linear infinite;
    will-change: transform;
}

/* Velocidades diferentes para algumas colunas para criar efeito mais dinâmico */
/*.mosaic-column:nth-child(3n) {
    animation-duration: 2000s;
}

.mosaic-column:nth-child(5n) {
    animation-duration: 2000s;
}*/


/* Responsividade */
@media (max-width: 1400px) {
    .mosaic-strip {
        grid-template-columns: repeat(8, 1fr);
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .mosaic-strip {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .mosaic-strip {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .mosaic-item {
        height: 180px;
    }
    
    .mosaic-item:hover {
        transform: scale(1.05);
    }
    
    .form-group {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .mosaic-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo-container {
        flex-direction: column;
        gap: 15px;
    }
}
