/* =========================================================
   UniSST V239 — ASSINATURAS + CONTRATO COMPARTILHADO DA HOME PÚBLICA
   Escopo:
   1) [data-v239-home-card-contract] centraliza exatamente a geometria/hover
      aprovada da Home pública antes do login e a reutiliza em Assinaturas.
   2) .sub239-subscription-hero adiciona carrossel multimídia atrás do conteúdo
      textual existente da página Assinaturas, valorizando a mídia à direita.
   ========================================================= */

/* ---------- Cards: um único contrato compartilhado ---------- */
html body [data-v239-home-card-contract] .reference-card-title{display:none!important}
html body [data-v239-home-card-contract] .v218-unified-card .pv211-hover-title{display:flex!important}
html body [data-v239-home-card-contract] .v217-course-rail{
  box-sizing:border-box!important;
  padding-top:16px!important;
  padding-bottom:22px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:none!important;
}
html body [data-v239-home-card-contract] .v217-course-rail::-webkit-scrollbar{display:none!important}
html body [data-v239-home-card-contract] .v217-rail-shell{overflow:visible!important}
html body [data-v239-home-card-contract] .v217-streaming-card{transform-origin:center center!important}

@media (min-width:900px){
  html body [data-v239-home-card-contract] .v217-landscape-section{
    --v239-card-w:var(--pv-card-w);
    --v239-card-h:var(--pv-card-h);
    min-height:calc(var(--v239-card-h) + 112px)!important;
  }
  html body [data-v239-home-card-contract] .v217-poster-section{
    --v239-poster-w:calc(var(--pv-poster-w) * .80);
    --v239-poster-h:calc(var(--pv-poster-h) * .80);
    min-height:calc(var(--v239-poster-h) + 92px)!important;
  }

  html body [data-v239-home-card-contract] .v217-landscape-section .v217-course-rail{
    grid-auto-columns:var(--v239-card-w)!important;
    padding-top:max(24px,calc(var(--v239-card-h) * .12))!important;
    padding-bottom:max(28px,calc(var(--v239-card-h) * .14))!important;
  }
  html body [data-v239-home-card-contract] .v217-poster-section .v217-course-rail{
    grid-auto-columns:var(--v239-poster-w)!important;
  }

  html body [data-v239-home-card-contract] .v217-landscape-section .v217-course-rail >
  a.v220-reference-card.v220-landscape-card:not(.v220-grid-card){
    flex:0 0 var(--v239-card-w)!important;
    flex-basis:var(--v239-card-w)!important;
    width:var(--v239-card-w)!important;
    min-width:var(--v239-card-w)!important;
    max-width:var(--v239-card-w)!important;
    height:var(--v239-card-h)!important;
    min-height:var(--v239-card-h)!important;
    max-height:var(--v239-card-h)!important;
    aspect-ratio:16/9!important;
    transform-origin:center center!important;
  }
  html body [data-v239-home-card-contract] .v217-landscape-section .v217-course-rail >
  a.v220-reference-card.v220-landscape-card:not(.v220-grid-card):first-child{transform-origin:left center!important}
  html body [data-v239-home-card-contract] .v217-landscape-section .v217-course-rail >
  a.v220-reference-card.v220-landscape-card:not(.v220-grid-card):last-child{transform-origin:right center!important}

  html body.streaming-system-v220 [data-v239-home-card-contract]
  .v217-landscape-section a.v220-reference-card.v220-landscape-card:not(.v220-grid-card):is(:hover,:focus-visible,.preview-pending,.preview-active){
    transform:translate3d(0,0,0) scale(1.20)!important;
    z-index:80!important;
    filter:brightness(1.04)!important;
    box-shadow:0 24px 58px rgba(0,0,0,.58)!important;
  }
  html body.streaming-system-v220 [data-v239-home-card-contract]
  .v217-landscape-section a.v220-reference-card.v220-landscape-card:not(.v220-grid-card):is(:hover,:focus-visible,.preview-pending,.preview-active)
  :is(.card-img,.featured-preview-art,.ranked-course-art,.course-playlist-art,.pv205-card-media,.pv203-title-card-media,.v220-reference-art){
    transform:translateZ(0) scale(1)!important;
  }

  html body [data-v239-home-card-contract] .v217-poster-section .v217-course-rail >
  a.v220-reference-card.v220-poster-card:not(.v220-grid-card){
    flex:0 0 var(--v239-poster-w)!important;
    flex-basis:var(--v239-poster-w)!important;
    width:var(--v239-poster-w)!important;
    min-width:var(--v239-poster-w)!important;
    max-width:var(--v239-poster-w)!important;
    height:var(--v239-poster-h)!important;
    min-height:var(--v239-poster-h)!important;
    max-height:var(--v239-poster-h)!important;
    aspect-ratio:2/3!important;
  }

  html body [data-v239-home-card-contract] .v217-landscape-section .v217-rail-shell > .rail-arrow{
    top:max(24px,calc(var(--v239-card-h) * .12))!important;
    bottom:auto!important;
    height:var(--v239-card-h)!important;
    min-height:var(--v239-card-h)!important;
    max-height:var(--v239-card-h)!important;
    transform:none!important;
  }
  html body [data-v239-home-card-contract] .v217-poster-section .v217-rail-shell > .rail-arrow{
    top:16px!important;
    bottom:auto!important;
    height:var(--v239-poster-h)!important;
    min-height:var(--v239-poster-h)!important;
    max-height:var(--v239-poster-h)!important;
    transform:none!important;
  }
}

