/* ============================================================
   ERCS-BLOG.CSS — blog/index.blade.php + blog/show.blade.php
   Merged from style.css + responsive.css (only rules these two
   pages actually use). Self-contained: includes tokens, base and
   shared bits, so style.css / responsive.css are not needed here.
   Same design tokens as home.css / about.css / service.css.
   ============================================================ */

:root {
  --primary: #0b2544;
  --primary-dark: #071a33;
  --accent: #1455d9;
  --ivory: #faf9f5;
  --surface: #f6f8fb;
  --text: #1a2233;
  --text-soft: #3d4759;
  --muted: #6b7585;
  --border: #e6e9ef;
  --white: #ffffff;
  --bronze: #b08a4e;
  --shadow-sm: 0 4px 14px rgba(15,30,55,.05);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --container: 1200px;
  --header-height: 80px;
  --transition: 180ms ease;
}

/* ---------- Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1,h2,h3,h4,p { margin-top: 0; }
h1,h2,h3,h4 {
  color: var(--primary-dark);
  font-family: Inter, sans-serif;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-sm { padding: clamp(36px, 5vw, 64px) 0; }

.sr-only {
  position:absolute !important;
  width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important;
  overflow:hidden !important; clip:rect(0,0,0,0) !important;
  white-space:nowrap !important; border:0 !important;
}

/* ---------- Shared UI bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: .74rem; line-height: 1;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.eyebrow::before { content:""; width: 20px; height: 1px; background: currentColor; }
.section-heading { max-width: 700px; margin-bottom: 36px; }
.section-heading h2 { margin: 10px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  transition: var(--transition);
}
.btn-primary { background: var(--accent); color: var(--white); cursor: pointer; }
.btn-primary:hover { background: #0d48be; }
.text-link { display:inline-flex; align-items:center; gap:6px; color: var(--accent); font-weight: 600; font-size: .95rem; }
.text-link span { transition: transform var(--transition); }
.text-link:hover span { transform: translateX(3px); }

.breadcrumb { display:flex; flex-wrap:wrap; gap:6px; color:var(--muted); font-size:.84rem; }
.breadcrumb a:hover { color:var(--accent); }

.blog-category {
  display:inline-flex; align-items:center; min-height:28px; padding:0 10px;
  border-radius:var(--radius-sm); background:#eef4ff; color:var(--accent);
  font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
}
.blog-meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; color:var(--muted); font-size:.8rem; }

/* ---------- Blog index: page header ---------- */
/* top padding includes the fixed site header height so the breadcrumb is not hidden behind it */
.page-hero { position:relative; overflow:hidden; padding:calc(var(--header-height) + 40px) 0 56px; background:var(--ivory); }
.page-hero::after {
  content:""; position:absolute; right:-80px; top:-160px; width:360px; height:360px;
  border:1px solid rgba(20,85,217,.10); border-radius:50%;
}
.page-hero h1 { max-width:900px; margin:16px 0 14px; }
.page-hero p { max-width:700px; color:var(--muted); font-size:1.02rem; }

/* ---------- Blog index: featured article ---------- */
.featured-blog { display:grid; grid-template-columns:1.08fr .92fr; gap:40px; align-items:center; }
.featured-blog-image { display:block; overflow:hidden; border-radius:var(--radius-lg); background:var(--surface); }
.featured-blog-image img { width:100%; aspect-ratio:16/11; object-fit:cover; }
.featured-blog-content .blog-category { margin-bottom:6px; }
.featured-blog-content h2 { margin:12px 0 14px; font-size:clamp(1.6rem,3vw,2.3rem); }
.featured-blog-content h2 a:hover { color:var(--accent); }
.featured-blog-content p { color:var(--muted); font-size:1rem; }

