/* =====================================================================================================
   N46g (Brain ruling MJ, Fabrice's staging review of N46f, 05-11-2026). Loaded after n46f.css.
   Tokens only: every colour, radius and type size comes from tokens.css. No hex, no important flag, no new font.
   1. The golden go-to-form button in the sidebar contact card (profiles) and the client's card in the rail of a
      client article.
   2. A heading after a picture: the N46c top margin in every case.
   2b. A heading above a picture: the same value as a bottom margin.
   3. The profile gallery, section.gpcf-gal.
   4. The client box of a client article.
   5. The "Partners" panel around the banners of the content column.
   ===================================================================================================== */

/* ----- 1. The golden button in the contact card ----- */
.ccard .gpcf-go--card{
  display:flex;
  width:100%;
  box-sizing:border-box;
  padding:0 var(--space-9);
  white-space:normal;
  text-align:center;
}

/* The client's card at the top of a client article's rail. The card's own rules live in client-profile.css, which
   loads on the profile template only; the same rules, scoped to the rail of layout A (.sigrail). */
.sigrail .ccard{
  display:flex;
  flex-direction:column;
  gap:var(--space-7);
  margin:0 0 var(--space-13);
  padding:var(--space-11) var(--space-10);
  background:var(--os-card);
  border:1px solid var(--os-line);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-floating);
}
.sigrail .ccard .ccard-name{
  margin:0;
  font-family:var(--font-display);
  font-weight:var(--weight-bold);
  font-size:var(--size-body);
  line-height:var(--lh-card-title);
  color:var(--os-muted);
}
.sigrail .ccard h2{
  margin:0;
  font-family:var(--font-display);
  font-weight:var(--weight-display);
  font-size:var(--size-h3);
  line-height:var(--lh-h3);
  color:var(--os-heading);
}
.sigrail .ccard .rows{ display:flex; flex-direction:column; gap:var(--space-4); }
.sigrail .ccrow{
  display:flex;
  align-items:center;
  gap:var(--space-5);
  min-height:68px;
  padding:var(--space-4) var(--space-6);
  border:1.5px solid var(--acc-deep,var(--os-dark-teal));
  border-radius:var(--radius-card);
  color:inherit;
  text-decoration:none;
  transition:background var(--duration-base) var(--ease);
}
.sigrail a.ccrow:hover{ background:var(--acc-wash,var(--os-tint)); }
.sigrail .ccrow .ico{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:var(--tap-min);
  height:var(--tap-min);
  border-radius:50%;
  background:var(--acc-wash,var(--os-tint));
  color:var(--acc-deep,var(--os-dark-teal));
}
.sigrail .ccrow .ico svg{ width:20px; height:20px; }
.sigrail .ccrow .txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.sigrail .ccrow .val{
  font-family:var(--font-display);
  font-weight:var(--weight-display);
  font-size:var(--size-body);
  line-height:var(--lh-card-title);
  color:var(--acc-deep,var(--os-dark-teal));
  overflow-wrap:anywhere;
}
.sigrail .ccrow .lab{
  font-family:var(--font-body);
  font-weight:var(--weight-bold);
  font-size:var(--size-small);
  color:var(--os-muted);
}
.sigrail .ccrow .chev{ flex:0 0 auto; color:var(--os-muted); }
.sigrail .ccrow .chev svg{ display:block; width:18px; height:18px; }
.sigrail .ccard .foot{
  display:flex;
  flex-direction:column;
  gap:var(--space-4);
  margin:var(--space-1) calc(-1 * var(--space-10)) calc(-1 * var(--space-11));
  padding:var(--space-8) var(--space-10) var(--space-9);
  border-top:1px solid var(--os-line);
  border-radius:0 0 var(--radius-card) var(--radius-card);
}
.sigrail .ccard .frow{
  display:flex;
  align-items:flex-start;
  gap:var(--space-4);
  font-family:var(--font-body);
  font-size:var(--size-small);
  line-height:1.45;
  color:var(--os-text);
}
.sigrail .ccard .frow .ico{ flex:0 0 auto; margin-top:2px; }
.sigrail .ccard .frow .ico svg{ display:block; width:16px; height:16px; }
.sigrail .ccard a,
.sigrail .ccard a:hover,
.sigrail .ccard a:focus-visible{ text-decoration:none; }

