/* Neigh-Barks site-wide spacing rhythm — v55
   Matches the homepage standard established in v53:
   desktop: 14px visible rhythm, mobile: 12px.
   For colour changes, spacing starts at the visible section boundary. */

.nb-site-rhythm{
  --nb-rhythm:14px;
}

/* Content-section boundaries: same compact rhythm used on Home. */
.nb-site-rhythm main > section:not(.nb-shared-banner):not(.page-hero),
.nb-site-rhythm > section.section,
.nb-site-rhythm > section.end,
.nb-site-rhythm > section.gd-purpose-intro,
.nb-site-rhythm > section.gd-section,
.nb-site-rhythm > section.gd-close{
  padding-top:var(--nb-rhythm)!important;
  padding-bottom:var(--nb-rhythm)!important;
}

/* FAQ groups are same-colour neighbours, so use one rhythm unit between them. */
.nb-site-rhythm .faq-main{
  padding-top:0!important;
  padding-bottom:0!important;
}
.nb-site-rhythm .faq-main > .faq-group{
  padding-top:var(--nb-rhythm)!important;
  padding-bottom:0!important;
}
.nb-site-rhythm .faq-main > .faq-group:last-child{
  padding-bottom:var(--nb-rhythm)!important;
}

/* Same-colour sections should not stack two gaps. */
.nb-page-giving-back main > .intro,
.nb-page-giving-back main > .community-photo-section,
.nb-page-fur-more-good-days > .gd-purpose-intro{
  padding-bottom:0!important;
}

/* Section subtitle: make the visible whitespace above and below it match. */
.nb-site-rhythm :where(.eyebrow,.kicker,.gd-kicker,.overline):has(+ :is(h1,h2)){
  display:block!important;
  margin:0!important;
  line-height:1!important;
}
.nb-site-rhythm :where(.eyebrow,.kicker,.gd-kicker,.overline) + :is(h1,h2){
  margin-top:var(--nb-rhythm)!important;
  margin-bottom:var(--nb-rhythm)!important;
}

/* Sections without a subtitle still use the same heading-to-content rhythm. */
.nb-site-rhythm main > section:not(.nb-shared-banner):not(.page-hero) > :where(.wrap,.page-wrap) > h2:first-child,
.nb-site-rhythm main > section:not(.nb-shared-banner):not(.page-hero) > :where(.wrap,.page-wrap) > :where(.sectionlead,.intro,.support-head,.center,.group-heading) > h2:first-child{
  margin-top:0!important;
  margin-bottom:var(--nb-rhythm)!important;
}

/* New standalone page heroes keep their scale, but use the same subtitle rhythm. */
.nb-site-rhythm .page-hero :where(.eyebrow,.kicker,.overline):has(+ h1){
  margin:0!important;
  line-height:1!important;
}
.nb-site-rhythm .page-hero :where(.eyebrow,.kicker,.overline) + h1{
  margin-top:var(--nb-rhythm)!important;
  margin-bottom:var(--nb-rhythm)!important;
}

@media(max-width:570px){
  .nb-site-rhythm{--nb-rhythm:12px;}
}
