/* =========================================================
   UniSST V242 — CARDS PÚBLICOS = TAMANHO CORRETO PÓS-LOGIN
   Autorização explícita do proprietário em 08/09/2026.

   FOCO EXCLUSIVO: geometria dos cards acadêmicos ANTES do login.
   - pós-login permanece sem alteração por esta camada;
   - público reutiliza a baseline responsiva histórica aprovada da Home/Cursos
     autenticados (V085/V115): 276x155,25 / 276x414 em desktop amplo;
   - horizontal 16:9; vertical 2:3;
   - hover horizontal preservado em +2,5%;
   - super-preview vertical cresce só na largura e mantém a altura do pôster;
   - em telas maiores aparecem MAIS cards, em vez de aumentar cada card;
   - tablet/mobile continuam responsivos e sem hover artificial.
   ========================================================= */

:root{
  --v242-preview-ratio:1.7777778;
  --v242-glance-ratio:1.5579710145; /* 430 / 276 */
}

/* -------------------------------------------------------------------------
   1) FONTE PÚBLICA ÚNICA DE TAMANHO
   Espelha os breakpoints/tamanhos da referência autenticada V085/V115.
   ------------------------------------------------------------------------- */
html body.prime-public-v086.public-guest{
  --v242-card-w:276px;
  --v242-card-h:155.25px;
  --v242-poster-w:276px;
  --v242-poster-h:414px;
  --v242-gap:24px;
  --v242-super-w:736px;
  --v242-glance-w:430px;
}

@media (min-width:1760px){
  html body.prime-public-v086.public-guest{
    --v242-card-w:276px;
    --v242-card-h:155.25px;
    --v242-poster-w:276px;
    --v242-poster-h:414px;
    --v242-gap:24px;
    --v242-super-w:736px;
    --v242-glance-w:430px;
  }
}

@media (min-width:1400px) and (max-width:1759px){
  html body.prime-public-v086.public-guest{
    --v242-card-w:clamp(250px,17vw,276px);
    --v242-card-h:calc(var(--v242-card-w) * .5625);
    --v242-poster-w:var(--v242-card-w);
    --v242-poster-h:calc(var(--v242-poster-w) * 1.5);
    --v242-gap:20px;
    --v242-super-w:calc(var(--v242-poster-h) * var(--v242-preview-ratio));
    --v242-glance-w:calc(var(--v242-card-w) * var(--v242-glance-ratio));
  }
}

@media (min-width:1100px) and (max-width:1399px){
  html body.prime-public-v086.public-guest{
    --v242-card-w:clamp(246px,22vw,264px);
    --v242-card-h:calc(var(--v242-card-w) * .5625);
    --v242-poster-w:var(--v242-card-w);
    --v242-poster-h:calc(var(--v242-poster-w) * 1.5);
    --v242-gap:16px;
    --v242-super-w:calc(var(--v242-poster-h) * var(--v242-preview-ratio));
    --v242-glance-w:calc(var(--v242-card-w) * var(--v242-glance-ratio));
  }
}

@media (min-width:681px) and (max-width:1099px){
  html body.prime-public-v086.public-guest{
    --v242-card-w:clamp(220px,29vw,252px);
    --v242-card-h:calc(var(--v242-card-w) * .5625);
    --v242-poster-w:var(--v242-card-w);
    --v242-poster-h:calc(var(--v242-poster-w) * 1.5);
    --v242-gap:14px;
    --v242-super-w:calc(var(--v242-poster-h) * var(--v242-preview-ratio));
    --v242-glance-w:calc(var(--v242-card-w) * var(--v242-glance-ratio));
  }
}

@media (max-width:680px){
  html body.prime-public-v086.public-guest{
    --v242-card-w:76vw;
    --v242-card-h:42.75vw;
    --v242-poster-w:42vw;
    --v242-poster-h:63vw;
    --v242-gap:10px;
    --v242-super-w:var(--v242-poster-w);
    --v242-glance-w:min(430px,calc(100vw - 28px));
  }
}

/* -------------------------------------------------------------------------
   2) NEUTRALIZA TODAS AS CAMADAS QUE PODERIAM REAUMENTAR O PÚBLICO
   V215/V220/V237/V238/V239/V240/V241 continuam no histórico, mas no guest
   todos os aliases de geometria apontam para a mesma referência V242.
   ------------------------------------------------------------------------- */
