/* ========================================
   BLOG ARTICLE — Styles bổ sung
   Dùng cho tất cả trang blog/*.html
   ======================================== */

/* ========== ARTICLE HERO ========== */
.article-hero {
    background: var(--ink-black);
    background-size: cover;
    background-position: center;
    padding: 100px 0 50px;
}
.article-excerpt {
    color: rgba(255,255,255,0.78);
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.75;
    margin: 0 0 18px;
}
.article-container {
    max-width: 900px;
    padding-top: 50px;
    padding-bottom: 70px;
}
.article-content {
    background: #fff;
    border: 1px solid #eef2f4;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(24px, 4vw, 46px);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-main);
}
.article-content h2 {
    font-size: 1.45rem;
    color: var(--secondary);
    margin: 34px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}
.article-content p { margin-bottom: 16px; }
.article-content strong { color: var(--secondary); }
.article-content em { color: var(--primary); font-style: normal; font-weight: 700; }
.article-cta {
    background: var(--primary-light);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 24px;
    margin: 30px 0;
}
.article-cta h3 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.article-cta p {
    color: var(--text-muted);
    margin-bottom: 16px;
}
.article-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.article-hero-inner { max-width: 780px; }
.article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.article-hero h1 {
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-meta .author-meta strong { color: rgba(255,255,255,0.9); }

/* ========== ARTICLE LAYOUT ========== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    padding: 50px 0 70px;
    align-items: start;
}
.article-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }

/* ========== ARTICLE BODY ========== */
.article-body {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-main);
}
.article-body .article-lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary);
    line-height: 1.7;
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin-bottom: 32px;
    background: var(--primary-light);
    padding: 18px 20px;
    border-radius: 0 10px 10px 0;
}
.article-body h2 {
    font-size: 1.45rem;
    color: var(--secondary);
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}
.article-body h3 {
    font-size: 1.15rem;
    color: var(--secondary);
    margin: 28px 0 12px;
}
.article-body h4 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 20px 0 8px;
    font-family: 'Sofia Sans', 'Inter', sans-serif;
    font-weight: 700;
}
.article-body p { margin-bottom: 16px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol {
    margin: 12px 0 20px 20px;
}
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.article-body strong { color: var(--secondary); font-weight: 700; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--primary-dark); }

/* Article Image */
.article-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
}
.article-img img { width: 100%; height: auto; display: block; }
.article-img figcaption {
    padding: 10px 14px;
    background: var(--bg-light);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Highlight box */
.highlight-box {
    background: var(--primary-light);
    border: 1px solid #bbf7d0;
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 24px 0;
}
.highlight-box h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.highlight-box p, .highlight-box li { font-size: 0.9rem; color: var(--secondary); margin: 0; }
.highlight-box ul { margin: 8px 0 0 16px; }
.highlight-box li { margin-bottom: 5px; }

/* Warning/note box */
.note-box {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 0.88rem;
    color: #78350f;
}
.note-box i { color: #f59e0b; margin-right: 6px; }

/* Comparison table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.88rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.compare-table th {
    background: var(--secondary);
    color: #fff;
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
}
.compare-table th:first-child { width: 35%; }
.compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.compare-table tr:nth-child(even) { background: var(--bg-light); }
.compare-table tr:hover { background: var(--primary-light); }
.compare-table .winner { color: var(--primary); font-weight: 700; }
.compare-table .icon-check { color: #22c55e; }
.compare-table .icon-x { color: #ef4444; }

/* ========== TABLE OF CONTENTS ========== */
.toc-widget {
    background: var(--bg-light);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 20px;
}
.toc-widget h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.toc-widget h3 i { color: var(--primary); }
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    transition: color 0.2s;
    line-height: 1.4;
}
.toc-list a::before {
    content: '›';
    color: var(--primary);
    font-size: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
}
.toc-list a:hover { color: var(--primary); text-decoration: none; }

/* ========== AUTHOR BOX ========== */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 28px;
    margin: 40px 0;
    border: 1px solid #e5e7eb;
    align-items: flex-start;
}
.author-avatar-lg {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--ink-black);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
}
.author-details h4 { font-size: 1rem; margin-bottom: 2px; }
.author-details .author-role { font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; display: block; }
.author-details p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 12px; }
.author-links { display: flex; gap: 8px; }
.author-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.author-link:hover { background: var(--primary); color: #fff; }

/* ========== INLINE CTA ========== */
.inline-cta {
    background: var(--ink-black);
    border-radius: var(--radius);
    padding: 28px 32px;
    color: #fff;
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}
.inline-cta i { font-size: 2.5rem; opacity: 0.7; flex-shrink: 0; }
.inline-cta h4 { color: #fff; font-size: 1.1rem; margin-bottom: 4px; }
.inline-cta p { font-size: 0.85rem; opacity: 0.8; margin: 0; }
.inline-cta-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ========== SHARE BAR ========== */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin: 32px 0;
    flex-wrap: wrap;
}
.share-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
}
.share-fb { background: #1877f2; color: #fff; }
.share-fb:hover { background: #1565c0; }
.share-zalo { background: #0068ff; color: #fff; }
.share-zalo:hover { background: #0052cc; }
.share-copy { background: var(--bg-light); color: var(--text-muted); border: 1px solid #e5e7eb; }
.share-copy:hover { background: #e5e7eb; }

/* ========== RELATED ARTICLES ========== */
.related-articles { padding: 50px 0 70px; background: var(--bg-light); }
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.related-article-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    transition: var(--transition);
}
.related-article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-article-img {
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary), #2a4a6c);
}
.related-article-img img { width: 100%; height: 100%; object-fit: cover; }
.related-article-body { padding: 16px; }
.related-article-body .cat { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 6px; }
.related-article-body h4 { font-size: 0.88rem; line-height: 1.45; color: var(--secondary); }
.related-article-body h4 a:hover { color: var(--primary); }
.related-article-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; }

/* ========== SIDEBAR WIDGETS ========== */
.blog-sidebar-widget {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
}
.blog-sidebar-widget h3 {
    font-size: 0.9rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--secondary);
}
.sidebar-project-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 8px;
    transition: var(--transition);
}
.sidebar-project-link:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-project-link i { color: var(--primary); font-size: 0.7rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .related-articles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .article-body h2 { font-size: 1.25rem; }
    .article-body h3 { font-size: 1.05rem; }
    .inline-cta { flex-direction: column; gap: 12px; }
    .inline-cta i { display: none; }
    .author-box { flex-direction: column; }
    .related-articles-grid { grid-template-columns: 1fr; }
    .compare-table { font-size: 0.78rem; }
    .compare-table th, .compare-table td { padding: 9px 10px; }
}
