:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0043a4 100%);
    padding-top: 80px;
}

.section-padding {
    padding: 80px 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.search-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chapter-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.chapter-card .card-body {
    padding: 25px;
}

.chapter-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.article-item {
    border-left: 3px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 15px;
    background: var(--light-color);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.article-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.article-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.article-preview {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.highlight {
    background-color: var(--warning-color);
    padding: 2px 4px;
    border-radius: 3px;
}

.pagination {
    justify-content: center;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

/* Search results visibility */
.search-results-hidden {
    display: none;
}

.search-results-visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Ensure the container has proper styling when visible */
#searchResults.search-results-visible {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-top: 30px;
}

/* Ad Container Styles */
.ad-container {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .search-box {
        padding: 20px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .ad-container {
        margin: 15px 0;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .chapter-card .card-body {
        padding: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}