html body.prime-public-v086.public-guest{
  --pv-rail-gap:var(--v242-gap)!important;
  --pv-card-w:var(--v242-card-w)!important;
  --pv-card-h:var(--v242-card-h)!important;
  --pv-poster-w:var(--v242-poster-w)!important;
  --pv-poster-h:var(--v242-poster-h)!important;
  --pv-super-focus-w:var(--v242-super-w)!important;

  --u112-card-w:var(--v242-card-w)!important;
  --u112-card-h:var(--v242-card-h)!important;
  --u112-poster-w:var(--v242-poster-w)!important;
  --u112-poster-h:var(--v242-poster-h)!important;

  --v215-pv205-card-w:var(--v242-card-w)!important;
  --v220-gap:var(--v242-gap)!important;

  --uv237-card-w:var(--v242-card-w)!important;
  --uv237-card-h:var(--v242-card-h)!important;
  --uv237-poster-w:var(--v242-poster-w)!important;
  --uv237-poster-h:var(--v242-poster-h)!important;
  --uv238-card-w:var(--v242-card-w)!important;
  --uv238-card-h:var(--v242-card-h)!important;

  --v239-card-w:var(--v242-card-w)!important;
  --v239-card-h:var(--v242-card-h)!important;
  --v239-poster-w:var(--v242-poster-w)!important;
  --v239-poster-h:var(--v242-poster-h)!important;

  --v240-focus-w:var(--v242-super-w)!important;
  --v240-focus-h:var(--v242-poster-h)!important;

  /* V241 é a camada que estava ampliando o guest para 4-up. */
  --v241-card-w:var(--v242-card-w)!important;
  --v241-card-h:var(--v242-card-h)!important;
  --v241-poster-w:var(--v242-poster-w)!important;
  --v241-poster-h:var(--v242-poster-h)!important;
  --v241-super-w:var(--v242-super-w)!important;
  --v241-gap:var(--v242-gap)!important;
}

html body.prime-public-v086.public-guest :is(.pv-public-showcase,[data-v239-home-card-contract],.v217-streaming-rails,.prime-experience-v205){
  --pv-card-w:var(--v242-card-w)!important;
  --pv-card-h:var(--v242-card-h)!important;
  --pv-poster-w:var(--v242-poster-w)!important;
  --pv-poster-h:var(--v242-poster-h)!important;
  --pv-super-focus-w:var(--v242-super-w)!important;
  --u112-card-w:var(--v242-card-w)!important;
  --u112-card-h:var(--v242-card-h)!important;
  --u112-poster-w:var(--v242-poster-w)!important;
  --u112-poster-h:var(--v242-poster-h)!important;
  --v215-pv205-card-w:var(--v242-card-w)!important;
  --v241-card-w:var(--v242-card-w)!important;
  --v241-card-h:var(--v242-card-h)!important;
  --v241-poster-w:var(--v242-poster-w)!important;
  --v241-poster-h:var(--v242-poster-h)!important;
  --v241-super-w:var(--v242-super-w)!important;
}

/* -------------------------------------------------------------------------
   3) TODOS OS TRILHOS PÚBLICOS ACADÊMICOS — MESMO BOX
   ------------------------------------------------------------------------- */
html body.prime-public-v086.public-guest.streaming-system-v220 :is(
  .course-rail,.public-course-rail,.v217-course-rail,.pv-public-course-rail,
  .pv205-card-rail,.pv203-card-rail,.learning-course-rail,.related-courses
){
  gap:var(--v242-gap)!important;
  column-gap:var(--v242-gap)!important;
  align-items:flex-start!important;
}

html body.prime-public-v086.public-guest.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-landscape-card:not(.v220-grid-card),
html body.prime-public-v086.public-guest .pv-public-landscape-rail .pv-public-course-card,
html body.prime-public-v086.public-guest.prime-experience-v205 :is(.pv205-card-rail,.pv203-card-rail)>a[data-course-preview="1"]{
  flex:0 0 var(--v242-card-w)!important;
  flex-basis:var(--v242-card-w)!important;
  width:var(--v242-card-w)!important;
  min-width:var(--v242-card-w)!important;
  max-width:var(--v242-card-w)!important;
  height:var(--v242-card-h)!important;
  min-height:var(--v242-card-h)!important;
  max-height:var(--v242-card-h)!important;
  aspect-ratio:16/9!important;
  box-sizing:border-box!important;
}

html body.prime-public-v086.public-guest.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-poster-card:not(.v220-grid-card),
html body.prime-public-v086.public-guest .pv-public-poster-rail .pv-public-course-card{
  flex:0 0 var(--v242-poster-w)!important;
  flex-basis:var(--v242-poster-w)!important;
  width:var(--v242-poster-w)!important;
  min-width:var(--v242-poster-w)!important;
  max-width:var(--v242-poster-w)!important;
  height:var(--v242-poster-h)!important;
  min-height:var(--v242-poster-h)!important;
  max-height:var(--v242-poster-h)!important;
  aspect-ratio:2/3!important;
  box-sizing:border-box!important;
}

/* Explorar/grades públicas: card mantém o mesmo tamanho dos trilhos; em telas
   maiores entram mais colunas, sem esticar o artwork. */
html body.prime-public-v086.public-guest.streaming-system-v220 :is(
  .catalog-grid,.prime-catalog-grid,.catalog-20-grid,.catalog-24-grid,.library-page .catalog-grid
){
  display:grid!important;
  grid-template-columns:repeat(auto-fill,var(--v242-card-w))!important;
  gap:var(--v242-gap)!important;
  justify-content:start!important;
  align-items:start!important;
}
html body.prime-public-v086.public-guest.streaming-system-v220 a.v220-reference-card.v220-grid-card.v220-landscape-card{
  width:var(--v242-card-w)!important;
  min-width:var(--v242-card-w)!important;
  max-width:var(--v242-card-w)!important;
  height:var(--v242-card-h)!important;
  min-height:var(--v242-card-h)!important;
  max-height:var(--v242-card-h)!important;
  aspect-ratio:16/9!important;
}
html body.prime-public-v086.public-guest.streaming-system-v220 a.v220-reference-card.v220-grid-card.v220-poster-card{
  width:var(--v242-poster-w)!important;
  min-width:var(--v242-poster-w)!important;
  max-width:var(--v242-poster-w)!important;
  height:var(--v242-poster-h)!important;
  min-height:var(--v242-poster-h)!important;
  max-height:var(--v242-poster-h)!important;
  aspect-ratio:2/3!important;
}

