/* ==========================================================================
   db-header.css · Daelim Belefic child theme
   --------------------------------------------------------------------------
   The header's navigation and mobile menu, carried over from the static build (src/css/sections/g1-header.css) so the
   menu markup from inc/db-nav.php looks and behaves exactly as reviewed. The bar itself (black section, logo block,
   CTA, call block, heights) is the Theme Builder header's own Divi settings and presets; the first block below only
   makes Divi's module wrappers stretch to the bar height and keeps the header sticky.
   Icons load from ../svg/. Open/close of the flyouts: css/db-flyout.css + js/db-flyout.js.
   ========================================================================== */

/* ---- the Theme Builder header: sticky, nothing changes on scroll ---- */
.et-l--header { position: sticky; top: 0; z-index: var(--z-header); }
@media (min-width: 600px) {
.admin-bar .et-l--header { top: var(--wp-admin--admin-bar--height, 32px); }
}
.g1-header { height: var(--h-header); }
.g1-header .g1-header__row, .g1-header .g1-header__row > .et_pb_column { height: 100%; }
.g1-header .g1-header__brand, .g1-header .g1-header__nav, .g1-header .g1-header__actions { display: flex; flex-direction: row; align-items: stretch; }
/* the menu's lists start from nothing too (Divi indents lists and adds a bottom margin) */
.g1-header ul, .g1-header li, .db-canvas ul, .db-canvas li { margin: 0; padding: 0; list-style: none; } /* beats Divi's ul indent */
/* the menu's buttons start from nothing (static reset.css): no browser background, border or padding */
:where(.g1-header, .db-canvas) :where(button) { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
/* the menu fills the black bar, 36 in from each end; the items sit centred in it (see .db-nav-list) */
.g1-header .g1-header__nav { flex: 1 1 auto; min-width: 0; margin-left: var(--wedge-w, 24px); padding-inline: 36px; }
.g1-header .g1-header__brand { flex: none; }
.g1-header .g1-header__actions { flex: none; margin-left: auto; }
.g1-header .et_pb_code, .g1-header .et_pb_code_inner { display: flex; align-items: stretch; height: 100%; }
.g1-header .g1-header__nav :is(.et_pb_code, .et_pb_code_inner) { flex: 1 1 auto; width: 100%; max-width: none; }   /* the menu fills the bar */
.g1-header .logo-block, .g1-header .header-cta, .g1-header .header-call { height: 100%; text-decoration: none; }
.g1-header .logo-block, .g1-header .header-cta, .g1-header .header-call { flex-direction: row; }
.g1-header .logo-block { display: flex; align-items: center; padding-inline: 24px 12px; }
/* the logo's left inset matches the white it gets on the right (12 + about half the 24px slant), so it isn't cramped
   against the screen edge (Xae, BugHerd #109, 2026-11-05; was 12 / 12) */
.g1-header .logo-block .et_pb_image, .g1-header .logo-block .et_pb_image_wrap { display: block; width: var(--w-logo); }
/* on custom post types (events, jobs) Divi prefixes its module CSS with .et-db #et-boc .et-l, so its "width: 100%" would
   beat the line above and the full-size logo would push the call button off a phone screen (audit 2026-10-25) */
.et-db #et-boc .et-l .g1-header .logo-block .et_pb_image, .et-db #et-boc .et-l .g1-header .logo-block .et_pb_image_wrap { width: var(--w-logo); }
.g1-header .logo-block img { display: block; width: 100%; height: auto; }
.g1-header .header-cta { display: flex; align-items: center; padding-inline: 24px; margin-left: var(--wedge-w); 
	transition: all .3s ease;}
.g1-header .header-cta .et_pb_text_inner, .g1-header .header-cta p { white-space: nowrap; }
.g1-header .header-call { align-items: center; justify-content: center; width: 56px; margin-left: calc(8px + var(--wedge-w)); }
.g1-header .header-call svg, .g1-header .header-call img { width: 24px; height: 24px; }
.db-nav-missing { color: var(--c-white); align-self: center; }
/* each top item is the positioning box for its caret and flyout panel (static: .dv-group { position: relative }) */
.g1-header .db-nav-item { position: relative; }
/* ---- type and surfaces of the menu markup (static presets.css: Text: Nav Item, Heading: Flyout Head, Text: Flyout Link,
   Group: Flyout Panel). Divi presets only reach Divi modules; inc/db-nav.php prints plain markup with the same classes. ---- */
.g1-header .text-nav-item { font-family: var(--ff-base); font-size: var(--fs-18); line-height: var(--lh-body); font-weight: var(--fw-semibold); color: var(--c-white); text-decoration: none; }
.g1-header .flyout-panel { background-color: var(--c-white); border-radius: var(--r-0); box-shadow: var(--shadow-flyout); }
.g1-header .heading-flyout-head.db-ul { padding-bottom: var(--sp-12); } /* Divi's p:last-of-type { padding-bottom: 0 } would win */
.g1-header .heading-flyout-head { margin: 0; font-family: var(--ff-base); font-size: var(--fs-18); line-height: var(--lh-heading); font-weight: var(--fw-semibold); letter-spacing: var(--ls-flyout-head); color: var(--c-black); }
.g1-header .text-flyout-link { font-family: var(--ff-base); font-size: var(--fs-16); line-height: var(--lh-normal); font-weight: var(--fw-light); color: var(--c-black); text-decoration: none; transition: color var(--dur-instant) var(--ease-standard); }
.g1-header .text-flyout-link:hover, .g1-header a.text-flyout-link:focus-visible { color: var(--c-blue); }
.db-canvas, .db-canvas a { font-family: var(--ff-base); }

/* the phone/tablet menu's CTA buttons (Primary Red; inc/db-nav.php prints them outside any Divi module) */
.db-canvas__button { display: flex !important; align-items: center; justify-content: center; width: 100%; padding: var(--sp-12) var(--sp-48) !important;   /* even sides, as Primary Red (BugHerd #94) */
  border: 2px solid var(--c-red) !important; border-radius: 0; background: var(--c-red); color: var(--c-white) !important; font-size: var(--fs-18) !important; line-height: var(--lh-normal);
  font-weight: var(--fw-semibold); text-decoration: none; transition: background-color var(--dur-base) var(--ease-standard); }
.db-canvas__button:hover, .db-canvas__button:focus-visible { background: var(--c-red-600); border-color: var(--c-red-600) !important; }
.db-canvas { background: var(--c-white); }

/* ---- desktop nav (1280px and up): the first item starts at x400 = 340 logo block + 24 wedge + 36 ---- */
.db-main-nav { display: flex; flex: 1 1 auto; height: 100%; }
/* the items spread evenly across the bar, at least 16 apart, inside a capped width so they don't drift apart on wide
   screens: about 32 apart at 1280, about 44 (2.75rem) from roughly 1340 up (Xae, BugHerd #104, 2026-11-03; #5 had made
   them one centred group 16–24 apart; 2.5rem fixed doesn't fit at 1280) */
.db-nav-list { display: flex; flex: 1 1 auto; justify-content: space-between; align-items: stretch; height: 100%; column-gap: var(--sp-16);
  max-width: 50rem; margin-inline: auto !important; }
.db-nav-item { display: flex; align-items: center; height: 100%; }
.db-nav-label {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-11);
  font-size: var(--fs-18); line-height: var(--lh-body); font-weight: var(--fw-semibold); color: var(--c-white); text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.db-nav-label:hover, .db-nav-label:focus-visible { color: var(--c-white); }
/* plain links get a 2px red bar 6px under the label on hover; the current section keeps it.
   Items with a panel show the chevron and the caret instead. */
.db-nav-label::after { content: none; }
.db-nav-item:not(.db-nav-item--panel) > .db-nav-label::before,
.db-nav-item.is-current > .db-nav-label::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 6px); height: 2px; background-color: var(--c-red);
  opacity: 0; transition: opacity var(--dur-fast) var(--ease-standard);
}
.db-nav-item:not(.db-nav-item--panel) > .db-nav-label:hover::before,
.db-nav-item:not(.db-nav-item--panel) > .db-nav-label:focus-visible::before,
.db-nav-item.is-current > .db-nav-label::before { opacity: 1; }
/* chevrons: button-only items (Industries, Company) draw it after the text; Products (a link) has a separate toggle button */
.db-nav-trigger::after {
  content: ""; display: block; width: 11.33px; height: 6.67px; margin-right: -1px; background-color: currentColor;
  -webkit-mask: url("../svg/nav-chevron.svg") center / contain no-repeat; mask: url("../svg/nav-chevron.svg") center / contain no-repeat;
  transition: rotate var(--dur-fast) var(--ease-standard);
}
.db-nav-toggle {
  display: inline-flex; align-items: center; justify-content: flex-start; height: 44px;
  padding: 0 var(--sp-12) 0 var(--sp-11); margin-right: -13px;   /* icon sits 12 after the label (its stroke box is 1px wider); the hit area extends past it */
  color: var(--c-white);
}
.db-nav-toggle::before { transition: rotate var(--dur-fast) var(--ease-standard); }

