/*
Theme Name:   Divi Child — Irish Wine Estates
Theme URI:    https://www.irishwineestates.com/
Description:  Child theme for Irish Wine Estates. Holds all custom CSS, JavaScript and template
              overrides for the homepage build. Never edit the Divi parent theme.
Author:       Irish Wine Estates
Author URI:   https://www.irishwineestates.com/
Template:     Divi
Version:      1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  divi-child-iwe
Tags:         Divi, child theme
*/

/* -------------------------------------------------------------------------
   Global design tokens.

   These mirror the Divi global colours registered in the Divi Builder so that
   custom CSS and builder-edited modules stay in sync. If a colour changes in
   Divi, change it here too — see README.md "Global colours".
   ------------------------------------------------------------------------- */

:root {
  --iwe-midnight:        #10182c;
  --iwe-deep-teal:       #18392f;  /* brand: Dark green  - reading text, panels, primary buttons */
  --iwe-emerald:         #27775d;  /* brand: Light green - supporting digital elements */
  --iwe-living-emerald:  #13b889;
  --iwe-burnt-copper:    #c76532;
  --iwe-champagne:       #d0af6a;  /* brand: Gold        - rules, highlights, restrained decoration */
  --iwe-ivory:           #f7f0e3;
  --iwe-mineral-grey:    #dce3de;
  --iwe-charcoal:        #172126;

  /* Typography — see the note in functions.php on why Playfair, not Cormorant. */
  --iwe-font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --iwe-font-body:    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --iwe-content-width: 1280px;
  --iwe-wide-width:    1440px;
  --iwe-gutter:        clamp(20px, 4vw, 72px);
  /* Measured against the reference: the band heights there work out at about
     4.5vw of padding, not 9vw. At 9vw the page rendered almost exactly twice
     the reference's height for the same width. */
  --iwe-section-pad:   clamp(36px, 3.9vw, 72px);

  /* Motion — every duration sits inside the 500–1000ms band from the spec. */
  --iwe-ease:      cubic-bezier(.2, .7, .2, 1);
  --iwe-duration:  .8s;
}

/* Base type rhythm. Divi sets most of this per-module; these are the fallbacks
   that apply to raw HTML inside Text modules. */

.iwe-home {
  font-family: var(--iwe-font-body);
  color: var(--iwe-charcoal);
}

.iwe-home h1,
.iwe-home h2,
.iwe-home h3 {
  font-family: var(--iwe-font-display);
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.02;
}

.iwe-home p {
  line-height: 1.6;
  max-width: 62ch; /* spec: ~55–65 characters per line */
}

/* Visible keyboard focus on every interactive element. Divi ships no focus
   ring on its buttons, so this is the accessibility baseline for the site. */

.iwe-home a:focus-visible,
.iwe-home button:focus-visible,
.iwe-home input:focus-visible,
.iwe-home textarea:focus-visible,
.iwe-home select:focus-visible,
.iwe-home .et_pb_button:focus-visible {
  outline: 2px solid var(--iwe-champagne);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link target offset so the sticky Divi header never covers the heading. */
.iwe-home :target {
  scroll-margin-top: 120px;
}


/* =========================================================================
   Global header and footer

   These are Divi Theme Builder templates and render on EVERY page, so their
   CSS lives here in the child stylesheet rather than in homepage.css, which
   is only enqueued on the front page.
   ========================================================================= */

/* --- Header ------------------------------------------------------------ */

.iwe-header {
  background: var(--iwe-midnight);
  position: relative;
  z-index: 100;
}

/*
   On the homepage the header floats over the hero photograph, as in the
   approved reference. Everywhere else it keeps a solid midnight bar, so the
   ivory nav text never lands on a light background and disappears.
*/
body.iwe-home .iwe-header {
  position: absolute;
  inset: 0 0 auto 0;
  background: transparent;
}

.iwe-header > .et_pb_row {
  width: min(100% - (2 * var(--iwe-gutter)), var(--iwe-wide-width));
  max-width: var(--iwe-wide-width);
  padding-top: clamp(14px, 1.8vh, 26px);
  padding-bottom: clamp(14px, 1.8vh, 26px);
  display: flex;
  align-items: center;
}

.iwe-header__logo img {
  width: clamp(120px, 8vw, 148px);
  height: auto;
  display: block;
}

/* Divi's menu module markup. */
.iwe-header .et_pb_menu,
.iwe-header .et_pb_menu__wrap {
  background: transparent;
  justify-content: center;
}

.iwe-header .et-menu li a,
.iwe-header .et_pb_menu .et-menu li a {
  font-family: var(--iwe-font-body);
  font-size: clamp(12.5px, calc(.7vw + 3px), 15px);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--iwe-ivory);
  opacity: 1;
  padding-bottom: 0;
  transition: color .4s var(--iwe-ease);
}