/* ---------- Blog index: search + category filters (server-side) ---------- */
.blog-toolbar { display:grid; gap:16px; }
.blog-search { display:flex; gap:10px; }
.blog-search .service-search { flex:1; min-width:0; }
.service-search input {
  width:100%; min-height:50px; padding:0 16px;
  border:1px solid var(--border); border-radius:var(--radius-md);
  background:var(--white); color:var(--text); outline:none; transition:var(--transition);
}
.service-search input:focus { border-color:rgba(20,85,217,.5); box-shadow:0 0 0 3px rgba(20,85,217,.08); }
.blog-search-btn { min-height:50px; border:0; }

.service-filters { display:flex; flex-wrap:wrap; gap:8px; }
.filter-chip {
  display:inline-flex; align-items:center; gap:8px;
  min-height:38px; padding:0 14px; border:1px solid var(--border);
  border-radius:var(--radius-sm); background:var(--white);
  color:var(--text-soft); font-weight:600; font-size:.9rem; cursor:pointer; transition:var(--transition);
}
.filter-chip:hover,
.filter-chip.is-active { border-color:var(--accent); color:var(--accent); background:#f6f9ff; }
.filter-count {
  padding:1px 8px; border-radius:999px; background:var(--surface);
  color:var(--muted); font-size:.72rem; font-weight:700;
}
.filter-chip.is-active .filter-count { background:var(--white); color:var(--accent); }

.blog-active-filter {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 16px; border-radius:var(--radius-md); background:var(--surface);
  color:var(--muted); font-size:.9rem;
}
.blog-active-filter strong { color:var(--primary-dark); }

/* ---------- Blog index + related: article cards ---------- */
.blog-list-section { padding-top:32px; }
.blog-directory-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.blog-directory-card {
  display:flex; flex-direction:column; overflow:hidden;
  border:1px solid var(--border); border-radius:var(--radius-md);
  background:var(--white); transition:transform var(--transition), border-color var(--transition);
}
.blog-directory-card:hover { transform:translateY(-3px); border-color:var(--accent); }
.blog-directory-image { display:block; flex-shrink:0; overflow:hidden; aspect-ratio:16/10; background:var(--surface); }
.blog-directory-image img { width:100%; height:100%; object-fit:cover; }
.blog-directory-body { display:flex; flex-direction:column; flex:1 1 auto; padding:20px; }
.blog-directory-body h2 { margin:0 0 8px; font-size:1.1rem; line-height:1.35; }
.blog-directory-body h2 a { display:block; color:var(--primary-dark); }
.blog-directory-body h2 a:hover { color:var(--accent); }
.blog-directory-body p { flex-grow:1; margin:0 0 16px; color:var(--muted); font-size:.9rem; }
.blog-directory-body .text-link { margin-top:auto; }

.empty-state {
  margin:0; padding:22px; border:1px dashed var(--border);
  border-radius:var(--radius-md); text-align:center; color:var(--muted); background:var(--surface);
}
.empty-state .text-link { margin-left:8px; }

.pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:36px; }
.pagination a,
.pagination span {
  width:40px; height:40px; display:grid; place-items:center;
  border:1px solid var(--border); border-radius:var(--radius-sm);
  background:var(--white); font-weight:600; font-size:.92rem; transition:var(--transition);
}
.pagination a:hover { border-color:var(--accent); color:var(--accent); }
.pagination a.is-current { border-color:var(--accent); background:var(--accent); color:var(--white); }
.pagination .is-disabled { opacity:.4; }

/* ---------- CTA panel (index) ---------- */
.cta-panel {
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:24px;
  padding:clamp(28px,5vw,52px); border-radius:var(--radius-lg); color:var(--white);
  background:var(--primary-dark);
}
.cta-panel h2 { color:var(--white); margin:8px 0; max-width:720px; }
.cta-panel p { margin:0; color:rgba(255,255,255,.68); }

/* ---------- Blog show: reading progress ---------- */
.reading-progress { position:fixed; top:0; left:0; right:0; height:3px; z-index:2000; pointer-events:none; }
.reading-progress span { display:block; width:0%; height:100%; background:var(--accent); }

