/* ==========================================================================
   TALL BIRCH — S0 HERO SLIDER (HOME-EXACT wave E1, worker E1-HERO)
   Owner: E1-HERO. Loaded after kindy-custom.css + kindy-hero-programs.css
   (head.blade.php:27-32), so equal-specificity rules here win.
   Source of truth: docs/homeexact/ref/sections/S0_hero_slider.html +
   docs/homeexact/ref_probe.json (S0 row i=1 box [143,54,1140,650],
   pad bottom 81) + docs/homeexact/w1/A2_design_tokens.md §1.8/§2a.
   Scope: S0 hero only. No other section's classes are touched.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ROW GEOMETRY — contained 1140, height 650, row bottom-pad 81.
      Overrides kindy-custom.css `.stm-hero{height:540px}` (VFIX D3).
      PLAN §4.2: y=54 in the REF is the Envato preview banner → NOT reproduced.
      The 81px row pad lives on the outer VC wrapper, never on .stm-hero
      (G05 measures .stm-hero height and must read 650).
   -------------------------------------------------------------------------- */
.home-page .wpb_revslider_element.wpb_content_element {
  padding-bottom: 81px;
  margin-bottom: 0 !important;
}

.stm-hero {
  position: relative;
  height: 650px;
  max-height: 650px;
  overflow: hidden;
}

.stm-hero__container {
  max-width: 1140px;
  margin: 0 auto;
  height: 100%;
  position: relative;
}

/* --------------------------------------------------------------------------
   2. SLIDES — stacked, only the active slide is visible. The partial ships
      slide 1 with .stm-hero__slide_active, so no-JS still renders a full hero.
   -------------------------------------------------------------------------- */
.stm-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transition: opacity 0.8s ease;
}

.stm-hero__slide.stm-hero__slide_active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   3. WHITE CARD — REF shape layer: 540 × 390 min, radius 25, bg
      rgba(255,255,255,0.80), bottom 65, left 10 (xo:10px in REF).
   -------------------------------------------------------------------------- */
.stm-hero__shape {
  position: absolute;
  left: 10px;
  bottom: 65px;
  width: 540px;
  max-width: 90%;
  min-height: 390px;
  background: rgba(255, 255, 255, 0.80);
  border-radius: 25px;
  padding: 30px 50px;
  box-shadow: 0 10px 40px rgba(20, 38, 94, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY — REF hero H1 measured live: "Grand Hotel" 400 60px,
      colour rgb(86,80,159) #56509F (ref_probe; PLAN §3.1 h1/.stm-title token
      60px/74px). Sub-text stays on the body stack (Dosis) per the brief; REF
      measured 18px/30px #595959.
   -------------------------------------------------------------------------- */
h1.stm-hero__title {
  font-family: 'Grand Hotel', cursive;
  font-weight: 400;
  font-size: 60px;
  line-height: 74px;
  color: #56509F;
  margin: 0 0 12px;
}

.stm-hero__text {
  font-size: 18px;
  line-height: 30px;
  color: #595959;
  margin: 0 0 20px;
}

/* Duck icon spacing on the outline-pink button (REF inline mt:-4px / mr:19px;
   the button colour tokens live in kindy-custom.css — E0-TOKENS). */
.stm-hero .stm-btn.tb-hero-btn { margin-top: 4px; }
.tb-hero-btn i { margin-top: -4px; margin-right: 19px; }

/* --------------------------------------------------------------------------
   5. RESPONSIVE — must keep scrollWidth == clientWidth (G01 @1366 / G02 @375).
      These media rules are declared after the base rules above so they win
      over kindy-custom.css's earlier `.stm-hero__*` breakpoints.
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .stm-hero {
    height: 600px;
    max-height: 600px;
  }
  .stm-hero__shape {
    width: 500px;
    padding: 24px 34px;
    min-height: 360px;
  }
  h1.stm-hero__title {
    font-size: 46px;
    line-height: 56px;
  }
  .stm-hero__text {
    font-size: 17px;
    line-height: 27px;
  }
}

@media (max-width: 767px) {
  /* full-bleed: hero sits inside a Bootstrap col whose WPBakery full-width JS
     never runs on this clone (same reason as VFIX D3 / kindy-custom.css). */
  .stm-hero {
    width: 100vw;
    max-width: 100vw;
    height: 600px;
    max-height: 600px;
    min-height: 600px;
    margin-left: calc(-50vw + 50%);
  }
  .stm-hero__container {
    position: relative;
    height: 100%;
  }
  .stm-hero__shape {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 16px;
    top: auto;
    width: auto;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
    display: block;
  }
  h1.stm-hero__title {
    font-size: 34px;
    line-height: 44px;
    margin-bottom: 8px;
  }
  .stm-hero__text {
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 12px;
  }
}
