/* ── LIGHT PROFESSIONAL PALETTE UNIFIED ── */
body {
    background-color: var(--navy-bg, #f8fafc);
    color: var(--text-main, #0f172a);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.blog-wrapper {
    padding: calc(var(--nav-height) + 20px) 16px 60px;
    padding-bottom: 60px;
}

/* ── MAIN DETAIL CARD ── */
.blog-card-main {
    background: var(--navy-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    box-shadow: var(--shadow-card, 0 10px 30px -5px rgba(15, 23, 42, 0.08));
    padding: 32px;
}

/* Breadcrumb */
.custom-breadcrumb {
    background: var(--navy-input, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 10px 16px;
}

/* Typography & Content Styling */
.post-detail-title {
    color: var(--text-main, #0f172a);
    font-weight: 800;
    line-height: 1.3;
    font-size: 2rem;
}

.meta-item {
    color: var(--text-muted, #475569);
    font-size: 0.875rem;
}

.post-content {
    color: var(--text-main, #0f172a);
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid var(--border-color, #e2e8f0);
}

.post-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted, #475569);
    border-left: 4px solid var(--gold, #d97706);
    padding-left: 16px;
    background: var(--navy-input, #f1f5f9);
    border-radius: 0 10px 10px 0;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* TOC (Mục lục) */
.toc-widget {
    background: var(--navy-input, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
}

.toc-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main, #0f172a);
}

.toc-link {
    color: var(--text-muted, #475569);
    transition: var(--transition, 0.25s cubic-bezier(0.4, 0, 0.2, 1));
}

.toc-link:hover {
    color: var(--gold, #d97706);
}

.post-section-heading {
    color: var(--text-main, #0f172a);
    font-weight: 700;
    font-size: 1.35rem;
    border-left: 4px solid var(--gold, #d97706);
    padding-left: 12px;
    scroll-margin-top: 100px;
}

.post-content h2 {
    color: var(--text-main, #0f172a);
    font-weight: 700;
    font-size: 1.35rem;
    border-left: 4px solid var(--gold, #d97706);
    padding-left: 12px;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.post-content h3 {
    color: var(--text-main, #0f172a);
    font-weight: 600;
    font-size: 1.15rem;
    margin-top: 1.35rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 100px;
}

.toc-sublist {
    padding-left: 18px;
    border-left: 2px solid var(--border-color, #e2e8f0);
}

.toc-link--h2 {
    font-weight: 600;
    color: var(--text-main, #0f172a);
}

.toc-link--h3 {
    font-size: 0.85rem;
    color: var(--text-muted, #475569);
}

.post-source {
    background: var(--navy-input, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 4px solid var(--gold, #d97706);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.925rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.post-source__label {
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.post-source__link {
    color: var(--gold, #d97706);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.post-source__link:hover {
    text-decoration: underline;
}

.post-source__text {
    color: var(--text-muted, #475569);
    font-weight: 500;
}

/* Tag Badges */
.tag-badge {
    background: var(--navy-input, #f1f5f9);
    color: var(--text-main, #0f172a);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition, 0.25s cubic-bezier(0.4, 0, 0.2, 1));
}

.tag-badge:hover {
    border-color: var(--gold, #d97706);
    color: var(--gold, #d97706);
    background: #ffffff;
}

/* ── SIDEBAR WIDGETS ── */
.sidebar-widget {
    background: var(--navy-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-main, 0 4px 20px -2px rgba(15, 23, 42, 0.06));
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main, #0f172a);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    position: relative;
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--gold, #d97706);
}

.side-post-title {
    color: var(--text-main, #0f172a);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

.side-post-title:hover {
    color: var(--gold, #d97706);
}

.rank-number {
    width: 28px;
    height: 28px;
    background-color: var(--navy-input, #f1f5f9);
    color: var(--text-muted, #475569);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discussion-item:first-child .rank-number {
    background-color: var(--gold, #d97706);
    color: #ffffff;
}

.book-thumb-container {
    width: 76px;
    height: 96px;
    background: var(--navy-input, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

/* App Sidebar Item */
.app-sidebar-item {
    background: var(--navy-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 10px 12px;
    transition: var(--transition, 0.25s cubic-bezier(0.4, 0, 0.2, 1));
}

.app-sidebar-item:hover {
    border-color: var(--gold, #d97706);
    transform: translateY(-2px);
    box-shadow: var(--shadow-main, 0 4px 20px -2px rgba(15, 23, 42, 0.06));
}

.app-sidebar-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

.app-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.download-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition, 0.25s cubic-bezier(0.4, 0, 0.2, 1));
}

.badge-ios { background: #000000; color: #ffffff; }
.badge-ios:hover { background: #333333; color: #ffffff; }
.badge-android { background: #15803d; color: #ffffff; }
.badge-android:hover { background: #166534; color: #ffffff; }

/* Buttons */
.btn-gold-outline {
    color: var(--gold, #d97706);
    border: 1.5px solid var(--gold, #d97706);
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 20px;
    transition: var(--transition, 0.25s cubic-bezier(0.4, 0, 0.2, 1));
}

.btn-gold-outline:hover {
    background: var(--gold, #d97706);
    color: #ffffff;
}

@media (max-width: 768px) {
    .blog-wrapper { padding-top: calc(var(--nav-height, 84px) + 12px); }
    .blog-card-main { padding: 20px; }
    .post-detail-title { font-size: 1.5rem; }
}