/* ==========================================================================================================
   GH single blog post template (inc/gh-blog-single.php). Loaded on single posts only, after design-system.css.
   Tokens come from design-system.css (:root --pnd-*). Breakpoints: 1100px two columns + sticky, 768px tablet.
   ========================================================================================================== */
.gh-blog-single { --gh-sticky-top: calc(var(--pnd-header-h, 80px) + 28px); --gh-side-w: 360px; --gh-gap: clamp(32px, 4vw, 56px); }
.gh-blog-single .gh-wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pnd-gutter, 24px); padding-right: var(--pnd-gutter, 24px); box-sizing: border-box; width: 100%; }
.gh-article-main { display: block; overflow: visible; }  /* no overflow/transform on sticky ancestors */

/* ---------- Hero ---------- */
.gh-ahero { background: linear-gradient(180deg, var(--pnd-tint, #EDF2F8) 0%, #fff 100%); border-bottom: 1px solid var(--pnd-border-soft, #F0F0F0); padding: clamp(24px, 4vw, 48px) 0 clamp(28px, 4vw, 52px); }
.gh-ahero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.gh-ahero--noimg .gh-ahero__grid { grid-template-columns: minmax(0, 1fr); }
.gh-ahero--noimg .gh-ahero__text { max-width: 880px; }
.gh-ahero__text { min-width: 0; }
.gh-crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font: 500 .875rem/1.4 var(--pnd-font-body); color: var(--pnd-muted); }
.gh-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.gh-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .55; flex: none; }
.gh-crumbs a { color: var(--pnd-blue); text-decoration: none; }
.gh-crumbs a:hover, .gh-crumbs a:focus-visible { text-decoration: underline; }
.gh-crumbs [aria-current] { color: var(--pnd-heading); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gh-ahero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; font: 500 .9rem/1.4 var(--pnd-font-body); color: var(--pnd-muted); }
.gh-ahero__cat { display: inline-flex; align-items: center; min-height: 30px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--pnd-tint-2, #D9E3F0); color: var(--pnd-blue) !important; font: 700 .76rem/1 var(--pnd-font-head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.gh-ahero__cat:hover, .gh-ahero__cat:focus-visible { border-color: var(--pnd-blue); }
.gh-ahero__info { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.gh-ahero__read { white-space: nowrap; }
.gh-ahero__read::before { content: "·"; margin: 0 10px; color: var(--pnd-muted); }
.gh-ahero__title { margin: 0; font-family: var(--pnd-font-head); font-weight: 800; font-size: clamp(1.85rem, 1.25rem + 2.4vw, 3.05rem); line-height: 1.12; letter-spacing: -.02em; color: var(--pnd-heading); text-wrap: balance; overflow-wrap: break-word; }
.gh-ahero__lead { margin: 16px 0 0; font-size: clamp(1.02rem, .95rem + .3vw, 1.15rem); line-height: 1.6; color: var(--pnd-text); max-width: 62ch; }
.gh-ahero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.gh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 700 1rem/1.2 var(--pnd-font-head); text-decoration: none; white-space: nowrap; border: 2px solid transparent; box-sizing: border-box; transition: background-color .2s, border-color .2s, transform .2s var(--pnd-ease); }
.gh-btn--red { background: var(--pnd-red); color: #fff !important; box-shadow: 0 10px 24px rgb(var(--pnd-red-rgb) / .24); }
.gh-btn--red:hover, .gh-btn--red:focus-visible { background: var(--pnd-red-hover); transform: translateY(-1px); }
.gh-btn--ghost { background: #fff; color: var(--pnd-blue) !important; border-color: var(--pnd-blue); }
.gh-btn--ghost:hover, .gh-btn--ghost:focus-visible { background: var(--pnd-tint); }
.gh-ahero__media { margin: 0; min-width: 0; border-radius: var(--pnd-r-lg, 22px); overflow: hidden; background: var(--pnd-tint); box-shadow: var(--pnd-shadow-md); aspect-ratio: var(--gh-ar, 1.5); }
.gh-ahero__img { display: block; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; object-position: center; }

/* ---------- Two-column layout ---------- */
.gh-article { display: grid; grid-template-columns: minmax(0, 1fr) var(--gh-side-w); gap: var(--gh-gap); align-items: start; padding-top: clamp(32px, 4vw, 52px); padding-bottom: clamp(40px, 5vw, 64px); }
.gh-article__main { min-width: 0; }
.gh-article__side { min-width: 0; display: flex; flex-direction: column; gap: 24px; align-self: stretch; }  /* stretch = full article height, so sticky has room and stops at its end */
.gh-side-sticky { position: sticky; top: var(--gh-sticky-top); display: flex; flex-direction: column; gap: 24px; }

/* ---------- Article typography ---------- */
.gh-prose { font-family: var(--pnd-font-body); font-size: 1.0625rem; line-height: 1.75; color: var(--pnd-text); max-width: 760px; overflow-wrap: break-word; }
.gh-prose > :first-child, .gh-prose > :first-child > :first-child, .gh-prose > :first-child > :first-child > :first-child { margin-top: 0; padding-top: 0; }
.gh-prose p { margin: 0 0 1.15em; }
.gh-prose h2, .gh-prose h3, .gh-prose h4 { font-family: var(--pnd-font-head); color: var(--pnd-heading); letter-spacing: -.01em; text-wrap: balance; scroll-margin-top: var(--gh-sticky-top); }
.gh-prose h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); line-height: 1.22; font-weight: 800; margin: 2em 0 .65em; padding-top: .2em; }
.gh-prose h3 { font-size: clamp(1.18rem, 1.08rem + .45vw, 1.35rem); line-height: 1.3; font-weight: 700; margin: 1.6em 0 .55em; }
.gh-prose h4 { font-size: 1.08rem; line-height: 1.35; font-weight: 700; margin: 1.4em 0 .5em; }
.gh-prose strong, .gh-prose b { color: var(--pnd-heading); font-weight: 650; }
.gh-prose a { color: var(--pnd-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gh-prose a:hover, .gh-prose a:focus-visible { color: var(--pnd-red); }
.gh-prose ul, .gh-prose ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.gh-prose li { margin: 0 0 .5em; padding-left: .2em; }
.gh-prose li::marker { color: var(--pnd-blue); font-weight: 700; }
.gh-prose li > ul, .gh-prose li > ol { margin: .5em 0 0; }
.gh-prose img, .gh-prose video, .gh-prose iframe, .gh-prose embed, .gh-prose object { max-width: 100%; }
.gh-prose img { height: auto; border-radius: var(--pnd-r-md, 16px); }
.gh-prose iframe { width: 100%; border: 0; border-radius: var(--pnd-r-md, 16px); }
.gh-prose iframe[src*="youtube"], .gh-prose iframe[src*="vimeo"] { aspect-ratio: 16 / 9; height: auto; }
.gh-prose figure { margin: 1.8em 0; max-width: 100%; }
.gh-prose figcaption, .gh-prose .wp-caption-text { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: var(--pnd-muted); text-align: center; }
.gh-prose .wp-caption { max-width: 100%; }
.gh-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.gh-prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.gh-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.gh-prose::after { content: ""; display: table; clear: both; }
.gh-prose blockquote { margin: 1.8em 0; padding: 18px 24px; border-left: 4px solid var(--pnd-blue); background: var(--pnd-tint); border-radius: 0 var(--pnd-r-md, 16px) var(--pnd-r-md, 16px) 0; color: var(--pnd-heading); font-size: 1.08rem; }
.gh-prose blockquote > :last-child { margin-bottom: 0; }
.gh-prose hr { border: 0; border-top: 1px solid var(--pnd-border); margin: 2.4em 0; }
.gh-prose code { font-size: .92em; background: var(--pnd-light); padding: 2px 6px; border-radius: 6px; }
/* tables: own scroll container, never page-wide overflow */
.gh-table-wrap { margin: 1.6em 0 1.8em; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--pnd-border); border-radius: var(--pnd-r-md, 16px); background: #fff; box-shadow: var(--pnd-shadow-sm); }
.gh-table-wrap:focus-visible { outline: 3px solid var(--pnd-sky); outline-offset: 2px; }
.gh-prose figure.wp-block-table { margin: 0; }
.gh-prose table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 0; font-size: .95rem; line-height: 1.5; }
.gh-prose th, .gh-prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--pnd-border-soft); }
.gh-prose thead th, .gh-prose tr:first-child th { background: var(--pnd-navy); color: #fff; font-family: var(--pnd-font-head); font-weight: 700; font-size: .9rem; }
.gh-prose tbody tr:nth-child(even) td { background: var(--pnd-light); }
.gh-prose tr:last-child td { border-bottom: 0; }
/* FAQ accordions (<details> in the post body) */
.gh-prose details { margin: 0 0 12px; border: 1px solid var(--pnd-border); border-radius: var(--pnd-r-md, 16px); background: #fff; box-shadow: var(--pnd-shadow-sm); overflow: hidden; }
.gh-prose details > summary { list-style: none; cursor: pointer; position: relative; padding: 16px 52px 16px 20px; font: 700 1.02rem/1.4 var(--pnd-font-head); color: var(--pnd-heading); }
.gh-prose details > summary::-webkit-details-marker { display: none; }
.gh-prose details > summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--pnd-blue); border-bottom: 2px solid var(--pnd-blue); transform: rotate(45deg); transition: transform .2s var(--pnd-ease); }
.gh-prose details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.gh-prose details > summary:hover { color: var(--pnd-blue); }
.gh-prose details > summary:focus-visible { outline: 3px solid var(--pnd-sky); outline-offset: -3px; }
.gh-prose details > :not(summary) { margin: 0; padding: 0 20px 16px; }
.gh-prose details > :not(summary) + :not(summary) { padding-top: 0; }
/* callouts that n8n/editors already mark up (existing classes only) */
.gh-prose .wp-block-pullquote, .gh-prose .callout, .gh-prose .note, .gh-prose .key-takeaways { margin: 1.8em 0; padding: 20px 24px; background: var(--pnd-tint); border-radius: var(--pnd-r-md, 16px); border: 1px solid var(--pnd-tint-2); }

/* ---------- After the body ---------- */
.gh-article__tags { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--pnd-border-soft); font-size: .92rem; color: var(--pnd-muted); max-width: 760px; }
.gh-article__tags-label { font-weight: 700; color: var(--pnd-heading); margin-right: 4px; }
.gh-article__tags a { color: var(--pnd-blue); }
.gh-article__services { margin: 28px 0 0; padding: 22px 24px; border-radius: var(--pnd-r-lg, 22px); background: var(--pnd-tint); max-width: 760px; box-sizing: border-box; }
.gh-article__services ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gh-article__services a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; border: 1px solid var(--pnd-tint-2); color: var(--pnd-blue); font: 600 .95rem/1.2 var(--pnd-font-head); text-decoration: none; }
.gh-article__services a:hover, .gh-article__services a:focus-visible { border-color: var(--pnd-blue); }

