/* Estilos principais do sistema bíblico - Atualizado com cores da marca */

/* Importar cores da marca */
@import url('brand-colors.css');

:root {
    /* Usar cores da marca como padrão */
    --primary-color: var(--brand-primary);
    --secondary-color: var(--brand-light);
    --accent-color: var(--brand-secondary);
    --text-color: var(--text-primary);
    --border-color: var(--border-color);
    
    /* Bootstrap variables usando cores da marca */
    --bs-primary: var(--brand-primary);
    --bs-secondary: var(--brand-secondary);
    --bs-success: var(--brand-accent);
    --bs-info: var(--brand-cyan);
    --bs-warning: var(--brand-secondary);
    --bs-danger: #dc3545;
    --bs-light: var(--brand-light);
    --bs-dark: var(--brand-dark);
}

/* Layout Geral */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
}

/* Header */
.site-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Hero Section Compacto */
.hero-section-compact {
    background: var(--bg-gradient-hero);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

.hero-content-compact {
    max-width: 800px;
    margin: 0 auto;
}

.search-box-compact {
    max-width: 600px;
    margin: 0 auto;
}

.search-box-compact form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-box-compact input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box-compact button {
    padding: 12px 20px;
    background: var(--brand-secondary);
    color: var(--brand-white);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box-compact button:hover {
    background: var(--brand-secondary-dark);
    transform: translateY(-2px);
}

.search-box-compact button i {
    font-size: 1rem;
}

/* Hero Section */
.hero-section {
    background: var(--bg-gradient-hero);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
}

.search-box button {
    padding: 12px 30px;
    background: var(--brand-secondary);
    color: var(--brand-white);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    background: var(--brand-secondary-dark);
    transform: translateY(-2px);
}

/* Recursos Grid */
.recursos-principais {
    margin: 3rem 0;
}

.recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.recurso-card {
    background: var(--brand-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.recurso-card:hover {
    transform: translateY(-5px);
}

.recurso-card h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recurso-card .btn {
    background: var(--brand-primary);
    color: var(--brand-white);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 1rem;
    transition: background 0.3s;
}

.recurso-card .btn:hover {
    background: var(--brand-primary-dark);
    color: var(--brand-white);
    text-decoration: none;
}

/* Devocional do Dia */
.devocional-dia {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    margin: 3rem 0;
}

.devocional-card {
    background: var(--brand-white);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--brand-primary);
}

.versiculo-ref {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-style: italic;
    color: var(--brand-primary);
}

/* Notícias Grid */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.noticia-card {
    background: var(--brand-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.noticia-card:hover {
    transform: translateY(-3px);
}

.noticia-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.noticia-card h3 {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.noticia-card h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.noticia-card h3 a:hover {
    color: var(--brand-primary);
}

.noticia-card p {
    padding: 0 1rem;
    color: #666;
}

.noticia-card small {
    padding: 0 1rem 1rem;
    color: #999;
    display: block;
}

/* Sidebar */
.sidebar {
    padding-left: 2rem;
}

.widget {
    background: var(--brand-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: var(--brand-primary);
}

.btn-small {
    background: var(--brand-primary);
    color: var(--brand-white);
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.btn-small:hover {
    background: var(--brand-primary-dark);
    color: var(--brand-white);
    text-decoration: none;
}

/* AdSense Containers */
.ad-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 5px;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
}

.site-footer h5, .site-footer h6 {
    color: var(--brand-secondary);
    margin-bottom: 1rem;
}

.site-footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: var(--brand-white);
}

.social-links a {
    margin-right: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-section-compact {
        padding: 1rem 0;
    }
    
    .search-box-compact form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box-compact input {
        width: 100%;
    }
    
    .search-box-compact button {
        width: 100%;
        border-radius: 8px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .search-box form {
        flex-direction: column;
    }
    
    .recursos-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    /* Layout compacto para mobile */
    .livros-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
    }
    
    .livro-card {
        padding: 0.6rem 0.4rem;
    }
    
    .livro-nome {
        font-size: 0.8rem;
    }
    
    .livro-info {
        font-size: 0.7rem;
    }
    
    .testamento-title {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem 0.8rem;
    }
    
    .testamento-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .links-populares {
        justify-content: center;
    }
    
    .link-popular {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .search-box-compact {
        padding: 0 1rem;
    }
    
    .search-box-compact input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .search-box-compact button {
        padding: 10px 15px;
        min-width: 45px;
    }
    
    .livros-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 0.4rem;
    }
    
    .livro-card {
        padding: 0.5rem 0.3rem;
    }
    
    .livro-nome {
        font-size: 0.75rem;
        line-height: 1.1;
    }
    
    .livro-info {
        font-size: 0.65rem;
    }
    
    .testamento-title {
        font-size: 1rem;
        padding: 0.5rem 0.6rem;
    }
    
    .testamento-count {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.recurso-card, .widget, .noticia-card {
    animation: fadeIn 0.6s ease-out;
}

/* Livros da Bíblia - Layout Compacto */
.livros-biblia {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.livros-biblia h2 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.testamento-section {
    margin-bottom: 2.5rem;
}

.testamento-title {
    color: var(--brand-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background: var(--brand-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--brand-primary);
}

.testamento-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.testamento-icon {
    font-size: 1.2rem;
}

.testamento-count {
    background: var(--brand-primary);
    color: var(--brand-white);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Grid mais compacto para os livros */
.livros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.livro-card {
    background: var(--brand-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.livro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--brand-primary);
}

.livro-link {
    display: block;
    padding: 0.8rem 0.6rem;
    text-decoration: none;
    color: var(--text-color);
    height: 100%;
    text-align: center;
}

.livro-link:hover {
    text-decoration: none;
    color: var(--text-color);
}

.livro-nome {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--brand-primary);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.livro-info {
    font-size: 0.75rem;
    color: #666;
    opacity: 0.8;
}

/* Layout alternativo em colunas para telas maiores */
@media (min-width: 992px) {
    .testamento-section {
        margin-bottom: 0;
    }
    
    .livros-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.5rem;
    }
}

/* Acesso Rápido */
.acesso-rapido {
    background: var(--brand-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.acesso-rapido h4 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.links-populares {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-popular {
    background: var(--brand-primary);
    color: var(--brand-white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-popular:hover {
    background: var(--brand-primary-dark);
    color: var(--brand-white);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Fallback para quando não conseguir carregar do banco */
.livros-fallback .livros-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
}

.livros-fallback .livro-card {
    padding: 0.8rem;
}

.livros-fallback .livro-nome {
    font-size: 0.9rem;
}

/* Estados de Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    40% { color: black; text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    60% { text-shadow: .25em 0 0 black, .5em 0 0 rgba(0,0,0,0); }
    80%, 100% { text-shadow: .25em 0 0 black, .5em 0 0 black; }
}