/* caret: white triangle under the open item, centred on its label (within 7px of the design) */
.db-flyout-caret {
  position: absolute; bottom: 0; left: calc(50% - 6px); translate: -50% 0; width: 24.4px; height: 11px; z-index: calc(var(--z-flyout) + 1);
  background-color: var(--c-white); pointer-events: none;
  -webkit-mask: url("../svg/flyout-caret.svg") center / 100% 100% no-repeat; mask: url("../svg/flyout-caret.svg") center / 100% 100% no-repeat;
}

/* ---- flyout panel geometry (from the design): left offset = panel x − nav item x at 1440 ---- */
.db-flyout { position: absolute; top: 100%; display: flex; width: var(--flyout-w); min-height: var(--flyout-h); }
.db-flyout--products { left: -60px; --flyout-w: 626px; --flyout-h: 258px; }   /* panel x340, item x400 */
.db-flyout--industries { left: -298px; --flyout-w: 537px; --flyout-h: 214px; } /* panel x624, item x922 */
.db-flyout--company { left: -286px; --flyout-w: 452px; --flyout-h: 202px; }    /* panel x798, item x1084 */
.db-flyout--photo-right { flex-direction: row-reverse; }
.db-flyout-photos { position: relative; flex: none; width: 250px; align-self: stretch; overflow: hidden; }
.db-flyout-img { position: absolute; inset: 0; }
.db-flyout-img picture, .db-flyout-img img, .db-flyout-img .wf-photo { width: 100%; height: 100%; object-fit: cover; }
.db-flyout-body { flex: 1 1 auto; min-width: 0; padding: 24px 48px 24px 32px; color: var(--c-black); }
.db-flyout--photo-right .db-flyout-body { padding: 24px 32px 24px 48px; }
.db-flyout--industries .db-flyout-body { padding-block: var(--sp-16); }      /* Industries: 16 top and bottom */
.db-flyout .heading-flyout-head a { color: inherit; text-decoration: none; }
.db-flyout .heading-flyout-head a:hover { color: var(--c-blue); }
.db-flyout-lists { display: grid; margin-top: 14px; }                        /* list starts 48 below the heading top */
.db-flyout-lists > * { grid-area: 1 / 1; }
.db-flyout-list { display: grid; align-content: start; row-gap: 5.6px; /* 28px pitch = 22.4 line + 5.6 */ }
.db-flyout-list li { display: flex; align-items: center; }
.db-flyout .text-flyout-link { display: block; white-space: nowrap; }
/* parent rows: label + black chevron 10 after it; the chevron is a separate drill <button> with a 44px hit area */
.db-drill { display: inline-flex; align-items: center; color: var(--c-black); padding: 11px 10px 11px 9px; margin: -11px -10px -11px 0; }
.db-drill:hover { color: var(--c-blue); }
.db-flyout-drill { display: grid; align-content: start; row-gap: 5.6px; }