/* Fileira e setas acompanham o novo tamanho; nenhuma área invisível conserva
   a altura grande da V241. */
html body.prime-public-v086.public-guest.streaming-system-v220 .v217-landscape-section{
  min-height:calc(var(--v242-card-h) + 62px)!important;
}
html body.prime-public-v086.public-guest.streaming-system-v220 .v217-poster-section{
  min-height:calc(var(--v242-poster-h) + 62px)!important;
}
html body.prime-public-v086.public-guest.streaming-system-v220 .rail-shell>.rail-arrow{
  height:var(--v242-card-h)!important;
  min-height:var(--v242-card-h)!important;
  max-height:var(--v242-card-h)!important;
}
html body.prime-public-v086.public-guest.streaming-system-v220 :is(
  .v217-poster-section .rail-shell>.rail-arrow,
  .rail-shell:has([data-v220-rail-orientation="poster"])>.rail-arrow,
  .rail-shell:has(.reference-poster-rail)>.rail-arrow
){
  height:var(--v242-poster-h)!important;
  min-height:var(--v242-poster-h)!important;
  max-height:var(--v242-poster-h)!important;
}

/* -------------------------------------------------------------------------
   4) EFEITOS — PRESERVADOS, MAS PROPORCIONAIS AO CARD MENOR
   ------------------------------------------------------------------------- */
@media (min-width:681px) and (hover:hover) and (pointer:fine){
  html body.prime-public-v086.public-guest.streaming-system-v220
  a[data-course-preview="1"].v220-reference-card.v220-landscape-card:is(:hover,:focus-visible,.preview-pending,.preview-active){
    transform:scale(1.025)!important;
    z-index:70!important;
    filter:brightness(1.04)!important;
    box-shadow:0 12px 26px rgba(0,0,0,.48)!important;
  }

  /* Vertical: mesma altura do pôster reduzido; só a largura vira preview 16:9. */
  html body.prime-public-v086.public-guest.streaming-system-v220.public-home-v198
  a[data-course-preview="1"].v220-reference-card.v220-poster-card.prime-poster-card.pv-super-focus-active,
  html body.prime-public-v086.public-guest.streaming-system-v220 [data-v239-home-card-contract]
  a[data-course-preview="1"].v220-reference-card.v220-poster-card.prime-poster-card.pv-super-focus-active,
  html body.prime-public-v086.public-guest.streaming-system-v220
  a[data-course-preview="1"].v220-reference-card.v220-poster-card.prime-poster-card.pv-super-focus-active{
    flex:0 0 var(--v242-super-w)!important;
    flex-basis:var(--v242-super-w)!important;
    width:var(--v242-super-w)!important;
    min-width:var(--v242-super-w)!important;
    max-width:var(--v242-super-w)!important;
    height:var(--v242-poster-h)!important;
    min-height:var(--v242-poster-h)!important;
    max-height:var(--v242-poster-h)!important;
    aspect-ratio:16/9!important;
    transform:none!important;
    transform-origin:left center!important;
    z-index:75!important;
  }

  /* Glance acompanha a redução do tile nos breakpoints intermediários. */
  html body.prime-public-v086.public-guest .course-hover-preview.pv-glance{
    width:min(var(--v242-glance-w),calc(100vw - 28px))!important;
    max-width:var(--v242-glance-w)!important;
  }
}

/* Touch: preserva o comportamento já aprovado; sem expansão artificial. */
@media (max-width:680px), (hover:none), (pointer:coarse){
  html body.prime-public-v086.public-guest.streaming-system-v220
  a[data-course-preview="1"].v220-reference-card{
    transform:none!important;
    box-shadow:none!important;
  }
  html body.prime-public-v086.public-guest.streaming-system-v220
  a[data-course-preview="1"].v220-poster-card.prime-poster-card.pv-super-focus-active{
    flex:0 0 var(--v242-poster-w)!important;
    width:var(--v242-poster-w)!important;
    min-width:var(--v242-poster-w)!important;
    max-width:var(--v242-poster-w)!important;
    height:var(--v242-poster-h)!important;
    min-height:var(--v242-poster-h)!important;
    max-height:var(--v242-poster-h)!important;
    aspect-ratio:2/3!important;
  }
  html body.prime-public-v086.public-guest .course-hover-preview,
  html body.prime-public-v086.public-guest .pv-super-focus-pane{display:none!important}
  html body.prime-public-v086.public-guest.streaming-system-v220 .rail-shell>.rail-arrow{display:none!important}
}
