/* ═══════════════════════════════════════════════════════════════
   EXPRESSIVE MINDS THERAPY — MAIN STYLESHEET
   Design tokens → theme-config.php
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS CUSTOM PROPERTIES ──────────────────────────────────── */
:root {
  --em-primary:    #10478E;
  --em-secondary:  #208AE5;
  --em-accent:     #FA6D00;
  --em-bg:         #F5F0E8;
  --em-surface:    #F2F2F2;
  --em-text:       #333333;
  --em-white:      #FFFFFF;
  --em-rainbow:    linear-gradient(to right, #FF0000, #FA6D00, #F9F201, #17A710, #208AE5, #9B20E5, #E520A5);
  --em-font-heading: 'EB Garamond', Georgia, serif;
  --em-font-body:    'Lato', Arial, sans-serif;
  --em-radius:     4px;
  --em-shadow:     0 2px 12px rgba(0,0,0,0.08);
  --em-shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --em-section-pad: 80px;

  /* Rainbow card border colours cycling in order */
  --em-r1: #FF0000;
  --em-r2: #FA6D00;
  --em-r3: #F9F201;
  --em-r4: #17A710;
  --em-r5: #208AE5;
  --em-r6: #9B20E5;
  --em-r7: #E520A5;
}

/* ── RESET / BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--em-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--em-text);
  background-color: var(--em-bg);
}

h1, h2, h3 {
  font-family: var(--em-font-heading);
  color: var(--em-primary);
  line-height: 1.25;
}

h4, h5, h6 {
  font-family: var(--em-font-body);
  color: var(--em-primary);
}

a {
  color: var(--em-primary);
  text-decoration: underline;
}

a:hover, a:focus {
  /* WCAG AA: secondary blue (#208AE5) on light backgrounds = 3.2:1 (fail).
     Use primary navy (#10478E) which gives 8.0:1. */
  color: var(--em-primary);
}

img { max-width: 100%; height: auto; }

/* ── SKIP TO CONTENT (ACCESSIBILITY) ─────────────────────────── */
.skip-to-content {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 9999;
  background: var(--em-primary);
  color: var(--em-white);
  padding: 10px 20px;
  border-radius: var(--em-radius);
  font-family: var(--em-font-body);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 16px;
}

/* ── RAINBOW BAR ─────────────────────────────────────────────── */
.em-rainbow-bar {
  width: 100%;
  height: 5px;
  background: var(--em-rainbow);
  display: block;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header,
.site-header.sticky-enabled {
  background: var(--em-white) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

/* Logo */
.site-header .site-logo img,
.site-branding .custom-logo {
  max-height: 70px;
  width: auto;
}

/* ── PRIMARY NAVIGATION ─────────────────────────────────────── */
.main-nav a,
.nav-primary a {
  font-family: var(--em-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--em-text);
  text-decoration: none;
  padding: 8px 14px;
  position: relative;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus,
.nav-primary a:hover,
.nav-primary a:focus {
  color: var(--em-primary);
}

/* Rainbow underline on active/hover nav links */
.main-nav li.current-menu-item > a::after,
.main-nav a:hover::after,
.nav-primary li.current-menu-item > a::after,
.nav-primary a:hover::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--em-rainbow);
  border-radius: 2px;
}

/* Dropdown menus */
.main-nav .sub-menu,
.nav-primary .sub-menu {
  background: var(--em-white);
  border-top: 3px solid var(--em-primary);
  box-shadow: var(--em-shadow);
  border-radius: 0 0 var(--em-radius) var(--em-radius);
  min-width: 220px;
}

.main-nav .sub-menu a,
.nav-primary .sub-menu a {
  padding: 10px 18px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

/* ── HEADER BOOKING CTA ──────────────────────────────────────── */
.em-header-cta,
.header-cta-button a {
  background: var(--em-primary) !important;
  color: var(--em-white) !important;
  font-family: var(--em-font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px !important;
  border-radius: var(--em-radius) !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s !important;
  display: inline-block;
}

.em-header-cta:hover,
.em-header-cta:focus,
.header-cta-button a:hover,
.header-cta-button a:focus {
  /* WCAG AA: secondary blue + white = 3.60:1 (fail). Darker navy = 13:1 (pass). */
  background: #0C3570 !important;
  color: var(--em-white) !important;
}

/* ── BUTTONS ──────────────────────────────────────────────────── */
.em-btn,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  font-family: var(--em-font-body);
  font-weight: 700;
  border-radius: var(--em-radius);
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border: 2px solid transparent;
}

/* Primary button */
.em-btn--primary,
.wp-block-button.is-style-fill .wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  background: var(--em-primary);
  color: var(--em-white);
  border-color: var(--em-primary);
}

.em-btn--primary:hover,
.em-btn--primary:focus,
button[type="submit"]:hover,
input[type="submit"]:hover {
  /* WCAG AA: secondary blue + white = 3.60:1 (fail). Darker navy = 13:1 (pass). */
  background: #0C3570;
  border-color: #0C3570;
  color: var(--em-white);
}

/* Secondary/outline button */
.em-btn--secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--em-primary);
  border-color: var(--em-primary);
}

