/* ===================== STORY SLIDER v4 – compact, dots only, smooth autoplay =====================
   Use together with hm-story.js and the updated page.
   - slanted brand-gradient text panel (navy fading into red, like the demo button) + white stripe over a full photo
   - dots only: the active dot stretches and fills red while the 6 s autoplay timer runs
   - smooth cross-fade (1.2 s) + text glides in from the side
   ================================================================================================ */
.hm-story{
  position:relative;isolation:isolate;overflow:hidden;
  padding:14px 0;
  background:linear-gradient(180deg,#fff 0%,var(--hm-sky-2,#fff6f6) 100%);
}
.hm-story::before,.hm-story::after,.hm-st-grid{display:none}
.hm-story>.container{position:relative;z-index:2}

/* ---------- banner shell (slides + dots) ---------- */
.hm-st-banner{
  position:relative;border-radius:22px;overflow:hidden;background:#14334f;
  box-shadow:none;
}
.hm-st-banner::before{display:none}
.hm-st-wrap{display:grid;touch-action:pan-y;position:relative;overflow:hidden;isolation:isolate}

/* STATIC glass panel: sits between the photos (below) and the text (above), so it never fades or cuts during a slide change */
.hm-st-wrap::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:58%;z-index:5;pointer-events:none;
  background:
    linear-gradient(115deg,rgba(255,255,255,.20) 0%,rgba(255,255,255,.06) 30%,rgba(255,255,255,0) 55%),
    radial-gradient(120% 90% at 100% 100%,rgba(255,255,255,.14),rgba(255,255,255,0) 60%),
    linear-gradient(105deg,rgba(20,51,79,.96) 0%,rgba(25,58,94,.90) 34%,rgba(125,29,58,.74) 72%,rgba(212,31,43,.50) 100%);
  -webkit-backdrop-filter:blur(16px) saturate(170%);backdrop-filter:blur(16px) saturate(170%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),inset 1px 0 0 rgba(255,255,255,.18);
  clip-path:polygon(0 0,100% 0,calc(100% - 64px) 100%,0 100%);
}
/* STATIC slanted edge line (thin glass band beside the panel) */
.hm-st-wrap::after{
  content:"";position:absolute;left:0;top:0;bottom:0;width:calc(58% + 9px);z-index:5;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.55));
  clip-path:polygon(calc(100% - 9px) 0,100% 0,calc(100% - 64px) 100%,calc(100% - 73px) 100%);
}

/* ---------- slides (stacked, cross-fade) ---------- */
.hm-st-slide{
  grid-area:1/1;position:relative;
  display:grid;grid-template-columns:1fr;align-items:stretch;justify-items:start;
  width:100%;min-height:240px;margin:0;padding:0;
  visibility:hidden;pointer-events:none;
  transition:visibility 0s linear 1.2s;   /* old slide stays until the new photo has faded in */
}
.hm-st-slide.is-active{visibility:visible;pointer-events:auto;transition:visibility 0s}
.hm-st-slide.is-past .hm-st-frame img{transform:scale(1)}

/* ---------- photo ---------- */
.hm-st-media{
  position:absolute;top:0;bottom:0;right:0;left:40%;z-index:0;opacity:0;
  transform:scale(1.05);transition:transform 1.4s cubic-bezier(.2,.7,.2,1),opacity 1.2s cubic-bezier(.45,0,.2,1);
}
.hm-story.is-back .hm-st-media{transform:scale(1.05)}
.hm-st-slide.is-active .hm-st-media,
.hm-st-slide.is-past .hm-st-media{transform:none}
.hm-st-slide.is-active .hm-st-media{opacity:1;z-index:2}
.hm-st-slide.is-past .hm-st-media{opacity:1;z-index:1}
.hm-st-media::before{display:none}

