/* ===========================
   Global CSS – Birch Faraday Child
   =========================== */

/* =========================================================
   1) DESIGN TOKENS
   ========================================================= */
:root{
  /* Spacing */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  /* Layers */
  --z-header: 1000;
  --z-overlay: 1100;
  --z-modal: 1200;

  /* Header geometry */
  --header-h: 116px;       /* measured */
  --hero-offset: 70px;     /* extra breathing room under header on desktop */
  --hero-m-offset: 50px;   /* extra breathing room under header on mobile */
}

@media (max-width: 767px){
  :root{ --header-h: 96px; }
}

/* =========================================================
   2) BASE / RESETS
   ========================================================= */
*,
*::before,
*::after{ box-sizing: border-box; }

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

/* =========================================================
   3) GLOBAL UTILITIES
   ========================================================= */

/* Hero overlay utility:
   Desktop: push content down, pull background up behind transparent header.
   Mobile: header behaves like an overlay, so do not pull hero up (avoid overlap). */
.hero-pad{
  padding-top: calc(var(--header-h) + var(--hero-offset));
  margin-top: calc(var(--header-h) * -1);
}
@media (max-width: 767px){
  .hero-pad{
    padding-top: calc(var(--header-h) + var(--hero-m-offset));
    margin-top: 0;
  }
}

/* Section padding helper */
.u-section-pad{
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}
@media (max-width: 767px){
  .u-section-pad{
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }
}

/* =========================================================
   4) TYPOGRAPHY HYGIENE
   ========================================================= */
p{ margin: 0 0 .75em; }
p:last-child{ margin-bottom: 0; }

/* Elementor nesting safety */
.elementor .elementor-widget-text-editor p:last-child,
.elementor .e-con p:last-child{
  margin-bottom: 0;
}

/* =========================================================
   5) ACCORDION REFINEMENT (Elementor Nested Accordion)
   ========================================================= */
.e-n-accordion .e-n-accordion-item-title{
  border-radius: 10px;
}
.e-n-accordion > .e-n-accordion-item[open] > .e-n-accordion-item-title{
  border-radius: 10px 10px 0 0;
}

/* =========================================================
   6) LIQUID GLASS STICKY HEADER
   Assumes structure:
   .bf-header-wrap
     .bf-header-bar   (glass pill, sticky)
     .bf-header-overlay (sibling container for off-canvas widget)
   ========================================================= */

/* Sticky wrapper */
.bf-header-wrap{
  position: relative;
  z-index: var(--z-header);
}

/* The glass pill (transparent at top of page) */
.bf-header-bar{
  width: min(1200px, calc(100% - 32px));
  margin: 12px auto 0;
  border-radius: 100px;

  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;

  position: relative;
  overflow: hidden; /* keeps blur + highlight clipped to pill shape */

  transition:
    background 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    transform 240ms ease;
}

/* Sticky state only */
.bf-header-wrap.elementor-sticky--effects .bf-header-bar{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);

  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);

  transform: translateY(-2px);
}

