/**
 * WBD — Elementor bridge.
 *
 * Lets native Elementor widgets (heading, text, image, button, icon-list,
 * accordion, video) inherit the WBD design system. Tailwind utility classes
 * and the wbd.css component classes are applied to each element's wrapper via
 * the editor's "CSS Classes" field; these rules forward them to the inner
 * markup Elementor generates and neutralize Elementor's own widget defaults.
 */

/* ---------- Theme Builder header/footer ---------- */
/* The header location sticks as a whole; elementor-bridge.js sets a negative
   top equal to the announcement bar height so the bar scrolls away and the
   nav pins — mirroring the theme's `#page > header.wbd-header` behaviour. */
.elementor-location-header {
  position: sticky;
  top: -43px;
  z-index: 40;
}
/* The nav header inside no longer matches `#page > header.wbd-header` — keep
   its layering + hide-on-scroll transition working in the new structure. */
.elementor-location-header header.wbd-header {
  position: relative;
  z-index: 40;
}

/* The footer template carries the newsletter section; contact + legal pages
   hide it, matching the theme's footer.php exclusion list.
   (603 contact · 608 privacy · 611 terms · 604 cookies · 602 code-of-conduct) */
.page-id-602 .elementor-location-footer #newsletter,
.page-id-603 .elementor-location-footer #newsletter,
.page-id-604 .elementor-location-footer #newsletter,
.page-id-608 .elementor-location-footer #newsletter,
.page-id-611 .elementor-location-footer #newsletter { display: none; }

/* ---------- Typography forwarding ---------- */
/* :where keeps specificity at one class so theme element rules like
   `.page-hero h1` (0,1,1) still outrank this reset. */
