/* ===== Theme Variables ===== */
.blog-article {
    --blog-surface: #ffffff;
    --blog-surface-soft: #f8f9fa;
    --blog-surface-alt: #f0f4ff;
    --blog-border: #e2e8f0;
    --blog-border-dashed: #cbd5e1;
    --blog-text: #1e293b;
    --blog-text-muted: #64748b;
    --blog-link: #667eea;
    --blog-accent: #667eea;
    --blog-accent-soft: rgba(102, 126, 234, 0.1);
    --blog-accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --blog-highlight-bg: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    --blog-highlight-border: #f59e0b;
    --blog-icon-bg: rgba(102, 126, 234, 0.12);
    --blog-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --blog-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--blog-text);
}

.theme-dark .blog-article {
    --blog-surface: #1e293b;
    --blog-surface-soft: #0f172a;
    --blog-surface-alt: #1a2744;
    --blog-border: #334155;
    --blog-border-dashed: #475569;
    --blog-text: #e2e8f0;
    --blog-text-muted: #94a3b8;
    --blog-link: #93c5fd;
    --blog-accent: #818cf8;
    --blog-accent-soft: rgba(129, 140, 248, 0.15);
    --blog-accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --blog-highlight-bg: linear-gradient(135deg, #422006 0%, #713f12 100%);
    --blog-highlight-border: #d97706;
    --blog-icon-bg: rgba(129, 140, 248, 0.18);
    --blog-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --blog-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ===== Breadcrumb ===== */
.blog-article .breadcrumb-item,
.blog-article .breadcrumb-item.active {
    color: var(--blog-text-muted);
    font-size: 0.875rem;
}

.blog-article .breadcrumb-item a {
    color: var(--blog-link);
    text-decoration: none;
}

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

/* ===== Hero Header ===== */
.blog-hero {
    padding: 2rem;
    border-radius: 1rem;
    background: var(--blog-accent-gradient);
    color: #fff;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.75rem;
}

.blog-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.blog-hero-sub {
    font-weight: 400;
    opacity: 0.85;
}

.blog-hero .blog-lead {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.92;
    margin-bottom: 1rem;
}

.blog-hero-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.blog-hero-meta i {
    margin-right: 0.3rem;
}

/* ===== Cover Image ===== */
.blog-cover {
    border-radius: 0.75rem;
    overflow: hidden;
    max-height: 320px;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

/* ===== Table of Contents ===== */
.blog-toc {
    background: var(--blog-surface-alt);
    border: 1px solid var(--blog-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.blog-toc h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--blog-accent);
}

.blog-toc h2 i {
    margin-right: 0.4rem;
}

.blog-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.blog-toc li a {
    display: block;
    color: var(--blog-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.blog-toc li a:hover {
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    border-left-color: var(--blog-accent);
}

/* ===== Section Header ===== */
.glossary-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--blog-accent);
}

.glossary-section-header > i {
    font-size: 1.25rem;
    color: var(--blog-accent);
}

.glossary-section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--blog-text);
}

/* ===== Glossary Grid ===== */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

/* ===== Glossary Card (basic) ===== */
.glossary-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--blog-border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--blog-surface);
    box-shadow: var(--blog-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.glossary-card:hover {
    box-shadow: var(--blog-shadow-hover);
    transform: translateY(-1px);
}

.glossary-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--blog-icon-bg);
    color: var(--blog-accent);
    font-size: 1.1rem;
}

.glossary-card-body {
    flex: 1;
    min-width: 0;
}

.glossary-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--blog-text);
}

.glossary-card-body p {
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 0;
    color: var(--blog-text-muted);
}

.glossary-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 2rem;
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    vertical-align: middle;
    margin-left: 0.35rem;
}

/* ===== Featured Card (with thumbnail) ===== */
.glossary-card-featured {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--blog-accent);
}

.glossary-card-featured .glossary-card-body h3 {
    font-size: 1.05rem;
}

.glossary-card-featured .glossary-card-body h3 i {
    color: var(--blog-accent);
}

.glossary-card-thumb {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--blog-surface-soft);
    border: 1px dashed var(--blog-border-dashed);
}

.glossary-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Highlight Card (God Pack etc) ===== */
.glossary-card-highlight {
    background: var(--blog-highlight-bg);
    border-color: var(--blog-highlight-border);
    border-left-color: var(--blog-highlight-border);
}

.glossary-card-highlight .glossary-card-body h3 i {
    color: var(--blog-highlight-border);
}

/* ===== Wide Card (no thumbnail) ===== */
.glossary-card-wide {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--blog-accent);
}

/* ===== Conclusion ===== */
.blog-conclusion {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--blog-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: var(--blog-surface-alt);
}

.blog-conclusion-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #22c55e;
}

.theme-dark .blog-conclusion-icon {
    color: #4ade80;
}

.blog-conclusion h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--blog-text);
}

.blog-conclusion p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: var(--blog-text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .blog-hero {
        padding: 1.25rem;
    }

    .blog-hero h1 {
        font-size: 1.35rem;
    }

    .blog-hero-meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    .blog-toc ul {
        grid-template-columns: 1fr;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }

    .glossary-card-featured {
        grid-template-columns: 1fr;
    }

    .glossary-card-thumb {
        width: 100%;
        height: 160px;
    }

    .blog-cover {
        max-height: 200px;
    }
}
