/* ==========================================================================
   HGH DESIGN SYSTEM CSS — part of the HGH Site Tweaks plugin (same file on every site)
   Version: see the plugin header (HGH_SITE_TWEAKS_VERSION). Changelog in readme.txt.

   Rules for this file:
   - Only what Divi 5 presets can't do.
   - Variables only (Divi --gvid-* / --gcid-* master barcodes). Never raw px / rem / hex
     (exceptions: 0, 100%, Divi breakpoints in media queries, fallbacks inside var()).
   - Same file on every site. Site-only tweaks go in that site's Theme Options → Custom CSS.
   - Edit the master copy, bump the plugin version, then deploy. Never edit it on one site.
   ========================================================================== */

/* ===== SYSTEM RESET =====
   Rule: CSS here only removes theme defaults or references variables.
   Never raw px / rem / hex values. */

/* Divi theme adds padding under every heading; spacing comes from presets */
h1, h2, h3, h4, h5, h6 { padding-bottom: 0; }

/* Long words never overflow on phones. No auto-hyphens: they split words like "Grass-fin-ished" */
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; hyphens: manual; }

/* ===== DARK SECTIONS =====
   Section Dark preset adds data-scheme="dark". Everything inside flips to light text.
   !important is required: Divi outputs preset colors with !important.
   Exception: light cards (the Feature Card presets) placed in a dark section keep their own colors,
   otherwise their text turns light-on-light. Add any new light card preset to the list below. */
body #page-container .et_pb_section[data-scheme="dark"],
body #page-container .et_pb_section[data-scheme="dark"] :is(.et_pb_module, .et_pb_text_inner, h1, h2, h3, h4, h5, h6, .et_pb_text a):not(:is(.preset--module--divi-group--hghfeatcd1, .preset--module--divi-group--hghfeatcw1, .preset--module--divi-group--hghfeathf1, .preset--module--divi-group--hghfeatfl1), :is(.preset--module--divi-group--hghfeatcd1, .preset--module--divi-group--hghfeatcw1, .preset--module--divi-group--hghfeathf1, .preset--module--divi-group--hghfeatfl1) *) {
  color: var(--gcid-hgh7txtdrk) !important;
}

/* Primary button on dark: no override (Nov 23) — Button Primary stays rust (Button color) on dark sections too, same as everywhere else. */

/* Secondary (outline) button on dark: white outline, fills white on hover */
body #page-container .et_pb_section[data-scheme="dark"] .preset--module--divi-button--gfa035vlob {
  background-color: transparent !important;
  border-color: var(--gcid-hgh7txtdrk) !important;
  color: var(--gcid-hgh7txtdrk) !important;
}
body #page-container .et_pb_section[data-scheme="dark"] .preset--module--divi-button--gfa035vlob:hover {
  background-color: var(--gcid-hgh7txtdrk) !important;
  color: var(--gcid-primary-color) !important;
}

/* ===== LINKS =====
   Links in text are always underlined: the link color alone is too close to body text,
   and in dark sections links share the text color. Buttons, menus and WooCommerce product cards are not affected. */
body #page-container .et_pb_module:not(.et_pb_menu) :is(p, li:not(.product)) a {
  text-decoration: underline;
}

/* ===== HERO IMAGE SHADE WITH PARALLAX (changed Nov 26, 2026) =====
   With parallax on, Divi draws the photo in its own layer above the section's own background, which hides it.
   This puts a neutral dark shade on top of the photo so white text stays readable without tinting the photo green.
   Uses the Black variable. Strengths were measured against every hero photo so all text passes WCAG AA
   (4.5:1 body text, 3:1 large headings). Re-check contrast if a hero photo is replaced with a brighter one.
   Targets the photo layer itself: Divi makes separate desktop/tablet/phone layers and hides the unused ones. */

/* Section Hero Image preset (interior pages): even 60% shade, because the text runs across the photo. */
.preset--module--divi-section--hghsechim1 .et-pb-parallax-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: color-mix(in srgb, var(--gcid-hgh7black0) 60%, transparent);
}

/* Section Hero Split preset: left-to-right fade, strongest behind the text, clear over the photo on the right.
   Even 60% shade on tablets and phones, where the text spans the whole photo.
   980px is Divi's tablet breakpoint (media queries can't use variables). */
.preset--module--divi-section--hghsechsp1 .et-pb-parallax-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--gcid-hgh7black0) 70%, transparent) 0%, color-mix(in srgb, var(--gcid-hgh7black0) 60%, transparent) 55%, color-mix(in srgb, var(--gcid-hgh7black0) 15%, transparent) 85%, color-mix(in srgb, var(--gcid-hgh7black0) 0%, transparent) 100%);
}
@media (max-width: 980px) {
  .preset--module--divi-section--hghsechsp1 .et-pb-parallax-background::after {
    background-image: none;
    background-color: color-mix(in srgb, var(--gcid-hgh7black0) 60%, transparent);
  }
}

/* ===== ACCENT WORD IN HEADINGS =====
   Wrap one word of a big heading in <span class="hgh-accent">word</span> to color it with the Button color.
   Divi has no setting for coloring part of a heading. Use on light sections only. */