.iwe-header .et-menu li a:hover,
.iwe-header .et-menu li.current-menu-item > a {
  color: var(--iwe-champagne);
  opacity: 1;
}

/* Divi renders the active item with an inline colour, hence the override. */
.iwe-header .et-menu li.current-menu-item > a {
  opacity: 1 !important; /* overrides Divi's inline .current-menu-item opacity */
}

/* "Join the Journey" — gold outline, square, with the reference's arrow. */
.iwe-header__cta .et_pb_button {
  font-family: var(--iwe-font-body);
  font-size: clamp(10px, .72vw, 12px);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .85em 1.7em;
  border: 1px solid var(--iwe-champagne);
  border-radius: 0;
  background: transparent;
  color: var(--iwe-champagne);
  transition: background-color .5s var(--iwe-ease), color .5s var(--iwe-ease);
}

.iwe-header__cta .et_pb_button:hover {
  background: var(--iwe-champagne);
  color: var(--iwe-midnight);
  padding: .85em 1.7em;
}

.iwe-header__cta .et_pb_button::after {
  display: none !important; /* overrides Divi's inline .et_pb_button:after rule */
}

/* Divi's mobile menu panel needs a solid ground to stay readable. */
.iwe-header .et_mobile_menu {
  background: var(--iwe-midnight);
  border-top-color: var(--iwe-champagne);
}

.iwe-header .et_mobile_menu li a {
  color: var(--iwe-ivory);
  border-bottom: 1px solid rgba(247, 240, 227, .12);
}

.iwe-header .mobile_menu_bar::before {
  color: var(--iwe-ivory);
}

@media (max-width: 980px) {
  .iwe-header > .et_pb_row {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .iwe-header__cta {
    display: none; /* the CTA repeats inside the hero on small screens */
  }
}


/* --- Footer ------------------------------------------------------------ */

.iwe-footer {
  background: var(--iwe-ivory);
  color: var(--iwe-charcoal);
  position: relative;
  overflow: hidden;
}

.iwe-footer > .et_pb_row {
  position: relative;
  z-index: 1;
  width: min(100% - (2 * var(--iwe-gutter)), var(--iwe-wide-width));
  max-width: var(--iwe-wide-width);
}

.iwe-footer__logo img {
  width: clamp(72px, 8vw, 120px);
  height: auto;
  display: block;
}

.iwe-footer .iwe-foot-label {
  font-family: var(--iwe-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(23, 33, 38, .55);
  margin: 0 0 1rem;
}

.iwe-footer address,
.iwe-footer .iwe-foot-address {
  font-family: var(--iwe-font-body);
  font-size: clamp(12px, .85vw, 14px);
  font-style: normal;
  line-height: 1.9;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--iwe-charcoal);
  margin: 0;
}

.iwe-footer .iwe-foot-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--iwe-font-body);
  font-size: clamp(11px, .8vw, 13px);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 2.2;
}

.iwe-footer .iwe-foot-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iwe-footer a {
  color: var(--iwe-charcoal);
  text-decoration: none;
  transition: color .4s var(--iwe-ease);
}

.iwe-footer a:hover {
  color: var(--iwe-emerald);
}

.iwe-footer .iwe-foot-tagline {
  font-family: var(--iwe-font-body);
  font-size: clamp(11px, .8vw, 13px);
  line-height: 1.8;
  color: rgba(23, 33, 38, .7);
  margin: 1rem 0 0;
}

.iwe-footer .et_pb_social_media_follow li a.icon::before {
  color: var(--iwe-charcoal);
  font-size: 18px;
}

