/* =====================================================================
   Elementor bridge stylesheet
   Component boxes (cards, section backgrounds, cta-band, hero) are styled
   natively in the Elementor data. This file re-applies the ORIGINAL styles.css
   typography, button, and image rules onto Elementor's markup via WIDGET-level
   classes (which render reliably in Elementor 4.x). Loaded after Elementor CSS.
   ===================================================================== */

/* Header nav: keep multi-word items ("Who We Serve") on one line, uniform with
   the rest of the menu (top-level links lacked white-space:nowrap). */
.nav a, .nav__top { white-space: nowrap; }

/* Hide the in-page breadcrumb nav (owner: unnecessary mid-page). The JSON-LD
   BreadcrumbList schema is separate and stays intact for SEO. */
.breadcrumb { display: none !important; }

/* Sidebar "Related" list: drop the default bullets (they poke off the side in the
   narrow sidebar) and render clean gold links instead. */
.sidebar ul { list-style: none; padding-left: 0; margin: 8px 0 0; }
.sidebar ul li { margin: 0 0 7px; line-height: 1.35; }
.sidebar ul li a { color: var(--gold-deep); text-decoration: none; font-weight: 500; }
.sidebar ul li a:hover { color: var(--gold); text-decoration: underline; }

/* Responsive 16:9 YouTube embed (converted from the [bpiyt] shortcode). Uses
   aspect-ratio, which survives Elementor's mobile flex layout; the padding-bottom
   fallback covers very old engines. Guarantees the video never collapses. */
.bpi-video { width: 100%; margin: 0; line-height: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(32,36,43,.12); background: #000; }
/* Explicit heights with !important so nothing can collapse the iframe (the
   aspect-ratio/padding approaches were defeated by Elementor's mobile flex). */
.bpi-video iframe { display: block; width: 100% !important; max-width: 100% !important;
  height: 220px !important; border: 0 !important; }
@media (min-width: 560px) { .bpi-video iframe { height: 340px !important; } }
@media (min-width: 900px) { .bpi-video iframe { height: 460px !important; } }

/* Hero/subhero primary action buttons go full-width on mobile (matches the old
   build's flex:1 1 100%) so they read wide, not narrow with big side buffers. */
@media (max-width: 767px) {
  .elementor-widget-button.btn-block-m,
  .elementor-widget-button.btn-block-m .elementor-button { width: 100%; }
}

/* Primary hero/subhero buttons (Schedule Online / Call Us) a touch larger. */
.elementor-widget-button.btn-block-m .elementor-button {
  padding-top: 1em; padding-bottom: 1em; padding-left: 2.4em; padding-right: 2.4em;
  font-size: 1.08rem;
}

/* Shiny gold button: a soft gold glow + a slow shine sweep across the pill. */
.elementor-widget-button.btn-shine .elementor-button {
  position: relative; overflow: hidden;
  box-shadow: 0 6px 18px rgba(220,178,62,.45), 0 0 22px rgba(220,178,62,.35);
}
.elementor-widget-button.btn-shine .elementor-button::after {
  content: ""; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg); pointer-events: none;
  animation: bpiBtnShine 4s ease-in-out infinite;
}
@keyframes bpiBtnShine { 0% { left: -75%; } 45%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .elementor-widget-button.btn-shine .elementor-button::after { animation: none; display: none; }
}