/* Highlight sheen (sticky only) */
.bf-header-wrap.elementor-sticky--effects .bf-header-bar::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 200px at 20% 0%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(900px 200px at 80% 100%, rgba(255,255,255,0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure header contents sit above sheen */
.bf-header-wrap.elementor-sticky--effects .bf-header-bar > *{
  position: relative;
  z-index: 1;
}

/* Mobile menu toggle icon: default colour handled by Elementor settings */
/* Light section override */
   .bf-header-wrap.bf-on-light.elementor-sticky--effects .bf-menu-toggle,
   .bf-header-wrap.bf-on-light.elementor-sticky--effects .bf-menu-toggle i,
   .bf-header-wrap.bf-on-light.elementor-sticky--effects .bf-menu-toggle svg{
    color: var(--e-global-color-f864c3d) !important;
    fill: var(--e-global-color-f864c3d) !important;
}

/* Optional: smooth transition */
   .bf-menu-toggle,
   .bf-menu-toggle i,
   .bf-menu-toggle svg{
     transition: color 200ms ease, fill 200ms ease;
}

/* ========== Menu text (e-n-menu) ========== */

/* Over LIGHT sections: make menu dark (works before sticky) */
.bf-header-wrap.bf-on-light .bf-menu .e-n-menu-title-container,
.bf-header-wrap.bf-on-light .bf-menu .e-n-menu-title-text{
  color: var(--e-global-color-f864c3d) !important;
}

/* Over DARK sections: make menu light (works before sticky) */
.bf-header-wrap.bf-on-dark .bf-menu .e-n-menu-title-container,
.bf-header-wrap.bf-on-dark .bf-menu .e-n-menu-title-text{
  color: rgba(255,255,255,0.92) !important;
}

/* ========== Mobile toggle icon ========== */

/* Over LIGHT sections */
.bf-header-wrap.bf-on-light .bf-menu-toggle .elementor-icon{
  color: var(--e-global-color-f864c3d) !important;
  border-color: var(--e-global-color-f864c3d) !important;
}
.bf-header-wrap.bf-on-light .bf-menu-toggle .elementor-icon svg{
  fill: var(--e-global-color-f864c3d) !important;
}

/* Over DARK sections */
.bf-header-wrap.bf-on-dark .bf-menu-toggle .elementor-icon{
  color: rgba(255,255,255,0.92) !important;
  border-color: rgba(255,255,255,0.92) !important;
}
.bf-header-wrap.bf-on-dark .bf-menu-toggle .elementor-icon svg{
  fill: rgba(255,255,255,0.92) !important;
}

/* Mobile tuning */
@media (max-width: 767px){
  .bf-header-bar{
    width: calc(100% - 20px);
    margin-top: 10px;
    border-radius: 100px;
  }

  .bf-header-wrap.elementor-sticky--effects .bf-header-bar{
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
  }
	
  .bf-header-wrap{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Fallback if backdrop-filter unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .bf-header-wrap.elementor-sticky--effects .bf-header-bar{
    background: rgba(255,255,255,0.18);
  }
}

/* =========================================================
   7) STICKY CONTRAST SWITCHING (JS toggles .bf-on-light)
   ========================================================= */

/* Smooth transitions */
.bf-header-wrap .elementor-nav-menu--main a{
  transition: color 200ms ease;
}

/* Default sticky text on dark backgrounds */
.bf-header-wrap.elementor-sticky--effects .elementor-nav-menu--main a{
  color: rgba(255,255,255,0.92);
}

/* When header is over a LIGHT section */
.bf-header-wrap.bf-on-light.elementor-sticky--effects .bf-header-bar{
  background: rgba(15,23,30,0.08);
  border-color: rgba(15,23,30,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}

/* Tone down sheen on light mode */
.bf-header-wrap.bf-on-light.elementor-sticky--effects .bf-header-bar::before{
  background:
    radial-gradient(1200px 200px at 20% 0%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(900px 200px at 80% 100%, rgba(255,255,255,0.06), transparent 55%);
}

/* Link colour on light sections */
.bf-header-wrap.bf-on-light.elementor-sticky--effects .elementor-nav-menu--main a{
  color: rgba(15,23,30,0.92);
}

/* =========================================================
   8) LOGO SWAP (light/dark logos)
   ========================================================= */

/* Default: show light logo */
.bf-logo--light{ display: block !important; }
.bf-logo--dark{ display: none !important; }

/* Over light sections: show dark logo */
.bf-header-wrap.bf-on-light .bf-logo--light{ display: none !important; }
.bf-header-wrap.bf-on-light .bf-logo--dark{ display: block !important; }

/* =========================================================
   9) HEADER MENU COLOUR SWITCH (Elementor e-n-menu)
   Only needed for light-mode override.
   Assumes the menu widget has class "bf-menu"
   ========================================================= */
.bf-menu .e-n-menu-title-container,
.bf-menu .e-n-menu-title-text{
  transition: color 200ms ease;
}

/* Sticky + light section */
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-container,
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-text{
  color: var(--e-global-color-f864c3d) !important;
}

/* Hover (light mode) */
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-container:hover,
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-container:hover .e-n-menu-title-text{
  color: var(--e-global-color-f864c3d) !important;
}

/* Current page (light mode) */
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-container[aria-current="page"],
.bf-header-wrap.bf-on-light.elementor-sticky--effects
.bf-menu .e-n-menu-title-container[aria-current="page"] .e-n-menu-title-text{
  color: var(--e-global-color-f864c3d) !important;
}

/* =========================================================
   10) OFF-CANVAS OVERLAY (MOBILE)
   Valid fix: keep off-canvas widget in a sibling container
   outside the glass pill so it is never constrained.
   ========================================================= */

/* The container you placed under the nav inside the header template */
.bf-header-overlay{
  position: relative;
  z-index: var(--z-modal);
}

/* Ensure Elementor dialog overlays are above everything */
.bf-header-overlay .dialog-widget,
.bf-header-overlay [role="dialog"]{
  z-index: 999999 !important;
}

/* If Elementor uses fixed positioning, ensure it can occupy viewport */
@media (max-width: 767px){
  .bf-header-overlay .dialog-widget,
  .bf-header-overlay [role="dialog"]{
    inset: 0;
    max-width: none;
    max-height: none;
  }
}

/* =========================================================
   11) BF BUTTON (for HTML buttons that match Elementor buttons)
   ========================================================= */
.bf-btn{
  display: inline-block;
  background-color: var(--e-global-color-57ecc12);
  color: var(--e-global-color-92fd97e);
  fill: var(--e-global-color-92fd97e);

  font-family: "Creato Display", Sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: 0.5px;

  border-radius: 100px;
  padding: 8px 16px;

  text-decoration: none;
}

.bf-btn__content{
  display: flex;
  flex-direction: row-reverse; /* puts icon on the right */
  gap: 5px;
  justify-content: center;
  align-items: center;
}

.bf-btn__icon{
  display: flex;
  align-items: center;
  line-height: 1;
}

/* Prevent nested spans from underlining */
.bf-btn span{ text-decoration: inherit; }

/* =========================================================
   12) FLIP BOX – BACK FACE LAYOUT
   ========================================================= */

/* Ensure layers can stretch */
.elementor-flip-box__layer,
.elementor-flip-box__layer__inner{
  height: 100%;
}

/* Back face inner as flex container */
.elementor-flip-box__back .elementor-flip-box__layer__inner{
  display: flex;
}

/* Wrapper inside back face */
.elementor-flip-box__back .bf-flip-back{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

/* Text styling */
h5.bf-flip-back-text{
  font-family: var(--e-global-typography-46ae315-font-family), Sans-serif;
  font-size: var(--e-global-typography-46ae315-font-size);
  font-weight: var(--e-global-typography-46ae315-font-weight);
  line-height: var(--e-global-typography-46ae315-line-height);
  color: var(--e-global-color-92fd97e);
  margin: 0;
  max-width: 234px;
}

.bf-flip-back .bf-btn{
  align-self: flex-start;
}

/* =========================================================
   13) MISC SITE TWEAKS
   ========================================================= */

/* Off-canvas animation speed (optional) */
.elementor-widget-off-canvas{
  --e-off-canvas-animation-duration: 800ms;
}

/* Mobile menu dividers (if using Nav Menu widget) */
.bf-m-nav.elementor-widget-nav-menu li:not(:last-child){
  border-style: solid;
  border-color: #FFFFFF45;
  border-bottom-width: 1px;
}

/* Margin above contact form submit button */
#bf-submit {
    margin-top: 15px;
}

/* Insights single post social share icons */
.bf-share .elementor-share-btn__icon {
		justify-content: flex-start;
		margin: 0;
}
.bf-share.elementor-share-buttons--shape-circle .elementor-share-btn {
		border-radius: 0px;
}

.e-n-menu .e-n-menu-title-text{
  opacity: 1;
  transition: opacity .2s ease;
}
.e-n-menu .e-n-menu-title:hover .e-n-menu-title-text,
.e-n-menu .e-n-menu-title.e-current .e-n-menu-title-text{
  opacity: .6;
}

/* === MENU ICON ON HOVER + ACTIVE (NO LAYOUT SHIFT, COLOUR-AWARE) === */

/* Base menu item container */
.e-n-menu .e-n-menu-title-container{
  position: relative;
}

/* Icon rendered as a mask so it can inherit colour */
.e-n-menu .e-n-menu-title-container::before{
  content: "";
  position: absolute;
  left: -1.2rem; /* controls how far left the icon sits */
  top: 50%;
  width: 14px;   /* icon size */
  height: 14px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;

  /* Icon colour now follows text colour */
  background-color: currentColor;

  /* SVG mask */
  -webkit-mask-image: url("/wp-content/uploads/Group-39537.svg");
  mask-image: url("/wp-content/uploads/Group-39537.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Show icon on hover */
.e-n-menu .e-n-menu-title:hover > .e-n-menu-title-container::before{
  opacity: 1;
}

/* Show icon on active (current page) */
.e-n-menu .e-n-menu-title.e-current > .e-n-menu-title-container::before{
  opacity: 1;
}

/* Keyboard focus parity */
.e-n-menu .e-n-menu-title:focus-within > .e-n-menu-title-container::before{
  opacity: 1;
}