.em-btn--secondary:hover,
.em-btn--secondary:focus {
  background: var(--em-primary);
  color: var(--em-white);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--em-accent);
  outline-offset: 3px;
}

/* ── HOME HERO ──────────────────────────────────────────────── */
.em-hero {
  background: var(--em-bg);
  padding: 100px 24px 80px;
  text-align: center;
}

.em-hero__eyebrow {
  font-family: var(--em-font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* WCAG AA: orange on off-white = 2.55:1 (fail). Navy = 8.0:1 (pass). */
  color: var(--em-primary);
  margin-bottom: 16px;
}

.em-hero h1 {
  font-family: var(--em-font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--em-primary);
  margin-bottom: 20px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.em-hero__sub {
  font-size: 1.15rem;
  color: var(--em-text);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.em-hero__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── PAGE HERO (ALL PAGES EXCEPT HOME) ───────────────────────── */
/* ── PAGE HERO — NAVY BANNER (default) ───────────────────────── */
.em-page-hero {
  background: var(--em-primary);
  color: var(--em-white);
  padding: 48px 24px 40px;
  text-align: center;
}

.em-page-hero__inner {
  max-width: 900px;
  margin: 0 auto;
}

.em-page-hero__title {
  font-family: var(--em-font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--em-white);
  margin: 0 0 12px;
}

.em-page-hero__breadcrumb {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.em-page-hero__breadcrumb a {
  color: rgba(255,255,255,0.85);
}

/* Full-width navy banner variant — breaks out of GP content column */
.em-page-hero--full-width {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* ── PAGE PHOTO STRIP (below navy banner, no overlay, no text) ── */
/* Used on Play Therapy as Option B layout */
.em-page-photo-strip {
  max-width: max(900px, 75vw);
  margin: 0 auto;
  max-height: 350px;
  overflow: hidden;
  display: block;
  line-height: 0;
  font-size: 0;
}

.em-page-photo-strip img {
  width: 100%;
  height: 350px;
  max-height: 350px;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* ── PAGE HERO — PHOTO VARIANT ───────────────────────────────── */
.em-page-hero--photo {
  position: relative;
  max-width: max(900px, 75vw);
  margin: 0 auto;
  height: 400px;
  overflow: hidden;
  padding: 0;         /* override base padding */
  text-align: center;
}

.em-page-hero--photo .em-page-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.em-page-hero--photo .em-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(10, 25, 60, 0.55) 55%,
    rgba(10, 25, 60, 0.85) 100%
  );
  z-index: 1;
}

/* Inner content: flex column pinned to bottom of the photo area */
.em-page-hero--photo .em-page-hero__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
  max-width: 900px;
  margin: 0 auto;
}

/* ── SECTIONS ─────────────────────────────────────────────────── */
.em-section {
  padding: var(--em-section-pad) 24px;
}

.em-section--alt {
  background: var(--em-surface);
}

.em-section__inner {
  max-width: 1160px;
  margin: 0 auto;
}

.em-section__heading {
  font-family: var(--em-font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--em-primary);
  margin-bottom: 16px;
}

.em-section__sub {
  color: var(--em-text);
  max-width: 680px;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ── RAINBOW DIVIDERS (HOME PAGE) ────────────────────────────── */
.em-rainbow-divider {
  width: 100%;
  height: 4px;
  background: var(--em-rainbow);
  border: none;
  margin: 0;
  display: block;
}

/* ── SERVICE CARDS GRID ─────────────────────────────────────── */
.em-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.em-service-card {
  background: var(--em-white);
  border-radius: var(--em-radius);
  box-shadow: var(--em-shadow);
  padding: 32px 28px;
  border-top: 5px solid var(--em-primary);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
  color: var(--em-text);
}

.em-service-card:hover,
.em-service-card:focus {
  transform: translateY(-4px);
  box-shadow: var(--em-shadow-hover);
  text-decoration: none;
  color: var(--em-text);
}

/* Rainbow border cycling */
.em-service-card:nth-child(7n+1) { border-top-color: var(--em-r1); }
.em-service-card:nth-child(7n+2) { border-top-color: var(--em-r2); }
.em-service-card:nth-child(7n+3) { border-top-color: var(--em-r3); }
.em-service-card:nth-child(7n+4) { border-top-color: var(--em-r4); }
.em-service-card:nth-child(7n+5) { border-top-color: var(--em-r5); }
.em-service-card:nth-child(7n+6) { border-top-color: var(--em-r6); }
.em-service-card:nth-child(7n+0) { border-top-color: var(--em-r7); }

.em-service-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.em-service-card__title {
  font-family: var(--em-font-heading);
  font-size: 1.4rem;
  color: var(--em-primary);
  margin-bottom: 10px;
}

.em-service-card__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--em-text);
}

/* ── ABOUT TEASER ─────────────────────────────────────────────── */
.em-about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: var(--em-section-pad) 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.em-about-teaser__image {
  border-radius: 8px;
  overflow: hidden;
}

.em-about-teaser__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.em-about-teaser__content h2 {
  font-family: var(--em-font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 16px;
}

/* ── CTA STRIP ───────────────────────────────────────────────── */
.em-cta-strip {
  background: var(--em-primary);
  color: var(--em-white);
  text-align: center;
  padding: 64px 24px;
}

.em-cta-strip h2 {
  color: var(--em-white);
  font-family: var(--em-font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 12px;
}

.em-cta-strip p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: rgba(255,255,255,0.88);
}

.em-cta-strip .em-btn--primary {
  background: var(--em-white);
  color: var(--em-primary);
  border-color: var(--em-white);
}

.em-cta-strip .em-btn--primary:hover {
  /* WCAG AA: #FA6D00 + white = 2.90:1 (fail). Use accessible amber. */
  background: #B85600;
  border-color: #B85600;
  color: var(--em-white);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--em-primary);
  color: rgba(255,255,255,0.85);
  border-top: 5px solid transparent;
  border-image: var(--em-rainbow) 1;
}

.em-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

.em-footer-col h3 {
  font-family: var(--em-font-heading);
  font-size: 1.2rem;
  color: var(--em-white);
  margin-bottom: 16px;
}

.em-footer-col p,
.em-footer-col address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
}

.em-footer-col a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.em-footer-col a:hover {
  color: var(--em-white);
  text-decoration: underline;
}

.em-footer-col .footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.em-footer-col .footer-nav li {
  margin-bottom: 8px;
}

.em-footer-logo img {
  max-height: 80px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 12px;
}

.em-footer-tagline {
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
}

/* Footer bottom bar */
.em-footer-bar {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 14px 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.em-footer-bar a {
  color: rgba(255,255,255,0.7);
}

/* ── NAP BLOCK ───────────────────────────────────────────────── */
.em-nap {
  font-style: normal;
}

.em-nap .em-nap__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

/* ── CONTACT PAGE ─────────────────────────────────────────────── */
.em-contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: var(--em-section-pad) 24px;
  max-width: 1060px;
  margin: 0 auto;
}

/* CF7 form styles */
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
  margin-top: 4px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: var(--em-radius);
  font-family: var(--em-font-body);
  font-size: 16px;
  color: var(--em-text);
  background: var(--em-white);
  transition: border-color 0.2s;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  border-color: var(--em-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16,71,142,0.15);
}

