/* =========================================================
   UniSST V217 — SISTEMA DE STREAMING CONSOLIDADO
   Camada AUTORITATIVA de superfície. Mantém a geometria V215:
   4 cards desktop, 16:9 horizontal, 2:3 vertical.
   ========================================================= */
:root{
  --stream-bg:#050505;--stream-surface:#141414;--stream-surface-2:#202020;
  --stream-border:rgba(255,255,255,.13);--stream-text:#fff;--stream-muted:#a9a9a9;
  --stream-gold:#d4af37;--stream-gutter:clamp(24px,3.2vw,50px);
  --stream-section-gap:clamp(28px,3.2vw,48px);--stream-header-h:64px;
  --stream-radius:10px;--stream-fast:150ms ease;--stream-normal:220ms ease;
}
html{scroll-padding-top:calc(var(--stream-header-h) + 12px)}
body{background:var(--stream-bg);color:var(--stream-text)}

/* Cabeçalho único: mesma altura, alinhamento e densidade público/autenticado. */
html body.streaming-system-v217 :is(.prime-header,.public-header,.uv198-header){min-height:var(--stream-header-h)!important;height:var(--stream-header-h)!important;background:rgba(10,10,10,.98)!important;border:0!important;box-shadow:none!important}
html body.streaming-system-v217 :is(.prime-header .header-inner,.public-header .public-header-inner,.uv198-header .uv198-header-inner){min-height:var(--stream-header-h)!important;height:var(--stream-header-h)!important;padding-left:var(--stream-gutter)!important;padding-right:var(--stream-gutter)!important;gap:22px!important;align-items:center!important}
html body :is(.prime-nav,.public-nav,.uv198-primary-nav){height:100%!important;align-items:center!important;gap:22px!important}
html body :is(.prime-nav,.public-nav,.uv198-primary-nav)>a{min-height:40px!important;padding:0!important;border-radius:0!important;display:inline-flex!important;align-items:center!important;background:transparent!important;box-shadow:none!important;white-space:nowrap!important}
html body :is(.prime-nav,.public-nav,.uv198-primary-nav)>a.active{background:transparent!important;color:#fff!important}
html body :is(.prime-nav,.public-nav,.uv198-primary-nav)>a.active::after{content:"";position:absolute;left:0;right:0;bottom:8px;height:2px;border-radius:2px;background:#fff;opacity:.9}
html body :is(.prime-nav,.public-nav,.uv198-primary-nav)>a{position:relative}

/* Hero: fluxo normal, sem sobreposição e mesma coluna de conteúdo. */
html body :is(.uv198-hero,.clean-home-hero,.v214-courses-hero,.sub215-detail-hero,.course-detail-hero){position:relative!important;clear:both!important;margin:0!important;transform:none!important;overflow:hidden!important}
html body .uv198-hero{min-height:clamp(520px,62vw,680px)!important;height:auto!important}
html body :is(.clean-home-hero,.v214-courses-hero){min-height:clamp(440px,52vw,620px)!important;height:auto!important}
html body .sub215-detail-hero{min-height:clamp(520px,56vw,700px)!important;height:auto!important}
html body :is(.uv198-hero,.clean-home-hero,.v214-courses-hero,.sub215-detail-hero)+*{position:relative!important;clear:both!important}

/* Vitrines/carrrosséis únicos. Não modifica proporções autorizadas. */
.v217-streaming-rails{display:block;width:100%;padding-block:18px var(--stream-section-gap)}
.v217-streaming-rail{position:relative;margin:0 0 var(--stream-section-gap);padding-left:0!important;padding-right:0!important}
.v217-streaming-rail .section-head{min-height:38px;margin-bottom:12px;display:flex;align-items:end;justify-content:space-between;gap:16px}
.v217-streaming-rail .section-head h2{margin:0;font-size:clamp(20px,1.65vw,27px);line-height:1.1;color:#fff}
.v217-streaming-rail .section-head a{color:#e5e5e5;text-decoration:none;font-weight:750}
.v217-streaming-rail .course-rail{scrollbar-width:none}
.v217-streaming-rail .course-rail::-webkit-scrollbar{display:none}
.v217-card-image{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;border-radius:inherit!important}
.v217-streaming-rail .card-img{position:relative!important;overflow:hidden!important;background:#111!important}
.v217-streaming-rail .popular-chip{z-index:6}
.v217-streaming-rail .reference-card-title{z-index:7}
.v217-progress{position:absolute;z-index:8;left:8px;right:8px;bottom:7px;height:3px;border-radius:4px;background:rgba(255,255,255,.24);overflow:hidden}
.v217-progress>i{display:block;height:100%;width:var(--v217-progress,0%);background:var(--stream-gold)}

/* Setas Prime-like: grande zona lateral, apenas hover/focus, estado início/fim. */
html body .rail-shell>.rail-arrow{width:54px!important;border:0!important;color:#fff!important;transition:opacity var(--stream-fast),visibility var(--stream-fast),background var(--stream-fast)!important}
html body .rail-shell>.rail-arrow.left{background:linear-gradient(90deg,rgba(5,5,5,.98),rgba(5,5,5,.74) 48%,rgba(5,5,5,.08) 88%,transparent)!important}
html body .rail-shell>.rail-arrow.right{background:linear-gradient(270deg,rgba(5,5,5,.98),rgba(5,5,5,.74) 48%,rgba(5,5,5,.08) 88%,transparent)!important}
html body .rail-shell>.rail-arrow svg{width:36px!important;height:36px!important;transition:transform var(--stream-fast)!important}
html body .rail-shell>.rail-arrow:hover svg{transform:scale(1.13)!important}
html body .rail-shell>.rail-arrow.is-disabled{display:none!important}

/* V217: centralização calculada pela altura NORMAL do card; a expansão de hover não participa do cálculo. */
@media (min-width:900px){
  /* Os trilhos compartilhados V217 herdam EXATAMENTE a baseline V215: 4-up, 16:9 / 2:3. */
  html body.streaming-system-v217 .v217-landscape-section .v217-course-rail{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:var(--pv-card-w)!important;column-gap:var(--pv-rail-gap)!important}
  html body.streaming-system-v217 .v217-poster-section .v217-course-rail{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:var(--pv-poster-w)!important;column-gap:var(--pv-rail-gap)!important}
  html body.streaming-system-v217 .v217-landscape-section .v217-course-rail>.v217-streaming-card{flex:0 0 var(--pv-card-w)!important;width:var(--pv-card-w)!important;min-width:var(--pv-card-w)!important;max-width:var(--pv-card-w)!important;height:var(--pv-card-h)!important;min-height:var(--pv-card-h)!important;max-height:var(--pv-card-h)!important}
  html body.streaming-system-v217 .v217-poster-section .v217-course-rail>.v217-streaming-card{flex:0 0 var(--pv-poster-w)!important;width:var(--pv-poster-w)!important;min-width:var(--pv-poster-w)!important;max-width:var(--pv-poster-w)!important;height:var(--pv-poster-h)!important;min-height:var(--pv-poster-h)!important;max-height:var(--pv-poster-h)!important}
  html body.streaming-system-v217 .v217-landscape-section .v217-rail-shell{--v217-arrow-h:var(--pv-card-h)}
  html body.streaming-system-v217 .v217-poster-section .v217-rail-shell{--v217-arrow-h:var(--pv-poster-h)}
  html body.streaming-system-v217 .v217-rail-shell>.rail-arrow{top:calc(5px + var(--v217-arrow-h)/2)!important;bottom:auto!important;height:var(--v217-arrow-h)!important;transform:translateY(-50%)!important}
}

/* Filtro consolidado e filtros ativos. */
.v216-filter-wrap{padding-left:var(--stream-gutter)!important;padding-right:var(--stream-gutter)!important;background:var(--stream-bg)!important}
html body .v216-course-filter .catalog-search{background:#151515!important;border-color:rgba(255,255,255,.2)!important}
html body .v216-course-filter .catalog-search input{color:#fff!important}
html body .v216-course-filter .catalog-search input::placeholder{color:#aaa!important}
.v217-filter-active{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 0}
.v217-filter-active span{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:#242424;color:#eee;font-size:12px;font-weight:750}
.v217-filter-mobile-toggle{display:none}

/* Cursos: hero + filtro + carrosséis + paginação, sem blocos de documentação. */
.v214-courses-home .uv198-hero-note{display:none!important}
.v214-courses-home .uv198-hero-copy{align-self:center!important}
.v214-courses-home .uv198-hero-copy>p{max-width:600px}
.v214-courses-home .home-prime-content,.v214-courses-home .pv-public-rails{padding-top:18px!important}

/* Detalhe premium do curso. */
.course-detail-hero[data-v217-course-detail]{min-height:clamp(560px,60vw,760px)!important;background:#030303!important}
.course-detail-hero[data-v217-course-detail] .course-detail-backdrop{background:linear-gradient(90deg,#050505 0%,rgba(5,5,5,.91) 31%,rgba(5,5,5,.48) 57%,rgba(5,5,5,.12) 76%,rgba(5,5,5,.02) 100%),linear-gradient(0deg,#050505 0%,transparent 36%)!important}
.course-detail-hero[data-v217-course-detail] .detail-content{max-width:min(720px,52vw)!important;padding-left:var(--stream-gutter)!important;padding-bottom:clamp(54px,6vw,86px)!important}
.course-detail-hero[data-v217-course-detail] h1{font-size:clamp(38px,4.8vw,72px)!important;line-height:.98!important;letter-spacing:-.035em!important}
.v217-course-facts{display:flex;gap:10px;flex-wrap:wrap;padding:18px var(--stream-gutter);background:#0b0b0b;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06)}
.v217-course-facts span{padding:8px 12px;border-radius:999px;background:#191919;color:#ddd;font-size:12px;font-weight:750}
.course-detail-page-v217 :is(.course-detail-body,.course-detail-content,.course-overview-section){max-width:none!important}
.course-detail-page-v217 .detail-layout{padding-left:var(--stream-gutter)!important;padding-right:var(--stream-gutter)!important}
.course-detail-page-v217 .related-courses{padding-left:var(--stream-gutter)!important;padding-right:var(--stream-gutter)!important}

/* Assinatura como página de produto. */
.sub215-detail-page .sub215-tabs{position:sticky;top:var(--stream-header-h);z-index:35;background:rgba(5,5,5,.94);backdrop-filter:blur(12px);padding-left:var(--stream-gutter);padding-right:var(--stream-gutter)}
.v217-subscription-faq{padding:0 var(--stream-gutter) var(--stream-section-gap)}
.v217-subscription-faq h2{font-size:26px;margin:0 0 14px}
.v217-subscription-faq details{border-top:1px solid var(--stream-border);padding:15px 0;color:#ddd}
.v217-subscription-faq summary{cursor:pointer;color:#fff;font-weight:800}
.v217-subscription-faq p{margin:10px 0 0;color:var(--stream-muted);max-width:900px}

/* Playlist central: resumo, compra/solicitação e reordenação. */
.v217-playlist-commerce{margin:0 var(--stream-gutter) 22px;padding:18px 20px;border:1px solid var(--stream-border);border-radius:12px;background:#111;display:flex;align-items:center;justify-content:space-between;gap:20px}
.v217-playlist-commerce strong{font-size:24px}.v217-playlist-commerce p{margin:3px 0 0;color:var(--stream-muted)}
.v217-playlist-actions{display:flex;gap:10px;flex-wrap:wrap}
.v217-playlist-actions button,.v217-playlist-actions a{min-height:42px;padding:0 16px;border-radius:8px;border:0;background:#fff;color:#111;font-weight:850;display:inline-flex;align-items:center;text-decoration:none;cursor:pointer}
.v217-playlist-actions .secondary{background:#2d2d2d;color:#fff}
.v217-course-state-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.v217-course-state-row span{font-size:11px;font-weight:800;padding:4px 7px;border-radius:5px;background:#262626;color:#eee}.v217-course-state-row .included{color:#111;background:var(--stream-gold)}
.v217-reorder-controls{display:flex;gap:5px;position:absolute;top:10px;right:10px;z-index:15}.v217-reorder-controls button{width:30px;height:30px;border-radius:50%;border:0;background:rgba(0,0,0,.72);color:#fff;cursor:pointer}
.course-playlist-card{position:relative}

/* Estados vazios premium. */
.v217-empty-state{margin:24px var(--stream-gutter);min-height:260px;padding:42px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:radial-gradient(circle at 80% 20%,rgba(212,175,55,.10),transparent 36%),#101010;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.v217-empty-state h2{font-size:30px;margin:6px 0}.v217-empty-state p{color:var(--stream-muted);max-width:620px}.v217-empty-state a{margin-top:12px}

/* Busca global overlay. */
.v217-global-search[hidden]{display:none!important}.v217-global-search{position:fixed;inset:0;z-index:10000;display:grid;place-items:start center;padding-top:max(72px,7vh)}
.v217-global-search-backdrop{position:absolute;inset:0;border:0;background:rgba(0,0,0,.82);backdrop-filter:blur(8px)}
.v217-global-search-panel{position:relative;width:min(1060px,calc(100vw - 32px));max-height:82vh;overflow:auto;background:#0d0d0d;border:1px solid rgba(255,255,255,.14);border-radius:14px;box-shadow:0 30px 80px rgba(0,0,0,.65)}
.v217-global-search-head{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:28px 1fr 38px;align-items:center;gap:12px;padding:14px 16px;background:#151515;border-bottom:1px solid rgba(255,255,255,.1)}
.v217-global-search-head>svg{width:23px;fill:none;stroke:var(--stream-gold);stroke-width:2}.v217-global-search-head label{display:block}.v217-global-search-head input{width:100%;height:44px;border:0;outline:0;background:transparent;color:#fff;font-size:18px;font-weight:650}.v217-global-search-head input::placeholder{color:#999}.v217-global-search-head>button{border:0;background:transparent;color:#fff;font-size:30px;cursor:pointer}
.v217-global-search-state{padding:18px;color:#aaa}.v217-global-search-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:0 16px 20px}.v217-search-card{position:relative;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#151515;text-decoration:none;color:#fff}.v217-search-card img{width:100%;height:100%;object-fit:cover}.v217-search-card span{position:absolute;inset:auto 0 0;padding:32px 10px 10px;background:linear-gradient(transparent,rgba(0,0,0,.94));font-size:13px;font-weight:800}.v217-search-card em{position:absolute;top:7px;right:7px;background:#fff;color:#111;padding:3px 6px;border-radius:3px;font-size:9px;font-style:normal;font-weight:900}
.v217-search-skeleton{height:150px;border-radius:8px;background:linear-gradient(100deg,#171717 25%,#222 42%,#171717 58%);background-size:200% 100%;animation:v217-shimmer 1.2s linear infinite}@keyframes v217-shimmer{to{background-position:-200% 0}}

/* Microanimações sem layout shift. */
@media (hover:hover){.course-card,.pv205-title-card,.pv-public-course-card{transition:transform var(--stream-normal),filter var(--stream-normal)!important;will-change:transform}.course-card:hover,.pv205-title-card:hover,.pv-public-course-card:hover{filter:brightness(1.04)}}

@media (max-width:900px){
  :root{--stream-gutter:18px}
  html body :is(.prime-nav,.public-nav,.uv198-primary-nav){gap:13px!important}
  .v217-global-search-results{grid-template-columns:repeat(2,minmax(0,1fr))}
  .course-detail-hero[data-v217-course-detail] .detail-content{max-width:72vw!important}
}
@media (max-width:680px){
  :root{--stream-gutter:14px;--stream-header-h:58px}
  html body.streaming-system-v217 :is(.prime-header,.public-header,.uv198-header){height:var(--stream-header-h)!important;min-height:var(--stream-header-h)!important}
  html body.streaming-system-v217 :is(.prime-header .header-inner,.public-header .public-header-inner,.uv198-header .uv198-header-inner){height:var(--stream-header-h)!important;min-height:var(--stream-header-h)!important;padding-inline:12px!important}
  .v217-filter-mobile-toggle{display:flex;width:100%;height:42px;align-items:center;justify-content:space-between;padding:0 13px;border:1px solid var(--stream-border);border-radius:8px;background:#1a1a1a;color:#fff;font-weight:800;margin-bottom:9px}
  .v216-filter-wrap[data-v217-mobile-filter]:not(.is-open) .v216-filter-segments,.v216-filter-wrap[data-v217-mobile-filter]:not(.is-open) .v216-course-filter{display:none!important}
  .v217-global-search{padding-top:12px}.v217-global-search-panel{max-height:calc(100vh - 24px)}.v217-global-search-results{grid-template-columns:1fr 1fr;gap:8px}.v217-global-search-head input{font-size:15px}
  .course-detail-hero[data-v217-course-detail]{min-height:610px!important}.course-detail-hero[data-v217-course-detail] .detail-content{max-width:100%!important;padding-left:16px!important;padding-right:16px!important}.course-detail-hero[data-v217-course-detail] h1{font-size:38px!important}
  .v217-playlist-commerce{margin-inline:14px;align-items:flex-start;flex-direction:column}.v217-empty-state{margin-inline:14px;padding:28px 20px}
  html body .rail-shell>.rail-arrow{display:none!important}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