/* ---------- Blog show: article header ---------- */
.article-hero { padding:calc(var(--header-height) + 32px) 0 40px; background:var(--ivory); }
.article-hero-inner { max-width:900px; }
.article-hero .blog-category { margin-top:22px; }
.article-hero h1 { margin:14px 0; font-size:clamp(2rem,4vw,3rem); }
.article-deck { max-width:760px; color:var(--muted); font-size:1.08rem; }
.article-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; color:var(--muted); font-size:.88rem; }

.article-featured-image {
  margin:40px auto 0; max-width:1100px; overflow:hidden;
  border-radius:var(--radius-lg); background:var(--surface);
}
.article-featured-image img { width:100%; aspect-ratio:16/9; object-fit:cover; }

/* ---------- Blog show: layout, TOC, share ---------- */
.article-main { padding:56px 0 24px; }
.article-layout { display:grid; grid-template-columns:240px minmax(0,740px); justify-content:center; gap:56px; }
.article-sidebar-inner { position:sticky; top:calc(var(--header-height) + 24px); }

.toc-block,
.share-block { border:1px solid var(--border); border-radius:var(--radius-md); background:var(--white); }
.toc-toggle {
  width:100%; display:flex; justify-content:space-between; gap:12px;
  padding:14px 16px; border:0; background:none; font-weight:700; cursor:pointer;
}
.article-toc { display:grid; padding:0 16px 14px; }
.article-toc[hidden] { display:none; }
.article-toc a { padding:6px 0; color:var(--muted); font-size:.83rem; }
.article-toc a.level-3 { padding-left:14px; font-size:.8rem; }
.article-toc a:hover,
.article-toc a.is-active { color:var(--accent); }

.share-block { margin-top:12px; padding:16px; }
.share-block > span {
  display:block; margin-bottom:10px; font-size:.74rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em;
}
.share-actions { display:grid; gap:6px; }
.share-actions button {
  border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface);
  padding:8px 10px; text-align:left; cursor:pointer; transition:var(--transition);
}
.share-actions button:hover { border-color:var(--accent); color:var(--accent); }

/* ---------- Blog show: article content (HTML from the database) ---------- */
.article-content { min-width:0; color:var(--text-soft); }
.article-content .lead { color:var(--primary-dark); font-size:1.18rem; line-height:1.65; }
.article-content h2,
.article-content h3 { scroll-margin-top:calc(var(--header-height) + 30px); }
.article-content h2 { margin:44px 0 14px; font-size:clamp(1.5rem,2.6vw,2rem); }
.article-content h3 { margin:30px 0 12px; font-size:1.25rem; }
.article-content p,
.article-content li { color:var(--text-soft); }
.article-content p { margin-bottom:18px; }
.article-content ul,
.article-content ol { padding-left:24px; margin-bottom:22px; }
.article-content li + li { margin-top:6px; }
.article-content a { color:var(--accent); font-weight:600; }
.article-content img { margin:24px 0; border-radius:var(--radius-md); }
.article-content blockquote {
  margin:28px 0; padding:22px 24px; border-left:4px solid var(--bronze);
  background:var(--ivory); color:var(--primary-dark); font-size:1.08rem; font-weight:600;
}
.article-content table { width:100%; border-collapse:collapse; margin:26px 0; font-size:.9rem; }
.article-content th,
.article-content td { padding:12px 14px; border:1px solid var(--border); text-align:left; vertical-align:top; }
.article-content th { background:var(--surface); color:var(--primary-dark); }
.article-callout {
  margin:26px 0; padding:20px; border:1px solid rgba(20,85,217,.14);
  border-radius:var(--radius-md); background:#f6f9ff;
}
.article-callout strong { display:block; margin-bottom:6px; color:var(--accent); }
.article-callout p { margin:0; }