/* ----- 2. A heading after a picture: the N46c margin in every case -----
   N46c (n46c.css section 2) covers the heading that is the next sibling of the picture. These rules add the two
   WPBakery cases seen on Siam Bike Tours (staging) and 283830 (live): the picture ends one row and the heading
   starts the next row, or the picture ends a text block. Each case is a rule of its own, so a browser that does not
   know one selector still applies the others. */
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):last-child) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:first-child{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):last-child) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > h2:first-child{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > :is(img,figure):last-child) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:first-child,
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > p:last-child > img) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:first-child,
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > p:last-child > a > img) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:first-child{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):last-child) + .vc_row-full-width + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:first-child{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) :is(p:has(> img),p:has(> a > img)) + h2{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .wpb_text_column:has(> .wpb_wrapper > :is(img,figure):last-child) + h2,
:is(.entry-content,.abody,.desc) .wpb_text_column:has(> .wpb_wrapper > :is(img,figure):last-child) + .wpb_text_column > .wpb_wrapper > h2:first-child{
  margin-top:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):last-child) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > h3:first-child{
  margin-top:max(var(--space-11), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(> .wpb_column > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):last-child) + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > h3:first-child{
  margin-top:max(var(--space-11), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) :is(p:has(> img),p:has(> a > img)) + h3{
  margin-top:max(var(--space-11), calc(var(--size-body) * var(--lh-body)));
}

/* ----- 2b. A heading above a picture (third N46g build, Brain 05-11-2026): the same gap below the heading as the
   N46c gap above a heading after a picture, so the gap reads the same both ways. Cases: a picture as the next
   sibling (or a paragraph opening with one); a text column ending with the heading, followed by a picture; a row
   ending with the heading, followed by a row (or a stretched-row spacer and a row) whose first column opens with a
   picture. Profiles, posts and pages. ----- */
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h2:last-child,
:is(.entry-content,.abody,.desc) h2:has(+ :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery)),
:is(.entry-content,.abody,.desc) h2:has(+ p > img:first-child),
:is(.entry-content,.abody,.desc) h2:has(+ p > a:first-child > img:first-child),
:is(.entry-content,.abody,.desc) .wpb_text_column:has(+ :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery)) > .wpb_wrapper > h2:last-child{
  margin-bottom:max(var(--space-12), calc(var(--size-body) * var(--lh-body)));
}
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) .vc_row:has(+ .vc_row-full-width + .vc_row > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(img,figure,p:first-child > img:first-child,p:first-child > a:first-child > img):first-child) > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:last-child > .wpb_wrapper > h3:last-child,
:is(.entry-content,.abody,.desc) h3:has(+ :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery)),
:is(.entry-content,.abody,.desc) h3:has(+ p > img:first-child),
:is(.entry-content,.abody,.desc) h3:has(+ p > a:first-child > img:first-child),
:is(.entry-content,.abody,.desc) .wpb_text_column:has(+ :is(img,figure,.gallery,.wpb_single_image,.wpb_gallery,.vc_images_carousel,.wp-caption,.wp-block-image,.wp-block-gallery)) > .wpb_wrapper > h3:last-child{
  margin-bottom:max(var(--space-11), calc(var(--size-body) * var(--lh-body)));
}

/* ----- 3. The profile gallery (template A part 7): eyebrow and H2, then 3:2 tiles, 3 per row ----- */
.gpcf-gal{ margin-top:var(--section-gap); }
.gpcf-gal > .eyebrow{ margin:0 0 var(--space-3); }
.gpcf-gal > h2{ margin:0; }
.gpcf-gal .gal{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-3);
  margin-top:var(--space-10);
}
.gpcf-gal .gal .gal-item{
  aspect-ratio:3 / 2;
  border:0;
  border-radius:var(--radius-md);
  box-shadow:none;
}
.gpcf-gal .gal img{ border-radius:var(--radius-md); }