.wpcf7 textarea {
  min-height: 160px;
  resize: vertical;
}

.wpcf7 label {
  font-weight: 700;
  font-size: 14px;
  color: var(--em-text);
  display: block;
  margin-top: 18px;
  margin-bottom: 4px;
}

.wpcf7 .wpcf7-submit {
  margin-top: 20px;
  width: 100%;
}

.wpcf7 .wpcf7-response-output {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--em-radius);
}

.wpcf7 .wpcf7-mail-sent-ok {
  border-color: #17A710;
  background: rgba(23,167,16,0.08);
  color: #0d6b0a;
}

.wpcf7 .wpcf7-validation-errors {
  border-color: #e00;
  background: rgba(220,0,0,0.07);
  color: #c00;
}

/* ── CF7 HONEYPOT (anti-spam hidden field) ─────────────────── */
/* CF7 6.x uses data-name; field named 'website' is bait for bots */
.wpcf7-form-control-wrap[data-name="website"] {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* ── FAQ ACCORDION ────────────────────────────────────────────── */
.em-faq details,
.em-faq .wp-block-details {
  border-bottom: 1px solid #d6e4ef;
  margin-bottom: 0;
  padding: 0 16px;
}

/* Alternating row backgrounds (collapsed state) */
.em-faq details:nth-child(odd) {
  background: #ffffff;
}

.em-faq details:nth-child(even) {
  background: #EEF4F8;
}

.em-faq summary {
  font-family: var(--em-font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--em-primary);
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.em-faq summary::after {
  content: '+';
  font-size: 1.4rem;
  /* WCAG AA: orange on white = 2.55:1 (fail). Navy = 8.0:1 (pass). */
  color: var(--em-primary);
  flex-shrink: 0;
}

.em-faq details[open] summary::after {
  content: '−';
}

/* Open state: keep background consistent, answer text has breathing room */
.em-faq details[open] {
  background: #ffffff;
}

.em-faq details > *:not(summary) {
  padding: 4px 0 20px;
  line-height: 1.75;
}

/* ── HEADSHOT PLACEHOLDER ─────────────────────────────────────── */
.em-headshot-placeholder {
  width: 280px;
  height: 320px;
  background: var(--em-surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  text-align: center;
  border: 2px dashed #ccc;
}

/* ── BOOKING BUTTON ───────────────────────────────────────────── */
/* WCAG AA: #FA6D00 + white = 2.90:1 (fail). #B85600 + white = 4.81:1 (pass). */
.em-booking-btn {
  display: inline-block;
  background: #B85600;
  color: var(--em-white);
  font-family: var(--em-font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--em-radius);
  text-decoration: none;
  transition: background 0.2s;
  border: 2px solid #B85600;
}

.em-booking-btn:hover,
.em-booking-btn:focus {
  background: #964800;
  border-color: #964800;
  color: var(--em-white);
}

/* ── INLINE CTA BLOCK ─────────────────────────────────────────── */
.em-inline-cta {
  background: var(--em-surface);
  border-left: 4px solid var(--em-primary);
  padding: 24px 28px;
  border-radius: 0 var(--em-radius) var(--em-radius) 0;
  margin: 40px 0;
}

.em-inline-cta p {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (768px – 1199px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .em-about-teaser {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .em-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .em-contact-wrap {
    grid-template-columns: 1fr;
  }

  .em-services-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (<768px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --em-section-pad: 48px;
  }

  .em-hero {
    padding: 60px 20px 48px;
  }

  .em-hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .em-hero__ctas a,
  .em-hero__ctas .em-btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .em-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 20px 28px;
  }

  .em-services-grid {
    grid-template-columns: 1fr;
  }

  .em-about-teaser {
    padding: 48px 20px;
    gap: 24px;
  }

  /* 44px minimum touch targets */
  a, button, input[type="submit"],
  .em-btn, .wp-block-button__link,
  .main-nav a, .nav-primary a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav a, .nav-primary a {
    display: block;
  }

  .em-booking-btn,
  .em-btn--primary,
  .em-btn--secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .em-page-hero {
    padding: 36px 20px 28px;
  }

  .em-page-hero--photo {
    height: 280px;
  }

  .em-page-hero--photo .em-page-hero__inner {
    padding-bottom: 28px;
  }

  .em-cta-strip {
    padding: 48px 20px;
  }
}

/* ══════════════════════════════════════════════════════════════
   GENERATEPRESS GLOBAL OVERRIDES
   ══════════════════════════════════════════════════════════════ */

/* Prevent horizontal scroll from full-width sections */
html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body.home,
body.page {
  background: var(--em-bg);
}

/* ── STICKY HEADER ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--em-white) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── HEADER INNER — LOGO LEFT, NAV CENTRE-RIGHT, CTA FAR RIGHT ─ */
.site-header .inside-header {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 200px !important;  /* clear the absolutely-positioned logo */
  padding-right: 40px !important;
  box-sizing: border-box !important;
  position: relative;
  display: flex !important;
  align-items: center !important;
}

/* Nav wrapper: flex:1 fills space between logo-padding and CTA,
   justify-content:center floats the inner .main-nav to the middle.
   Background is transparent here — navy lives on .main-nav below. */
.site-header #site-navigation,
.site-header .nav-primary,
.site-header .main-navigation {
  flex: 1 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: stretch !important;
  background: transparent !important;
  margin-left: 0 !important;
}

/* Navy background on the inner nav strip only — keeps the panel
   at its natural content width even though the wrapper is flex:1 */
.site-header .main-navigation .main-nav,
.site-header .nav-primary .main-nav {
  background: var(--em-primary) !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0;
}

/* CTA booking button — accessible amber, white text, pushed to far right */
/* WCAG AA: #FA6D00 + white = 2.90:1 (fail). #B85600 + white = 4.81:1 (pass). */
.em-header-book-btn {
  margin-left: 0;
  flex-shrink: 0;
  background: #B85600;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: var(--em-font-body);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: background 0.2s;
}

.em-header-book-btn:hover,
.em-header-book-btn:focus {
  background: #964800;
  color: #fff !important;
  text-decoration: none;
}

/* Fix 3 cont: Logo pinned to far-left using absolute positioning so it's
   immune to any remaining flex/grid centering on the container */
.site-header .site-logo {
  position: absolute !important;
  left: 40px !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
}

.site-header .site-logo a,
.site-branding .custom-logo-link {
  display: block;
  line-height: 0;
}

/* GP renders logo as img.header-image.is-logo-image */
.site-header img.header-image.is-logo-image,
.site-branding .custom-logo,
.site-header .custom-logo {
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

/* Belt-and-braces: hide GP site title text */
.site-title,
.site-description {
  display: none !important;
  visibility: hidden !important;
}

/* ── FIX 7: RAINBOW BAR — TRULY FULL WIDTH ──────────────────── */
/* The bar fires on generate_after_header — at body level, before #page wrapper */
.em-rainbow-bar {
  display: block !important;
  width: 100% !important;
  height: 5px !important;
  background: var(--em-rainbow) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  line-height: 0;
  font-size: 0;
  /* Stretch beyond any parent padding by using negative margins if needed */
  position: relative;
  left: 0;
  right: 0;
}

/* ── FIX 1+2: NAV COLOURS — WHITE TEXT ON DARK BAR ─────────── */
/* GP's nav bar has background #222222 from generate_settings.
   Our previous override was setting color to --em-text (dark) on dark bg.
   Remove conflict: let GP's inline CSS handle colours, only override what we need. */

/* Top-level nav links — white on dark background */
.main-navigation .main-nav ul li a,
.nav-primary .main-nav ul li a {
  font-family: var(--em-font-body) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: #fff !important;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a,
.nav-primary .main-nav ul li a:hover,
.nav-primary .main-nav ul li.current-menu-item > a {
  color: #fff !important;
  background-color: rgba(255,255,255,0.12) !important;
}

/* Rainbow underline on active/hover nav links */
.main-navigation .main-nav ul li.current-menu-item > a::after,
.main-navigation .main-nav ul li a:hover::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--em-rainbow);
  border-radius: 2px;
}

.main-navigation .main-nav ul li a {
  position: relative;
}

/* Dropdown menus */
.main-navigation .main-nav ul ul,
.nav-primary .main-nav ul ul {
  background: var(--em-white) !important;
  border-top: 3px solid var(--em-primary) !important;
  box-shadow: var(--em-shadow) !important;
  min-width: 220px;
}

.main-navigation .main-nav ul ul li a,
.nav-primary .main-nav ul ul li a {
  color: var(--em-text) !important;
  border-bottom: 1px solid #eee;
  padding: 10px 18px !important;
  font-size: 14px !important;
  background: transparent !important;
}

.main-navigation .main-nav ul ul li a:hover,
.main-navigation .main-nav ul ul li.current-menu-item > a {
  background: var(--em-surface) !important;
  color: var(--em-primary) !important;
}

/* Mobile menu toggle button */
.menu-toggle,
button.menu-toggle {
  background: transparent !important;
  border: 2px solid #fff !important;
  color: #fff !important;
  border-radius: var(--em-radius) !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--em-primary) !important;
  border-top: 5px solid transparent;
  border-image: var(--em-rainbow) 1;
}

.site-footer .inside-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0;
}

/* ── CONTENT AREA CONSTRAINTS ───────────────────────────────── */
.content-area {
  padding-top: 0;
  width: 100%;
}

.no-sidebar .content-area {
  width: 100% !important;
  max-width: 100% !important;
}

/* Inner article content (non-home pages) — 900px or 75vw, whichever is larger */
.site-content .inside-article,
.site-content .inside-page-header {
  max-width: max(900px, 75vw);
  margin: 0 auto;
  padding: 20px 24px 40px;
}

/* About Zoe: minimal top gap — no banner above, content starts close to rainbow bar */
.page-id-20 .inside-article {
  padding-top: 4px !important;
}

/* Replace GP's 34px default with a controlled gap between banner and content */
.page .entry-content,
.single .entry-content {
  margin-top: 24px !important;
}

/* First section's own padding is now redundant — the margin above provides the gap */
.page .entry-content > .em-section:first-of-type,
.page .entry-content > section:first-of-type {
  padding-top: 0 !important;
}

/* Float pages: first element after the floated img starts at the same level as the image */
.entry-content > .em-content-float-img + * {
  margin-top: 0 !important;
}

/* About Zoe page: ensure headshot has visible minimum width */
.page-id-20 .em-section img {
  min-width: 280px;
}

/* EMDR Therapy: photo floated right inside content column */
.em-content-float-img {
  float: right;
  width: 40%;
  max-width: 380px;
  margin: 0 0 24px 32px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
  display: block;
  height: auto;
}

@media (max-width: 767px) {
  .em-content-float-img {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px 0;
  }
}

/* Hide GP's page title on all pages (we use em-page-hero instead) */
.page .entry-header,
.single .entry-header,
.page .page-header {
  display: none !important;
}

/* ── HOME PAGE — STRIP ALL CONTAINER CONSTRAINTS ────────────── */
.page-template-page-home #page,
.page-template-page-home #content,
.page-template-page-home .site-content,
.page-template-page-home .content-area,
.page-template-page-home .site-main,
.page-template-page-home article,
.page-template-page-home .inside-article,
.page-template-page-home .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  box-sizing: border-box;
}

.page-template-page-home .grid-container:not(.inside-header) {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.page-template-page-home .entry-header,
.page-template-page-home .page-header {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   HOME HERO — SINGLE UNIFIED BLOCK (image + overlaid text)
   Fix 4+5: one block, text sits ON TOP of the image.
   No separate navy panel below.
   ══════════════════════════════════════════════════════════════ */

/* Outer container: relative so overlays can position against it.
   100vw + negative margin escapes any container padding.
   overflow-x:hidden on html/body prevents scrollbar. */
.em-hero-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 600px;   /* total hero height — image + text area as one block */
  overflow: hidden;
  display: block;
}

/* Image fills the entire section */
.em-hero-full__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  display: block;
}

/* Gradient: subtle at top, dark at bottom where text lives */
.em-hero-full__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04)  0%,
    rgba(0, 0, 0, 0.15)  40%,
    rgba(10, 25, 60, 0.78) 68%,
    rgba(10, 25, 60, 0.93) 100%
  );
  z-index: 1;
}

