/* Celebrity Health News - Custom Styles */
/* File: assets/css/style.css */

/* Root variables for theme colors */
:root {
    --bs-primary-rgb: 220, 53, 69;
    --health-critical: #dc3545;
    --health-serious: #fd7e14;
    --health-moderate: #ffc107;
    --health-mild: #20c997;
    --health-minor: #198754;
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #ffffff;
    --bs-border-color: #404040;
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Custom navbar styling */
.navbar-brand {
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Health severity badges */
.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
}

.severity-critical { background-color: var(--health-critical); }
.severity-serious { background-color: var(--health-serious); }
.severity-moderate { background-color: var(--health-moderate); color: #000; }
.severity-mild { background-color: var(--health-mild); }
.severity-minor { background-color: var(--health-minor); }

/* Article cards */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.article-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1rem;
}

[data-bs-theme="dark"] .article-card .card-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

.article-meta {
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

/* Celebrity cards */
.celebrity-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.celebrity-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.celebrity-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Search filters */
.filter-section {
    background: var(--bs-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .filter-section {
    background: var(--bs-dark);
}

/* Timeline for celebrity health history */
.health-timeline {
    position: relative;
    padding-left: 2rem;
}

.health-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bs-border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--bs-primary);
    border-radius: 50%;
    border: 3px solid var(--bs-body-bg);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .filter-section {
        padding: 1rem;
    }
    
    .article-card,
    .celebrity-card {
        margin-bottom: 1rem;
    }
    
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Accessibility improvements */
.visually-hidden-focusable:focus {
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    background: var(--bs-primary) !important;
    color: white !important;
    border-radius: 0.25rem !important;
    z-index: 10000 !important;
    top: 1rem !important;
    left: 1rem !important;
}

/* Loading states */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
}

[data-bs-theme="dark"] .loading-placeholder {
    background: linear-gradient(90deg, #343a40 25%, #495057 50%, #343a40 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    #back-to-top,
    .filter-section {
        display: none !important;
    }
    
    .article-card,
    .celebrity-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}