.hm-st-frame{position:absolute;inset:0;padding:0;border-radius:0;overflow:hidden;background:#0f2840;box-shadow:none}
.hm-st-frame img{
  display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;
  object-fit:cover;object-position:center 30%;border-radius:0;background:#0f2840;
  transform:scale(1.06);transition:transform 7.5s linear;   /* slow, continuous zoom-out */
}
.hm-st-slide.is-active .hm-st-frame img{transform:scale(1)}
.hm-st-frame::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,transparent 60%,rgba(15,40,64,.35));
}
/* app screenshots ('shot' => true): show the whole screen */
.hm-st-frame.is-shot img{object-fit:contain;padding:28px 28px 28px 24%;transform:none!important;background:linear-gradient(135deg,#1c4a73,#14334f)}

/* play button (only on slides with a video) */
.hm-st-play{
  position:absolute;left:80%;top:50%;z-index:3;width:60px;height:60px;margin:-30px 0 0 -30px;border-radius:50%;
  display:grid;place-items:center;color:#fff!important;text-decoration:none;font-size:17px;
  background:#ed2024;border:3px solid rgba(255,255,255,.9);
  box-shadow:0 16px 34px -12px rgba(0,0,0,.6);transition:transform .25s ease;
}
.hm-st-play:hover{transform:scale(1.08)}
.hm-st-play::before{display:none}
.hm-st-play::after{content:"";position:absolute;inset:-12px;border-radius:50%;border:2px solid rgba(255,255,255,.75);animation:hmStPing 1.8s infinite}
@keyframes hmStPing{from{transform:scale(.85);opacity:1}to{transform:scale(1.35);opacity:0}}

.hm-st-badge{
  position:absolute;right:20px;bottom:20px;z-index:3;
  display:flex;align-items:center;gap:10px;padding:8px 13px;border-radius:12px;
  background:#fff;box-shadow:0 18px 36px -18px rgba(0,0,0,.55);
}
.hm-st-badge b{font-size:21px;font-weight:800;line-height:1;white-space:nowrap;color:#ed2024;-webkit-text-fill-color:#ed2024;background:none}
.hm-st-badge span{font-weight:600;font-size:12.5px;line-height:1.3;color:#14334f}

/* ---------- navy text panel with slanted right edge ---------- */
.hm-st-num{display:none}
.hm-st-text{
  position:relative;z-index:6;align-self:stretch;
  width:58%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  padding:80px 90px 90px 50px;overflow:visible;
  background:none;border:0;border-radius:0;transform:none;box-shadow:none;
}
.hm-st-text::before{display:none}

/* text: old text leaves quickly, new text arrives after it (no overlapping ghost text) */
.hm-st-text>*{opacity:0;transform:translateX(-22px);transition:opacity .3s ease,transform .3s ease}
.hm-story.is-back .hm-st-text>*{transform:translateX(22px)}
.hm-st-slide.is-active .hm-st-text>*{opacity:1;transform:none;transition:opacity .7s ease .35s,transform .9s cubic-bezier(.2,.7,.2,1) .35s}
.hm-st-slide.is-active .hm-st-text>:nth-child(2){transition-delay:.45s}
.hm-st-slide.is-active .hm-st-text>:nth-child(3){transition-delay:.55s}
.hm-st-slide.is-active .hm-st-text>:nth-child(4){transition-delay:.65s}
.hm-st-slide.is-active .hm-st-text>:nth-child(5){transition-delay:.75s}
.hm-st-text>*{position:relative}

.hm-st-text .hm-pill{
  background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.35);box-shadow:none;
}
.hm-st-text .hm-pill{font-size:13px;padding:4px 13px}
.hm-st-text .hm-pill i{color:#ff6b6e}
.hm-st-text .hm-h2{
  color:#fff!important;margin:8px 0 14px;padding-bottom:10px;
  font-size:clamp(20px,1.9vw,26px);line-height:1.15;letter-spacing:-.01em;text-shadow:none;
}
 .hm-story .hm-btn:hover {
        background: #fff none;
        color: #14334f !important;
    }
.hm-st-text .hm-h2::after{content:"";position:absolute;left:0;bottom:0;width:48px;height:3px;border-radius:3px;background:#ed2024}
.hm-st-text p{color:rgba(255,255,255,.88);font-size:15px;line-height:1.55;max-width:58ch;margin:0 0 14px;text-shadow:none}
.hm-st-text .hm-btn{padding:9px 22px;font-size:15px;background:#ed2024 none;color:#fff;border:0;box-shadow:0 14px 26px -14px rgba(237,32,36,.9)}
@media (hover:hover){.hm-st-text .hm-btn:hover{background:#fff none;color:#14334f !important;}}
.hm-st-text .hm-btn:focus-visible{outline:3px solid #fff;outline-offset:3px}

/* ---------- dots only (bottom-left, over the navy panel) ---------- */
.hm-st-ctl{
  position:absolute;left:52px;bottom:16px;right:auto;z-index:6;
  display:flex;align-items:center;width:max-content;max-width:calc(100% - 40px);
  margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;transform:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
.hm-st-dots{display:flex;align-items:center;gap:8px}
.hm-st-dots button{
  position:relative;width:9px;height:9px;min-width:0;padding:0;border:0;border-radius:9px;overflow:hidden;
  background:rgba(255,255,255,.4);cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:width .5s cubic-bezier(.4,0,.2,1),background .3s;
}
.hm-st-dots button::after{content:"";position:absolute;inset:-10px -3px}   /* bigger tap area */
.hm-st-dots button i{position:absolute;inset:0;border-radius:inherit;background:#ed2024;transform-origin:left;transform:scaleX(0)}
.hm-st-dots button .n,.hm-st-dots button .l{display:none}
.hm-st-dots button:hover{background:rgba(255,255,255,.75)}
.hm-st-dots button.is-active{width:34px;background:rgba(255,255,255,.4)}
.hm-st-dots button:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* ---------- tablet ---------- */
@media (max-width:1199px){
  .hm-st-slide{min-height:230px}
  .hm-st-text{width:62%;padding:20px 80px 40px 36px}
  .hm-st-wrap::before{width:62%}
  .hm-st-wrap::after{width:calc(62% + 9px)}
  .hm-st-media{left:44%}
  .hm-st-ctl{left:36px}
  .hm-st-text .hm-h2{font-size:clamp(20px,2.5vw,24px)}
  .hm-st-text p{font-size:14px}
}

/* ---------- mobile: photo on top, text below ---------- */
@media (max-width:991px){
  .hm-story{padding:20px 0}
  .hm-st-banner{border-radius:16px}
  .hm-st-slide{min-height:0;align-items:start;justify-items:stretch}
  .hm-st-wrap::before,.hm-st-wrap::after{display:none}
  .hm-st-text::before{display:none}
  .hm-st-media{left:0;right:0;bottom:auto;height:140px}
  .hm-st-frame::after{background:linear-gradient(180deg,transparent 55%,#14334f 100%)}
  .hm-st-frame.is-shot img{padding:16px 16px 28px}
  .hm-st-play{left:50%;top:70px;width:46px;height:46px;margin:-23px 0 0 -23px}
  .hm-st-badge{right:12px;top:12px;bottom:auto}
  .hm-st-text{
    width:auto;margin-top:120px;padding:16px 16px 38px;clip-path:none;align-self:auto;
    background:linear-gradient(135deg,#14334f 0%,#7d1d3a 100%);
    -webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;
  }
  .hm-st-slide.is-active .hm-st-text{z-index:7}   /* new solid text block always above the old one */
  .hm-st-text .hm-h2{font-size:18px}
  .hm-st-text p{font-size:13.5px;margin:0 0 12px;max-width:none}
  .hm-st-text .hm-btn{width:100%;justify-content:center}
  .hm-st-ctl{left:16px;bottom:14px}
}
@media (max-width:575px){
  .hm-st-media{height:120px}
  .hm-st-text{margin-top:100px}
  .hm-st-play{top:60px}
  .hm-st-text .hm-pill{font-size:13.5px;padding:5px 13px}
  .hm-st-text .hm-h2{font-size:17px}
  .hm-st-dots{gap:6px}
  .hm-st-dots button{width:7px;height:7px}
  .hm-st-dots button.is-active{width:26px}
}

@media (prefers-reduced-motion:reduce){
  .hm-st-play::after{animation:none}
  .hm-st-slide,.hm-st-media,.hm-st-text>*,.hm-st-frame img{transition:none!important}
  .hm-st-frame img{transform:none!important}
}