.iwe-footer .et_pb_social_media_follow li a.icon:hover::before {
  color: var(--iwe-emerald);
}

.iwe-footer__bar {
  border-top: 1px solid rgba(23, 33, 38, .16);
  padding-top: 1.4rem;
  margin-top: clamp(28px, 4vw, 56px);
  font-family: var(--iwe-font-body);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(23, 33, 38, .6);
}

/*
   The Celtic knot watermark. No separate knot asset was supplied, so the
   light-background logo mark — which is itself a Celtic-knot shamrock — is
   reused at low opacity, cropped by the section's overflow.
*/
.iwe-footer__knot {
  position: absolute;
  z-index: 0;
  inset-inline-end: -4%;
  bottom: -34%;
  width: min(38vw, 460px);
  opacity: .07;
  pointer-events: none;
  user-select: none;
}

.iwe-footer__knot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Focus states for the global chrome, matching the homepage baseline. */
.iwe-header a:focus-visible,
.iwe-header .et_pb_button:focus-visible,
.iwe-footer a:focus-visible {
  outline: 2px solid var(--iwe-champagne);
  outline-offset: 3px;
}

.iwe-footer a:focus-visible {
  outline-color: var(--iwe-emerald);
}


/* -------------------------------------------------------------------------
   Header nav and CTA - matched to the reference.

   Divi prints the Theme Builder button's own styles with an ID-anchored
   selector (body #page-container .et_pb_section .et_pb_button_0_tb_header),
   which outranked the plain class rules above and rendered the button in
   white mixed-case type. These selectors carry #page-container to win on
   specificity rather than with !important.
   ------------------------------------------------------------------------- */

body #page-container .et_pb_section .iwe-header__cta .et_pb_button {
  font-family: var(--iwe-font-body);
  font-size: clamp(10px, .72vw, 12px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--iwe-champagne);
  background: rgba(16, 24, 44, .18);
  border: 1px solid var(--iwe-champagne);
  border-radius: 0;
  padding: .95em 1.6em;
}

body #page-container .et_pb_section .iwe-header__cta .et_pb_button:hover {
  color: var(--iwe-midnight);
  background: var(--iwe-champagne);
  padding: .95em 1.6em;
}

/* Active item carries a short gold rule beneath it, as in the reference. */
body #page-container .iwe-header .et-menu > li > a {
  position: relative;
}

body #page-container .iwe-header .et-menu > li.current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: .2em;
  bottom: -8px;
  height: 1px;
  background: var(--iwe-champagne);
}

body #page-container .iwe-header .et-menu > li {
  padding-left: clamp(12px, 1.6vw, 28px);
  padding-right: 0;
}

/* -------------------------------------------------------------------------
   Seven-item navigation (Sept 2026 brief, section 6) plus the
   2027 PREVIEW TOURS CTA. Tighter item spacing so all seven fit on one line
   at desktop widths, and a logo that no longer collides with the hero eyebrow.
   ------------------------------------------------------------------------- */

.iwe-header__logo img {
  width: clamp(120px, 8vw, 148px);
}

body #page-container .iwe-header .et-menu > li {
  padding-left: clamp(5px, .6vw, 10px);
}

/* Menu text raised by exactly 3px at every width (Sept 2026 review): the old
   values were clamp(9.5px, .7vw, 12px), so the floor, the fluid middle and the
   ceiling each gain 3. Seven items, the logo and the CTA still share one line,
   so the width that costs is taken back from the letter-spacing and the gaps
   between items rather than from the type size. */
body #page-container .iwe-header .et-menu li a {
  font-size: clamp(12.5px, calc(.7vw + 3px), 15px);
  letter-spacing: .02em;
  white-space: nowrap;
}

/* Narrow laptops: the type is already at its floor, so the gaps between items
   are what give. Kept at 6px rather than squeezed to nothing - any tighter and
   the labels run together into one block of text. */
@media (min-width: 981px) and (max-width: 1199px) {
  body #page-container .iwe-header .et-menu > li { padding-left: 6px; }
}

