/*
 * KRU — Elementor bridge.
 *
 * Elementor wraps every widget in its own markup and ships a kit stylesheet
 * that would otherwise win over the theme. Rather than restate the design in
 * Elementor's controls (where it would drift), the KRU class goes on the
 * element and this file makes Elementor's wrapper transparent to it.
 */

/* 1. Elementor's inner nodes inherit from the KRU class on the wrapper, so
      .giant / .lede / .tagline keep meaning exactly what they mean elsewhere. */
.elementor-widget .elementor-heading-title,
.elementor-widget .elementor-widget-container > p,
.elementor-widget .elementor-widget-container > h1,
.elementor-widget .elementor-widget-container > h2,
.elementor-widget .elementor-widget-container > h3 {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  opacity: 1;
  margin: 0;
}

/* 2. Containers carrying .wrap behave like the theme's .wrap, not like a
      default Elementor container. */
.elementor .e-con.wrap,
.elementor .e-con > .e-con-inner.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--kru-gut);
  width: 100%;
}

/* 2b. Section rhythm. Elementor applies container padding via --padding-*,
       so setting `padding` in a class would lose to its own longhand rules.
       These feed the theme's spacing through Elementor's own mechanism. */
.elementor .e-con.hero {
  --padding-block-start: clamp(40px, 6vw, 74px);
  --padding-block-end: clamp(64px, 8vw, 100px);
  --padding-inline-start: 0; --padding-inline-end: 0;
}
.elementor .e-con.block {
  --padding-block-start: clamp(64px, 9vw, 120px);
  --padding-block-end: clamp(64px, 9vw, 120px);
  --padding-inline-start: 0; --padding-inline-end: 0;
}
.elementor .e-con.close {
  --padding-block-start: clamp(70px, 10vw, 130px);
  --padding-block-end: clamp(70px, 10vw, 130px);
  --padding-inline-start: 0; --padding-inline-end: 0;
}
.elementor .e-con.wrap {
  --padding-block-start: 0; --padding-block-end: 0;
  --padding-inline-start: var(--kru-gut); --padding-inline-end: var(--kru-gut);
}
.elementor .e-con.kru-bleed {
  --padding-block-start: 0; --padding-block-end: 0;
  --padding-inline-start: 0; --padding-inline-end: 0;
}

/* 3. Full-bleed rows (the ticker, the stats band) keep no container chrome. */
.elementor .e-con.kru-bleed {
  max-width: none;
  padding: 0;
  --padding-inline-start: 0;
  --padding-inline-end: 0;
}

/* 4. The two-column layouts are grids in the theme; Elementor containers are
      flex by default, so restate the grid where the class asks for it. */
@media (min-width: 861px) {
  .elementor .hero > .wrap,
  .elementor .block > .wrap {
    display: grid;
    grid-template-columns: 1.15fr minmax(250px, 320px);
    gap: clamp(30px, 5vw, 64px);
    align-items: center;
  }
  .elementor .block > .wrap {
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: clamp(32px, 5vw, 70px);
  }
  .elementor .block.flip > .wrap {
    grid-template-columns: minmax(260px, 420px) 1fr;
  }
}

/* 5. Copy columns and button rows stack the way the design does. */
.elementor .e-con.copy { display: block; }
.elementor .e-con.hero-cta {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  width: auto;
}

/* 6. Elementor's button chrome gives way to .btn. */
.elementor .elementor-widget-button .elementor-button {
  background: none;
  padding: 0;
  border-radius: 0;
  font: inherit;
  color: inherit;
  fill: currentColor;
}
.elementor .elementor-widget-button .elementor-button-content-wrapper { display: contents; }
.elementor .elementor-widget-button.btn { display: inline-flex; }

/* 7. Raw HTML widgets (phone mockups, ticker, receipt) carry no wrapper. */
.elementor .elementor-widget-html,
.elementor .elementor-widget-html > .elementor-widget-container { margin: 0; padding: 0; }

/* 8. The closing band centres its own content in the theme; Elementor's
      container needs telling. */
.elementor .e-con.kru-center {
  display: block;
  text-align: center;
}
.elementor .kru-center .hero-cta { justify-content: center; }
