/* Blog pages generated by the admin CMS (posts, listing, author). Loaded after site CSS. */

.post-hero { padding-bottom: clamp(3rem, 6vw, 4.5rem); background: var(--ss-navy); }
.post-hero::before { background: radial-gradient(circle at 85% 20%, rgba(255, 212, 29, .22), transparent 45%); }
.post-hero h1 { max-width: 980px; }
.post-meta a { color: #fff; text-decoration: none; }
.post-meta a:hover { color: var(--ss-yellow); }
.post-meta .bi { color: var(--ss-yellow); margin-right: .2rem; }

/* Left sticky sidebar: table of contents + CTA */
.post-sidebar { display: grid; gap: 1.25rem; }
@media (min-width: 992px) {
  /* TOC scrolls inside its box; the CTA below it always stays visible */
  .post-sidebar { position: sticky; top: calc(var(--ss-header-h) + 24px); max-height: calc(100vh - var(--ss-header-h) - 48px); display: flex; flex-direction: column; }
  .post-sidebar .toc { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .post-sidebar .toc > ol { overflow-y: auto; min-height: 0; scrollbar-width: thin; margin-right: -.5rem; padding-right: .5rem; }
  .sidebar-cta { flex: none; }
}
.post-sidebar .toc { position: static; max-height: none; }
.toc__title { display: flex; align-items: center; gap: .5rem; font-family: var(--ss-font-display); font-weight: 700; font-size: 1.15rem; color: var(--ss-ink); cursor: pointer; list-style: none; margin: 0; }
.toc__title::-webkit-details-marker { display: none; }
.toc__title::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; font-size: .85rem; transition: transform .2s ease; }
.toc[open] .toc__title::after { transform: rotate(180deg); }
.toc[open] .toc__title { margin-bottom: .9rem; }
@media (min-width: 992px) { .toc__title { pointer-events: none; } .toc__title::after { display: none; } }
.toc ol { counter-reset: toc; list-style: none; padding: 0; }
.toc > ol > li { counter-increment: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: .38rem .6rem .38rem 2rem; position: relative; border-radius: var(--ss-radius-sm); font-size: .93rem; line-height: 1.4; color: var(--ss-muted); }
.toc > ol > li > a::before { content: counter(toc, decimal-leading-zero); position: absolute; left: .55rem; top: .45rem; font-size: .75rem; font-weight: 800; color: var(--ss-yellow-600); }
.toc ol ol a { padding-left: 2.6rem; font-size: .88rem; }
.toc a:hover { background: #fff; color: var(--ss-ink); text-decoration: none; }
.toc a.is-active { background: var(--ss-yellow); color: var(--ss-ink); font-weight: 700; }
.toc a.is-active::before { color: var(--ss-ink) !important; }

.sidebar-cta { background: var(--ss-navy); color: #fff; border-radius: var(--ss-radius); padding: 1.5rem; position: relative; overflow: hidden; isolation: isolate; }
.sidebar-cta::before { content: ""; position: absolute; z-index: -1; width: 16rem; height: 16rem; right: -6rem; top: -6rem; background: radial-gradient(closest-side, rgba(255, 212, 29, .45), transparent); }
.sidebar-cta p { color: rgba(255, 255, 255, .82); font-size: .95rem; }
.sidebar-cta__eyebrow { font-size: .78rem !important; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ss-yellow) !important; margin-bottom: .35rem; }
.sidebar-cta__title { font-family: var(--ss-font-display); font-size: 1.4rem !important; font-weight: 700; color: #fff !important; line-height: 1.25; margin-bottom: .6rem; }
.sidebar-cta__phone { display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; color: #fff; font-weight: 700; text-decoration: none; font-size: .95rem; }
.sidebar-cta__phone:hover { color: var(--ss-yellow); }

/* Article */
.post-figure { margin: 0 0 2rem; border-radius: var(--ss-radius); overflow: hidden; box-shadow: var(--ss-shadow); }
.post-figure img { width: 100%; height: auto; display: block; }
.post-article .prose { max-width: none; font-size: 1.075rem; }
.post-article .prose > h2:first-child { margin-top: 0; }
.prose figure { margin: 2rem 0; }
.prose figure.image img { border-radius: var(--ss-radius-sm); height: auto; }
.prose figure.image figcaption, .prose figure.table figcaption { font-size: .9rem; color: var(--ss-muted); text-align: center; margin-top: .6rem; }
.prose figure.image_resized { max-width: 100%; }
.prose figure.image_resized img { width: 100%; }
.prose .image-style-side, .prose .image-style-align-right { float: right; max-width: 50%; margin: .3rem 0 1rem 1.5rem; }
.prose .image-style-align-left { float: left; max-width: 50%; margin: .3rem 1.5rem 1rem 0; }
.prose .image-style-align-center, .prose figure.image:not([class*="style"]) { margin-inline: auto; text-align: center; }
@media (max-width: 575.98px) { .prose .image-style-side, .prose .image-style-align-right, .prose .image-style-align-left { float: none; max-width: 100%; margin: 1.5rem 0; } }
.prose figure.table { overflow-x: auto; display: block; }
.prose figure.table table { min-width: 520px; }
.prose img { max-width: 100%; height: auto; }
.prose h2, .prose h3 { scroll-margin-top: calc(var(--ss-header-h) + 20px); }
.prose::after { content: ""; display: table; clear: both; }

.post-faq { margin-top: 3rem; }
.post-faq h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 1.25rem; }

.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.post-tags li { background: var(--ss-bg-soft); border: 1px solid var(--ss-line); border-radius: 999px; padding: .3rem .85rem; font-size: .88rem; font-weight: 600; }

.post-share { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; padding: 1.1rem 0; border-block: 1px solid var(--ss-line); font-weight: 700; }
.post-share span { margin-right: .5rem; }
.post-share a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ss-bg-soft); color: var(--ss-ink); text-decoration: none; transition: background-color .2s ease; }
.post-share a:hover { background: var(--ss-yellow); }

.author-box { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--ss-bg-soft); border: 1px solid var(--ss-line); border-radius: var(--ss-radius); padding: 1.5rem; }
.author-box img { width: 76px; height: 76px; border-radius: 50%; flex: none; background: #fff; border: 3px solid var(--ss-yellow); object-fit: contain; }
.author-box__label { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ss-muted); margin-bottom: .2rem; }
.author-box__name { font-size: 1.4rem; margin-bottom: .5rem; }
.author-box__name a { color: var(--ss-ink); text-decoration: none; }
.author-box p { font-size: .98rem; margin-bottom: .6rem; }
.author-box__link { font-weight: 700; color: var(--ss-ink); }
@media (max-width: 575.98px) { .author-box { flex-direction: column; } }

/* Popup enquiry form */
.enquiry-modal { border: 0; border-radius: calc(var(--ss-radius) * 1.3); padding: .5rem; border-top: 4px solid var(--ss-yellow); }
.enquiry-modal .modal-title { font-family: var(--ss-font-display); }

/* Listing pagination */
.pagination { --bs-pagination-color: var(--ss-ink); --bs-pagination-active-bg: var(--ss-ink); --bs-pagination-active-border-color: var(--ss-ink); --bs-pagination-hover-color: var(--ss-ink); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(255, 212, 29, .4); }
.post-card .btn-sm { padding: .45rem 1.1rem; font-size: .88rem; }