/* ----- 4. The client box of a client article (template B part 4, ruling MJ item 4) ----- */
.gpcf-cbox{
  margin-bottom:var(--space-12); /* Third N46g build: 30 px under the box, the same as above it. */
  grid-template-columns:72px minmax(0,1fr);
  gap:var(--space-9);
  align-items:center;
}
/* Third N46g build: the heading that opens the row after the box drops its own small top margin, so it sits exactly
   the box's 30 px under it (4 px more otherwise). */
.gpcf-cbox + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > :is(h2,h3):first-child,
.gpcf-cbox + .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > .wpb_text_column:first-child > .wpb_wrapper > :is(h2,h3):first-child,
.gpcf-cbox + :is(h2,h3){ margin-top:0; }
.gpcf-cbox .gpcf-cbox__ini,
.gpcf-cbox .gpcf-cbox__logo{ width:72px; height:72px; }
.gpcf-cbox .gpcf-cbox__ini{ border-radius:50%; }
.gpcf-cbox .gpcf-cbox__n{
  font-family:var(--font-display);
  font-weight:var(--weight-bold);
}
.gpcf-cbox .gpcf-cbox__t{
  margin:var(--space-1) 0 0;
  overflow:hidden;
  font-size:var(--size-small);
  line-height:1.45;
  color:var(--os-muted);
  white-space:nowrap;
  text-overflow:ellipsis;
}
.gpcf-cbox .gpcf-cbox__pills{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-3);
  margin-top:var(--space-5);
}
.gpcf-cbox .gpcf-pill{
  display:inline-flex;
  align-items:center;
  gap:var(--space-2);
  min-height:36px;
  padding:0 var(--space-6);
  box-sizing:border-box;
  border:1px solid var(--acc-line,var(--os-line));
  border-radius:var(--radius-pill);
  background:var(--os-card);
  color:var(--acc-deep,var(--os-link));
  font-family:var(--font-body);
  font-weight:var(--weight-bold);
  font-size:var(--size-small);
  line-height:1.2;
  white-space:nowrap;
  text-decoration:none;
  transition:background var(--duration-base) var(--ease);
}
.gpcf-cbox .gpcf-pill .ico{ display:inline-flex; }
.gpcf-cbox .gpcf-pill .ico svg{ display:block; width:16px; height:16px; }
.gpcf-cbox a.gpcf-pill:hover{ background:var(--acc-wash,var(--os-tint)); color:var(--os-heading); text-decoration:none; }
.gpcf-cbox a.gpcf-pill:focus-visible{ outline:3px solid var(--os-heading); outline-offset:2px; }
.gpcf-cbox .gpcf-pill--gold{
  background:var(--os-cta);
  border-color:var(--os-cta);
  color:var(--os-cta-ink);
}
.gpcf-cbox a.gpcf-pill--gold:hover{ background:var(--os-cta-hover); border-color:var(--os-cta-hover); color:var(--os-cta-ink); }

/* ----- 5. The "Partners" panel around the banners of the content column (ruling MJ item 5) ----- */
.gpcf-adpanel{
  padding:var(--space-10);
  background:var(--os-tint);
  border-radius:var(--radius-card);
}
.gpcf-adpanel .gpcf-adpanel__eb{ margin:0 0 var(--space-7); }
/* BX2 ruling 3: no per-banner caption inside the panel (the markup prints none; this covers a cached zone). */
.gpcf-adpanel .sigband > .sigad .sigad-mark{ display:none; }
.gpcf-adpanel .sigband{ margin:0; }
.cards > .gpcf-adpanel{ grid-column:1 / -1; }
.amain > .gpcf-adpanel{ margin-top:var(--space-13); }

/* ----- Phone (768 px and below) ----- */
@media (max-width:768px){
  .gpcf-gal .gal{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gpcf-cbox{ grid-template-columns:minmax(0,1fr); justify-items:start; }
  .gpcf-cbox .gpcf-cbox__t{ white-space:normal; }
  .gpcf-cbox .gpcf-pill{ min-height:var(--tap-min); }
  .amain > .gpcf-adpanel{ margin-top:var(--space-9); }
}
