/* Research Page Styles */

/* Page Header */
.page-research .page-header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    position: relative;
    overflow: hidden;
}

.page-research .page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.page-research .page-header .container {
    position: relative;
    z-index: 1;
}

/* Section Styling */
.section-title {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.section-header .badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    letter-spacing: 0.5px;
}

/* WHO Stats Section */
.who-stats {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.who-stats .stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.who-stats .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.info-card {
    transition: transform 0.3s ease;
}

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

/* Stat Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
}

/* Filter Section */
.category-filter {
    background: #f1f3f5;
}

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-wrapper .form-select {
    max-width: 400px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.filter-wrapper .form-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.25);
}

/* Search Box */
.search-box .form-control {
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    border: 2px solid #dee2e6;
    min-width: 250px;
}

.search-box .form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.25);
}

/* Research Cards */
.research-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.research-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.research-card:hover .research-icon {
    transform: scale(1.1);
}

/* Subtle Background Colors */
.bg-primary-subtle { background-color: rgba(26, 115, 232, 0.1) !important; }
.bg-success-subtle { background-color: rgba(40, 167, 69, 0.1) !important; }
.bg-info-subtle { background-color: rgba(23, 162, 184, 0.1) !important; }
.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.1) !important; }
.bg-danger-subtle { background-color: rgba(220, 53, 69, 0.1) !important; }
.bg-secondary-subtle { background-color: rgba(108, 117, 125, 0.1) !important; }

/* Publication Cards */
.publication-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: 10px;
    border-left: 4px solid #1a73e8 !important;
}

.publication-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-left-color: #0d47a1 !important;
}

.publication-title {
    color: #1a1a2e;
    font-weight: 600;
    line-height: 1.4;
}

.publication-category {
    line-height: 1.5;
}

/* Badge Colors for Categories */
.badge.bg-pink {
    background-color: #e91e63 !important;
}

.badge.bg-purple {
    background-color: #9c27b0 !important;
}

/* Priority Cards */
.priority-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.priority-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
}

.priority-icon {
    transition: transform 0.3s ease;
}

.priority-card:hover .priority-icon {
    transform: scale(1.15);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

.cta-section .btn-light {
    color: #1a73e8;
    font-weight: 600;
}

.cta-section .btn-outline-light:hover {
    color: #1a73e8;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    color: #1a73e8;
    padding: 0.5rem 1rem;
}

.pagination .page-link:hover {
    background-color: #e3f2fd;
}

.pagination .page-item.active .page-link {
    background-color: #1a73e8;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
}

/* Modal Styles */
#articleModal .modal-header {
    border-bottom: none;
}

#articleModal .modal-body {
    padding: 2rem;
}

#articleModal .article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

#articleModal .article-content h1,
#articleModal .article-content h2,
#articleModal .article-content h3,
#articleModal .article-content h4 {
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#articleModal .article-content h1 { font-size: 1.75rem; }
#articleModal .article-content h2 { font-size: 1.5rem; }
#articleModal .article-content h3 { font-size: 1.25rem; }
#articleModal .article-content h4 { font-size: 1.1rem; }

#articleModal .article-content p {
    margin-bottom: 1rem;
}

#articleModal .article-content ul,
#articleModal .article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#articleModal .article-content li {
    margin-bottom: 0.5rem;
}

#articleModal .article-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

#articleModal .article-content table th,
#articleModal .article-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

#articleModal .article-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#articleModal .article-content strong {
    color: #1a1a2e;
}

#articleModal .article-content em {
    color: #495057;
}

#articleModal .references-content {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .filter-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-wrapper .form-select {
        max-width: 100%;
        width: 100%;
    }
    
    .search-box .form-control {
        min-width: 100%;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 1.5rem;
    }
    
    .research-icon {
        width: 60px;
        height: 60px;
    }
    
    .publication-card .row {
        flex-direction: column;
    }
    
    .cta-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #articleModal .modal-body {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.research-card,
.publication-card,
.stat-card,
.info-card {
    animation: fadeInUp 0.6s ease forwards;
}

.research-card:nth-child(2) { animation-delay: 0.1s; }
.research-card:nth-child(3) { animation-delay: 0.2s; }
.research-card:nth-child(4) { animation-delay: 0.3s; }
.research-card:nth-child(5) { animation-delay: 0.4s; }
.research-card:nth-child(6) { animation-delay: 0.5s; }

/* Breadcrumb Styling */
.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Loading State */
.publications-loading {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.publications-empty {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
