/* Importação de Fontes */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: #222;
    margin-bottom: 15px;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
header {
    background-color: #000;
    color: #fff;
    padding: 1rem 0;
    border-bottom: 5px solid #ffcc00; /* Dourado */
    position: sticky; /* Fixa o header no topo */
    top: 0;
    z-index: 1000; /* Garante que fique acima de outros elementos */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    color: #fff;
    font-size: 2.2rem;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav ul li {
    display: inline;
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a.active { /* Classe 'active' para o link da seção visível */
    color: #ffcc00; /* Dourado */
}

/* Botão padrão */
.btn {
    display: inline-block;
    background-color: #ffcc00; /* Dourado */
    color: #000;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.btn:hover {
    background-color: #e0b300; /* Dourado mais escuro */
}

/* Seções */
.content-section {
    padding: 60px 0;
    background-color: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    
    /* Estilos para a transição */
    opacity: 1;
    height: auto;
    transform: translateY(0);
    overflow: visible;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, height 0.5s ease-in-out, padding 0.5s ease-in-out, margin-bottom 0.5s ease-in-out;
}

.content-section:nth-of-type(even) { /* Estilo alternado para seções */
    background-color: #f9f9f9;
}

/*
 * CORREÇÃO PRINCIPAL:
 * A classe .hidden NÃO DEVE ter 'display: none;', pois isso
 * quebra as animações de transição.
 * Usamos opacity, height, padding e margin para "esconder" a seção.
 */
.content-section.hidden,
.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    transform: translateY(20px); /* Move levemente para baixo ao desaparecer */
}


#hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://via.placeholder.com/1500x500?text=Cultura+Afro-Brasileira') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
}

#hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #fff;
}

#hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* Galeria de Arte */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.artist-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
}

.artist-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Garante que a imagem cubra o espaço sem distorcer */
    display: block;
    cursor: pointer; /* Indica que a imagem é clicável */
}

.artist-card h3 {
    margin: 15px 0 10px;
    color: #000;
}

.artist-card p {
    padding: 0 15px 15px;
    font-size: 0.95rem;
    color: #555;
}

/* Musicalidade - Video */
.music-video {
    margin-top: 40px;
    text-align: center;
}

.music-video iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Footer */
footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        margin-top: 15px;
    }

    header nav ul li {
        margin: 0 10px;
        display: block; /* Links de navegação em coluna */
        margin-bottom: 10px;
    }

    #hero h2 {
        font-size: 2.2rem;
    }

    .gallery {
        grid-template-columns: 1fr; /* Coluna única em telas menores */
    }

    .music-video iframe {
        height: 250px; /* Ajuste para telas menores */
    }
}

/* ================== LIGHTBOX STYLES ================== */
.lightbox {
    display: none; /* Escondido por padrão */
    position: fixed; /* Fixa o modal na tela */
    z-index: 2000; /* Acima de tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permite scroll se a imagem for muito grande */
    background-color: rgba(0,0,0,0.9); /* Fundo preto semi-transparente */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */
    opacity: 0; /* Começa invisível para transição */
    transition: opacity 0.3s ease-in-out;
}

.lightbox.active {
    display: flex; /* Exibe como flex para centralizar */
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%; /* Máximo de 90% da largura da tela */
    max-height: 90%; /* Máximo de 90% da altura da tela */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transform: scale(0.8); /* Começa menor para transição */
    transition: transform 0.3s ease-in-out;
}

.lightbox.active .lightbox-content {
    transform: scale(1); /* Expande para o tamanho real na transição */
}


#caption {
    margin-top: 15px;
    text-align: center;
    color: #ccc;
    font-size: 1.2rem;
    padding: 8px 0;
}

/* Botão de Fechar */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}


/* ================== QUIZ STYLES (NOVOS) ================== */

#quiz-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Oculta o container do quiz quando .hidden está presente */
#quiz-container.hidden {
    display: none;
}

#quiz-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

#quiz-progress {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
}

#question-text {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 30px;
    min-height: 50px; /* Evita pulos de layout */
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna em mobile */
    gap: 10px;
}

/* Em telas maiores, 2 colunas */
@media (min-width: 600px) {
    .btn-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-answer {
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 15px;
    text-align: left;
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: 0; /* Sobrescreve o .btn padrão */
}

.btn-answer:hover:not(:disabled) {
    background-color: #f0f0f0;
    border-color: #aaa;
}

.btn-answer:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Feedback de Resposta */
.btn-answer.correct {
    background-color: #d4edda; /* Verde */
    border-color: #c3e6cb;
    color: #155724;
    font-weight: bold;
}

.btn-answer.incorrect {
    background-color: #f8d7da; /* Vermelho */
    border-color: #f5c6cb;
    color: #721c24;
    font-weight: bold;
}

#quiz-feedback {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 25px; /* Evita que o layout "pule" */
    line-height: 1.4;
}

/* Estilo para o parágrafo de explicação */
.quiz-explanation {
    font-size: 1rem;
    font-weight: normal; /* Texto normal, não negrito */
    color: #333; /* Cor de texto padrão */
    margin-top: 10px; /* Espaçamento */
    margin-bottom: 0;
}

#next-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    background-color: #ffcc00; /* Dourado */
}

/* Oculta o botão "Próxima" quando tem a classe .hidden */
#next-btn.hidden {
    display: none;
}

#quiz-results {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 30px;
}

/* Oculta os resultados por padrão */
#quiz-results.hidden {
    display: none;
}

#quiz-score-text {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 30px;
}