/* -------------------------------------------------------------------------
   Top navigation - spacing (Sept 2026 review)

   The items sat 5-10px apart, which read as cramped. Widened from 1200px
   only: below that there is roughly 20px between the menu and the Preview
   Tours button, and anything more collides with it.
   ------------------------------------------------------------------------- */

@media (min-width: 1200px) {
  body #page-container .iwe-header .et-menu > li {
    padding-left: clamp(12px, 1.5vw, 26px);
  }
}

/* -------------------------------------------------------------------------
   Header CTA - corrected selectors.

   Divi applies a Button module's CSS class to the <a> itself:
     <a class="et_pb_button et_pb_button_0_tb_header iwe-header__cta">
   so the earlier descendant selectors (.iwe-header__cta .et_pb_button) never
   matched anything and the button fell back to Divi's default white 20px
   mixed-case style. These use the compound form.
   ------------------------------------------------------------------------- */

body #page-container .iwe-header a.et_pb_button.iwe-header__cta {
  font-family: var(--iwe-font-body);
  font-size: clamp(10px, .72vw, 12px);
  font-weight: 700;
  line-height: 1.2 !important; /* overrides Divi's .et_pb_button line-height:1.7em!important */
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--iwe-champagne);
  background: rgba(16, 24, 44, .18);
  border: 1px solid var(--iwe-champagne);
  border-radius: 0;
  padding: 1em 1.6em;
  white-space: nowrap;
  transition: background-color .5s var(--iwe-ease), color .5s var(--iwe-ease);
}

body #page-container .iwe-header a.et_pb_button.iwe-header__cta:hover {
  color: var(--iwe-midnight);
  background: var(--iwe-champagne);
  padding: 1em 1.6em;
}

body #page-container .iwe-header a.et_pb_button.iwe-header__cta::after {
  display: none !important; /* overrides Divi's inline .et_pb_button:after arrow glyph */
}

body #page-container .iwe-header a.et_pb_button.iwe-header__cta:focus-visible {
  outline: 2px solid var(--iwe-champagne);
  outline-offset: 3px;
}

/* Header crest size at every width. Below 981px Divi stretches image-module
   images to 100% of the column, which rendered the crest at ~445px on phones.
   #page-container gives this rule the specificity to win without !important. */
body #page-container .iwe-header .iwe-header__logo img {
  width: clamp(120px, 8vw, 148px);
  max-width: 100%;
  height: auto;
}

@media (max-width: 980px) {
  body #page-container .iwe-header .iwe-header__logo .et_pb_image_wrap { display: inline-block; }
  body #page-container .iwe-header .iwe-header__logo img { width: 120px; }
}

/* Footer copyright bar: exempt from the homepage 62ch paragraph measure,
   which wrapped "Terms" onto its own line. */
.iwe-footer .iwe-footer__bar p,
.iwe-home .iwe-footer .iwe-footer__bar p {
  max-width: none;
}

/* Footer crest size. Below 981px Divi stretches image-module images to the
   full column, which rendered the footer crest at ~350px on phones. */
body #page-container .iwe-footer .iwe-footer__logo img {
  width: clamp(72px, 8vw, 120px);
  max-width: 100%;
  height: auto;
}

@media (max-width: 980px) {
  body #page-container .iwe-footer .iwe-footer__logo .et_pb_image_wrap { display: inline-block; }
  body #page-container .iwe-footer .iwe-footer__logo img { width: 88px; }
}

/* -------------------------------------------------------------------------
   Inner-page header (every page except the homepage) - ivory bar with
   midnight type, as in contact_estate.png.

   The Theme Builder header section carries Divi's own
   `background-color: RGBA(255,255,255,0) !important`, so off the homepage the
   ivory nav text sat on the ivory page and all but vanished. The !important
   below is needed to beat that Divi rule; #page-container outranks the rest.
   The matching light-background crest is swapped in by
   iwe_inner_page_header_logo() in functions.php.
   ------------------------------------------------------------------------- */

body:not(.iwe-home) #page-container .iwe-header.et_pb_section {
  background-color: var(--iwe-ivory) !important; /* overrides Divi's transparent !important */
  border-bottom: 1px solid rgba(23, 33, 38, .08);
}

body:not(.iwe-home) #page-container .iwe-header .et-menu li a {
  color: var(--iwe-midnight);
}