:where(.elementor-widget-heading) .elementor-heading-title {
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
.elementor-widget-text-editor {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Children of Tailwind flex rows size to content, exactly like plain divs do —
   Elementor's `--width: 100%` container default would otherwise crush
   siblings. Explicit width utilities (w-full, w-[…]) still win (important). */
.e-con.flex > .e-con,
.e-con.inline-flex > .e-con { width: auto; }

/* Kill Elementor's default container padding (10px sides) — the design's
   spacing comes entirely from Tailwind classes / explicit settings. Values set
   in the editor still win (per-element rules are more specific). */
.e-con {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  --padding-block-start: 0;
  --padding-block-end: 0;
  --padding-inline-start: 0;
  --padding-inline-end: 0;
}

/* Keep container flex direction row when the Tailwind `flex` class is used —
   Elementor's `.e-con-full.e-flex { flex-direction: var(--flex-direction) }`
   is two classes deep, so match that specificity (with :where so we don't
   climb above it). Tailwind's own flex-col / sm:flex-row utilities still win
   because the CDN runs with `important: true`. */
.e-con-full.e-flex:where(.flex) { flex-direction: row; flex-wrap: nowrap; }
/* Insurance: Tailwind display classes must beat .e-con { display: var(--display) } */
.e-con-full.e-flex:where(.grid) { display: grid; }
.e-con-full.e-flex:where(.block) { display: block; }
.e-con-full.e-flex:where(.hidden) { display: none; }

/* ---------- Image helpers ---------- */
/* Fill the nearest positioned ancestor (frames, circles, posters). */
.img-cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.img-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.wbd-zoom img { transition: transform .5s; }
.group:hover .wbd-zoom img { transform: scale(1.1); }

/* Static fill: the image occupies its frame's full fixed height (the
   `size-full object-cover` pattern without absolute positioning). */
.img-fill { position: relative; width: 100%; height: 100%; flex: 1; }
.img-fill img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Skewed hero panels: replicate `.wbd-skew > img` for Elementor's wrapper depth */
.wbd-skew .elementor-widget-image { position: static; }
.wbd-skew img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: skewX(9deg) scale(1.28);
}

/* Hero mobile background image widget */
.wbd-hero-mobile-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Marquee logos (`h-14 sm:h-16` on the item, logo scales inside) */
.wbd-logo-item img { max-height: 3.5rem; width: auto; object-fit: contain; }
@media (min-width: 640px) {
  .wbd-logo-item img { max-height: 4rem; }
}

/* ---------- Buttons ---------- */
/* The wrapper carries btn-* classes purely as markers for the recipes below —
   strip the wbd.css component box styles it would otherwise draw itself
   (double pill / double hover). */
.elementor-widget-button.btn-primary,
.elementor-widget-button.btn-secondary,
.elementor-widget-button.btn-ghost,
.elementor-widget-button.btn-dark,
.elementor-widget-button.btn-flame {
  display: block;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  gap: 0;
  transition: none;
}
.elementor-widget-button.btn-primary:hover,
.elementor-widget-button.btn-secondary:hover,
.elementor-widget-button.btn-ghost:hover,
.elementor-widget-button.btn-dark:hover,
.elementor-widget-button.btn-flame:hover {
  background: none;
  box-shadow: none;
  transform: none;
}

.elementor-widget-button.wbd-btn .elementor-button {
  background: none;
  border: none;
  border-radius: 9999px;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  color: inherit;
  box-shadow: none;
}
.elementor-widget-button.wbd-btn .elementor-button-content-wrapper {
  display: flex; align-items: center; gap: .5rem;
}

.elementor-widget-button.btn-primary .elementor-button {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 3.5rem; padding: 0 1.75rem;
  border-radius: 9999px;
  background: var(--wbd-lime); color: var(--wbd-navy);
  font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 30px -10px rgba(25, 230, 160, .55);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.elementor-widget-button.btn-primary .elementor-button:hover {
  background: var(--wbd-lime-deep);
  box-shadow: 0 14px 36px -10px rgba(25, 230, 160, .7);
  transform: translateY(-1px);
}

.elementor-widget-button.btn-ghost .elementor-button {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 3.5rem; padding: 0 1.75rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(245, 242, 251, .35);
  color: var(--wbd-ice);
  font-size: 15px; font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease;
}
.elementor-widget-button.btn-ghost .elementor-button:hover {
  background: rgba(245, 242, 251, .12);
  border-color: rgba(245, 242, 251, .6);
}

.elementor-widget-button.btn-secondary .elementor-button {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 3.5rem; padding: 0 1.75rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(0, 37, 85, .25);
  color: var(--wbd-navy);
  font-size: 15px; font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease;
}
.elementor-widget-button.btn-secondary .elementor-button:hover {
  background: var(--wbd-ice-deep);
  border-color: rgba(0, 37, 85, .45);
}

.elementor-widget-button.btn-dark .elementor-button {
  display: inline-flex; align-items: center; gap: .375rem;
  height: 2.5rem; padding: 0 1.25rem;
  border-radius: 9999px;
  background: var(--wbd-navy); color: var(--wbd-ice);
  font-size: 14px; font-weight: 600;
  transition: background-color .15s ease;
}
.elementor-widget-button.btn-dark .elementor-button:hover { background: var(--wbd-violet); }

/* Small lime pill (pricing featured CTA) */
.elementor-widget-button.btn-lime-sm .elementor-button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.25rem; width: 100%;
  border-radius: 9999px;
  background: var(--wbd-lime); color: var(--wbd-navy);
  font-size: 14px; font-weight: 700;
  transition: background-color .15s ease;
}
.elementor-widget-button.btn-lime-sm .elementor-button:hover { background: var(--wbd-lime-deep); }

/* Outline pill (pricing default CTA) */
.elementor-widget-button.btn-outline-ink .elementor-button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.25rem; width: 100%;
  border-radius: 9999px;
  border: 1px solid rgba(0, 37, 85, .2);
  color: var(--wbd-ink);
  font-size: 14px; font-weight: 600;
  transition: background-color .15s ease;
}
.elementor-widget-button.btn-outline-ink .elementor-button:hover { background: var(--wbd-sand); }

/* Ice outline pill on dark sections (journey "Watch all") */
.elementor-widget-button.btn-ice .elementor-button {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 2.75rem; padding: 0 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(245, 242, 251, .25);
  color: var(--wbd-ice);
  font-size: 14px; font-weight: 600;
  transition: background-color .15s ease;
}
.elementor-widget-button.btn-ice .elementor-button:hover { background: rgba(245, 242, 251, .1); }

/* Underlined text link (e.g. "Read the full case") */
.elementor-widget-button.btn-underline .elementor-button {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: 0;
  font-size: 15px; font-weight: 500;
  color: inherit;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 2px;
}

