/* ===========================
   BLOG PAGE STYLES
   =========================== */

/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.blog-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.blog-breadcrumb a {
    color: #0ea5e9;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: #38bdf8;
}

.blog-hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.2;
    margin-bottom: 18px;
}

.blog-subtitle {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 720px;
}

.blog-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 20px;
}

.bm-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 80px;
    align-items: start;
}

@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: -1;
    }
}

/* Quick Summary */
.quick-summary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-left: 4px solid #0ea5e9;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 36px;
}

.quick-summary h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0ea5e9;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-summary ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-summary ul li {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Article Body */
.blog-article {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.85;
}

.blog-article h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 48px 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
}

.blog-article h3 {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 36px 0 14px;
}

.blog-article h4 {
    font-size: 17px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 28px 0 10px;
}

.blog-article p {
    margin-bottom: 20px;
}

.blog-article ul,
.blog-article ol {
    padding-left: 24px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-article li {
    line-height: 1.7;
}

.blog-article strong {
    color: #f1f5f9;
    font-weight: 600;
}

.blog-article em {
    color: #94a3b8;
}

/* Info Box */
.info-box {
    background: rgba(14, 165, 233, 0.07);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.25);
}

.info-box.danger {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.25);
}

.info-box.success {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.2);
}

.info-box-title {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: #0ea5e9;
}

.info-box.warning .info-box-title {
    color: #f59e0b;
}

.info-box.danger .info-box-title {
    color: #ef4444;
}

.info-box.success .info-box-title {
    color: #10b981;
}

.info-box p,
.info-box ul {
    margin-bottom: 0;
    color: #cbd5e1;
    font-size: 15px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
    border-radius: 10px;
    overflow: hidden;
}

.data-table th {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

/* Symptom List */
.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0 28px;
}

.symptom-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
}

.symptom-item .si-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Medical Disclaimer */
.medical-disclaimer {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 48px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.7;
}

.disclaimer-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.medical-disclaimer strong {
    color: #f59e0b;
}

/* Article Tags Section */
.article-tags-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tags-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Related Articles */
.related-articles {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.related-articles h3 {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.25s;
}

.related-card:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
}

.related-card-emoji {
    font-size: 28px;
}

.related-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.4;
}

.related-card-tag {
    font-size: 12px;
    color: #64748b;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 20px 22px;
}

.sidebar-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* TOC */
.toc-card {
    background: rgba(14, 165, 233, 0.05);
    border-color: rgba(14, 165, 233, 0.15);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.toc-link:hover,
.toc-link.active {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.07);
    border-left-color: #0ea5e9;
}

.toc-link.toc-h3 {
    padding-left: 22px;
    font-size: 12px;
}

/* Health Tip Card */
.tip-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(14, 165, 233, 0.05));
    border-color: rgba(16, 185, 129, 0.2);
}

.tip-card h4 {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.15);
}

.tip-card p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
}

/* Popular List */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-list li a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.2s;
    align-items: flex-start;
}

.popular-list li a:hover {
    color: #e2e8f0;
}

.popular-list .pop-num {
    font-size: 18px;
    font-weight: 800;
    color: rgba(14, 165, 233, 0.3);
    flex-shrink: 0;
    line-height: 1.2;
}

/* Stats card in sidebar */
.stats-bar-card h4 {
    margin-bottom: 14px;
}

.sidebar-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.sidebar-stat:last-child {
    margin-bottom: 0;
}

.ss-label {
    font-size: 12px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

.ss-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
}

.ss-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

/* Loading */
.article-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px;
    color: #475569;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(14, 165, 233, 0.2);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hamburger in blog */
@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 20px 40px;
    }

    .blog-title {
        font-size: 26px;
    }

    .blog-subtitle {
        font-size: 16px;
    }
}

/* Article not found */
.not-found-box {
    text-align: center;
    padding: 80px 20px;
    color: #475569;
}

.not-found-box h2 {
    color: #94a3b8;
    font-size: 28px;
    margin-bottom: 12px;
}

.not-found-box a {
    color: #0ea5e9;
}

/* ============================================
   BLOG LIGHT MODE OVERRIDES
   ============================================ */
[data-theme="light"] .blog-hero {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #EFF6FF 100%);
}

[data-theme="light"] .blog-title {
    color: #0F172A;
}

[data-theme="light"] .blog-subtitle {
    color: #334155;
}

[data-theme="light"] .blog-breadcrumb {
    color: #64748b;
}

[data-theme="light"] .blog-meta-bar {
    border-top-color: rgba(15, 23, 42, 0.08);
    color: #64748b;
}

[data-theme="light"] .blog-article {
    color: #334155;
}

[data-theme="light"] .blog-article h2 {
    color: #0F172A;
    border-bottom-color: rgba(14, 165, 233, 0.25);
}

[data-theme="light"] .blog-article h3,
[data-theme="light"] .blog-article h4 {
    color: #1E293B;
}

[data-theme="light"] .blog-article strong {
    color: #0F172A;
}

[data-theme="light"] .quick-summary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(14, 165, 233, 0.25);
}

[data-theme="light"] .quick-summary ul li {
    color: #334155;
}

[data-theme="light"] .info-box {
    background: rgba(14, 165, 233, 0.05);
}

[data-theme="light"] .info-box p,
[data-theme="light"] .info-box ul {
    color: #475569;
}

[data-theme="light"] .data-table td {
    color: #334155;
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .data-table tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.02);
}

[data-theme="light"] .symptom-item {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    color: #334155;
}

[data-theme="light"] .medical-disclaimer {
    background: rgba(245, 158, 11, 0.05);
    color: #64748b;
}

[data-theme="light"] .sidebar-card {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-card h4 {
    color: #1E293B;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .toc-link {
    color: #64748b;
}

[data-theme="light"] .related-card {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .related-card:hover {
    background: rgba(14, 165, 233, 0.06);
}

[data-theme="light"] .related-card-title {
    color: #1E293B;
}

[data-theme="light"] .article-tags-section {
    border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .related-articles {
    border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .related-articles h3 {
    color: #0F172A;
}

[data-theme="light"] .popular-list li a {
    color: #64748b;
}

[data-theme="light"] .popular-list li a:hover {
    color: #1E293B;
}

[data-theme="light"] .ss-bar {
    background: rgba(15, 23, 42, 0.07);
}

[data-theme="light"] .not-found-box {
    color: #64748b;
}

[data-theme="light"] .not-found-box h2 {
    color: #475569;
}