/* ---- Spacing model: zero widget margins; all vertical spacing comes from
   Elementor container gaps (set in the generator). This prevents the doubled
   space above/below headings. Multi-paragraph text keeps internal rhythm only. */
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-head); line-height: 1.15; margin: 0; }
.elementor-widget-text-editor p { margin: 0 0 1em; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---- Heading sizes (match styles.css) ---- */
.elementor-widget-heading.sh-h2 .elementor-heading-title   { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.elementor-widget-heading.hero-h1 .elementor-heading-title { font-size: clamp(2.1rem, 4.8vw, 3.5rem); }
.elementor-widget-heading.card-title .elementor-heading-title { font-size: 1.18rem; }
.elementor-widget-heading.cta-h2 .elementor-heading-title  { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---- Body text colours/sizes ---- */
/* No colour here: let the native per-widget text colour win (light on dark
   sections, ink-soft on light sections). Forcing ink-soft made dark-section
   intro paragraphs unreadable. */
.elementor-widget-text-editor.sh-p p    { font-size: 1.06rem; }
.elementor-widget-text-editor.hero-sub p { font-size: 1.18rem; color: var(--ink-soft); max-width: 36ch; }
.elementor-widget-text-editor.card-text p { color: var(--ink-soft); }
.elementor-widget-text-editor.cta-p p   { max-width: 560px; margin-left: auto; margin-right: auto; }
.elementor-widget-text-editor.find-cap p { font-size: .85rem; color: var(--muted); padding: 12px 14px; }

/* ---- Eyebrow ---- */
.elementor-widget-heading.eyebrow .elementor-heading-title {
  font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---- Icon badge ---- */
.elementor-widget-heading.icon-badge .elementor-heading-title {
  width: 50px; height: 50px; border-radius: 13px; background: var(--gold-soft); color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 0 6px;
}

/* ---- Pills ---- */
.elementor-widget-text-editor.pill { display: inline-block; }
.elementor-widget-text-editor.pill p {
  background: var(--gold-soft); color: var(--gold-deep); font-weight: 600; font-size: .82rem;
  padding: 6px 12px; border-radius: 999px; margin: 0; display: inline-block;
}

/* ---- Trust-strip items ---- */
.elementor-widget-text-editor.trust-item p { color: var(--cream); font-family: var(--font-head); font-weight: 600; font-size: .96rem; margin: 0; }

/* ---- Buttons are fully NATIVE now (padding/colour/radius/type set in the
   Elementor data = single source of truth, editable, no duplicate styling).
   Only kill Elementor's default min-height so the thin pill isn't inflated. ---- */
.elementor-widget-button .elementor-button { min-height: 0; line-height: 1.1; }

/* ---- Finding photos: fixed 180px crop like the original figure images ---- */
.elementor-widget-image.find-photo img { width: 100%; height: 180px; object-fit: cover; display: block; border-radius: 0; }

/* ---- Deficiency / gallery photos: uniform height so mixed aspect ratios line up ---- */
.elementor-widget-image.find-photo-lg img { width: 100%; height: 260px; object-fit: cover; display: block; }
@media (max-width: 767px) { .elementor-widget-image.find-photo-lg img { height: 210px; } }

/* ---- Hero highlight span + hero/report photo rounding ---- */
.elementor-heading-title .hl { color: var(--gold-deep); }
.elementor-widget-image.hero-photo img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---- Ad landing-page quote form: white card + padded inputs (matches the
   previous ad-landing design). Scoped to .lp-* so only landing pages get it. ---- */
.lp-form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}
.lead-form input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: var(--font-body); background: var(--white); color: var(--ink);
  box-sizing: border-box;
}
.lead-form input:focus { outline: none; border-color: var(--gold); }
.lp-hero-media img { border-radius: 14px; display: block; width: 100%; }
.lp-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: .82rem; color: var(--muted); }

/* ---------- Sticky booking sidebar (Elementor) ----------
   Elementor wraps the .sidebar aside in a content-height widget div, so the
   old .sidebar{position:sticky} had no room to travel. Stick the widget
   wrapper instead: its parent column stretches to the full row height. */
@media (min-width: 941px) {
  .elementor-widget-html:has(.sidebar) {
    position: sticky;
    top: 96px;
  }
  .elementor-widget-html:has(.sidebar) .sidebar { position: static; }
}

/* ---------- Bio + About media-object photos ----------
   Portrait photo floats left at a fixed comfortable width with text wrapping
   around it (classic media-object). Consistent 4:5 crop, rounded, soft shadow.
   Stacks centered on mobile. */
.bio-photo img,
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: block;
}
@media (min-width: 700px) {
  .bio-photo {
    float: left;
    width: min(340px, 42%);
    margin: 6px 30px 16px 0;
  }
  .about-photo {
    float: left;
    width: min(380px, 44%);
    margin: 6px 32px 16px 0;
  }
}
@media (max-width: 699px) {
  .bio-photo,
  .about-photo {
    max-width: 380px;
    margin: 0 auto 18px;
  }
}