/* Arrow icon appended via mask so it always matches currentColor */
.wbd-btn-arrow .elementor-button-content-wrapper::after {
  content: "";
  width: 15px; height: 15px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'><path d='M3 7h8m0 0L7 3m4 4-4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'><path d='M3 7h8m0 0L7 3m4 4-4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* ---------- Check list (pricing features, icon-list widget) ---------- */
.wbd-checklist .elementor-icon-list-items {
  display: flex; flex-direction: column; gap: .75rem;
  font-size: 14px; line-height: 1.5;
}
.wbd-checklist .elementor-icon-list-item {
  display: flex; align-items: flex-start; gap: .5rem;
}
.wbd-checklist .elementor-icon-list-item::before {
  content: "";
  width: 16px; height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
  background-color: var(--wbd-check, var(--wbd-teal));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='m3 8 3 3 7-7' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='m3 8 3 3 7-7' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}
.wbd-checklist--coral { --wbd-check: var(--wbd-coral); }

/* ---------- Journey video cards ---------- */
.wbd-video-card { cursor: pointer; }
/* Only the poster image widget goes static (so the img fills the frame) —
   the duration pill / play button widgets keep their absolute positioning. */
.wbd-card-frame .elementor-widget-image { position: static; }
.wbd-card-frame img { z-index: 0; }
.wbd-card-frame::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  /* solid behind the title block, fading upward */
  background: linear-gradient(to top,
    rgb(0, 26, 64) 0%,
    rgb(0, 26, 64) 30%,
    rgba(0, 26, 64, 0.55) 55%,
    rgba(0, 26, 64, 0.08) 100%);
  pointer-events: none;
}
/* Same solid-bottom gradient for the legacy-markup cards (/videos/ page etc.) */
[data-video-trigger] span[class*="bg-gradient-to-t"] {
  background: linear-gradient(to top,
    rgb(0, 26, 64) 0%,
    rgb(0, 26, 64) 30%,
    rgba(0, 26, 64, 0.55) 55%,
    rgba(0, 26, 64, 0.08) 100%) !important;
}
.wbd-play {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  transform: translate(-50%, -50%);
  width: 3.5rem; height: 3.5rem;
  border-radius: 9999px;
  background: var(--wbd-lime);
  box-shadow: 0 10px 30px -8px rgba(25, 230, 160, .65);
  transition: transform .3s;
}
.wbd-play::before {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  transform: translateX(1px);
  background: var(--wbd-navy);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 3.8v12.4L16.4 10 6 3.8Z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 3.8v12.4L16.4 10 6 3.8Z'/></svg>") center / contain no-repeat;
}
.wbd-video-card:hover .wbd-play { transform: translate(-50%, -50%) scale(1.1); }
.wbd-video-card:hover .wbd-card-frame img { transform: scale(1.05); }
.wbd-card-frame img { transition: transform .5s; }
.wbd-duration {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .375rem;
  height: 1.75rem; padding: 0 .625rem;
  border-radius: 9999px;
  background: rgba(0, 26, 64, .7);
  backdrop-filter: blur(4px);
  color: var(--wbd-ice);
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wbd-duration::before {
  content: "";
  width: 12px; height: 12px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M4 2.5v7l5.5-3.5L4 2.5Z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M4 2.5v7l5.5-3.5L4 2.5Z'/></svg>") center / contain no-repeat;
}
.wbd-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; }

/* Lightbox player fills its stage (960px landscape / 420px portrait) instead
   of shrinking to the video file's natural resolution. */
#wbd-video-lightbox [data-video-frame] { width: 100% !important; }

/* ---------- Program tab buttons (containers driven by theme JS) ---------- */
.tab-btn { cursor: pointer; user-select: none; }

/* ---------- FAQ (toggle widget) ---------- */
.wbd-faq .elementor-toggle { border: none; }
.wbd-faq .elementor-toggle-item {
  border: none !important;
  border-top: 1px solid var(--wbd-line) !important;
  background: none;
}
.wbd-faq .elementor-toggle-item:last-child {
  border-bottom: 1px solid var(--wbd-line) !important;
}
.wbd-faq .elementor-tab-title {
  display: flex !important; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0 !important;
  border: none;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.025em; line-height: 1.25;
  color: var(--wbd-ink) !important;
  cursor: pointer;
}
@media (min-width: 640px) {
  .wbd-faq .elementor-tab-title { font-size: 24px; }
}
.wbd-faq .elementor-tab-title a { color: inherit; }
.wbd-faq .elementor-toggle-icon,
.wbd-faq .elementor-accordion-icon {
  order: 2;
  flex: 0 0 auto;
  width: 2.25rem !important; height: 2.25rem !important;
  border-radius: 9999px;
  background: var(--wbd-sand);
  display: grid !important; place-items: center;
  font-size: 13px;
  color: var(--wbd-ink);
  transition: transform .25s ease;
  float: none !important;
  position: static !important;
  margin: 0 !important;
}
/* closed/opened icon spans overlap in the same grid cell (one is hidden) */
.wbd-faq .elementor-toggle-icon span,
.wbd-faq .elementor-accordion-icon span {
  grid-area: 1 / 1;
  line-height: 1;
  margin: 0;
  width: auto;
}
.wbd-faq .elementor-toggle-icon svg,
.wbd-faq .elementor-accordion-icon svg { width: 13px; height: 13px; }
.wbd-faq .elementor-tab-title.elementor-active .elementor-toggle-icon,
.wbd-faq .elementor-active .elementor-accordion-icon { transform: rotate(45deg); }
.wbd-faq .elementor-tab-content {
  border: none !important;
  padding: 0 0 1.5rem !important;
  color: var(--wbd-muted);
  font-size: 15px; line-height: 1.65;
  max-width: 600px;
}