/* Text content: spans the bottom 40% of the hero, content centred within */
.em-hero-full__content {
  position: absolute;
  top: 60%;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24px 40px;
  text-align: center;
  color: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Eyebrow label */
.em-hero-full__eyebrow {
  font-family: var(--em-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 14px;
}

/* H1 */
.em-hero-full__heading {
  font-family: var(--em-font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  line-height: 1.2;
  margin: 0 auto 18px;
  max-width: 860px;
}

/* Subheading */
.em-hero-full__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* CTAs row */
.em-hero-full__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* WCAG AA: #FA6D00 + white = 2.90:1 (fail). #B85600 + white = 4.81:1 (pass). */
.em-hero-full__btn-primary {
  background: #B85600;
  color: #fff;
  border: 2px solid #B85600;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--em-radius);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.em-hero-full__btn-primary:hover,
.em-hero-full__btn-primary:focus {
  background: #fff;
  color: var(--em-primary);
  border-color: #fff;
  text-decoration: none;
}

.em-hero-full__btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--em-radius);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.em-hero-full__btn-secondary:hover,
.em-hero-full__btn-secondary:focus {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

/* ── HOME PAGE SECTION CONTAINERS ─────────────────────────────── */
.em-home-section {
  padding: 80px 24px;
  width: 100%;
}

.em-home-section--alt {
  background: var(--em-surface);
}

.em-home-section__inner {
  max-width: 1160px;
  margin: 0 auto;
}

.em-home-section__heading {
  font-family: var(--em-font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--em-primary);
  text-align: center;
  margin-bottom: 12px;
}

.em-home-section__sub {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  color: var(--em-text);
}

/* ── ABOUT TEASER ────────────────────────────────────────────── */
.em-home-about {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.em-home-about__image img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  display: block;
}

.em-home-about__content h2 {
  font-family: var(--em-font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--em-primary);
  margin-bottom: 16px;
}

/* ── CTA STRIP BUTTON COLOURS ────────────────────────────────── */
.em-cta-strip__btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* WCAG AA: #FA6D00 + white = 2.90:1 (fail). #B85600 + white = 4.81:1 (pass). */
.em-cta-strip__btn-book {
  background: #B85600;
  color: #fff;
  border: 2px solid #B85600;
  padding: 14px 32px;
  font-weight: 700;
  border-radius: var(--em-radius);
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.em-cta-strip__btn-book:hover,
.em-cta-strip__btn-book:focus {
  background: #964800;
  border-color: #964800;
  color: #fff;
  text-decoration: none;
}

.em-cta-strip__btn-contact {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 14px 32px;
  font-weight: 700;
  border-radius: var(--em-radius);
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.em-cta-strip__btn-contact:hover,
.em-cta-strip__btn-contact:focus {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

/* ── RESPONSIVE — HOME HERO ──────────────────────────────────── */
@media (max-width: 767px) {
  .em-hero-full {
    height: 480px;
  }

  .em-hero-full__content {
    padding: 32px 20px 44px;
  }

  .em-hero-full__heading {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .em-hero-full__ctas {
    flex-direction: column;
    align-items: center;
  }

  .em-hero-full__btn-primary,
  .em-hero-full__btn-secondary {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .em-home-section {
    padding: 48px 20px;
  }

  .em-home-about {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .em-cta-strip__btns {
    flex-direction: column;
    align-items: center;
  }

  .em-cta-strip__btn-book,
  .em-cta-strip__btn-contact {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (max-width: 1199px) {
  .em-home-about {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .em-home-about {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET + HAMBURGER NAV (<1024px)
   Switch to hamburger at 1024px to prevent nav link wrapping.
   Dropdown is absolutely positioned below the header so the
   logo row stays stable at [logo left] [hamburger right].
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {

  /* Logo: stays absolutely positioned — just shift left inset from 40px to 16px */
  .site-header .site-logo {
    left: 16px !important;
  }

  /* Logo image: reduce to 48px on mobile for a compact header */
  .site-header img.header-image.is-logo-image,
  .site-branding .custom-logo,
  .site-header .custom-logo {
    max-height: 48px !important;
  }

  /* Header: compact 72px height (12px padding + 48px logo + 12px padding) */
  .site-header .inside-header {
    padding: 12px 16px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  /* CTA booking button: hidden on tablet/mobile */
  .em-header-book-btn {
    display: none !important;
  }

  /* Nav: push to far right — logo is absolute (not in flex flow) so nav
     is the only flex item; margin-left: auto drives it to the right edge.
     Use .site-header prefix to match desktop selector specificity (0,2,0). */
  .site-header .main-navigation,
  .site-header .nav-primary,
  .site-header #site-navigation {
    background: transparent !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
  }

  /* Hamburger: force visible, styled for white header */
  .menu-toggle,
  button.menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 2px solid var(--em-primary) !important;
    color: var(--em-primary) !important;
    border-radius: var(--em-radius) !important;
    min-height: 40px !important;
    min-width: 44px !important;
    padding: 6px 10px !important;
    cursor: pointer;
    position: relative;
    z-index: 201;
  }

  /* Collapsed: hide nav list entirely */
  .site-header .main-navigation:not(.toggled) .main-nav,
  .site-header .nav-primary:not(.toggled) .main-nav {
    display: none !important;
  }

  /* Expanded: nav list as a fixed full-width overlay below the 72px header */
  .site-header .main-navigation.toggled .main-nav,
  .site-header .nav-primary.toggled .main-nav {
    display: block !important;
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--em-primary) !important;
    z-index: 200 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .site-header .main-navigation.toggled .main-nav > ul,
  .site-header .nav-primary.toggled .main-nav > ul {
    display: block !important;
    width: 100%;
  }

  /* Nav items: full width, stacked */
  .site-header .main-navigation.toggled .main-nav ul > li,
  .site-header .nav-primary.toggled .main-nav ul > li {
    width: 100%;
    float: none;
    position: relative;
  }

  /* Links: 44px touch target, no text wrap */
  .site-header .main-navigation.toggled .main-nav ul li a,
  .site-header .nav-primary.toggled .main-nav ul li a {
    white-space: nowrap !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #fff !important;
  }

  /* Rainbow underline: hide on stacked mobile items */
  .site-header .main-navigation.toggled .main-nav ul li a::after,
  .site-header .nav-primary.toggled .main-nav ul li a::after {
    display: none !important;
  }

  /* Sub-menus: inline (not absolute/floating) */
  .site-header .main-navigation.toggled .main-nav ul ul,
  .site-header .nav-primary.toggled .main-nav ul ul {
    position: static !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    box-shadow: none !important;
    border-top: 1px solid rgba(255,255,255,0.2) !important;
    background: rgba(0,0,0,0.18) !important;
    display: block !important;
  }

  .site-header .main-navigation.toggled .main-nav ul ul li a,
  .site-header .nav-primary.toggled .main-nav ul ul li a {
    color: rgba(255,255,255,0.9) !important;
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
    padding-left: 36px !important;
    background: transparent !important;
    font-size: 14px !important;
  }
}

/* ── About Zoe: stack photo/text to single column on mobile ─── */
@media (max-width: 767px) {
  /* The About Zoe page uses an inline style="display:grid;grid-template-columns:1fr 2fr"
     on the photo/bio wrapper div — override it here */
  .page-id-20 .em-section__inner > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .page-id-20 .em-section img {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}