body:not(.iwe-home) #page-container .iwe-header .et-menu li a:hover,
body:not(.iwe-home) #page-container .iwe-header .et_pb_menu ul.et-menu li.current-menu-item > a {
  color: var(--iwe-deep-teal) !important; /* overrides Divi's champagne current-item !important */
}

body:not(.iwe-home) #page-container .iwe-header .et-menu > li.current-menu-item > a::after {
  background: var(--iwe-burnt-copper);
}

body:not(.iwe-home) #page-container .iwe-header a.et_pb_button.iwe-header__cta {
  color: var(--iwe-ivory);
  background: var(--iwe-deep-teal);
  border-color: var(--iwe-deep-teal);
}

body:not(.iwe-home) #page-container .iwe-header a.et_pb_button.iwe-header__cta:hover {
  color: var(--iwe-ivory);
  background: var(--iwe-midnight);
  border-color: var(--iwe-midnight);
}

body:not(.iwe-home) #page-container .iwe-header .mobile_nav .mobile_menu_bar::before {
  color: var(--iwe-midnight);
}

/*
   Mobile header: Divi stacks its three header columns at full width below
   981px, so the logo, hamburger and CTA landed on three separate lines. The
   earlier `.iwe-header__cta { display:none }` never matched, because Divi puts
   that class on the <a>, not on the column. Keep one bar: logo left, menu right.
*/
@media (max-width: 980px) {
  body #page-container .iwe-header > .et_pb_row {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }
  body #page-container .iwe-header > .et_pb_row > .et_pb_column {
    width: auto !important;        /* overrides Divi's stacked 100% column width */
    margin: 0 !important;          /* overrides Divi's mobile column bottom margin */
  }
  body #page-container .iwe-header > .et_pb_row > .et_pb_column:first-child { flex: 0 0 auto; }
  body #page-container .iwe-header > .et_pb_row > .et_pb_column:nth-child(2) { flex: 1 1 auto; display: flex; justify-content: flex-end; }
  body #page-container .iwe-header > .et_pb_row > .et_pb_column:last-child { display: none; }

  /* Divi sizes the dropdown to its nearest positioned ancestor. With the menu
     column shrunk to the hamburger, the panel was ~60px wide and wrapped every
     item. Release those ancestors so the panel spans the whole header row. */
  body #page-container .iwe-header > .et_pb_row { position: relative; }
  body #page-container .iwe-header > .et_pb_row > .et_pb_column:nth-child(2),
  body #page-container .iwe-header .et_pb_menu,
  body #page-container .iwe-header .et_pb_menu_inner_container,
  body #page-container .iwe-header .et_pb_menu__wrap,
  body #page-container .iwe-header .et_mobile_nav_menu,
  body #page-container .iwe-header .mobile_nav { position: static; }
  body #page-container .iwe-header .et_mobile_menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    padding: 8px 20px;
    box-shadow: 0 18px 40px rgba(16, 24, 44, .35);
  }
  body #page-container .iwe-header .et_mobile_menu li a {
    padding: 14px 0;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
  }
  body #page-container .iwe-header .et_mobile_menu li:last-child a { border-bottom: 0; }
}

/* Footer: stack the columns on every phone width. Two-across at 480-767px
   broke the email address mid-word ("...CO / M"). */
@media (max-width: 767px) {
  body #page-container .iwe-footer .et_pb_row > .et_pb_column {
    width: 100% !important;       /* overrides Divi's 47.25% phone-landscape column width */
    margin-right: 0 !important;   /* overrides Divi's column gutter */
  }
  body #page-container .iwe-footer .et_pb_row > .et_pb_column:not(:last-child) { margin-bottom: 30px; }
}

/* Homepage header button: ivory with deep green text. Copper merged into the
   hero's copper band on wide screens; ivory reads against the band, the
   photograph and the green panel alike. Inner pages keep the deep-teal button. */
body.iwe-home #page-container .iwe-header a.et_pb_button.iwe-header__cta {
  color: #0b3a2e;
  background: var(--iwe-ivory);
  border-color: var(--iwe-ivory);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

