/* Reset e Configurações Básicas */
@import url('https://fonts.googleapis.com/css2?family=Abadi&display=swap');

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

:root {
    --primary-color: #2d5016;
    --secondary-color: #4a7c2c;
    --accent-color: #7cb342;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --sidebar-bg: #1a3310;
    --sidebar-text: #e8f5e9;
}

body {
    font-family: 'Abadi', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Navegação Lateral */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0d1f08 100%);
    color: var(--sidebar-text);
    overflow-y: auto;
    padding: 20px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sidebar-header {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 28px;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-weight: bold;
}

.sidebar-header p {
    font-size: 14px;
    color: #a5d6a7;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-menu a:hover {
    background-color: var(--secondary-color);
    padding-left: 20px;
    color: #fff;
}

/* Conteúdo Principal */
#content {
    margin-left: 280px;
    padding: 40px 60px;
    max-width: 1200px;
}

/* Cabeçalho do Livro */
.book-header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.book-header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.book-header h2 {
    font-size: 24px;
    font-weight: 300;
    color: #c8e6c9;
}

.book-header .slogan {
    font-size: 18px;
    font-weight: 400;
    color: #a5d6a7;
    margin-top: 15px;
    font-style: italic;
    letter-spacing: 1px;
}

/* Capítulos */
.chapter {
    background: white;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chapter h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
}

.chapter h3 {
    font-size: 26px;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.chapter p {
    margin-bottom: 20px;
    text-align: justify;
    font-size: 17px;
}

.chapter ul, .chapter ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.chapter li {
    margin-bottom: 10px;
    font-size: 17px;
    text-align: justify;
}

.chapter strong {
    color: var(--primary-color);
}

.chapter em {
    color: var(--secondary-color);
}

/* Capítulo 10 - Alinhamento à esquerda */
.chapter-left p,
.chapter-left li {
    text-align: left !important;
}

/* Imagens */
.content-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 30px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Modal para Imagens */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 95%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close:hover {
    color: var(--accent-color);
}

/* Rodapé */
.book-footer {
    text-align: center;
    padding: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 12px;
    margin-top: 50px;
}

.book-footer p {
    margin: 10px 0;
    font-size: 16px;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 1024px) {
    #sidebar {
        width: 250px;
    }
    
    #content {
        margin-left: 250px;
        padding: 30px 40px;
    }
}

@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    #content {
        margin-left: 0;
        padding: 20px;
    }
    
    .book-header h1 {
        font-size: 32px;
    }
    
    .book-header h2 {
        font-size: 18px;
    }
    
    .chapter {
        padding: 25px;
    }
    
    .chapter h2 {
        font-size: 28px;
    }
    
    .chapter h3 {
        font-size: 22px;
    }
    
    .close {
        top: 15px;
        right: 25px;
        font-size: 35px;
    }
}

/* Scrollbar Customizada */
#sidebar::-webkit-scrollbar {
    width: 8px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ccc65;
}