/* ---------- Flow (block) container for magazine-style photo wrap ----------
   Elementor containers are flex, which ignores floats. .bpi-flow switches the
   prose container to block flow so .bio-photo/.about-photo genuinely float and
   the text wraps around, then continues full width below. */
.bpi-flow { display: block !important; }
.bpi-flow::after { content: ""; display: table; clear: both; }
.bpi-flow > .elementor-widget { width: 100%; }
@media (min-width: 700px) {
  .bpi-flow .elementor-widget-image.bio-photo {
    float: left; width: min(320px, 40%); margin: 6px 30px 14px 0;
  }
  .bpi-flow .elementor-widget-image.about-photo {
    float: right; width: min(380px, 42%); margin: 6px 0 18px 34px;
  }
}

/* ---------- Header "Book Online" attention effects (desktop only) ---------- */
@media (min-width: 941px) and (prefers-reduced-motion: no-preference) {
  .header-cta .btn--gold {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  /* shine sweep across the button */
  .header-cta .btn--gold::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.55) 50%, transparent 68%) no-repeat;
    background-size: 240% 100%;
    animation: bpishine 3.4s ease-in-out infinite;
    pointer-events: none;
  }
  /* orbiting ring around the button */
  .header-cta .btn--gold::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    padding: 2px;
    background: conic-gradient(from 0deg, transparent 0 295deg, rgba(220,178,62,.9) 330deg, #fff 352deg, transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: exclude;
    animation: bpiring 2.8s linear infinite;
    pointer-events: none;
  }
}
@keyframes bpishine { 0% { background-position: 170% 0 } 55% { background-position: -70% 0 } 100% { background-position: -70% 0 } }
@keyframes bpiring { to { transform: rotate(360deg) } }
/* ring rotates the ::before, so it must not be clipped by overflow:hidden - use a wrapper trick: keep shine clipped via inset background instead */
.header-cta .btn--gold { overflow: visible !important; }
.header-cta .btn--gold::after { border-radius: inherit; overflow: hidden; }

/* smooth-jump target for the chat "Get a quote" button */
#quote { scroll-margin-top: 110px; }

/* ---------- InterNACHI CPI seal overlay (Ian + Lawrence photos) ---------- */
.has-cpi { position: relative; }
.has-cpi::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: clamp(56px, 22%, 84px);
  aspect-ratio: 1 / 1;
  background: url('/assets/img/internachi-cpi.png') center / contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  pointer-events: none;
}

/* clickable hotspot matching the CPI seal overlay position */
.cpi-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: clamp(56px, 22%, 84px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  z-index: 2;
}
/* footer credential badges keep a consistent height */
.footer-badges a { display: inline-flex; align-items: center; }

/* ---------- Credential trust strip + inline trust badge sizing ---------- */
.bpi-trust-strip { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; padding: 6px 0; }
.bpi-trust-strip img { height: 64px; width: auto; display: block; }
.bpi-trust-strip a { display: inline-flex; transition: transform .15s ease; }
.bpi-trust-strip a:hover { transform: translateY(-2px); }
@media (max-width: 600px) { .bpi-trust-strip { gap: 18px; } .bpi-trust-strip img { height: 46px; } }
.trust-badge-hero img { max-width: 210px !important; width: 100%; margin: 0 auto; display: block; }

/* Instant-quote widget: narrower + centered on desktop (widget is responsive; height untouched) */
#quote { max-width: 560px; margin-left: auto !important; margin-right: auto !important; width: 100%; }
