/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Estilos do herói da galeria */
.galeria-hero {
    background-color: #111;
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
    margin-bottom: 30px;
}

.galeria-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.galeria-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filtros */
.filtros-container {
    margin-bottom: 30px;
    text-align: center;
}

.filtros-container h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #333;
}

.filtros-botoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.filtro-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filtro-btn:hover,
.filtro-btn.ativo {
    background-color: #0056b3;
    color: white;
    border-color: #0056b3;
}

/* Grid da galeria */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

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

.galeria-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.galeria-item:hover .overlay {
    transform: translateY(0);
}

.galeria-item .overlay h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.galeria-item .overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 80vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-prev, 
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .galeria-hero h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .galeria-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-botoes {
        flex-direction: column;
        align-items: center;
    }
    
    .filtro-btn {
        width: 100%;
        max-width: 250px;
    }
}