/* ---- actions: hamburger (below 1280), CTA, phone call block (phones) ---- */
.g1-header .hamburger, .g1-header .header-call { display: none; }
.g1-header .hamburger { align-self: center; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--c-white); cursor: pointer; }
/* hamburger: three bars; while the menu is open the outer bars meet in the middle and turn into an X */
.hamburger__box { position: relative; display: block; width: 24px; height: 18px; }
.hamburger__line {
  position: absolute; left: 0; width: 24px; height: 2px; background-color: currentColor;
  /* closing: rotate back first, then slide apart; the middle bar returns when they part */
  transition: transform var(--dur-fast) var(--ease-standard), top var(--dur-fast) var(--ease-standard) var(--dur-fast), opacity 0s linear var(--dur-fast);
}
.hamburger__line:nth-child(1) { top: 0; }
.hamburger__line:nth-child(2) { top: 8px; }
.hamburger__line:nth-child(3) { top: 16px; }
.hamburger[aria-expanded="true"] .hamburger__line {
  /* opening: slide together first, then rotate */
  transition: top var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard) var(--dur-fast), opacity 0s linear var(--dur-fast);
}
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(1) { top: 8px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(3) { top: 8px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .hamburger__line, .hamburger[aria-expanded="true"] .hamburger__line { transition: none; }
}


/* 1280–1439: everything is fluid through tokens (logo 260 → 316); the nav items spread to fit (see .db-nav-list); no overrides needed */

/* ---- tablet (1279px and below): 64px bar, 180px logo, hamburger + CTA ---- */
@media (max-width: 1279px) {
  .g1-header { --h-header: 64px; --w-logo: 180px; }
  .g1-header .logo-block { padding: var(--sp-6) 24px var(--sp-6) 32px; }   /* #109: 32 left ≈ 24 + half the slant */
  .g1-header .g1-header__nav { display: none; }
  .g1-header .hamburger { display: inline-flex; margin-right: var(--sp-16); }
  .g1-header .header-cta { padding-inline: 20px; }
  .g1-header .header-cta .text-nav-item { font-size: 16px; /* Text: Nav Item, tablet value */ }
}
/* ---- phone (767px and below): 160px logo (128 below 375) + black hamburger + red call block; the CTA moves into the menu panel ---- */
@media (max-width: 767px) {
  .g1-header { --w-logo: 160px; }
  .g1-header .logo-block { padding: var(--sp-6) 16px var(--sp-6) 24px; }   /* #109: 24 left ≈ 16 + half the slant (px: the spacing variables shrink on phones) */
  .g1-header .header-cta { display: none; }
  .g1-header .hamburger { margin-right: 0; }
  .g1-header .header-call { display: flex; }
}
@media (max-width: 374px) {
  .g1-header { --w-logo: 128px; }
}

/* ---- mobile/tablet menu panel (below 1280): slides in from the right over a dimmed backdrop ---- */
.db-canvas-backdrop {
  position: fixed; inset: 0; z-index: var(--z-mobile-nav); background: rgba(1, 0, 15, 0.5); /* --c-black at 50% */
  opacity: 0; transition: opacity var(--dur-base) var(--ease-enter);
}
.db-canvas {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-mobile-nav) + 1);
  width: min(420px, 85vw); height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column;
  translate: 100% 0; transition: translate var(--dur-fast) var(--ease-exit);
}
.db-canvas.is-open { translate: 0 0; transition: translate var(--dur-base) var(--ease-enter); }
.db-canvas-backdrop.is-open { opacity: 1; }
.db-canvas__top { display: flex; justify-content: flex-end; align-items: center; height: 64px; padding-inline: var(--sp-10); flex: none; }
.db-canvas__nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.db-canvas__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--c-black); }
.db-canvas__cta-top { display: none; padding: 0 24px var(--sp-16); }
.db-canvas__cta-top .dv-button, .db-canvas__cta-bottom { width: 100%; }
.db-mnav { border-top: var(--bw-hair) solid var(--c-grey-300); }
.db-mnav__row { border-bottom: var(--bw-hair) solid var(--c-grey-300); }
.db-mnav__link, .db-mnav__toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 24px;
  font-size: var(--fs-18); line-height: var(--lh-body); font-weight: var(--fw-semibold); color: var(--c-black); text-decoration: none; text-align: left;
}
.db-mnav__link:hover, .db-mnav__toggle:hover { color: var(--c-blue); }
.db-mnav__toggle::after { transition: rotate var(--dur-accordion) var(--ease-standard); }
.db-mnav__toggle[aria-expanded="true"]::after { rotate: 180deg; }
/* groups open/close by animating the grid row from 0fr to 1fr (height: auto can't be transitioned) */
.db-mnav__panel { display: grid; grid-template-rows: 1fr; }
.js .db-mnav__panel { grid-template-rows: 0fr; transition: grid-template-rows var(--dur-accordion) var(--ease-standard); }
.js .db-mnav__group.is-open > .db-mnav__panel { grid-template-rows: 1fr; }
.db-mnav__panel > .db-mnav__sub { overflow: hidden; min-height: 0; transition: visibility var(--dur-accordion); }
/* closed: the links leave the tab order (they're in an aria-hidden panel); visibility flips after the collapse */
.js .db-mnav__group:not(.is-open) > .db-mnav__panel > .db-mnav__sub { visibility: hidden; }
.db-mnav__sub > li:last-child { padding-bottom: 8px;  }   /* inside the clipped box, so a closed group collapses to 0 */
.db-mnav__link--l2 { min-height: 42px; padding-top: 8px; padding-bottom: 8px; padding-left: 40px; font-size: 16px; line-height: var(--lh-normal); font-weight: var(--fw-light); }
.db-mnav__sub3 { margin-left: 40px; padding-top: 8px; padding-bottom: 8px;}
.db-mnav__link--l3 { min-height: 40px; padding-left: 56px; font-size: var(--fs-16); line-height: var(--lh-normal); font-weight: var(--fw-light); }
.db-mnav__link[aria-current="page"] { color: var(--c-blue); font-weight: var(--fw-semibold); }
.db-canvas__footer { margin-top: auto; padding: 24px; display: grid; gap: var(--sp-16); flex: none; }
.db-canvas__tel { font-size: var(--fs-18); font-weight: var(--fw-semibold); color: var(--c-blue); text-decoration: none; text-align: center; }
@media (max-width: 767px) {
  .db-canvas__cta-top { display: block; }
  .db-canvas__cta-bottom { display: none; }
}
/* the menu panel never shows on desktop (canvas.js also closes it when the window grows past 1279px) */
@media (min-width: 1280px) {
  .db-canvas, .db-canvas-backdrop { display: none; }
}

/* ---- Visual Builder / Theme Builder editing view: Divi wraps layouts in #et-boc and colours every link with
   ".et-db #et-boc .et-l a", which outranks the rules above. Repeat the link colours with the same wrapper so the
   header looks the same while it is being edited. (The live site has no such wrapper.) ---- */
.et-db #et-boc .et-l .g1-header .text-nav-item, .et-db #et-boc .et-l .g1-header .db-nav-label,
.et-db #et-boc .et-l .g1-header .header-cta, .et-db #et-boc .et-l .g1-header .header-call { color: var(--c-white); }
.et-db #et-boc .et-l .g1-header .text-flyout-link, .et-db #et-boc .et-l .g1-header .heading-flyout-head a { color: var(--c-black); }
.et-db #et-boc .et-l .g1-header .text-flyout-link:hover, .et-db #et-boc .et-l .g1-header .heading-flyout-head a:hover { color: var(--c-blue); }