body.iwe-home #page-container .iwe-header a.et_pb_button.iwe-header__cta:hover {
  color: var(--iwe-ivory);
  background: #0b3a2e;
  border-color: var(--iwe-ivory);
}

/* -------------------------------------------------------------------------
   Deferred Theme Builder CSS (404, category and other archive pages).

   On pages with no Divi builder content, Divi loads the header and footer
   styles as "et-core-unified-cpt-deferred" CSS, prefixed with
   `.et-db #et-boc .et-l`. That prefix outranks the `body #page-container`
   rules above, so the crests rendered at 500px / 350px on phones and the
   inner-page header lost its ivory bar. These repeat the key rules with the
   same prefix plus html body, which breaks the specificity tie that the
   later-loading deferred file would otherwise win.
   ------------------------------------------------------------------------- */

html body.et-db #et-boc .et-l .iwe-header .iwe-header__logo img {
  width: clamp(120px, 8vw, 148px);
  max-width: 100%;
  height: auto;
}

html body.et-db #et-boc .et-l .iwe-footer .iwe-footer__logo img {
  width: clamp(72px, 8vw, 120px);
  max-width: 100%;
  height: auto;
}

html body:not(.iwe-home).et-db #et-boc .et-l .iwe-header.et_pb_section {
  background-color: var(--iwe-ivory) !important; /* overrides Divi's deferred transparent !important */
}

@media (max-width: 980px) {
  html body.et-db #et-boc .et-l .iwe-header .iwe-header__logo .et_pb_image_wrap,
  html body.et-db #et-boc .et-l .iwe-footer .iwe-footer__logo .et_pb_image_wrap { display: inline-block; }
  html body.et-db #et-boc .et-l .iwe-header .iwe-header__logo img { width: 120px; }
  html body.et-db #et-boc .et-l .iwe-footer .iwe-footer__logo img { width: 88px; }

  html body.et-db #et-boc .et-l .iwe-header > .et_pb_row {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  html body.et-db #et-boc .et-l .iwe-header > .et_pb_row > .et_pb_column {
    width: auto !important;        /* overrides Divi's stacked 100% column width */
    margin: 0 !important;          /* overrides Divi's mobile column bottom margin */
  }
  html body.et-db #et-boc .et-l .iwe-header > .et_pb_row > .et_pb_column:first-child { flex: 0 0 auto; }
  html body.et-db #et-boc .et-l .iwe-header > .et_pb_row > .et_pb_column:nth-child(2) { flex: 1 1 auto; display: flex; justify-content: flex-end; position: static; }
  html body.et-db #et-boc .et-l .iwe-header > .et_pb_row > .et_pb_column:last-child { display: none; }
}

@media (max-width: 767px) {
  html body.et-db #et-boc .et-l .iwe-footer .et_pb_row > .et_pb_column {
    width: 100% !important;       /* overrides Divi's deferred phone column width */
    margin-right: 0 !important;
  }
}

/* -------------------------------------------------------------------------
   Sticky header (all pages). assets/js/header.js adds body.iwe-header-stuck
   once the visitor scrolls past the header; the header is then fixed to the
   top, slides down into view, gains a solid background and tightens up.
   Each rule is repeated with the `html body.et-db #et-boc .et-l` prefix so it
   also wins on pages that load Divi's deferred Theme Builder CSS.
   ------------------------------------------------------------------------- */

@keyframes iwe-header-slide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

body.iwe-header-stuck #page-container .iwe-header.et_pb_section,
html body.iwe-header-stuck.et-db #et-boc .et-l .iwe-header.et_pb_section {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9990;
  box-shadow: 0 10px 30px rgba(16, 24, 44, .18);
  animation: iwe-header-slide .45s var(--iwe-ease) both;
}

/* Keep the header's space in the page so content doesn't jump up. */
body.iwe-header-stuck:not(.iwe-home) #et-boc .et-l--header {
  min-height: var(--iwe-header-h, 0px);
}

/* Homepage: the header floats over the hero, so it needs its own ground. */
body.iwe-home.iwe-header-stuck #page-container .iwe-header.et_pb_section {
  background-color: rgba(11, 58, 46, .96) !important; /* overrides Divi's transparent header background !important */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Inner pages keep their ivory bar, slightly translucent. */
