/* ============ BluePeak Blog Post Redesign (ClearStaq-style) ============ */

/* Hide old Elementor hero; kill top spacing so the dark band meets the menu */
body.single-post .elementor-element-6b795c1a { display: none !important; }
body.single-post .elementor-element-62fdc6b7 { padding-top: 0 !important; margin-top: 0 !important; }
body.single-post .elementor-element-62fdc6b7 > .elementor-container,
body.single-post .elementor-element-86aee5d,
body.single-post .elementor-element-86aee5d > .elementor-widget-wrap { padding-top: 0 !important; }

/* Full-width post-content widget; inner blocks are constrained + centered (equal margins) */
body.single-post .elementor-element-62fdc6b7 .elementor-container { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
body.single-post .elementor-element-86aee5d,
body.single-post .elementor-element-86aee5d > .elementor-widget-wrap { padding-left: 0 !important; padding-right: 0 !important; }
body.single-post .elementor-element-4c910b58,
body.single-post .elementor-widget-theme-post-content > .elementor-widget-container { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; overflow: visible; }
/* Constrain the related-articles block (siblings of the content widget) too */
body.single-post .elementor-element-2eeefe1,
body.single-post .elementor-element-187b3697,
body.single-post .elementor-element-1d2fcfe9 { max-width: 1152px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }

/* ---------- HERO: full-width dark band (matches menu #0E1828) ---------- */
.bp-hero-band { width: 100%; background: #0e1828; padding: 52px 0 58px; }
.bp-hero-inner, .bp-hero-banner-wrap, .bp-article-grid { max-width: 1152px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
.bp-hero-cat { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #5cb0f2; margin-bottom: 15px; }
.bp-hero-title { font-size: 45px; line-height: 1.12; font-weight: 800; letter-spacing: -0.022em; color: #fff; margin: 0 0 18px; max-width: 900px; }
.bp-hero-meta { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font-size: 14.5px; color: #9aa6be; }
.bp-hero-meta .bp-dot { color: #4a5570; }

/* Image banner — contained, aligned with the grid, on white */
.bp-hero-banner-wrap { padding-top: 40px; }
.bp-hero-banner { margin: 0 0 46px; border-radius: 18px; overflow: hidden; background: #eef0f4; }
.bp-hero-banner img { width: 100%; display: block; aspect-ratio: 16 / 7; object-fit: cover; }

/* ---------- 2-COLUMN GRID: sticky sidebar (LEFT) + article (RIGHT) ---------- */
.bp-article-grid { display: grid; grid-template-columns: 312px minmax(0, 1fr); gap: 56px; align-items: stretch; padding-bottom: 20px; }
.bp-toc-sidebar { grid-column: 1; }
.bp-article-main { grid-column: 2; min-width: 0; }

/* Sticky block sized to the viewport so the CTA is always visible; TOC scrolls internally */
.bp-toc-sticky { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.bp-toc-box { border: 1px solid #e7e8ee; border-radius: 16px; padding: 16px 18px 8px; background: #fff; }
.bp-toc-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #99a0af; margin-bottom: 10px; flex: 0 0 auto; }
.bp-toc { display: flex; flex-direction: column; }
.bp-toc-link { display: block; padding: 5px 0 5px 14px; border-left: 2px solid #edeef2; color: #5a6072; font-size: 14px; line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.bp-toc-link.bp-toc-sub { padding-left: 28px; font-size: 13px; color: #868da0; }
.bp-toc-link:hover { color: #0b8bec; }
.bp-toc-link.is-active { color: #0b8bec; border-left-color: #0b8bec; font-weight: 600; }

/* CTA card — pinned below the TOC, always visible */
.bp-cta-card { flex: 0 0 auto; background: linear-gradient(160deg, #141a33 0%, #1d2547 100%); border-radius: 16px; padding: 20px; color: #fff; }
.bp-cta-title { font-size: 16.5px; font-weight: 700; margin-bottom: 7px; }
.bp-cta-text { font-size: 13.5px; line-height: 1.55; color: #b9c0d6; margin: 0 0 15px; }
.bp-cta-btn { display: block; text-align: center; background: #0b8bec; color: #fff !important; font-weight: 600; font-size: 14.5px; padding: 12px 16px; border-radius: 10px; text-decoration: none !important; transition: background .15s, transform .15s; }
.bp-cta-btn:hover { background: #0a79cc; transform: translateY(-1px); }

/* ---------- Body typography ---------- */
body.single-post .elementor-widget-theme-post-content { font-size: 17.5px; line-height: 1.8; color: #33333c; }
.bp-article-main > p:first-child { font-size: 19px; color: #454b5c; }
.bp-article-main p { margin: 0 0 1.35em; }
.bp-article-main a { color: #0b8bec; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.bp-article-main h2 { font-size: 27px; line-height: 1.25; font-weight: 700; color: #141a33; letter-spacing: -0.01em; margin: 2.1em 0 0.65em; scroll-margin-top: 96px; }
.bp-article-main h3 { font-size: 20px; line-height: 1.3; font-weight: 700; color: #1c2340; margin: 1.7em 0 0.5em; scroll-margin-top: 96px; }
.bp-article-main ul, .bp-article-main ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.bp-article-main li { margin: 0 0 0.5em; }

/* In-content ez-toc: hide on desktop (sidebar replaces it), show on mobile */
body.single-post #ez-toc-container { background: #f8f9fb; border: 1px solid #e7e8ee; border-radius: 14px; padding: 20px 24px; box-shadow: none; width: auto; float: none; }
@media (min-width: 1025px) { body.single-post #ez-toc-container { display: none; } }

/* Stat cards */
body.single-post .pseo-stat { border: 1px solid #e7e8ee !important; background: #f8f9fb !important; border-radius: 14px !important; color: #141a33 !important; }
body.single-post .pseo-stat > div:first-child { color: #0b8bec !important; }

/* Tables */
.bp-article-main table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15.5px; border: 1px solid #e7e8ee; border-radius: 12px; overflow: hidden; }
.bp-article-main thead th { background: #141a33; color: #fff; font-weight: 600; text-align: left; padding: 13px 16px; font-size: 14px; }
.bp-article-main tbody td { padding: 12px 16px; border-top: 1px solid #edeef3; color: #3a3f52; }
.bp-article-main tbody tr:nth-child(even) { background: #fafbfc; }

/* FAQ */
body.single-post .pseo-faq-item { padding: 22px 0 !important; border-bottom: 1px solid #edeef3; }
body.single-post .pseo-faq-item p:first-child { font-size: 17.5px !important; color: #141a33 !important; margin: 0 0 8px !important; }
body.single-post .pseo-faq-item p:last-child { font-size: 16px !important; line-height: 1.7 !important; color: #5a5f70 !important; }

/* ---------- RELATED ARTICLES: hide old Elementor widget; custom .bp-related instead ---------- */
body.single-post .elementor-element-187b3697, body.single-post .elementor-element-1d2fcfe9, body.single-post .elementor-element-2eeefe1 { display: none !important; }

.bp-related { max-width: 1152px; margin: 8px auto 8px; padding: 0 24px; box-sizing: border-box; }
.bp-related-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: #141a33; margin: 0 0 26px; }
.bp-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bp-related-card { display: flex; flex-direction: column; border: 1px solid #e9ebf1; border-radius: 16px; overflow: hidden; background: #fff; text-decoration: none !important; transition: box-shadow .2s, transform .2s, border-color .2s; }
.bp-related-card:hover { box-shadow: 0 16px 38px rgba(20,26,51,.12); transform: translateY(-4px); border-color: #dfe2ea; }
.bp-related-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #eef0f4; }
.bp-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.bp-related-card:hover .bp-related-thumb img { transform: scale(1.04); }
.bp-related-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 11px; flex: 1 1 auto; }
.bp-related-cat { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #0b8bec; background: #e8f4fd; padding: 5px 11px; border-radius: 999px; }
.bp-related-cardtitle { font-size: 18px; line-height: 1.3; font-weight: 700; color: #141a33; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bp-related-meta { margin-top: auto; font-size: 13.5px; color: #7a8194; }
.bp-related-meta .bp-dot { color: #c3c7d0; margin: 0 3px; }

/* (legacy Elementor related card rules kept but widget hidden) */
body.single-post .elementor-element-187b3697 { text-align: center; margin-top: 3.2em; }
body.single-post .elementor-element-1d2fcfe9 .elementor-posts-container { align-items: stretch; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post { display: flex; flex-direction: column; justify-content: flex-start; border: 1px solid #eceef3; border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; height: 100%; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post:hover { box-shadow: 0 14px 34px rgba(20,26,51,.10); transform: translateY(-3px); }
body.single-post .elementor-element-1d2fcfe9 .elementor-post__thumbnail { position: relative; aspect-ratio: 16 / 10; height: auto !important; padding-bottom: 0 !important; overflow: hidden; margin: 0 !important; flex: 0 0 auto; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post__thumbnail img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post__text { padding: 20px 22px 24px !important; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post__title { margin: 0 !important; }
body.single-post .elementor-element-1d2fcfe9 .elementor-post__read-more { margin: auto 0 0 !important; align-self: flex-start; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bp-article-grid { grid-template-columns: 1fr; gap: 0; }
  .bp-article-main { grid-column: auto; }
  .bp-toc-sidebar { display: none; }
  .bp-hero-title { font-size: 33px; }
  .bp-hero-band { padding: 32px 0 38px; width: auto; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
  .bp-hero-banner-wrap { padding-top: 26px; }
  .bp-related-grid { grid-template-columns: 1fr; }
}
