/* CSS específico para navegação de capítulos */

/* Container principal da navegação */
.chapter-navigation {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

/* Abas dos capítulos */
#chapter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin: 0;
}

/* Botões individuais dos capítulos */
.chapter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px; /* Largura fixa para todos os capítulos */
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    /* Estado não selecionado - fundo azul escuro/cinza */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chapter-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: rgba(255, 215, 0, 0.3);
}

.chapter-tab.active {
    /* Estado selecionado - fundo amarelo/dourado como na imagem */
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    border-color: #f59e0b;
    transform: translateY(-1px);
    font-weight: 700;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    #chapter-tabs {
        gap: 6px;
        padding: 6px 0;
    }
    
    .chapter-tab {
        width: 130px; /* Largura fixa para mobile */
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #chapter-tabs {
        gap: 4px;
        padding: 4px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .chapter-tab {
        width: 110px; /* Largura fixa para mobile pequeno */
        padding: 6px 12px;
        font-size: 12px;
        margin: 2px;
    }
}

/* Overflow horizontal para muitos capítulos */
@media (max-width: 640px) {
    .chapter-navigation {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .chapter-navigation::-webkit-scrollbar {
        display: none;
    }
    
    #chapter-tabs {
        min-width: max-content;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 8px;
    }
    
    .chapter-tab {
        flex-shrink: 0;
    }
}

/* Animações suaves */
.chapter-tab {
    will-change: transform;
}

.chapter-tab:active {
    transform: scale(0.95);
}

/* Indicador visual para capítulo ativo */
.chapter-tab.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #f59e0b;
    border-radius: 2px;
}

/* Melhor contraste para acessibilidade */
.chapter-tab:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}
