/* Blog post layout: sticky table of contents on the left, article on the right,
   then AI summary, share, author, enquiry and related posts after the body.
   Loaded by component/blog-start.php; markup from blog-start.php / blog-end.php. */

.blg-progress { position: fixed; top: 0; left: 0; z-index: 10000; height: 3px; width: 0; background: #f5a623; transition: width .1s linear; }

.blg-wrap { padding: 40px 0 20px; }
.blg-wrap p, .blg-wrap li { text-align: left; }

/* Older posts wrap their body in their own .container / section; inside the
   article column those must not add a second fixed width or extra padding. */
.blg-article .container { max-width: none; width: 100%; padding-left: 0; padding-right: 0; }
.blg-article > section, .blg-article section.py-5 { padding-top: 0 !important; padding-bottom: 0 !important; }
.blg-article img { max-width: 100%; height: auto; }
.blg-article .blog-content-box { border: 0; }
.blg-article .blog-img img { border-radius: 10px; }
.blg-article h2, .blg-article h3, .blg-article h4 { scroll-margin-top: 110px; }
.blg-article .toc-wrapper { display: none; }

/* Meta line under the title */
.blg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 0 0 18px; margin-bottom: 24px; border-bottom: 1px solid #e1e7f0; font-size: 14px; color: #4a5a68; }
.blg-meta-author { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #1c2b39; }
.blg-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #0f3277; color: #fff; font-size: 15px; font-weight: 800; flex: 0 0 38px; }
.blg-avatar { overflow: hidden; }
.blg-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.blg-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.blg-meta-item i { color: #f5a623; }

/* Table of contents */
.blg-side { position: relative; }
.blg-side-inner { position: sticky; top: 110px; }
.blg-toc { background: #f3f6fb; border: 1px solid #e1e7f0; border-radius: 12px; padding: 18px 16px; max-height: calc(100vh - 140px); overflow-y: auto; }
.blg-toc-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #0f3277; }
.blg-toc-list { list-style: none; margin: 0; padding: 0; }
.blg-toc-list li { margin: 0; }
.blg-toc-list a { display: block; padding: 7px 10px; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; font-size: 14px; line-height: 1.45; color: #4a5a68; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s; }
.blg-toc-list a:hover { background: #fff; color: #0f3277; }
.blg-toc-list a.is-active { background: #fff; border-left-color: #f5a623; color: #0f3277; font-weight: 600; }
.blg-toc-list .blg-toc-sub a { padding-left: 24px; font-size: 13px; }
.blg-side-cta { margin-top: 16px; background: #0f3277; border-radius: 12px; padding: 18px 16px; color: #dce4f2; font-size: 14px; line-height: 1.6; }
.blg-side-cta strong { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }
.blg-side-cta a { display: inline-block; margin-top: 10px; background: #f5a623; color: #0a2457 !important; font-weight: 700; padding: 8px 16px; border-radius: 4px; text-decoration: none !important; }

/* Mobile table of contents */
.blg-toc-mobile { display: none; margin: 0 0 24px; background: #f3f6fb; border: 1px solid #e1e7f0; border-radius: 10px; }
.blg-toc-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: #0f3277; list-style: none; }
.blg-toc-mobile summary::-webkit-details-marker { display: none; }
.blg-toc-mobile summary::after { content: "+"; float: right; font-weight: 700; }
.blg-toc-mobile[open] summary::after { content: "\2212"; }
.blg-toc-mobile .blg-toc-list { padding: 0 8px 10px; }

/* After the body */
.blg-after { margin-top: 36px; }
.blg-full { margin-top: 16px; }
.blg-full .blg-author { padding: 28px 32px; }
.blg-full .blg-cta { padding: 30px 32px; }
.blg-after .rc-ai-summary { margin: 0 0 28px; }
.blg-block { border: 1px solid #e1e7f0; border-radius: 12px; padding: 22px 24px; margin-bottom: 24px; background: #fff; }
.blg-block-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: #0f3277; text-transform: none; }

.blg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.blg-share-label { font-weight: 700; color: #1c2b39; margin-right: 4px; }
.blg-share a, .blg-share button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #d3deef; border-radius: 20px; background: #fff; color: #0f3277 !important; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s; }
.blg-share a:hover, .blg-share button:hover { background: #0f3277; border-color: #0f3277; color: #fff !important; }

.blg-author { display: flex; gap: 32px; align-items: center; background: #f3f6fb; border: 0; }
/* Large portrait circle, about the height of the text block beside it. */
.blg-author .blg-avatar { width: 150px; height: 150px; flex: 0 0 150px; font-size: 60px; border: 5px solid #fff; box-shadow: 0 10px 26px rgba(15,50,119,.18); }
.blg-author .blg-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.blg-meta a.blg-meta-author { text-decoration: none !important; }
.blg-author-label { margin: 0 0 2px !important; font-size: 12px !important; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #6b7a87 !important; }
/* .blg-author prefix: these are <p>s and must beat the generic .blg-author p rule. */
.blg-author .blg-author-name { margin: 0 0 4px; font-size: 24px; font-weight: 800; line-height: 1.25; color: #0f3277; }
.blg-author .blg-author-role { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #f5a623; text-transform: uppercase; letter-spacing: .5px; }
.blg-author p { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: #4a5a68; }
.blg-author-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.blg-author-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid #c9d6ee; border-radius: 6px; background: #fff; color: #0f3277 !important; font-size: 14px; font-weight: 600; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.blg-author-links a:hover { background: #0f3277; border-color: #0f3277; color: #fff !important; }
.blg-author-links a.blg-btn-li { background: #0a66c2; border-color: #0a66c2; color: #fff !important; }
.blg-author-links a.blg-btn-li:hover { background: #004182; border-color: #004182; box-shadow: 0 6px 16px rgba(10,102,194,.3); }

.blg-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: #0f3277; border: 0; color: #dce4f2; }
.blg-cta h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: #fff; text-transform: none; }
.blg-cta p { margin: 0; color: #dce4f2; font-size: 15px; }
.blg-cta-btns a { display: inline-block; margin: 4px 0 4px 8px; padding: 11px 20px; border-radius: 4px; font-weight: 700; text-decoration: none !important; }
.blg-cta-btns .blg-btn-primary { background: #f5a623; color: #0a2457 !important; }
.blg-cta-btns .blg-btn-ghost { border: 2px solid #fff; color: #fff !important; }

.blg-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.blg-related a { display: block; border: 1px solid #e1e7f0; border-radius: 10px; overflow: hidden; background: #fff; color: #1c2b39 !important; text-decoration: none !important; transition: box-shadow .2s, border-color .2s; }
.blg-related a:hover { border-color: #0f3277; box-shadow: 0 10px 24px rgba(15,50,119,.1); }
.blg-related-img { display: block; aspect-ratio: 16 / 10; background: #f3f6fb; overflow: hidden; }
.blg-related-img img { width: 100%; height: 100%; object-fit: cover; }
.blg-related-title { display: block; padding: 12px 14px 14px; font-size: 14px; font-weight: 700; line-height: 1.45; }

@media (max-width: 991px) {
	.blg-side { display: none; }
	.blg-toc-mobile { display: block; }
	.blg-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
	.blg-wrap { padding-top: 24px; }
	.blg-related { grid-template-columns: 1fr; }
	.blg-author { flex-direction: column; align-items: flex-start; gap: 18px; }
	.blg-author .blg-avatar { width: 96px; height: 96px; flex-basis: 96px; font-size: 38px; }
	.blg-author-links a { flex: 1 1 100%; justify-content: center; }
	.blg-cta-btns a { margin-left: 0; margin-right: 8px; }
	.blg-block { padding: 18px; }
}