body.iwe-header-stuck:not(.iwe-home) #page-container .iwe-header.et_pb_section,
html body.iwe-header-stuck:not(.iwe-home).et-db #et-boc .et-l .iwe-header.et_pb_section {
  background-color: rgba(247, 240, 227, .97) !important; /* overrides Divi's transparent header background !important */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Tighter bar and smaller crest while stuck. */
body.iwe-header-stuck #page-container .iwe-header > .et_pb_row,
html body.iwe-header-stuck.et-db #et-boc .et-l .iwe-header > .et_pb_row {
  padding-top: 8px;
  padding-bottom: 8px;
  transition: padding .35s var(--iwe-ease);
}

body.iwe-header-stuck #page-container .iwe-header .iwe-header__logo img,
html body.iwe-header-stuck.et-db #et-boc .et-l .iwe-header .iwe-header__logo img {
  width: clamp(52px, 4.4vw, 70px);
}

@media (max-width: 980px) {
  body.iwe-header-stuck #page-container .iwe-header .iwe-header__logo img,
  html body.iwe-header-stuck.et-db #et-boc .et-l .iwe-header .iwe-header__logo img {
    width: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.iwe-header-stuck #page-container .iwe-header.et_pb_section,
  html body.iwe-header-stuck.et-db #et-boc .et-l .iwe-header.et_pb_section {
    animation: none;
  }
}

/* IWE-VB-IMAGE-SHIM ---------------------------------------------------
   Sections converted from hand-written HTML into Image modules.

   Divi wraps the picture in a span, which lands between the container the
   design gives a height to and the img that fills it, so rules such as
   .iwe-c-hero__media img { height: 100%; object-fit: cover } stop
   resolving and the photograph shows uncropped.

   Making the span a full-height block hands the img back the parent it
   had as plain markup. Where the module has no height of its own,
   height: 100% resolves to auto, so this does nothing. Only pictures
   this conversion created carry iwe-vb-img, so images the designs
   already size themselves are untouched.
   --------------------------------------------------------------------- */
.et_pb_module.et_pb_image.iwe-vb-img > .et_pb_image_wrap {
  display: block;
  height: 100%;
}

/* Divi Text modules set overflow-wrap: break-word, which the Code modules
   these replaced never did. On a narrow column that is enough to split a
   long word such as QUESTIONS across two lines, so it is turned back off
   for converted wording only. */
.et_pb_text.iwe-vb-text,
.et_pb_text.iwe-vb-text .et_pb_text_inner {
  overflow-wrap: normal;
  word-wrap: normal;
}

/* iwe-prose-underline
   Brand guidelines section 11: keep links underlined; never use colour alone
   for meaning. Scoped to links inside running text.

   Only "p a" is matched, never "li a". The footer menu is a < li < ul, so
   leaving list items out excludes it without needing an exception, while
   links in sentences are a < p. The legal pages name their own containers
   below because their lists are prose, not navigation. */
.et_pb_text_inner p a:not(.iwe-link):not(.iwe-c-btn),
.iwe-p-legal__body a,
.iwe-p-legal__contact a,
.iwe-c-details__text a,
.iwe-c-privacy a,
.iwe-c-faq__intro a,
.iwe-c__wrap p a:not(.iwe-link):not(.iwe-c-btn) {
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

/* The footer address is the one list marked up as a paragraph - .iwe-foot-address
   IS the <p>, not a wrapper around one - so it
   does fall inside the rule above and has to be taken back out. The selector
   deliberately carries the same :not() pair as the rule it overrides: without
   them it has three classes against four and loses on specificity, which is
   exactly how the first attempt at this underlined the whole footer. */
.et_pb_text_inner .iwe-foot-address a:not(.iwe-link):not(.iwe-c-btn),
.iwe-p-legal__toc a,
.iwe-p-legal__related a {
  text-decoration: none;
}

.et_pb_text_inner .iwe-foot-address a:not(.iwe-link):not(.iwe-c-btn):hover,
.iwe-p-legal__toc a:hover,
.iwe-p-legal__related a:hover {
  text-decoration: underline;
  text-underline-offset: .18em;
}
