/* static/style.css */

/* --- 1. Variáveis Globais e Reset --- */
:root {
    --cor-primaria: #2c3e50;
    --cor-secundaria: #34495e;
    --cor-fundo: #fdfcfb;
    --cor-texto: #333333;
    --cor-destaque: #c0392b;
    --cor-hover: #5dade2;
    --cor-borda: #e0e0e0;
    --fonte-serif: 'Georgia', 'Times New Roman', serif;
    --fonte-sans-serif: 'Helvetica Neue', 'Arial', sans-serif;
    --largura-maxima: 960px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- 2. Estilos Base do Corpo --- */
body {
    font-family: var(--fonte-sans-serif);
    line-height: 1.6;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: var(--largura-maxima);
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* --- 3. Cabeçalho e Rodapé --- */
.main-header {
    background-color: var(--cor-primaria);
    color: #ffffff;
    text-align: center;
    padding: 1.5rem 1rem;
}

.main-header.compact-header {
    padding: 0.75rem 1rem;
}

.logo-link {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.logo-img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.main-header h1 {
    font-family: var(--fonte-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0.5rem 0 0.25rem;
}

.main-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0;
}

.main-footer {
    padding: 1rem;
    font-size: 0.85rem;
    background-color: var(--cor-secundaria);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.main-footer p {
    margin: 0.25rem 0;
}

/* --- 4. Conteúdo Principal --- */
.content {
    padding: 2rem;
}

/* --- 5. Página de Índice (Com Testamentos) --- */
.testaments-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.testament-section {
    padding: 1.5rem;
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    background-color: #fdfdfd;
}

.testament-section h2 {
    font-family: var(--fonte-serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--cor-secundaria);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cor-borda);
}

.book-column-list {
    list-style: none;
    padding: 0;
    column-count: 2;
    column-gap: 1.5rem;
}

.book-column-list li a {
    display: block;
    text-decoration: none;
    color: var(--cor-primaria);
    padding: 0.4rem 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.book-column-list li a:hover {
    background-color: var(--cor-hover);
    color: white;
}

/* --- 6. Página de Livro (Índice de Capítulos) --- */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
    padding: 1rem 0;
}

.chapter-link-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    text-decoration: none;
    color: var(--cor-primaria);
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.chapter-link-item:hover {
    background-color: var(--cor-hover);
    color: white;
    border-color: var(--cor-hover);
    transform: scale(1.05);
}

/* --- 7. Página de Capítulo (Texto) --- */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--cor-secundaria);
    color: white;
}

.nav-button {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.current-chapter-display {
    font-size: 1.2rem;
    font-weight: bold;
}

.bible-text {
    font-family: var(--fonte-serif);
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: justify;
}

.bible-text h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    color: var(--cor-secundaria);
}

.bible-text p {
    margin-bottom: 1rem;
}

.verse-number {
    font-weight: bold;
    color: var(--cor-destaque);
    font-size: 0.8em;
    vertical-align: super;
    margin-right: 0.25em;
}

/* --- 8. Links Especiais --- */
.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

/* --- 9. Responsividade --- */
@media (max-width: 900px) {
    .book-column-list {
        column-count: 1;
    }
}

@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }
    .content {
        padding: 1.5rem;
    }
    .chapter-nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    .current-chapter-display {
        order: -1;
    }
}

@media (max-width: 600px) {
    .testaments-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .testament-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    .container {
        border-radius: 0;
        box-shadow: none;
    }
    .content {
        padding: 1rem;
    }
    .bible-text {
        font-size: 1.1rem;
    }
    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.5rem;
    }
    .chapter-link-item {
        height: 50px;
        font-size: 1rem;
    }
}
