/* ===================================================================
   Blog (v2) — scoped to .blog-* classes so it doesn't bleed into
   Tax_guides / Help_center / other v2 pages.
   =================================================================== */

/* ----- Hero band on the listing ------------------------------------ */
.blog-hero {
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #eef0f5;
}
.blog-hero .breadcrumb-item a { color: #6b7280; text-decoration: none; }
.blog-hero .breadcrumb-item a:hover { color: var(--bs-primary); }

.blog-searchbar .input-group-text { border-right: 0; }
.blog-searchbar .form-control:focus { box-shadow: none; }

/* ----- Sidebar (categories list) ----------------------------------- */
.blog-side .blog-cat-link {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
}
.blog-side .blog-cat-link:hover { background: #f3f4f6; color: var(--bs-primary); }
.blog-side .blog-cat-link.is-active { background: #eef2ff; color: var(--bs-primary); font-weight: 600; }

/* ----- Cards (listing + related) ----------------------------------- */
.blog-card {
    border: 1px solid #eef0f5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.blog-card:hover {
    box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
    transform: translateY(-2px);
    border-color: #dfe3ec;
}
.blog-card-media {
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
}
.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.blog-card:hover .blog-card-media img { transform: scale(1.04); }

.blog-card-title {
    font-size: 17px;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-excerpt {
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-meta { display: flex; align-items: center; gap: 8px; letter-spacing: .04em; }
.blog-read-more { color: var(--bs-primary); font-weight: 600; }

/* Category pill — small label badge */
.blog-cat-pill {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-decoration: none;
}
a.blog-cat-pill:hover { background: #dbeafe; }

/* Empty state */
.blog-empty { color: #6b7280; }

/* Pagination */
.blog-pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    min-width: 38px;
    text-align: center;
}
.blog-pagination .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}
.blog-pagination .page-item.disabled .page-link { color: #9ca3af; background: #f9fafb; }

/* ===================================================================
   Detail page
   =================================================================== */
.blog-detail-header {
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #eef0f5;
}
.blog-meta-row { color: #6b7280; }

.blog-cover-section { background: #fff; padding-top: 0; }
.blog-cover-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(17, 24, 39, .06);
    max-height: 460px;
}
.blog-cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Body typography */
.blog-body {
    color: #374151;
    font-size: 1.05rem;
    line-height: 1.75;
}
.blog-body h2 { font-size: 1.5rem; font-weight: 700; color: #1f2937; margin: 2rem 0 1rem; }
.blog-body h3 { font-size: 1.25rem; font-weight: 700; color: #1f2937; margin: 1.5rem 0 .75rem; }
.blog-body h4 { font-size: 1.1rem;  font-weight: 700; color: #1f2937; margin: 1.25rem 0 .5rem; }
.blog-body p  { margin-bottom: 1rem; }
.blog-body a  { color: var(--bs-primary); text-decoration: underline; }
.blog-body ul, .blog-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-body ul li { margin-bottom: .35rem; }
.blog-body ol li { margin-bottom: .35rem; }
.blog-body blockquote {
    border-left: 4px solid var(--bs-primary);
    background: #f8f9ff;
    padding: .75rem 1rem;
    margin: 1.25rem 0;
    color: #4b5563;
    border-radius: 0 8px 8px 0;
}
.blog-body code {
    background: #f3f4f6;
    padding: .125rem .375rem;
    border-radius: 4px;
    font-size: .9em;
}
.blog-body pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.25rem 0;
}
.blog-body pre code { background: transparent; color: inherit; padding: 0; }
.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.25rem 0;
    display: block;
}
.blog-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
}
.blog-body th, .blog-body td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}
.blog-body th { background: #f9fafb; font-weight: 700; }

/* Tags */
.blog-tag-pill {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 4px 4px 0;
    text-decoration: none;
}
.blog-tag-pill:hover { background: #dbeafe; }

/* Share */
.blog-share-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.blog-share-btn:hover {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}