/* Author box */
.author-card {
  display:flex; gap:16px; align-items:flex-start; margin-top:44px; padding:20px;
  border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface);
}
.author-card-avatar { flex:0 0 56px; width:56px; height:56px; border-radius:50%; object-fit:cover; }
.author-card-avatar--fallback {
  display:grid; place-items:center; background:var(--accent); color:var(--white);
  font-weight:700; font-size:1.2rem;
}
.author-card-label { display:block; color:var(--muted); font-size:.74rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.author-card-name { display:block; color:var(--primary-dark); font-size:1.02rem; }
.author-card p { margin:6px 0 0; color:var(--muted); font-size:.9rem; }

/* ---------- Blog show: related + prev/next ---------- */
.related-articles-section { background:var(--surface); }
.article-next-prev { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; padding:40px 0 72px; }
.article-next-prev a {
  display:flex; flex-direction:column; gap:6px; padding:20px;
  border:1px solid var(--border); border-radius:var(--radius-md); background:var(--white);
  transition:var(--transition);
}
.article-next-prev a:hover { border-color:var(--accent); }
.article-next-prev a:last-child { text-align:right; }
.article-next-prev span { color:var(--muted); font-size:.8rem; font-weight:600; }
.article-next-prev strong { color:var(--primary-dark); }

/* ---------- Focus / reduced motion ---------- */
:focus-visible { outline:2px solid rgba(20,85,217,.4); outline-offset:2px; }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* ============================================================
   Responsive — only rules that touch classes used above
   ============================================================ */

@media (max-width: 1080px) {
  .blog-directory-grid { grid-template-columns:repeat(2,1fr); }
  .article-layout { grid-template-columns:1fr; gap:32px; }
  .article-sidebar-inner { position:static; }
}

@media (max-width: 920px) {
  :root { --header-height:74px; }
  .cta-panel { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
  .featured-blog { grid-template-columns:1fr; gap:28px; }
}

@media (max-width: 640px) {
  .container { width:min(calc(100% - 28px), var(--container)); }
  .section { padding:56px 0; }
  .blog-list-section { padding-top:32px; }
  h1 { font-size:clamp(2.1rem,10vw,3rem); }
  h2 { font-size:clamp(1.6rem,8vw,2.1rem); }

  .page-hero { padding:calc(var(--header-height) + 28px) 0 40px; }
  .blog-directory-grid { grid-template-columns:1fr; }
  .blog-search { flex-direction:column; }

  .article-hero { padding:calc(var(--header-height) + 24px) 0 32px; }
  .article-featured-image { margin-top:24px; border-radius:var(--radius-md); }
  .article-main { padding-top:40px; }
  .article-content table { display:block; overflow-x:auto; white-space:nowrap; }
  .article-next-prev { grid-template-columns:1fr; }
  .article-next-prev a:last-child { text-align:left; }
}

/* ============================================================
   ERCS BLOG — 2026 Editorial refinement
   Designed for the existing index/show Blade templates.
   The article header is a genuine split layout: content LEFT,
   feature image RIGHT, stacked in a logical order on mobile.
   ============================================================ */

/* Restrict premium overrides to blog sections, not the shared navbar/footer. */
.blog-page-hero,
.article-hero-split {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 88% 7%, rgba(20,85,217,.095), transparent 47%),
    linear-gradient(135deg,#f9fbff 0%,#f6f8fc 60%,#faf9f5 100%);
}
.blog-page-hero::before,
.article-hero-split::before {
  content:""; pointer-events:none; position:absolute; inset:auto -7% -240px auto;
  width:540px; height:540px; border:1px solid rgba(20,85,217,.07);
  border-radius:50%; z-index:-1;
}
.blog-page-hero .container,
.article-hero-split .container { position:relative; z-index:1; }
.blog-page-hero h1,
.article-hero-split h1 {
  color:var(--primary-dark); letter-spacing:-.047em; font-weight:800;
  line-height:1.09; text-wrap:balance;
}
.blog-page-hero h1 { max-width:820px; font-size:clamp(2.65rem,5vw,4.55rem); }
.blog-page-hero p { max-width:650px; font-size:clamp(1rem,1.35vw,1.12rem); line-height:1.8; }
.blog-page-hero .eyebrow { margin-top:32px; }
.blog-page-hero .breadcrumb,
.article-hero-split .breadcrumb { font-weight:500; gap:10px; }
.blog-page-hero .breadcrumb a,
.article-hero-split .breadcrumb a { transition:color var(--transition); }

/* Index: feature area */
.blog-featured-area { padding:clamp(48px,6vw,86px) 0 38px; }
.blog-featured-area .featured-blog {
  grid-template-columns:minmax(0,1.03fr) minmax(0,.97fr); gap:clamp(26px,5vw,76px);
  padding:clamp(16px,2vw,28px); border:1px solid #e5ebf5;
  border-radius:28px; background:#fff;
  box-shadow:0 25px 75px rgba(8,32,65,.075);
}
.blog-featured-area .featured-blog-image { border-radius:19px; height:100%; }
.blog-featured-area .featured-blog-image img {
  height:100%; min-height:350px; aspect-ratio:1.25; object-fit:cover;
  transition:transform 550ms cubic-bezier(.2,.8,.2,1);
}
.blog-featured-area .featured-blog:hover img { transform:scale(1.035); }
.blog-featured-area .featured-blog-content { padding:clamp(6px,1.5vw,24px) clamp(8px,2vw,25px) clamp(6px,1.5vw,24px) 0; }
.blog-featured-area .featured-blog-content h2 { font-size:clamp(1.8rem,3vw,2.8rem); line-height:1.17; letter-spacing:-.035em; }
.blog-featured-area .featured-blog-content p { line-height:1.85; }
.blog-category { border-radius:999px; padding:4px 13px; letter-spacing:.075em; }
.blog-meta { align-items:center; gap:9px; }
.blog-featured-area .text-link { margin-top:18px; }

/* Index: controls and directory */
.blog-toolbar-premium { padding:22px; border:1px solid #e7ebf3; border-radius:21px; background:#fff; box-shadow:0 12px 40px rgba(8,32,65,.035); }
.blog-toolbar-premium .service-search input { border-radius:12px; min-height:54px; padding-inline:20px; }
.blog-toolbar-premium .filter-chip { border-radius:999px; min-height:40px; padding:0 17px; }
.blog-toolbar-premium .filter-chip.is-active { color:white; border-color:var(--accent); background:var(--accent); }
.blog-toolbar-premium .filter-chip.is-active .filter-count { color:var(--accent); }
.blog-directory-area { padding-top:30px; }
.blog-directory-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:25px; }
.blog-directory-card {
  border-radius:20px; border-color:#e6ebf2;
  box-shadow:0 9px 30px rgba(8,32,65,.035);
  transition:transform 250ms ease,box-shadow 250ms ease,border-color 250ms ease;
}
.blog-directory-card:hover { transform:translateY(-6px); box-shadow:0 22px 45px rgba(8,32,65,.11); border-color:#c8d9f9; }
.blog-directory-image { aspect-ratio:16/10; }
.blog-directory-image img { transition:transform 500ms ease; }
.blog-directory-card:hover .blog-directory-image img { transform:scale(1.045); }
.blog-directory-body { padding:25px 26px 28px; }
.blog-directory-body h2 { font-size:1.16rem; letter-spacing:-.018em; line-height:1.42; }
.blog-directory-body p { line-height:1.75; }
.blog-cta-panel { border-radius:23px; box-shadow:0 24px 65px rgba(7,26,51,.14);
  background:radial-gradient(circle at 88% 5%,rgba(58,123,238,.28),transparent 35%),linear-gradient(135deg,#071a33,#0c3157); }

/* SHOW: key request — title/excerpt/meta LEFT, uploaded image RIGHT. */
.article-hero-split { position:relative; padding:calc(var(--header-height) + 38px) 0 clamp(48px,6vw,85px); overflow:hidden; }
.article-hero-split .article-hero-inner { max-width:var(--container); }
.article-hero-grid {
  display:grid; grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);
  align-items:center; gap:clamp(24px,4.6vw,72px); margin-top:clamp(28px,4vw,54px);
}
.article-hero-copy { min-width:0; }
.article-hero-split .blog-category { margin-top:0; }
.article-hero-split h1 {
  max-width:700px; margin:18px 0 22px;
  font-size:clamp(2.05rem,3.7vw,3.85rem); overflow-wrap:anywhere;
}
.article-hero-split .article-deck {
  margin-bottom:22px; max-width:610px; font-size:clamp(1rem,1.24vw,1.12rem);
  line-height:1.8; color:#4b5d70;
}
.article-hero-split .article-meta { margin-top:24px; padding-top:18px; border-top:1px solid #dfe6f0; gap:10px; }
.article-hero-media {
  width:100%; min-width:0; max-width:none; margin:0; align-self:stretch;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(20,85,217,.1); border-radius:23px; overflow:hidden;
  background:#e9eef6; box-shadow:0 28px 65px rgba(8,32,65,.14);
}
.article-hero-media img {
  display:block; width:100%; height:100%; min-height:310px;
  max-height:510px; aspect-ratio:1.32; object-fit:contain;
}
.article-main-premium { padding-top:clamp(42px,5vw,80px); }
.article-layout-premium {
  grid-template-columns:minmax(195px,245px) minmax(0,790px);
  gap:clamp(28px,5vw,78px); justify-content:center; align-items:start;
}
.article-sidebar { min-width:0; }
.article-sidebar-inner { top:calc(var(--header-height) + 24px); }
.article-layout-premium .toc-block,
.article-layout-premium .share-block { border-color:#e3eaf4; border-radius:15px; box-shadow:0 7px 28px rgba(8,32,65,.035); }
.article-layout-premium .toc-toggle { padding:18px 19px; color:var(--primary-dark); }
.article-layout-premium .article-toc { padding:0 19px 18px; max-height:min(56vh,510px); overflow-y:auto; }
.article-layout-premium .article-toc a { border-left:2px solid transparent; padding:7px 0 7px 10px; line-height:1.5; }
.article-layout-premium .article-toc a.is-active { border-left-color:var(--accent); background:#f7faff; font-weight:600; }
.article-layout-premium .article-content { max-width:100%; font-size:1rem; line-height:1.88; overflow-wrap:anywhere; }
.article-layout-premium .article-content :is(h2,h3) { letter-spacing:-.025em; line-height:1.25; }
.article-layout-premium .article-content h2 { margin-top:46px; }
.article-layout-premium .article-content img { max-width:100%; height:auto; }
.article-layout-premium .article-content :is(pre,table,iframe) { max-width:100%; }
.article-layout-premium .article-content pre { overflow-x:auto; }
.article-layout-premium .article-content table { display:block; overflow-x:auto; }
.article-layout-premium .author-card { border-radius:18px; }
.article-layout-premium .faq-item summary { color:var(--primary-dark); }
.related-articles-section { background:#f6f8fc; }

/* keyboard focus only within blog components */
.blog-page-hero :focus-visible,
.blog-featured-area :focus-visible,
.blog-toolbar-premium :focus-visible,
.blog-directory-area :focus-visible,
.article-hero-split :focus-visible,
.article-main-premium :focus-visible { outline:3px solid rgba(20,85,217,.48); outline-offset:3px; }

@media (max-width:1100px) {
  .article-hero-grid { grid-template-columns:minmax(0,1fr) minmax(0,.9fr); gap:28px; }
  .article-hero-split h1 { font-size:clamp(2rem,3.8vw,3.1rem); }
  .article-layout-premium { grid-template-columns:minmax(175px,220px) minmax(0,1fr); gap:30px; }
  .blog-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:850px) {
  .article-hero-grid { grid-template-columns:minmax(0,1fr); gap:27px; }
  .article-hero-copy { max-width:700px; }
  .article-hero-media { min-height:0; max-width:720px; }
  .article-hero-media img { height:auto; min-height:0; max-height:480px; aspect-ratio:16/9; }
  .article-layout-premium { grid-template-columns:minmax(0,1fr); gap:28px; }
  .article-sidebar-inner { position:static; }
  .article-layout-premium .article-toc { max-height:280px; }
  .blog-featured-area .featured-blog { grid-template-columns:minmax(0,1fr); }
  .blog-featured-area .featured-blog-image img { min-height:0; height:auto; aspect-ratio:16/9; }
  .blog-featured-area .featured-blog-content { padding:8px 13px 20px; }
}
@media (max-width:640px) {
  .blog-page-hero { padding-bottom:44px; }
  .blog-page-hero h1 { font-size:clamp(2.25rem,9vw,3.15rem); }
  .article-hero-split { padding-top:calc(var(--header-height) + 26px); padding-bottom:42px; }
  .article-hero-grid { margin-top:27px; }
  .article-hero-split h1 { font-size:clamp(2.05rem,8vw,2.75rem); }
  .article-hero-media { border-radius:15px; }
  .article-hero-media img { aspect-ratio:16/10; object-fit:contain; }
  .blog-toolbar-premium { padding:16px; }
  .blog-directory-grid { grid-template-columns:minmax(0,1fr); }
  .blog-directory-body { padding:22px; }
  .article-main-premium { padding-top:35px; }
}
@media (prefers-reduced-motion:reduce) {
  .blog-featured-area .featured-blog-image img,
  .blog-directory-card,
  .blog-directory-image img { transition:none!important; }
}





/* ==========================================
   BLOG SHOW — STICKY TOC + FULL IMAGE FIX
   Add at the END of ercs-blog.css
   ========================================== */

/* 1. Desktop: Sticky Table of Contents */
@media (min-width: 851px) {

  .article-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 60px);
    align-items: stretch;
  }

  .article-sidebar {
    position: relative;
    align-self: stretch;
    min-width: 0;
  }

  .article-sidebar-inner {
    position: sticky;
    top: calc(var(--header-height, 80px) + 20px);
    max-height: calc(
      100dvh - var(--header-height, 80px) - 40px
    );
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .article-content {
    min-width: 0;
  }
}

/* 2. Featured Image — Remove empty gaps */
.article-hero-split .article-hero-media {
  position: relative;
  height: clamp(310px, 33vw, 470px);
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
}

.article-hero-split .article-hero-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
}

/* 3. Mobile and Tablet */
@media (max-width: 850px) {

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .article-sidebar-inner {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .article-hero-split .article-hero-media {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================
   STICKY TOC — NO INTERNAL SCROLL
   ========================================== */

@media (min-width: 851px) {

  .article-layout .article-sidebar {
    position: relative;
    align-self: stretch;
    min-height: 0;
    overflow: visible;
  }

  .article-layout .article-sidebar-inner {
    position: sticky;
    top: calc(var(--header-height, 80px) + 20px);

    /* Remove TOC internal scrolling */
    max-height: none;
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .article-toc {
    max-height: none;
    overflow: visible;
  }

  /* Active section highlighting */
  .article-toc a {
    display: block;
    padding: 8px 12px;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    color: var(--muted, #667085);
    transition:
      color 0.2s ease,
      background 0.2s ease,
      border-color 0.2s ease;
  }

  .article-toc a.is-active {
    color: var(--accent, #1455d9);
    background: #eef4ff;
    border-left-color: var(--accent, #1455d9);
    font-weight: 700;
  }
}

/* Hide Table of Contents scrollbar */

.article-sidebar-inner,
.article-toc,
.toc-block {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;
}

.article-sidebar-inner::-webkit-scrollbar,
.article-toc::-webkit-scrollbar,
.toc-block::-webkit-scrollbar {
    display: none !important; /* Chrome, Edge, Safari */
}


