/* =====================================================================
   NatBridge Law LLP — Insights page
   The page uses the Practice page components (hero, section heading,
   practice cards), so fonts, sizes and spacing match the rest of the site.
   This file adds: 1. hero image  2. topic/date line on the cards
   3. the article reader that opens over the page  4. a no-JavaScript fallback.
   ===================================================================== */

/* ---------- 1. Hero image (phones keep the plain brown hero, like every page) ---------- */
@media (min-width: 768px) {
  html body.page-practice.page-insights section.hero.practice-hero {
    background-image:
      linear-gradient(90deg, rgba(28,11,4,.93) 0%, rgba(28,11,4,.88) 34%, rgba(28,11,4,.54) 58%, rgba(28,11,4,.10) 80%),
      linear-gradient(to top, #1f0b04 0, #1f0b04 30px, rgba(31,11,4,0) 104px),
      url('../images/insights-hero.webp') !important;
    /* Photo zoomed in and lifted slightly; a soft fade at the bottom blends the photo into the
       dark brown fill, and the photo's left edge already matches that colour. */
    background-color: #1f0b04 !important;
    background-repeat: no-repeat !important;
    background-position: center center, center center, right 0 bottom 30px !important;
    background-size: cover, cover, auto 140% !important;
  }
}
body.page-insights .nb-insights-content { scroll-margin-top: 64px; }

/* ---------- 2. Cards: topic, date and reading time (same pill as practice service tags) ---------- */
html body.page-insights:not(#nbi) .nb-insight-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
html body.page-insights:not(#nbi) .nb-insight-tag {
  display: inline-block; font: 12px/1.3 Georgia, serif; color: #5b391f !important; background: #fcf4e8 !important;
  border: 1px solid #caa56f !important; border-radius: 5px; padding: 5px 8px;
}
html body.page-insights:not(#nbi) .nb-insight-meta time,
html body.page-insights:not(#nbi) .nb-insight-meta .nb-insight-read {
  font: 12px/1.3 Georgia, serif; color: #77716b; background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important;
}
html body.page-insights:not(#nbi) .nb-insight-card .nb-practice-details summary { cursor: pointer; }
@media (hover: hover) {
  html body.page-insights:not(#nbi) .nb-insight-card h3:hover { color: #7a4a20; }
}

/* ---------- 3. Article reader ---------- */
html.nb-reader-open, html.nb-reader-open body { overflow: hidden !important; }
.nb-reader {
  position: fixed; inset: 0; width: min(1180px, calc(100% - 48px)); height: calc(100% - 48px); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 1px solid #c79a5c; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #fffefa, #faf6ef); color: #2b1c12;
  box-shadow: 0 30px 80px -20px rgba(15, 6, 1, .65);
  display: none; flex-direction: column;
}
.nb-reader[open] { display: flex; }
.nb-reader::backdrop { background: rgba(22, 10, 4, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .nb-reader[open] { animation: nb-reader-in .32s cubic-bezier(.2,.7,.2,1); }
  .nb-reader[open]::backdrop { animation: nb-reader-fade .32s ease; }
  .nb-reader.is-closing { animation: nb-reader-out .18s ease forwards; }
}
@keyframes nb-reader-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes nb-reader-out { to { opacity: 0; transform: translateY(3px); } }
@keyframes nb-reader-fade { from { opacity: 0; } to { opacity: 1; } }

/* Top bar: the site's dark header style */
.nb-reader-bar {
  position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 0 14px 0 26px; height: 54px; background: #2c190f; color: #f1e2c9; border-bottom: 1px solid #6e4a2a;
}
.nb-reader-brand { font: 600 11px/1 Georgia, serif; letter-spacing: .22em; text-transform: uppercase; color: #d8b47a; white-space: nowrap; }
.nb-reader-crumb {
  flex: 1; min-width: 0; font: 13px/1.2 Georgia, serif; color: #cdb898; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 14px; border-left: 1px solid #6e4a2a;
}
.nb-reader-close {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #b48852; background: transparent;
  color: #f1dcb6; font: 24px/1 Georgia, serif; cursor: pointer; display: grid; place-items: center; transition: background-color .2s;
}
.nb-reader-close:hover, .nb-reader-close:focus-visible { background: rgba(216,170,111,.16); outline: none; }
.nb-reader-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.nb-reader-progress i { display: block; height: 100%; background: linear-gradient(90deg, #a8743a, #e2c48f); transform-origin: 0 50%; transform: scaleX(0); }

/* Scroll area and layout */
.nb-reader-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; outline: none; }
.nb-reader-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 56px; justify-content: center; padding: 40px 40px 56px; }
.nb-reader--no-toc .nb-reader-layout { grid-template-columns: minmax(0, 720px); }
.nb-reader--no-toc .nb-reader-toc { display: none; }

/* Section list */
.nb-reader-toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 160px); overflow: auto; }
.nb-reader-toc p { margin: 0 0 12px; font: 700 11px/1 Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: #a56b2f; }
.nb-reader-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid #e3cfae; }
.nb-reader-toc li { margin: 0; }
.nb-reader-toc a {
  display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent;
  font: 13px/1.4 Georgia, serif; color: #6c5b4c; text-decoration: none; transition: color .2s, border-color .2s;
}
.nb-reader-toc a:hover { color: #3a2316; }
.nb-reader-toc a.is-active { color: #3a2316; border-left-color: #b98a4e; font-weight: 600; }

/* Article */
.nb-reader-head { margin-bottom: 22px; }
.nb-reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; font: 13px/1.3 Georgia, serif; color: #77716b; }
.nb-reader-meta span + span::before { content: "·"; margin-right: 14px; color: #b9a58c; }
.nb-reader-meta .nb-reader-tag + span::before { content: none; margin: 0; }
.nb-reader-tag { color: #5b391f; background: #fcf4e8; border: 1px solid #caa56f; border-radius: 5px; padding: 5px 9px; font-size: 12px; }
.nb-reader h2#nb-reader-title { margin: 0; font: 400 34px/1.18 Georgia, "Times New Roman", serif; color: #342016; letter-spacing: -.01em; }
.nb-reader-body .nb-insight-figure { margin: 0 0 26px; border-radius: 10px; overflow: hidden; aspect-ratio: 726 / 300; background: #2c190f; }
.nb-reader-body .nb-insight-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nb-reader-body .nb-insight-lead { margin: 0 0 22px; font: italic 19px/1.5 Georgia, serif; color: #8a5a2b; }
.nb-reader-body p { margin: 0 0 16px; font: 16.5px/1.75 Georgia, "Times New Roman", serif; color: #3b2d22; }
.nb-reader-body h4 {
  margin: 38px 0 14px; padding-top: 26px; border-top: 1px solid #ead9be; scroll-margin-top: 24px;
  font: 400 24px/1.25 Georgia, "Times New Roman", serif; color: #342016;
}
.nb-reader-body h5 { margin: 22px 0 6px; font: 600 16px/1.4 Georgia, serif; color: #8a5a2b; }
.nb-reader-body ul, .nb-reader-body ol { margin: 4px 0 20px; padding-left: 24px; }
.nb-reader-body li { margin: 0 0 9px; padding-left: 4px; font: 16.5px/1.65 Georgia, serif; color: #3b2d22; }
.nb-reader-body li::marker { color: #b98a4e; }
.nb-reader-body ol li::marker { font-weight: 600; }
.nb-reader-body strong { color: #2b1a10; font-weight: 600; }
.nb-reader-body blockquote {
  margin: 24px 0 26px; padding: 16px 22px; border-left: 3px solid #c79a5c; background: #f8efe1; border-radius: 0 8px 8px 0;
}
.nb-reader-body blockquote p { margin: 0; font: italic 18px/1.6 Georgia, serif; color: #5b391f; }
.nb-reader-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid #ead9be;
}
.nb-reader-back {
  padding: 11px 18px; border: 1px solid #caa56f; border-radius: 5px; background: #fffaf2; color: #5b391f;
  font: 14px/1 Georgia, serif; cursor: pointer; transition: background-color .2s;
}
.nb-reader-back:hover { background: #fcf0dd; }
.nb-reader-next { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 60%; text-align: right; text-decoration: none; }
.nb-reader-next small { font: 700 11px/1 Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: #a56b2f; }
.nb-reader-next span { font: 16px/1.35 Georgia, serif; color: #342016; }
.nb-reader-next:hover span { color: #8a5a2b; }

/* Tablet: section list hidden, article centred */
@media (max-width: 1000px) {
  .nb-reader-layout { grid-template-columns: minmax(0, 720px); padding: 32px 32px 48px; }
  .nb-reader-toc { display: none; }
}
/* Phones: full screen */
@media (max-width: 767px) {
  .nb-reader { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .nb-reader-bar { height: 50px; padding: 0 10px 0 16px; gap: 10px; }
  .nb-reader-brand { font-size: 10px; letter-spacing: .16em; }
  .nb-reader-crumb { display: none; }
  .nb-reader-close { margin-left: auto; width: 34px; height: 34px; font-size: 22px; }
  .nb-reader-layout { padding: 20px 18px 36px; }
  .nb-reader h2#nb-reader-title { font-size: 23px; line-height: 1.22; }
  .nb-reader-meta { font-size: 12px; gap: 6px 10px; }
  .nb-reader-meta span + span::before { margin-right: 10px; }
  .nb-reader-body .nb-insight-figure { margin-bottom: 18px; border-radius: 8px; }
  .nb-reader-body .nb-insight-lead { font-size: 16.5px; }
  .nb-reader-body p, .nb-reader-body li { font-size: 15.5px; line-height: 1.7; }
  .nb-reader-body h4 { font-size: 20px; margin-top: 30px; padding-top: 20px; }
  .nb-reader-body h5 { font-size: 15px; }
  .nb-reader-body blockquote { padding: 13px 16px; }
  .nb-reader-body blockquote p { font-size: 16px; }
  .nb-reader-next { max-width: 100%; align-items: flex-start; text-align: left; }
}

/* ---------- 4. Without JavaScript the article opens inside the card (readable light style) ---------- */
html body.page-insights:not(#nbi) .nb-insight-card details[open] .nb-insight-article { margin: 12px 0 16px; padding-left: 13px; border-left: 2px solid #d8aa6f; }
html body.page-insights:not(#nbi) .nb-insight-card details[open] .nb-insight-article :is(p, li) { font-size: 14px !important; line-height: 1.6 !important; color: #453a33 !important; margin: 0 0 10px !important; max-width: none !important; }
html body.page-insights:not(#nbi) .nb-insight-card details[open] .nb-insight-article :is(h4, h5) { color: #342016 !important; font-size: 16px !important; margin: 16px 0 6px !important; }
html body.page-insights:not(#nbi) .nb-insight-card details[open] .nb-insight-figure img { width: 100%; height: auto; border-radius: 8px; }
html body.page-insights:not(#nbi) .nb-insight-close { display: none; }

/* ---------- Reader refinements: centred top bar, compact article typography ---------- */
.nb-reader-bar { justify-content: center; padding: 0 64px; }
.nb-reader-crumb { flex: 0 1 auto; max-width: 70%; }
.nb-reader-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

.nb-reader-layout { padding: 30px 40px 44px; gap: 48px; grid-template-columns: 220px minmax(0, 700px); }
.nb-reader--no-toc .nb-reader-layout { grid-template-columns: minmax(0, 700px); }
.nb-reader-head { margin-bottom: 16px; }
.nb-reader-meta { margin-bottom: 10px; }
.nb-reader h2#nb-reader-title { font-size: 30px; line-height: 1.2; }
.nb-reader-body .nb-insight-figure { margin: 0 0 18px; }
.nb-reader-body .nb-insight-lead { margin: 0 0 14px; font-size: 17px; line-height: 1.45; }
.nb-reader-body p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.6; }
.nb-reader-body h4 { margin: 24px 0 8px; padding-top: 16px; font-size: 21px; line-height: 1.25; scroll-margin-top: 16px; }
.nb-reader-body h5 { margin: 14px 0 3px; font-size: 15px; }
.nb-reader-body ul, .nb-reader-body ol { margin: 2px 0 12px; padding-left: 22px; }
.nb-reader-body li { margin: 0 0 4px; font-size: 15.5px; line-height: 1.5; }
.nb-reader-body blockquote { margin: 14px 0 16px; padding: 11px 18px; }
.nb-reader-body blockquote p { font-size: 16.5px; line-height: 1.5; }
.nb-reader-foot { margin-top: 28px; padding-top: 18px; }
.nb-reader-toc a { padding: 5px 0 5px 14px; font-size: 12.5px; }

@media (max-width: 1000px) {
  .nb-reader-layout { grid-template-columns: minmax(0, 700px); padding: 26px 28px 40px; }
}
@media (max-width: 767px) {
  .nb-reader-bar { padding: 0 50px; }
  .nb-reader-close { right: 8px; margin-left: 0; }
  .nb-reader-layout { padding: 18px 16px 32px; }
  .nb-reader h2#nb-reader-title { font-size: 21px; }
  .nb-reader-body .nb-insight-lead { font-size: 15.5px; }
  .nb-reader-body p, .nb-reader-body li { font-size: 14.5px; line-height: 1.55; }
  .nb-reader-body p { margin-bottom: 9px; }
  .nb-reader-body h4 { font-size: 18px; margin-top: 20px; padding-top: 14px; }
  .nb-reader-body h5 { font-size: 14px; }
  .nb-reader-body blockquote p { font-size: 15px; }
}

/* ---------- Reader: tight print-style spacing ---------- */
html body .nb-reader .nb-reader-body p { margin: 0 0 6px !important; font-size: 15px !important; line-height: 1.45 !important; }
html body .nb-reader .nb-reader-body li { margin: 0 0 2px !important; font-size: 15px !important; line-height: 1.4 !important; }
html body .nb-reader .nb-reader-body ul, html body .nb-reader .nb-reader-body ol { margin: 0 0 8px !important; }
html body .nb-reader .nb-reader-body .nb-insight-lead { margin: 0 0 10px !important; font-size: 16px !important; line-height: 1.35 !important; }
html body .nb-reader .nb-reader-body h4 { margin: 16px 0 5px !important; padding-top: 10px !important; font-size: 19px !important; line-height: 1.2 !important; }
html body .nb-reader .nb-reader-body h5 { margin: 8px 0 1px !important; font-size: 15px !important; line-height: 1.3 !important; }
html body .nb-reader .nb-reader-body blockquote { margin: 8px 0 10px !important; padding: 8px 14px !important; }
html body .nb-reader .nb-reader-body blockquote p { margin: 0 !important; font-size: 15.5px !important; line-height: 1.4 !important; }
html body .nb-reader .nb-reader-body .nb-insight-figure { margin-bottom: 14px !important; }
html body .nb-reader .nb-reader-head { margin-bottom: 12px !important; }
html body .nb-reader .nb-reader-foot { margin-top: 20px !important; padding-top: 14px !important; }
@media (max-width: 767px) {
  html body .nb-reader .nb-reader-body p { font-size: 14.5px !important; line-height: 1.45 !important; margin-bottom: 6px !important; }
  html body .nb-reader .nb-reader-body li { font-size: 14.5px !important; line-height: 1.4 !important; }
  html body .nb-reader .nb-reader-body h4 { font-size: 17px !important; margin-top: 14px !important; padding-top: 9px !important; }
  html body .nb-reader .nb-reader-body blockquote p { font-size: 14.5px !important; }
}

/* ---------- Reader: top bar aligned with the section list and the article column ---------- */
html body .nb-reader .nb-reader-scroll { scrollbar-gutter: stable both-edges; }
@media (min-width: 1001px) {
  html body .nb-reader .nb-reader-bar {
    display: grid; grid-template-columns: 220px minmax(0, 700px); column-gap: 48px; justify-content: center;
    align-items: center; padding: 0 40px;
  }
  html body .nb-reader.nb-reader--no-toc .nb-reader-bar { grid-template-columns: minmax(0, 700px); }
  html body .nb-reader.nb-reader--no-toc .nb-reader-brand { display: none; }
  html body .nb-reader .nb-reader-brand { justify-self: start; }
  html body .nb-reader .nb-reader-crumb { justify-self: stretch; max-width: none; padding-left: 14px; margin-left: 0; border-left: 1px solid #6e4a2a; }
}

/* ---------- Section list with bullet points ---------- */
html body .nb-reader .nb-reader-toc ol { border-left: 0; }
html body .nb-reader .nb-reader-toc a { position: relative; padding: 5px 0 5px 16px; border-left: 0; margin-left: 0; }
html body .nb-reader .nb-reader-toc a::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%;
  background: #cfae7e; transition: background-color .2s, transform .2s;
}
html body .nb-reader .nb-reader-toc a.is-active::before { background: #8a5a2b; transform: scale(1.25); }
html body .nb-reader .nb-reader-toc a.is-active { color: #2b1a10; }

/* ---------- Easier reading: dark, bold point headers ---------- */
html body .nb-reader .nb-reader-body p,
html body .nb-reader .nb-reader-body li { color: #2e231b !important; }
html body .nb-reader .nb-reader-body h4 { font-weight: 700 !important; color: #21140b !important; }
html body .nb-reader .nb-reader-body h5 { font-weight: 700 !important; color: #2b1a10 !important; }
html body .nb-reader .nb-reader-body strong { font-weight: 700 !important; color: #21140b !important; }
html body .nb-reader .nb-reader-body .nb-insight-lead { color: #7a4d22 !important; }

/* Article date in bold (cards and reader) */
html body.page-insights:not(#nbi) .nb-insight-meta time { font-weight: 700 !important; color: #3a2416 !important; }
html body .nb-reader .nb-reader-meta .nb-reader-tag + span { font-weight: 700; color: #3a2416; }

/* Smaller laptops and tablets: a little less zoom so the photo stays clear of the hero text */
@media (min-width: 768px) and (max-width: 1199px) {
  html body.page-practice.page-insights section.hero.practice-hero { background-size: cover, cover, auto 111% !important; }
}
