/* ================= EaSee Experience Layer ================= */

body.intro-lock { overflow:hidden; }

.easee-intro {
  position:fixed; inset:0; z-index:9999; display:grid; place-items:center;
  background:#111842; opacity:1; visibility:visible;
  transition:opacity .8s cubic-bezier(.2,.7,.2,1),visibility .8s;
}
.easee-intro.is-done { opacity:0; visibility:hidden; pointer-events:none; }
.easee-intro__backdrop {
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 50% 45%,rgba(16,176,202,.25),transparent 28%),
    radial-gradient(circle at 15% 85%,rgba(16,176,202,.10),transparent 35%),
    linear-gradient(135deg,#111842,#1b2660 55%,#0b8fa3);
}
.easee-intro__content { position:relative;width:min(78vw,760px);display:flex;flex-direction:column;align-items:center; }
.easee-intro__video { width:100%;max-height:58vh;object-fit:contain;filter:drop-shadow(0 30px 60px rgba(0,0,0,.28)); }
.easee-intro__progress { width:min(260px,50vw);height:2px;margin-top:24px;background:rgba(255,255,255,.18);overflow:hidden;border-radius:999px; }
.easee-intro__progress span { display:block;width:0;height:100%;background:#10b0ca;box-shadow:0 0 14px rgba(16,176,202,.8); }

.hero-video { transform-style:preserve-3d;transition:transform .6s cubic-bezier(.2,.7,.2,1),box-shadow .6s ease; }
.hero-video:hover { transform:perspective(1200px) rotateY(-2deg) rotateX(1deg) translateY(-4px);box-shadow:0 32px 70px rgba(27,38,96,.16),0 18px 45px rgba(16,176,202,.14); }

.mod { cursor:pointer;transform-style:preserve-3d; }
.mod::after {
  content:"";position:absolute;inset:0;border-radius:inherit;
  background:linear-gradient(135deg,rgba(16,176,202,.10),transparent 45%);
  opacity:0;transition:opacity .35s ease;pointer-events:none;
}
.mod:hover::after { opacity:1; }

.module-modal {
  position:fixed;inset:0;z-index:500;display:grid;place-items:center;
  opacity:0;visibility:hidden;pointer-events:none;transition:opacity .45s ease,visibility .45s ease;
}
.module-modal.is-open { opacity:1;visibility:visible;pointer-events:auto; }
.module-modal__backdrop { position:absolute;inset:0;background:rgba(10,18,52,.66);backdrop-filter:blur(16px); }
.module-modal__scene {
  width:min(1120px,calc(100vw - 40px));min-height:min(650px,calc(100vh - 80px));
  position:relative;overflow:hidden;border-radius:32px;
  border:1px solid rgba(16,176,202,.28);
  background:
    radial-gradient(circle at 20% 20%,rgba(16,176,202,.14),transparent 32%),
    radial-gradient(circle at 85% 80%,rgba(27,38,96,.22),transparent 38%),
    linear-gradient(145deg,#f9fbff,#edf2fa);
  box-shadow:0 45px 110px rgba(17,24,66,.35);
  transform:perspective(1600px) rotateX(8deg) scale(.92) translateY(35px);
  transition:transform .65s cubic-bezier(.16,1,.3,1);
}
.module-modal.is-open .module-modal__scene { transform:perspective(1600px) rotateX(0) scale(1) translateY(0); }
.module-modal__close {
  position:absolute;right:24px;top:20px;z-index:20;width:42px;height:42px;border-radius:50%;
  border:1px solid var(--line);background:rgba(255,255,255,.72);color:var(--primary);
  font-size:28px;line-height:1;cursor:pointer;transition:.25s ease;
}
.module-modal__close:hover { background:var(--primary);color:#fff;transform:rotate(90deg); }
.module-modal__inner {
  min-height:650px;padding:70px;display:grid;grid-template-columns:.9fr 1.1fr;gap:70px;align-items:center;
  position:relative;z-index:5;
}
.module-modal__visual {
  width:min(390px,100%);aspect-ratio:1;margin:auto;position:relative;display:grid;place-items:center;
  transform-style:preserve-3d;animation:moduleFloat 5s ease-in-out infinite;
}
.module-modal__ring { position:absolute;border-radius:50%;border:1px solid rgba(16,176,202,.45);transform-style:preserve-3d; }
.module-modal__ring--outer { inset:8%;animation:spin3d 14s linear infinite;border-left-color:transparent;border-right-color:rgba(27,38,96,.35); }
.module-modal__ring--inner { inset:23%;animation:spin3dReverse 9s linear infinite;border-top-color:rgba(16,176,202,.8);border-bottom-color:transparent; }
.module-modal__core {
  width:34%;aspect-ratio:1;border-radius:28%;background:linear-gradient(145deg,#1b2660,#10b0ca);
  box-shadow:0 25px 60px rgba(16,176,202,.35),inset 0 0 0 1px rgba(255,255,255,.35);
  transform:translateZ(70px) rotate(8deg);display:grid;place-items:center;
}
.module-modal__core-dot { width:26%;aspect-ratio:1;border-radius:50%;background:#fff;box-shadow:0 0 30px rgba(255,255,255,.9); }
.module-modal__float {
  position:absolute;width:42px;height:42px;border-radius:14px;border:1px solid rgba(16,176,202,.35);
  background:rgba(255,255,255,.72);backdrop-filter:blur(8px);box-shadow:0 12px 30px rgba(27,38,96,.12);
}
.module-modal__float--a { top:13%;left:12%;animation:orbitA 5s ease-in-out infinite; }
.module-modal__float--b { right:10%;top:28%;animation:orbitB 6s ease-in-out infinite; }
.module-modal__float--c { left:22%;bottom:13%;animation:orbitC 5.5s ease-in-out infinite; }
.module-modal__grid {
  position:absolute;inset:0;opacity:.32;background-image:radial-gradient(circle,rgba(27,38,96,.15) 1px,transparent 1px);
  background-size:28px 28px;mask-image:radial-gradient(ellipse at center,black 10%,transparent 70%);
}
.module-modal__copy { position:relative;z-index:5; }
.module-modal__eyebrow { display:inline-block;color:var(--accent-deep);font-size:12px;font-weight:600;letter-spacing:.18em;text-transform:uppercase; }
.module-modal__count { display:inline-block;margin-left:10px;padding:5px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent-deep);font-size:11px;font-weight:600; }
.module-modal__copy h2 { font-size:clamp(36px,4vw,58px);margin:20px 0 18px; }
.module-modal__copy p { max-width:590px;color:var(--ink-soft);font-size:18px;line-height:1.8; }

@keyframes moduleFloat { 0%,100%{transform:translateY(0) rotateZ(0)}50%{transform:translateY(-12px) rotateZ(2deg)} }
@keyframes spin3d { to{transform:rotateX(65deg) rotateZ(360deg)} }
@keyframes spin3dReverse { to{transform:rotateY(70deg) rotateZ(-360deg)} }
@keyframes orbitA { 0%,100%{transform:translate3d(0,0,30px)}50%{transform:translate3d(12px,-15px,70px)} }
@keyframes orbitB { 0%,100%{transform:translate3d(0,0,60px)}50%{transform:translate3d(-14px,10px,30px)} }
@keyframes orbitC { 0%,100%{transform:translate3d(0,0,40px)}50%{transform:translate3d(15px,10px,75px)} }

@media(max-width:800px) {
  .module-modal__scene { min-height:calc(100vh - 28px);width:calc(100vw - 20px);border-radius:24px; }
  .module-modal__inner { min-height:calc(100vh - 28px);padding:70px 28px 36px;grid-template-columns:1fr;gap:15px; }
  .module-modal__visual { width:min(270px,70vw); }
  .module-modal__copy h2 { font-size:34px;margin:12px 0; }
  .module-modal__copy p { font-size:15px;line-height:1.65; }
  .module-modal__close { right:14px;top:14px; }
}
@media(prefers-reduced-motion:reduce) {
  .module-modal__visual,.module-modal__ring,.module-modal__float { animation:none !important; }
}

/* =========================================================
   Module modal — two equal halves
   Details + video, matching the existing hero-video treatment.
   ========================================================= */

.module-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility .45s ease;
}

.module-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.module-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 52, .66);
  backdrop-filter: blur(15px);
}

.module-modal__scene {
  width: min(1120px, 100%);
  max-height: calc(100svh - 56px);
  height: auto;
  min-height: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 30px;
  border: 1px solid rgba(16, 176, 202, .20);
  background:
    radial-gradient(circle at 88% 18%, rgba(16,176,202,.11), transparent 30%),
    radial-gradient(circle at 12% 85%, rgba(27,38,96,.07), transparent 34%),
    linear-gradient(135deg, #f9fbff 0%, #eef3fa 100%);
  box-shadow: 0 45px 120px rgba(17, 24, 66, .38);
  transform: perspective(1600px) rotateX(7deg) scale(.94) translateY(28px);
  transition: transform .65s cubic-bezier(.16,1,.3,1);
}

.module-modal.is-open .module-modal__scene {
  transform: perspective(1600px) rotateX(0) scale(1) translateY(0);
}

.module-modal__grid {
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image: radial-gradient(circle, rgba(27,38,96,.13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 8%, transparent 72%);
  pointer-events: none;
}

.module-modal__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.module-modal__orb--one {
  width: 260px;
  height: 260px;
  right: -90px;
  top: -100px;
  background: radial-gradient(circle, rgba(16,176,202,.14), transparent 68%);
}

.module-modal__orb--two {
  width: 300px;
  height: 300px;
  left: -180px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(27,38,96,.10), transparent 68%);
}

.module-modal__close {
  position: absolute;
  right: 20px;
  top: 18px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(27,38,96,.10);
  border-radius: 50%;
  background: rgba(255,255,255,.80);
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: .25s ease;
  box-shadow: 0 6px 20px rgba(27,38,96,.08);
}

.module-modal__close:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(90deg);
}

.module-modal__inner {
  min-height: 0;
  padding: 66px 58px 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
  position: relative;
  z-index: 5;
}

/* ---------- Left half ---------- */

.module-modal__details {
  min-width: 0;
  padding: 8px 18px 8px 0;
}

.module-modal__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.module-modal__edition {
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.module-modal__count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.module-modal__details h2 {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: .98;
  letter-spacing: -.055em;
}

.module-modal__description {
  max-width: 500px;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.module-modal__points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.module-modal__points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.module-modal__points li::before {
  content: "✓";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(16,176,202,.12);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 800;
}

.module-modal__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.module-modal__demo {
  min-width: 118px;
}

.module-modal__next {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: 600 13px/1 var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  transition: color .2s ease, transform .2s ease;
}

.module-modal__next span {
  color: var(--accent);
  font-size: 18px;
  transition: transform .2s ease;
}

.module-modal__next:hover {
  color: var(--accent-deep);
}

.module-modal__next:hover span {
  transform: translateX(4px);
}

/* ---------- Right half ---------- */

.module-modal__media {
  min-width: 0;
}

.module-modal__video {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  border-radius: 24px;
  box-shadow: 0 24px 65px rgba(27,38,96,.16);
}

.module-modal__video::after {
  background: radial-gradient(ellipse at center, transparent 50%, rgba(17,24,66,.22) 100%);
}

.module-modal__video video {
  object-fit: cover;
}

.module-modal__video .video-brand-tag {
  top: 16px;
  left: 16px;
  padding: 7px 13px;
  font-size: 10px;
}

/* ---------- Footer ---------- */

.module-modal__footer {
  min-height: 38px;
  padding: 0 20px;
  border-top: 1px solid rgba(27,38,96,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a94a9;
  font-size: 9px;
  letter-spacing: .02em;
  position: relative;
  z-index: 5;
}

.module-modal__footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 17px;
  margin-right: 5px;
  padding: 0 4px;
  border: 1px solid rgba(27,38,96,.12);
  border-radius: 4px;
  background: rgba(255,255,255,.72);
  color: #7f8aa0;
  font: 600 8px/1 var(--font);
}

.module-modal__video {
  position: relative;
  overflow: hidden;
}

.module-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
/* Small transition when moving to another module. */
.module-modal__details.is-changing,
.module-modal__media.is-changing {
  animation: moduleContentSwap .28s ease;
}

@keyframes moduleContentSwap {
  0% { opacity: .35; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .module-modal {
    padding: 14px;
  }

  .module-modal__scene {
    max-height: calc(100vh - 28px);
    overflow-y: auto;
  }

  .module-modal__inner {
    min-height: 0;
    padding: 60px 28px 30px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .module-modal__details {
    padding-right: 0;
    order: 1;
  }

  .module-modal__media {
    order: 2;
  }

  .module-modal__video {
    aspect-ratio: 16 / 10;
  }

  .module-modal__details h2 {
    font-size: 42px;
  }
}

@media (max-width: 560px) {
  .module-modal__scene {
    border-radius: 22px;
  }

  .module-modal__inner {
    padding: 56px 20px 24px;
    gap: 24px;
  }

  .module-modal__details h2 {
    font-size: 36px;
  }

  .module-modal__description {
    font-size: 14px;
  }

  .module-modal__actions {
    gap: 14px;
    flex-wrap: wrap;
  }

  .module-modal__footer {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-modal__scene,
  .module-modal__details.is-changing,
  .module-modal__media.is-changing {
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================================
   Heading-only cinematic transition
   Everything except the H1 stays fixed.
   ========================================================= */
   .hero-cinematic h1 {
    color: #fff;
}
.hero-cinematic .lede {
    color: #ffffff;
}

.hero-cinematic .hero-actions .btn-ghost {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.hero-cinematic .hero-actions .btn-ghost:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.hero-cinematic .hero-copy {
  position: relative;
  width: min(650px, 58vw);
  z-index: 7;
}

.hero-cinematic .hero-heading-stage {
  position: relative;
  width: 100%;
  margin: 20px 0 24px;
  perspective: 1000px;
}

/* The two headlines are deliberately kept in normal document flow.
   They never occupy the same grid cell, so one can never visually sit
   underneath the other during the cinematic handoff. */
.hero-cinematic .hero-heading {
  position: relative;
  width: 100%;
  margin: 0;
  will-change: opacity, transform;
  transform-origin: left center;
  backface-visibility: hidden;
}

.hero-cinematic .hero-heading-two {
  margin-top: 0;
}

.hero-cinematic .hero-heading-one {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-cinematic .hero-heading-two {
  opacity: 0;
  transform: translate3d(110px, 0, 0) scale(.985);
}

.hero-cinematic .hero-heading-one em {
  font-style: normal;
  color: #38c7dc;
}

.hero-cinematic .hero-heading-two .accent {
  background: linear-gradient(135deg,#38c7dc 0%,#8be4ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* The rest of the Hero copy never participates in the state transition. */
.hero-cinematic .eyebrow,
.hero-cinematic .lede,
.hero-cinematic .hero-actions,
.hero-cinematic .chips {
  transform: none !important;
}

@media (max-width: 900px) {
  .hero-cinematic .hero-copy {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .hero-cinematic .hero-heading {
    transition: none !important;
    transform: none !important;
  }
}



/* =========================================================
   Header state is controlled by page section, not Hero
   animation progress.
   ========================================================= */

header.hero-header-transparent {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

header.hero-header-colored {
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 8px 30px rgba(17,24,66,.10);
  backdrop-filter: blur(14px);
}

/* The existing navigation should remain readable in both states. */
header.hero-header-transparent .nav-links a {
  color: rgba(255,255,255,.88);
}

header.hero-header-colored .nav-links a {
  color: var(--primary, #1b2660);
}

header.hero-header-transparent .btn-ghost {
  color: #fff;
}

header.hero-header-colored .btn-ghost {
  color: var(--primary, #1b2660);
}



/* Hero header: white Hero background */
header.hero-header-transparent {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

header.hero-header-transparent a {
    color: #ffffff !important;
}

header.hero-header-transparent .btn-ghost,
header.hero-header-transparent .btn-primary {
    background: #14315e !important;
    color: #ffffff !important;
    border-color: #14315e !important;
}

header.hero-header-transparent .btn-ghost:hover,
header.hero-header-transparent .btn-primary:hover {
    background: #14315e !important;
    color: #ffffff !important;
    border-color: #14315e !important;
}


/* =========================================================
   Header — always visible, solid white
   ========================================================= */

header,
.site-header,
.site-header-wrap {
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: 0 1px 0 rgba(20,49,94,.08) !important;
    backdrop-filter: none !important;
}

header a,
.site-header a {
    color: #000000 !important;
}

header .btn,
header .btn-primary,
header .btn-accent,
header .btn-ghost,
.site-header .btn,
.site-header .btn-primary,
.site-header .btn-accent,
.site-header .btn-ghost {
    background: #14315e !important;
    color: #ffffff !important;
    border-color: #14315e !important;
}

header .btn:hover,
header .btn-primary:hover,
header .btn-accent:hover,
header .btn-ghost:hover,
.site-header .btn:hover,
.site-header .btn-primary:hover,
.site-header .btn-accent:hover,
.site-header .btn-ghost:hover {
    background: #14315e !important;
    color: #ffffff !important;
    border-color: #14315e !important;
}

/* Override any Hero-progress header states from earlier versions. */
header.hero-header-hidden,
header.hero-header-visible,
header.hero-header-transparent,
header.hero-header-colored {
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: 0 1px 0 rgba(20,49,94,.08) !important;
    backdrop-filter: none !important;
}


/* =========================================================
   MOBILE MODAL + CINEMATIC SCROLL RELEASE V3
   Prevent blank modal space and release page scrolling once
   the hero cinematic reaches 100%.
   ========================================================= */
body.module-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.module-modal {
  padding: 12px;
  overscroll-behavior: contain;
}

.module-modal__scene {
  min-height: 0;
  height: auto;
  max-height: calc(100svh - 24px);
  display: flex;
  flex-direction: column;
}

.module-modal__inner {
  min-height: 0;
}

@media (max-width: 900px) {
  .module-modal {
    padding: 10px;
  }

  .module-modal__scene {
    width: min(100%, 620px);
    height: auto;
    max-height: calc(100svh - 20px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .module-modal__inner {
    min-height: 0;
    padding: 54px 22px 22px;
    gap: 22px;
  }

  .module-modal__media {
    margin-top: 0;
  }

  .module-modal__video {
    aspect-ratio: 16 / 9;
  }

  .module-modal__footer {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .module-modal {
    padding: 8px;
  }

  .module-modal__scene {
    max-height: calc(100svh - 16px);
    border-radius: 20px;
  }

  .module-modal__inner {
    padding: 52px 18px 18px;
    gap: 18px;
  }

  .module-modal__details h2 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .module-modal__description {
    margin-bottom: 16px;
  }

  .module-modal__points {
    gap: 8px;
  }

  .module-modal__actions {
    margin-top: 20px;
  }

  .module-modal__footer {
    min-height: 34px;
    padding: 0 12px;
  }
}

/* Short mobile screens: keep the modal compact instead of creating a
   viewport-height card with a large empty area underneath the content. */
@media (max-width: 560px) and (max-height: 740px) {
  .module-modal__inner {
    padding-top: 48px;
    gap: 14px;
  }

  .module-modal__video {
    aspect-ratio: 16 / 8.5;
  }

  .module-modal__description {
    line-height: 1.55;
  }

  .module-modal__points li {
    font-size: 12px;
  }

  .module-modal__actions {
    margin-top: 14px;
  }
}

/* =========================================================
   Responsive modal sizing — final override
   Keep the modal content-sized on larger screens instead of
   forcing a viewport-height card with empty space.
   ========================================================= */
.module-modal__scene {
  height: fit-content;
  min-height: 0;
  max-height: min(760px, calc(100svh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
}

.module-modal__inner {
  min-height: 0;
}

@media (max-width: 900px) {
  .module-modal__scene {
    height: fit-content;
    min-height: 0;
    max-height: calc(100svh - 20px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .module-modal__inner {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .module-modal__scene {
    max-height: calc(100svh - 16px);
  }
}

/* =========================================================
   Module modal — intrinsic mobile/compact sizing
   Do not let the fixed overlay force the scene to viewport height.
   The overlay becomes the scroll container only when the content
   is taller than the available screen.
   ========================================================= */
.module-modal {
  overflow-x: hidden;
  overflow-y: auto;
  place-items: center;
  align-content: center;
}

.module-modal__scene {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: min(1120px, calc(100vw - 40px));
  overflow: visible;
  align-self: center;
  flex: 0 0 auto;
}

.module-modal__inner {
  min-height: 0 !important;
  height: auto;
}

@media (max-width: 900px) {
  .module-modal {
    padding: 10px;
    align-content: center;
    justify-items: center;
  }

  .module-modal__scene {
    width: min(620px, calc(100vw - 20px));
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible;
    margin: auto 0;
  }

  .module-modal__inner {
    min-height: 0 !important;
    height: auto;
  }
}

@media (max-width: 560px) {
  .module-modal {
    padding: 8px;
  }

  .module-modal__scene {
    width: calc(100vw - 16px);
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

/* Mobile modal centering fix — preserve content-sized scene */
@media (max-width: 900px) {
  .module-modal {
    place-items: center;
    align-content: center;
    justify-content: center;
  }

  .module-modal__scene {
    align-self: center;
    margin: auto;
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 560px) {
  .module-modal__scene {
    max-width: calc(100vw - 16px);
  }
}

/* =========================================================
   YouTube module video — final sizing override
   The iframe must completely fill the existing video panel.
   ========================================================= */
.module-modal__media {
  min-width: 0 !important;
  min-height: 0 !important;
}

.module-modal__video {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
}

.module-modal__video > iframe#moduleLogoVideo {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  aspect-ratio: auto !important;
}

@media (max-width: 900px) {
  .module-modal__video {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
  }

  .module-modal__video > iframe#moduleLogoVideo {
    width: 100% !important;
    height: 100% !important;
  }
}