@media (max-width:899px), (hover:none), (pointer:coarse){
  html body [data-v239-home-card-contract] .v218-unified-card .pv211-hover-title{display:none!important}
}

/* ---------- Assinaturas: carrossel principal atrás do texto ---------- */
html body.prime-experience-v205 .sub224-subscription .sub239-subscription-hero{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  background:#050505!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-fallback{
  z-index:0!important;
  background-size:cover!important;
  background-position:72% center!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-carousel{
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
  pointer-events:auto!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-track{
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transition:opacity .58s ease,visibility .58s ease!important;
  background:#050505!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide.active{
  z-index:2!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide :is(.sub239-hero-image,.sub239-hero-video){
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:74% center!important;
  margin:0!important;
  border:0!important;
  filter:saturate(.98) contrast(1.03) brightness(.92)!important;
  pointer-events:none!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide .sub239-hero-frame{
  pointer-events:none!important;
  transform:translate(-44%,-50%)!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-shade{
  z-index:3!important;
  pointer-events:none!important;
  background:
    linear-gradient(90deg,#050505 0%,rgba(5,5,5,.99) 28%,rgba(5,5,5,.88) 43%,rgba(5,5,5,.48) 60%,rgba(5,5,5,.14) 78%,rgba(5,5,5,.03) 100%),
    linear-gradient(0deg,#050505 0%,rgba(5,5,5,.48) 13%,rgba(5,5,5,.08) 39%,rgba(5,5,5,.02) 100%)!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-subscription-hero .sub215-detail-hero-layout{
  z-index:4!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-controls{
  position:absolute!important;
  z-index:7!important;
  right:clamp(24px,4vw,64px)!important;
  bottom:30px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-arrow{
  width:42px!important;
  height:42px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:999px!important;
  background:rgba(10,10,10,.64)!important;
  color:#fff!important;
  cursor:pointer!important;
  backdrop-filter:blur(8px)!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-arrow:hover{background:rgba(28,28,28,.88)!important}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-arrow svg{width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.1!important}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-dots{display:flex!important;align-items:center!important;gap:7px!important}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-dots button{
  width:7px!important;height:7px!important;padding:0!important;border:0!important;border-radius:99px!important;
  background:rgba(255,255,255,.42)!important;cursor:pointer!important;transition:width .18s ease,background .18s ease!important;
}
html body.prime-experience-v205 .sub224-subscription .sub239-hero-dots button.active{width:22px!important;background:#fff!important}

@media (max-width:899px){
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide :is(.sub239-hero-image,.sub239-hero-video){object-position:68% center!important}
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide .sub239-hero-frame{transform:translate(-46%,-50%)!important}
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-shade{
    background:
      linear-gradient(90deg,rgba(5,5,5,.97) 0%,rgba(5,5,5,.82) 38%,rgba(5,5,5,.35) 72%,rgba(5,5,5,.12) 100%),
      linear-gradient(0deg,#050505 0%,rgba(5,5,5,.62) 22%,rgba(5,5,5,.10) 58%,rgba(5,5,5,.04) 100%)!important;
  }
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-controls{right:18px!important;bottom:18px!important}
}
@media (max-width:640px){
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-arrow{display:none!important}
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-controls{left:50%!important;right:auto!important;transform:translateX(-50%)!important;bottom:14px!important}
}
@media (prefers-reduced-motion:reduce){
  html body.prime-experience-v205 .sub224-subscription .sub239-hero-slide{transition:none!important}
}
