/* ==========================================================================
   assets/blocks-common.css: the one stylesheet every page-section block shares.
   Handle `pw-blocks-common` (registered in inc/enqueue.php, named in each
   block.json "style", so it loads only on pages that use a block). It was two
   files, text/shared.css (A: .pw-a*, button looks) and cards/common.css
   (B: .pw-sec*, .pw-sp--*); their selectors never overlapped, so the order
   below (A then B) changes nothing.
   ========================================================================== */

/* ==========================================================================
   Shared by pw/hero, pw/page-header, pw/media-text, pw/cta-band and pw/text
   (named in each block.json "style" as the handle `pw-blocks-common`, registered in
   inc/enqueue.php). Everything here reproduces how the Elementor
   build drew these sections; each value was read from the live site at 1440,
   1024, 768 and 390 wide.

   Two page-level modes exist on the old site and are a control here
   ("Text spacing"):
     compact   pages on Elementor's full-width template (Home, Services,
               Self-Help Zone, Contact, About): browser-default paragraph
               margins (1em above and below), no space under headings.
     open      pages on the default template (service pages, Join Us,
               Membership, Resources, Booking, forms): Kadence's content
               rules, 2rem under paragraphs and lists, 24px under headings.
   ========================================================================== */

.pw-a {
  --pw-a-h: var(--pw-primary);   /* heading colour */
  --pw-a-t: var(--pw-text);      /* text colour */
  --pw-a-hw: 600;                /* heading weight */
  --pw-a-ew: 700;                /* small-heading weight */
  font-family: var(--pw-font-body);
  font-size: 17px;
  line-height: 1.6;
  position: relative;
}
.pw-a--tone-light { --pw-a-h: #ffffff; --pw-a-t: #ffffff; }
.pw-a--tone-tan   { --pw-a-h: var(--pw-primary); --pw-a-t: #ffffff; }
.pw-a--tone-cream { --pw-a-h: var(--pw-bg-accent); --pw-a-t: #ffffff; }
.pw-a--tone-warm  { --pw-a-h: var(--pw-primary); --pw-a-t: var(--pw-text); }

/* Links in running text, per tone. */
.pw-a--tone-light .pw-a-copy a:not(.pw-btn),
.pw-a--tone-tan .pw-a-copy a:not(.pw-btn),
.pw-a--tone-cream .pw-a-copy a:not(.pw-btn) { color: #ffffff; text-decoration-thickness: 2px; }

/* ---- Backdrop: a photo or flat colour, and the shade over it ------------- */

.pw-a-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: var(--pw-a-minh, 0);
}
.pw-a-panel--photo { background: var(--pw-secondary) var(--pw-a-img, none) center / cover no-repeat; }
.pw-a-panel--brown { background: var(--pw-secondary); }
.pw-a-panel--green { background: var(--pw-accent); }
.pw-a-panel--sand  { background: var(--pw-bg-accent); }
.pw-a-panel--shaded::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pw-a-ov);
}

/* ---- Type ----------------------------------------------------------------- */

.pw-a-title {
  margin: 0;
  font-family: var(--pw-font-heading);
  font-weight: var(--pw-a-hw);
  font-size: 48px;
  line-height: 1;
  color: var(--pw-a-h);
}
.pw-a-title--xl { font-size: 95px; }
.pw-a-title--l  { font-size: 48px; }
.pw-a-title--m  { font-size: 24px; }
.pw-a-title--s  { font-size: 22px; }
.pw-a-title--m, .pw-a-title--s { font-weight: var(--pw-a-ew); }
@media (max-width: 767px) {
  .pw-a-title--xl { font-size: 60px; }
  .pw-a-title--l  { font-size: 36px; }
}
.pw-a-eyebrow {
  margin: 0;
  font-family: var(--pw-font-heading);
  font-weight: var(--pw-a-ew);
  font-size: 20px;
  line-height: 1;
  color: var(--pw-a-h);
}
/* Kadence's content rule: half the heading's own size below it. */
.pw-a--open .pw-a-title,
.pw-a--open .pw-a-eyebrow { margin-bottom: .5em; }

/* The text under a heading (Elementor "text editor"). */
.pw-a-copy { color: var(--pw-a-t); display: flow-root; font-size: 17px; line-height: 1.6; }
.pw-a-copy p { margin: 1em 0; }
.pw-a-copy ul, .pw-a-copy ol { margin: 0 0 1.5em 1.5em; padding: 0; }
.pw-a-copy li { margin: 0; }
.pw-a-copy strong, .pw-a-copy b { font-weight: 700; }
.pw-a-copy img.emoji { display: inline; width: 1em; height: 1em; margin: 0 .07em; vertical-align: -0.1em; }
.pw-a--open .pw-a-copy p { margin: 0 0 32px; }
.pw-a--open .pw-a-copy ul, .pw-a--open .pw-a-copy ol { margin: 0 0 32px; padding-left: 34px; }
.pw-a--open .pw-a-copy > :last-child { margin-bottom: 0; }
.pw-a--open .pw-a-copy li > ul, .pw-a--open .pw-a-copy li > ol { margin: 0; }

/* A vertical run of "widgets": Elementor spaced them with a 20px gap. */
.pw-a-stack { display: flex; flex-direction: column; gap: var(--pw-a-gap, 20px); }

/* ---- Buttons: the looks this part of the site added to .pw-btn ----------- */

/* Doubled class: the shared .pw-btn rule in style.css can load after this file. */
.pw-btn.pw-btn--plain-pill { border-width: 0; border-radius: 25px; }
.pw-btn.pw-btn--plain { border-width: 0; border-radius: 3px; }
.pw-btn.pw-btn--outline { border-color: #ffffff; border-radius: 3px; }
.pw-btn.pw-btn--plain-arrow { display: inline-flex; align-items: center; gap: 14px; border-width: 0; border-radius: 3px; }
* + .pw-btn--plain-arrow { margin-left: 15px; }
.pw-btn__icon { flex: none; width: 15px; height: 15px; }
.pw-btns.pw-btns--stack { flex-direction: column; align-items: flex-start; gap: 5px; }

/* ---- Two intro layouts several panels share --------------------------------
   narrow  content centred in a 750px column (600px on a tablet), gap 24px
   left    content on the left in a 1280px box, text column 680px wide
   (Services, Self-Help and Booking heroes; the About and Initial Assessment
   headers; Contact's hero, Resources' header, Home's membership band.)        */

.pw-a-narrow, .pw-a-left { padding: 0 24px; align-items: center; }
.pw-a-narrow .pw-a-panel__inner,
.pw-a-left .pw-a-panel__inner { width: 100%; margin-inline: auto; display: flex; flex-direction: column; gap: 24px; }
.pw-a-narrow .pw-a-panel__inner { max-width: 750px; align-items: center; text-align: center; }
.pw-a-left .pw-a-panel__inner { max-width: 1280px; align-items: flex-start; text-align: left; padding-right: 600px; }
.pw-a-narrow .pw-a-copy, .pw-a-left .pw-a-copy { margin-bottom: -10px; }
@media (max-width: 1024px) {
  .pw-a-narrow, .pw-a-left { padding: 0 16px; }
  .pw-a-narrow .pw-a-panel__inner, .pw-a-left .pw-a-panel__inner { gap: 16px; }
  .pw-a-narrow .pw-a-panel__inner { max-width: 600px; }
  .pw-a-left .pw-a-panel__inner { padding-right: 250px; }
}
@media (max-width: 767px) {
  .pw-a-narrow, .pw-a-left { min-height: 0; padding: 48px 16px; }
  .pw-a-narrow .pw-a-panel__inner, .pw-a-left .pw-a-panel__inner { max-width: none; padding-right: 0; }
}
.pw-btn__text { display: block; }

/* ==========================================================================
   Shared by the "B" blocks (cards, steps, testimonials, faq, form, posts).
   Same handle as the section above, `pw-blocks-common`. Everything here was read off the old Elementor
   containers (padding, margins, content widths, heading type per breakpoint).
   Elementor breakpoints: tablet 1024px and below, mobile 767px and below.
   ========================================================================== */

.pw-sec { position: relative; box-sizing: border-box; }
.pw-sec__in {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-inline: auto;
  gap: var(--pw-sec-gap, 20px);
}

/* ---- spacing presets ---------------------------------------------------- */
.pw-sp--wide { padding: 100px 24px; --pw-sec-gap: 48px; }
.pw-sp--wide > .pw-sec__in { max-width: 1280px; }
.pw-sp--boxed, .pw-sp--boxed-lg { margin: 50px 0; padding: 50px 10px; --pw-sec-gap: 20px; }
.pw-sp--boxed-lg { margin: 100px 0; }
.pw-sp--tight { margin: 0; padding: 10px; --pw-sec-gap: 20px; }
.pw-sp--xwide { padding: 112px 24px; --pw-sec-gap: 24px; }
.pw-sp--open { margin: 100px 0; padding: 0; --pw-sec-gap: 20px; }
.pw-sp--boxed > .pw-sec__in, .pw-sp--boxed-lg > .pw-sec__in, .pw-sp--tight > .pw-sec__in, .pw-sp--open > .pw-sec__in { max-width: 1140px; }
.pw-sp--xwide > .pw-sec__in { max-width: 1280px; }

/* Large gap under the heading area: 80px, 40px on a tablet, 32px on a phone (the base rule must come before the media ones). */
.pw-sec.pw-gb--large .pw-intro { margin-bottom: 80px; }
@media (max-width: 1024px) {
  .pw-sec.pw-gb--large .pw-intro { margin-bottom: 40px; }
  .pw-sp--wide { padding: 80px 16px; --pw-sec-gap: 32px; }
}
@media (max-width: 767px) {
  .pw-sp--wide { padding: 48px 16px; }
  .pw-sp--xwide { padding: 64px 16px; }
  .pw-sec.pw-gb--large .pw-intro { margin-bottom: 32px; }
}

/* ---- section heading: the three looks the old site uses ----------------- */
.pw-sec .pw-intro { display: flex; flex-direction: column; gap: 10px; }
.pw-sec .pw-intro--center { align-items: center; text-align: center; }
.pw-sec .pw-intro--start { align-items: flex-start; text-align: start; }
.pw-sec .pw-intro__eyebrow {
  margin: 0;
  font-family: var(--pw-font-heading);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: var(--pw-text);
}
.pw-sec.pw-eb--tan .pw-intro__eyebrow { color: var(--pw-primary); }
.pw-sec.pw-eb--sans .pw-intro__eyebrow { font-family: var(--pw-font-body); font-weight: 400; }
.pw-sec .pw-intro__heading {
  margin: 0;
  font-family: var(--pw-font-heading);
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  color: var(--pw-primary);
}
.pw-sec.pw-hw--medium .pw-intro__heading { font-weight: 500; }
.pw-sec.pw-hs--roomy .pw-intro__heading { margin-bottom: 24px; }
@media (max-width: 767px) { .pw-sec.pw-hs--roomy .pw-intro__heading { margin-bottom: 18px; } } /* after the rule above, or it never applies */
.pw-sec h1.pw-intro__heading, .pw-sec.pw-hw--medium h1.pw-intro__heading { font-size: 95px; font-weight: 700; }
@media (max-width: 767px) {
  .pw-sec .pw-intro__heading { font-size: 36px; }
  .pw-sec h1.pw-intro__heading, .pw-sec.pw-hw--medium h1.pw-intro__heading { font-size: 60px; }
}
.pw-sec .pw-intro__text { margin-top: 10px; color: var(--pw-text); }
.pw-sec .pw-intro__text p { margin: 0 0 1em; }
.pw-sec .pw-intro__text p:last-child { margin-bottom: 0; }

/* ---- the text under the heading, in the looks the old site uses --------- */
.pw-sec.pw-in--grey .pw-intro__text,
.pw-sec.pw-in--tan .pw-intro__text,
.pw-sec.pw-in--tan-lg .pw-intro__text {
  margin-top: 0;
  font-family: var(--pw-font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}
.pw-sec.pw-in--grey .pw-intro__text { color: var(--pw-text); }
.pw-sec.pw-in--tan .pw-intro__text { color: var(--pw-primary); }
.pw-sec.pw-in--tan-lg .pw-intro__text { color: var(--pw-primary); font-size: 24px; line-height: 1; }
.pw-sec.pw-in--grey .pw-intro__text p, .pw-sec.pw-in--tan .pw-intro__text p, .pw-sec.pw-in--tan-lg .pw-intro__text p { margin: 0; }
/* These lines were h5 headings. On a Kadence page (the "roomy" headings, 24px under the h2) Kadence left .5em (10px)
   under them; on an Elementor full-width page it did not. */
.pw-sec.pw-hs--roomy.pw-in--grey .pw-intro__text, .pw-sec.pw-hs--roomy.pw-in--tan .pw-intro__text { margin-bottom: .5em; }

/* The introduction as a real heading (Introduction is: H3): it looks exactly like the paragraph it replaces. */
.pw-sec .pw-intro__text-heading { margin: 0 0 .5em; font: inherit; color: inherit; letter-spacing: inherit; } /* .5em under it, like every heading on the old site */

/* "Narrower introduction on tablets": 15% in from each side between 768 and 1024 wide (Booking). */
@media (min-width: 768px) and (max-width: 1024px) {
  .pw-sec .pw-intro__text--narrow { padding-inline: 15%; }
}

/* ---- the lines that show on a dark band ---------------------------------- */
.pw-sec.pw-band--brown.pw-in--body .pw-intro__text { color: #ffffff; }

/* ==========================================================================
   Extra space above / below a block (inc/block-space.php): an empty div, the
   same height at every width.
   ========================================================================== */
.pw-extra-space { display: block; height: 0; }
.pw-extra-space--small  { height: 20px; }
.pw-extra-space--medium { height: 50px; }
.pw-extra-space--large  { height: 100px; }