.hgh-accent {
  color: var(--gcid-hgh7btn01a);
}
/* On dark sections and photo heroes the accent is plain light text (Button color is too low-contrast there). */
body #page-container .et_pb_section[data-scheme="dark"] .hgh-accent,
body #page-container .preset--module--divi-section--hghsechim1 .hgh-accent,
body #page-container .preset--module--divi-section--hghsechsp1 .hgh-accent {
  color: var(--gcid-hgh7txtdrk) !important;
  text-decoration: none;
}

/* Text links inside photo heroes use the light text color, keeping the underline so they still read as links. */
body #page-container .preset--module--divi-section--hghsechim1 .et_pb_text a,
body #page-container .preset--module--divi-section--hghsechsp1 .et_pb_text a {
  color: var(--gcid-hgh7txtdrk) !important;
  text-decoration: underline;
}

/* ===== ACCESSIBILITY (WCAG 2.2 AA) =====
   Visible keyboard focus everywhere (2.4.7): Button-color ring on light backgrounds, light ring on dark. */
:focus-visible {
  outline: calc(var(--gvid-sf4sz60kpp) * 3) solid var(--gcid-hgh7btn01a);
  outline-offset: var(--gvid-j9ecl578f0);
}
body #page-container .et_pb_section[data-scheme="dark"] :focus-visible,
body .et-l--header :focus-visible,
body .et-l--footer :focus-visible,
body #page-container .preset--module--divi-section--hghsechim1 :focus-visible,
body #page-container .preset--module--divi-section--hghsechsp1 :focus-visible {
  outline-color: var(--gcid-hgh7txtdrk);
}
/* Respect "reduce motion" (2.3.3): no parallax movement, smooth scrolling or animations. */
@media (prefers-reduced-motion: reduce) {
  .et-pb-parallax-background { transform: none !important; }
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Footer links: bigger tap targets (2.5.8) */
.et-l--footer .et_pb_menu .et-menu > li > a {
  padding-top: var(--gvid-j9ecl578f0);
  padding-bottom: var(--gvid-j9ecl578f0);
}

/* ===== FAQ (accessible) =====
   Built with the browser's own <details>/<summary>: works with keyboard and screen readers, no script.
   Divi's accordion can't be reached with the Tab key and doesn't announce open/closed.
   Markup: <div class="hgh-faq"><details><summary><h3>Question</h3></summary><div class="hgh-faq-answer">…</div></details>…</div> */
.hgh-faq details {
  background-color: var(--gcid-hgh7white0);
  border: var(--gvid-sf4sz60kpp) solid var(--gcid-hgh7border);
  border-radius: var(--gvid-cyapdfi2mu);
  margin-bottom: var(--gvid-sr7a7iqda2);
}
.hgh-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gvid-sr7a7iqda2);
  padding: var(--gvid-sr7a7iqda2) var(--gvid-xm2mexyrtk);
}
.hgh-faq summary::-webkit-details-marker { display: none; }
/* extra .et_pb_text_inner so this beats the Text preset's heading font */
.et_pb_text_inner .hgh-faq summary h3 {
  margin: 0;
  padding: 0;
  font-family: var(--et_global_body_font);
  font-size: var(--gvid-ypizin9axd);
  font-weight: var(--et_global_heading_font_weight);
  line-height: var(--gvid-oe2t2yc2e0);
  color: var(--gcid-body-color);
}
.hgh-faq summary::after {
  content: "+" / "";
  flex-shrink: 0;
  font-size: var(--gvid-o06ebj484j);
  line-height: var(--gvid-oe2t2yc2e0);
  color: var(--gcid-hgh7btn01a);
}
.hgh-faq details[open] summary::after { content: "−" / ""; }
.hgh-faq-answer {
  padding: 0 var(--gvid-xm2mexyrtk) var(--gvid-sr7a7iqda2);
}

/* ===== STICKY SIDE COLUMN =====
   Rows using the "Row Top Align + Sticky Side Column" preset: the SHORTER column (a photo, a category menu)
   stays in view while the visitor scrolls the taller one, and stops by itself at the end of the row.
   Every column in the row is sticky; the tallest one fills the row, so it can't move. Browser-native
   sticky (Divi's sticky measures once at load and overshoots when content changes height).
   Desktop only: 981px is Divi's desktop breakpoint. --hgh-header-h = height of a header that stays
   pinned at the top: set as a variable by sites whose header scrolls away, or measured live by
   HGH Site Tweaks (section 9) when the header is pinned. Falls back to 0. */
@media (min-width: 981px) {
  .preset--module--divi-row--hghrowtop1 > .et_pb_column {
    position: sticky;
    top: calc(var(--gvid-xm2mexyrtk) + var(--hgh-header-h, 0px) + var(--wp-admin--admin-bar--height, 0px));
  }
}

/* ===== BLOG POSTS (Post Content module) =====
   Post Content has no setting for space around headings inside a post. */
.et_pb_post_content :is(h2, h3, h4, h5, h6) {
  margin-top: var(--gvid-xm2mexyrtk);
  padding-bottom: var(--gvid-sr7a7iqda2);
}
.et_pb_post_content > :first-child { margin-top: 0; }
.et_pb_post_content li { line-height: var(--gvid-eug8ddg31k); }