/* ---------- Sidebar ---------- */
.gh-side-label { margin: 0 0 12px; font: 800 .75rem/1.2 var(--pnd-font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--pnd-muted); }
.gh-side-card { background: #fff; border: 1px solid var(--pnd-border); border-radius: var(--pnd-r-lg, 22px); box-shadow: var(--pnd-shadow-sm); padding: 22px 22px 24px; box-sizing: border-box; min-width: 0; }
.gh-side-card--form { background: var(--pnd-navy); border-color: var(--pnd-navy); color: rgba(255,255,255,.9); box-shadow: var(--pnd-shadow-md); scroll-margin-top: var(--gh-sticky-top); }
.gh-side-card__title { margin: 0 0 8px; font: 800 1.4rem/1.2 var(--pnd-font-head); color: #fff; }
.gh-side-card__text { margin: 0 0 18px; font-size: .95rem; line-height: 1.55; }
.gh-side-card__text a { color: #fff; font-weight: 700; white-space: nowrap; }
.gh-side-card__form { background: #fff; border-radius: var(--pnd-r-md, 16px); padding: 18px 16px 20px; color: var(--pnd-text); }
.gh-side-card__form .gform_wrapper ul.gform_fields, .gh-side-card__form .gform_wrapper .gform_fields, .gh-side-card__form .gform_wrapper .ginput_complex { grid-template-columns: 1fr !important; gap: 14px !important; }
.gh-side-card__form .gform_wrapper input[type="text"], .gh-side-card__form .gform_wrapper input[type="tel"], .gh-side-card__form .gform_wrapper input[type="email"] { min-height: 46px !important; padding: 10px 14px !important; }
.gh-side-card__form .gform_wrapper textarea { min-height: 96px !important; height: 96px !important; }
.gh-side-card__form .gform_wrapper .gform_button, .gh-side-card__form .gform_wrapper input[type="submit"] { width: 100% !important; background: var(--pnd-red) !important; box-shadow: 0 10px 24px rgb(var(--pnd-red-rgb) / .24) !important; min-height: 52px !important; }
.gh-side-card__form .gform_wrapper .gform_button:hover, .gh-side-card__form .gform_wrapper input[type="submit"]:hover { background: var(--pnd-red-hover) !important; }
.gh-side-card__form .gform_wrapper .gform_footer, .gh-side-card__form .gform_wrapper .gform-footer { margin-top: 16px !important; }
.gh-side-card__form .ginput_recaptcha { max-width: 100%; }
.gh-side-sticky > .gh-side-services { max-height: calc(100vh - var(--gh-sticky-top) - var(--gh-bottom-bar, 124px)); overflow-y: auto; overscroll-behavior: contain; }
.gh-side-services ul { list-style: none; margin: 0; padding: 0; }
.gh-side-services li + li { border-top: 1px solid var(--pnd-border-soft); }
.gh-side-services li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 2px; color: var(--pnd-heading); font: 600 .95rem/1.3 var(--pnd-font-head); text-decoration: none; }
.gh-side-services li a::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--pnd-blue); border-bottom: 2px solid var(--pnd-blue); transform: rotate(-45deg); opacity: .7; }
.gh-side-services li a:hover, .gh-side-services li a:focus-visible { color: var(--pnd-blue); }
.gh-side-services__all { display: inline-block; margin-top: 12px; color: var(--pnd-red); font: 700 .95rem/1.3 var(--pnd-font-head); text-decoration: none; }
.gh-side-services__all:hover, .gh-side-services__all:focus-visible { text-decoration: underline; }
.gh-toc--side { background: #fff; border: 1px solid var(--pnd-border); border-radius: var(--pnd-r-lg, 22px); box-shadow: var(--pnd-shadow-sm); padding: 22px 22px 18px; max-height: calc(100vh - var(--gh-sticky-top) - var(--gh-bottom-bar, 124px));  /* clears the global bottom call bar (pnd-cta-bar) */ overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
.gh-toc ol { margin: 0; padding: 0 0 0 1.35em; font-size: .93rem; line-height: 1.45; }
.gh-toc li { margin: 0 0 8px; padding-left: 2px; }
.gh-toc li::marker { color: var(--pnd-muted); font-weight: 600; }
.gh-toc a { color: var(--pnd-text); text-decoration: none; }
.gh-toc a:hover, .gh-toc a:focus-visible { color: var(--pnd-blue); text-decoration: underline; }
.gh-toc--inline { display: none; margin: 0 0 28px; }
.gh-toc--inline details { border: 1px solid var(--pnd-border); border-radius: var(--pnd-r-md, 16px); background: var(--pnd-light); }
.gh-toc--inline summary { cursor: pointer; padding: 14px 18px; font: 700 1rem/1.3 var(--pnd-font-head); color: var(--pnd-heading); }
.gh-toc--inline summary span { font-weight: 500; color: var(--pnd-muted); font-size: .9rem; }
.gh-toc--inline ol { padding: 0 18px 14px 2.4em; }

/* ---------- Related articles ---------- */
.gh-related { background: var(--pnd-light); border-top: 1px solid var(--pnd-border-soft); padding: clamp(40px, 5vw, 64px) 0; }
.gh-related__title { margin: 0 0 24px; font: 800 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.2 var(--pnd-font-head); color: var(--pnd-heading); }
.gh-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) { .gh-blog-single { --gh-side-w: 330px; } }
@media (max-width: 1099px) {
  .gh-article { grid-template-columns: minmax(0, 820px); }   /* readable measure on tablets, aligned with the hero text */
  .gh-article__side { align-self: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; max-width: 760px; }
  .gh-side-sticky { position: static; }
  .gh-toc--side { display: none; }               /* the inline (collapsible) contents list is shown instead */
  .gh-toc--inline { display: block; }
  .gh-prose, .gh-article__tags, .gh-article__services { max-width: none; }
  .gh-article__side { max-width: none; }
}
@media (max-width: 899px) {
  .gh-ahero__grid { grid-template-columns: minmax(0, 1fr); }
  .gh-ahero__media { order: 2; }
  .gh-related__grid { gap: 16px; }
}
@media (max-width: 767px) {
  .gh-blog-single .gh-wrap { padding-left: 16px; padding-right: 16px; }
  .gh-ahero__actions { display: none; }          /* the global bottom call bar already offers Call / Request on phones */
  .gh-crumbs li:last-child { display: none; }    /* current page = the H1 right below */
  .gh-crumbs ol { margin-bottom: 14px; }
  .gh-ahero__meta { gap: 8px 12px; font-size: .86rem; }
  .gh-ahero__media { border-radius: var(--pnd-r-md, 16px); }
  .gh-article__side { display: flex; align-items: stretch; }
  .gh-prose { font-size: 1.0625rem; line-height: 1.7; }
  .gh-prose .alignleft, .gh-prose .alignright { float: none; margin: 1em auto; max-width: 100%; }
  .gh-prose table { min-width: 520px; font-size: .9rem; }
  .gh-prose th, .gh-prose td { padding: 10px 12px; }
  .gh-related__grid { grid-template-columns: minmax(0, 1fr); }
  .gh-side-card { padding: 20px 16px 22px; }
  .gh-side-card__form { padding: 16px 12px 18px; }
}
@media (max-width: 419px) {
  .gh-ahero__info { column-gap: 14px; }
  .gh-ahero__read::before { display: none; }   /* no orphan separator when the read time wraps */
}
@media (max-width: 380px) {
  .gh-side-card { padding: 18px 10px 20px; }
  .gh-side-card__form { padding: 14px 8px 16px; }
  .gh-side-card__form .ginput_recaptcha { overflow: hidden; }
}
@media (max-height: 559px) { .gh-side-sticky { position: static; } }
@media (prefers-reduced-motion: reduce) { .gh-btn, .gh-prose details > summary::after { transition: none; } }
