/* Blog - An Đô. Brand overrides mirror the inline styles on the main pages. */
:root {
    --primary-color: #1e5aa8;
    --primary-dark: #164a91;
    --primary-light: #e3f2fd;
    --primary-medium: #bbdefb;
    --ink: #1f2933;
    --muted: #52606d;
}

.navbar { background: transparent !important; box-shadow: none; }
.navbar-brand img { height: 50px; width: auto; }
.navbar-brand .brand-name { color: var(--primary-color) !important; }
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: .5rem 1rem !important;
    margin: 0 .2rem;
    transition: all .3s ease;
}
.navbar-nav .nav-link.active {
    border-color: var(--primary-color) !important;
    background-color: var(--primary-color);
}
.text-primary { color: var(--primary-color) !important; }
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}
.section-title::after { background: var(--primary-color) !important; }

.page-header .blog-title {
    max-width: 960px;
    font-size: 2.6rem;
    line-height: 1.25;
    text-transform: none;
    text-align: center;
    padding: 0 16px;
}
.breadcrumb-bar { font-size: .95rem; }
.breadcrumb-bar a { color: #fff; text-decoration: underline; }

/* Article */
.post-wrap { max-width: 820px; margin: 0 auto; }
.post-meta { color: var(--muted); font-size: .95rem; }
.post-meta span + span::before { content: "·"; margin: 0 .5rem; }
.post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 8px; }
.post-body { color: var(--ink); font-size: 1.08rem; line-height: 1.8; }
.post-body h2 {
    font-size: 1.7rem;
    margin: 2.2rem 0 1rem;
    padding-top: .4rem;
    color: var(--primary-dark);
    scroll-margin-top: 90px;
}
.post-body h3 { font-size: 1.3rem; margin: 1.6rem 0 .8rem; scroll-margin-top: 90px; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 1.1rem; }
.post-body li { margin-bottom: .35rem; }
.post-body a { color: var(--primary-color); text-decoration: underline; }
.post-body table { width: 100%; margin-bottom: 1.4rem; font-size: .98rem; }
.post-body th { background: var(--primary-color); color: #fff; }
.post-body th, .post-body td { padding: .6rem .75rem; border: 1px solid #d9e2ec; vertical-align: top; }
.post-body tr:nth-child(even) td { background: #f5f8fc; }
.post-body blockquote, .post-body .note {
    border-left: 4px solid var(--primary-color);
    background: var(--primary-light);
    padding: 1rem 1.2rem;
    margin: 1.4rem 0;
    border-radius: 0 6px 6px 0;
}
.post-body .note p:last-child { margin-bottom: 0; }
.post-body .faq h3 { font-size: 1.12rem; margin-top: 1.2rem; }

.toc {
    background: #f5f8fc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 1.1rem 1.4rem;
    margin: 1.5rem 0 2rem;
}
.toc strong { display: block; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: .2rem 0; }
.toc a { color: var(--ink); }

.cta-box {
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    padding: 1.6rem 1.8rem;
    margin: 2.5rem 0;
}
.cta-box h2, .cta-box .h4 { color: #fff; margin: 0 0 .5rem; }
.cta-box a.btn { margin: .6rem .6rem 0 0; }
.cta-box .btn-light { color: var(--primary-dark); font-weight: 700; }

/* Cards (index + related) */
.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}
.post-card:hover { box-shadow: 0 8px 24px rgba(30, 90, 168, .15); transform: translateY(-2px); }
.post-card img { width: 100%; height: 190px; object-fit: cover; }
.post-card .card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--primary-color); font-weight: 700; }
.post-card h2, .post-card h3 { font-size: 1.15rem; line-height: 1.4; margin: .4rem 0 .6rem; }
.post-card h2 a, .post-card h3 a { color: var(--ink); }
.post-card p { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; flex: 1; }
.post-card .more { font-weight: 600; color: var(--primary-color); }

.cat-nav a {
    display: inline-block;
    margin: .25rem;
    padding: .35rem .9rem;
    border: 1px solid var(--primary-medium);
    border-radius: 20px;
    color: var(--primary-dark);
    font-size: .92rem;
}
.cat-nav a:hover { background: var(--primary-light); text-decoration: none; }

@media (max-width: 768px) {
    .page-header .blog-title { font-size: 1.7rem; }
    .post-body { font-size: 1rem; }
    .post-body h2 { font-size: 1.4rem; }
    .post-body table { display: block; overflow-x: auto; }
}
@media (max-width: 576px) {
    .navbar-brand .brand-name { font-size: 1.5rem; }
    .navbar-brand img { height: 35px; }
}
