/* FUNDAFLIX — tokens (fonte única de verdade) */
:root {
  color-scheme: dark;
  --brand: #e50914;
  --brand-hover: #c40812;
  --brand-active: #a80710;
  --bg: #0b0b0f;
  --surface: #17171d;
  --surface-raised: #22222b;
  --border: #34343e;
  --control-border: #72727e;
  --text: #f5f5f7;
  --text-secondary: #b6b6c2;
  --focus: #fff;
  --success: #72d5a0;
  --error: #ff8b94;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --container: 1280px;
  --gutter: 48px;
  --header-h: 80px;
  --section-gap: 64px;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --t: 180ms ease;
}

@media (max-width: 1023px) { :root { --gutter: 24px; } }
@media (max-width: 767px) {
  :root { --gutter: 16px; --header-h: 64px; --section-gap: 40px; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 767px) { body { font-size: 16px; } }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--surface-raised); color: var(--text);
  padding: 12px 16px; border-radius: var(--radius-control);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 20px; height: 20px; flex: none; }

/* ---------- Aviso de revisão ---------- */
.review-bar {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px; line-height: 1.4;
  padding: 8px 0;
}
.review-bar strong { color: var(--text); font-weight: 600; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; text-decoration: none; padding: 4px 0; }
.logo img { width: 170px; height: auto; }
/* Espaço reservado enquanto o PNG original não estiver em assets/ */
.logo-placeholder {
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  width: 170px; height: 44px;
  border: 1px dashed var(--control-border);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-align: center; line-height: 1.2;
}
.logo.is-missing img { display: none; }
.logo.is-missing .logo-placeholder { display: inline-flex; }
@media (max-width: 767px) {
  .site-header .logo img, .site-header .logo-placeholder { width: 140px; }
}
.site-footer .logo img, .site-footer .logo-placeholder { width: 140px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 12px;
  font-size: 15px; font-weight: 600; line-height: 1.4;
  text-decoration: none; color: var(--text-secondary);
  border-radius: var(--radius-control);
  transition: color var(--t);
}
.main-nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.main-nav a[aria-current="page"] { color: var(--text); }

.header-search { margin-left: auto; width: min(320px, 30vw); }
.menu-toggle { display: none; }

@media (max-width: 1023px) { .header-search { display: none; } }
@media (max-width: 767px) {
  .header-inner { justify-content: space-between; }
  .main-nav { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px;
    background: transparent; border: 0; border-radius: var(--radius-control);
    cursor: pointer;
  }
  .menu-toggle:hover { background: var(--surface-raised); }
}

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.mobile-menu a:hover { text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--radius-control);
  font-size: 16px; font-weight: 600; line-height: 1.4;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { background: var(--brand-active); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--control-border); }
.btn-secondary:hover { background: var(--surface-raised); }
.btn:disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed;
  background: var(--surface-raised); color: var(--text-secondary); border-color: var(--border);
}
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: underline; text-underline-offset: 4px;
}
.btn-link:hover { text-decoration-thickness: 2px; }

/* ---------- Busca ---------- */
.search { position: relative; }
.search-field {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 1px 0 14px;
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  transition: border-color var(--t);
}
.search-field:focus-within { border-color: var(--text); }
.search-field .icon-sm { color: var(--text-secondary); }
.search-field input {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: 0; outline: none;
  font-size: 16px;
}
.search-field input::placeholder { color: var(--text-secondary); opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.search-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  background: transparent; border: 0; border-radius: 6px; cursor: pointer;
  color: var(--text-secondary);
}
.search-clear:hover { background: var(--surface-raised); color: var(--text); }
.search-clear[hidden] { display: none; }
.search-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 520px;
  display: flex; align-items: center;
  overflow: hidden;
  background-color: var(--surface);
  /* Quadro do vídeo como imagem de reserva enquanto o vídeo carrega ou se não tocar. */
  background-image:
    url('../assets/hero-4pos-poster.webp'),
    radial-gradient(ellipse 70% 90% at 78% 40%, #2b2b34 0%, #17171d 55%, #0b0b0f 100%);
  background-size: cover;
  background-position: center;
}
.hero-video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.hero-toggle {
  position: absolute; right: var(--gutter); bottom: 24px; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: rgba(11,11,15,.72); color: var(--text);
  border: 1px solid var(--control-border); border-radius: 999px; cursor: pointer;
  transition: background-color var(--t);
}
.hero-toggle:hover { background: var(--surface-raised); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11,11,15,.94) 0%, rgba(11,11,15,.78) 38%, rgba(11,11,15,.15) 75%, rgba(11,11,15,0) 100%);
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,15,0), var(--bg));
}
.hero-content { padding: 64px 0; }
.hero-text { max-width: 560px; }
.hero h1 {
  margin: 0 0 16px;
  font-size: 56px; font-weight: 700; line-height: 1.08; letter-spacing: -0.015em;
}
.hero p { margin: 0 0 32px; color: var(--text-secondary); max-width: 60ch; }
@media (max-width: 767px) {
  .hero { min-height: 380px; align-items: flex-end; }
  .hero::before {
    background: linear-gradient(180deg, rgba(11,11,15,.1) 0%, rgba(11,11,15,.7) 45%, rgba(11,11,15,.96) 100%);
  }
  .hero-content { padding: 120px 0 40px; }
  .hero h1 { font-size: 36px; }
  .hero-toggle { bottom: 16px; }
}

/* ---------- Seções ---------- */
.section { padding-top: var(--section-gap); }
.section-title {
  margin: 0; font-size: 28px; font-weight: 700; line-height: 1.2;
}
.section-title:focus { outline: none; }
.section-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
@media (max-width: 767px) { .section-title { font-size: 24px; } }

/* ---------- Catálogo ---------- */
.catalog-head { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.toolbar {
  display: grid; gap: 16px 24px;
  grid-template-columns: minmax(260px, 400px) 1fr;
  align-items: end;
}
@media (max-width: 1023px) { .toolbar { grid-template-columns: 1fr; } }

.filters { min-width: 0; }
.filters-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 12px;
}
@media (max-width: 767px) {
  /* Rolagem horizontal só neste grupo — a página não transborda. */
  .filters-list {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter);
    scrollbar-width: none;
  }
  .filters-list::-webkit-scrollbar { display: none; }
  .filters-list li { flex: none; }
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 20px;
  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: background-color var(--t), border-color var(--t);
}
.chip:hover { background: var(--surface-raised); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed="true"]:hover { background: var(--brand-hover); }
/* Indicador além da cor: marca de seleção */
.chip .check { display: none; }
.chip[aria-pressed="true"] .check { display: block; }

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  min-height: 44px;
  font-size: 14px; color: var(--text-secondary);
}
.results-bar p { margin: 0; }

.lesson-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1023px) { .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .lesson-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Card de aula ---------- */
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--control-border); }
.card:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-raised); overflow: hidden; }
.duration {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(11,11,15,.88); color: var(--text);
  font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 8px; border-radius: 6px;
}
.card-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-meta { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.tag-demo {
  align-self: flex-start;
  font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .02em;
  color: var(--text-secondary);
  border: 1px dashed var(--control-border); border-radius: 4px; padding: 4px 6px;
}

/* ---------- Capa da aula na identidade de cada pós ----------
   Cores e fontes vêm das páginas oficiais de cada pós-graduação. */
.tema-padrao    { --pos-bg: #17171d; --pos-bg2: #0b0b0f; --pos-acento: #f5f5f7; --pos-rotulo: #b6b6c2;
                  --pos-fonte: var(--font-ui); --pos-fonte-rotulo: var(--font-ui); --pos-italico: normal; }
.tema-fundacoes { --pos-bg: #0e1828; --pos-bg2: #010e1b; --pos-acento: #ffdaa2; --pos-rotulo: #e0bf8c;
                  --pos-fonte: 'Fraunces', Georgia, serif; --pos-fonte-rotulo: 'JetBrains Mono', ui-monospace, monospace; }
.tema-estruturas{ --pos-bg: #6e1612; --pos-bg2: #4a0d0a; --pos-acento: #f7a368; --pos-rotulo: #f7a368;
                  --pos-fonte: 'Fraunces', Georgia, serif; --pos-fonte-rotulo: 'JetBrains Mono', ui-monospace, monospace; }
.tema-geotecnia { --pos-bg: #102a1f; --pos-bg2: #06110b; --pos-acento: #ff9d6b; --pos-rotulo: #ff9d6b;
                  --pos-fonte: 'Fraunces', Georgia, serif; --pos-fonte-rotulo: 'JetBrains Mono', ui-monospace, monospace; }
.tema-uag       { --pos-bg: #1a1a15; --pos-bg2: #0a0a08; --pos-acento: #7fb52a; --pos-rotulo: #7fb52a;
                  --pos-fonte: 'Playfair Display', Georgia, serif; --pos-fonte-rotulo: 'Barlow', var(--font-ui); }

.art {
  container-type: inline-size;
  background: linear-gradient(135deg, var(--pos-bg) 0%, var(--pos-bg2) 100%);
}
/* Foto da aula (capa do YouTube, 4:3 com faixas pretas): ampliada para esconder as faixas e
   esmaecida à esquerda, onde fica o texto. */
.art-foto {
  position: absolute; right: 0; top: 50%;
  height: 133.4%; width: auto; max-width: none;
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 66%);
          mask-image: linear-gradient(90deg, transparent 18%, #000 66%);
  opacity: 1; filter: saturate(1.15) contrast(1.05);
  transition: opacity 200ms ease, transform 200ms ease;
}
.art::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  /* Véu de legibilidade sobre toda a área do título (primeira linha = reserva sem color-mix). */
  background:
    linear-gradient(90deg, var(--pos-bg2) 0%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.45) 76%, transparent 96%),
    linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.35) 60%, transparent 85%);
  background:
    linear-gradient(90deg, var(--pos-bg2) 0%, color-mix(in srgb, var(--pos-bg) 82%, transparent) 50%, color-mix(in srgb, var(--pos-bg2) 55%, transparent) 76%, transparent 96%),
    linear-gradient(0deg, color-mix(in srgb, var(--pos-bg2) 80%, transparent) 0%, color-mix(in srgb, var(--pos-bg2) 40%, transparent) 60%, transparent 85%);
}
/* As capas da pós de UAG já trazem texto à esquerda: mostra só o lado da arte (silos). */
.tema-uag .art-foto {
  -webkit-mask-image: linear-gradient(90deg, transparent 50%, #000 82%);
          mask-image: linear-gradient(90deg, transparent 50%, #000 82%);
}
.card:hover .art-foto { opacity: 1; transform: translateY(-50%) scale(1.03); }
.art-conteudo {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 20px 64px 18px 20px; /* reserva sem container queries */
  padding: 6.5cqi 26cqi 6cqi 6.5cqi;
}
.art-pos {
  position: absolute; top: 18px; left: 20px; right: 20px;
  top: 6cqi; left: 6.5cqi; right: 6.5cqi;
  font-family: var(--pos-fonte-rotulo);
  font-size: 12px; font-size: max(12px, 3.3cqi); font-weight: 600; line-height: 1.25;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--pos-rotulo);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-pos::before {
  content: ''; display: inline-block; vertical-align: middle;
  width: 5cqi; height: 2px; margin-right: 2.4cqi; background: currentColor;
}
.art-aula {
  font-family: var(--pos-fonte);
  font-style: italic; font-weight: 600;
  font-size: 14px; font-size: max(14px, 5.6cqi); line-height: 1.1;
  color: var(--pos-acento);
  margin-bottom: 1.4cqi;
}
.art-titulo {
  margin: 0;
  font-family: var(--pos-fonte);
  font-weight: 700; font-size: 21px; font-size: max(17px, 7cqi); line-height: 1.06; letter-spacing: -0.005em;
  color: #fff;
  text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,.5), 0 2px 14px rgba(0,0,0,.45);
}
.tema-uag .art-titulo, .tema-uag .art-aula { font-weight: 700; }

/* ---------- Fileiras por pós (opção "Todas") ---------- */
.rows { display: flex; flex-direction: column; gap: 48px; }
.row-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.row-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.row-title small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.row-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.row-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--control-border); border-radius: 999px; cursor: pointer;
  transition: background-color var(--t), opacity var(--t);
}
.row-arrow:hover:not(:disabled) { background: var(--surface-raised); }
.row-arrow:disabled { opacity: .35; cursor: default; }
.row-track {
  list-style: none; margin: 0 -8px; padding: 8px 8px 12px;
  display: grid; grid-auto-flow: column; gap: 16px;
  grid-auto-columns: calc((100% - 16px - 3 * 16px) / 3.6);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 8px;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > li { scroll-snap-align: start; min-width: 0; }
@media (max-width: 1023px) {
  .row-track { grid-auto-columns: calc((100% - 16px - 16px) / 2.3); }
}
@media (max-width: 767px) {
  .rows { gap: 36px; }
  .row-title { font-size: 18px; }
  .row-arrow { display: none; }
  /* No celular a fileira encosta na borda da tela, como num app de streaming. */
  .row-track {
    grid-auto-columns: 78%; gap: 12px;
    margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 12px;
    scroll-padding-inline: var(--gutter);
  }
}

/* Skeleton */
.skeleton .card-media, .skeleton .sk-line {
  background: linear-gradient(90deg, var(--surface-raised) 0%, #2a2a33 50%, var(--surface-raised) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-line { height: 14px; border-radius: 4px; }
.sk-line.w-70 { width: 70%; height: 18px; }
.sk-line.w-40 { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Estados vazio / erro */
.state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 40px 24px;
  text-align: center;
}
.state h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.state p { margin: 0 0 20px; color: var(--text-secondary); font-size: 16px; }
.state.is-error h3 { color: var(--error); }

/* ---------- Rodapé (mesmo desenho da página da Black) ---------- */
.site-footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--border);
  padding: 56px 0 44px;
  color: var(--text-secondary);
}
.footer-title { margin: 0 0 18px; font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--text); }
.footer-company { margin: 0; font-size: 14px; line-height: 1.7; }
.footer-contacts { margin-top: 30px; padding-block: 36px; border-block: 1px solid var(--border); }
.footer-heading { margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--text); }
.footer-group + .footer-group { margin-top: 14px; }
.footer-name { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.wa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px 8px 12px;
  background: rgba(37, 211, 102, 0.1); border: 1px solid rgba(37, 211, 102, 0.45); border-radius: 999px;
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t), border-color var(--t);
}
.wa-btn:hover { background: rgba(37, 211, 102, 0.22); border-color: #25d366; }
.wa-btn svg { flex: none; width: 18px; height: 18px; fill: #25d366; }
.footer-bottom { margin-top: 26px; font-size: 13px; line-height: 1.8; }
.footer-bottom p { margin: 0; }
.footer-bottom p + p { margin-top: 6px; }
@media (max-width: 767px) {
  .site-footer { padding: 40px 0 32px; }
  .footer-title { font-size: 18px; }
  .wa-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-btn { justify-content: center; padding-inline: 8px; font-size: 13px; gap: 6px; }
  .wa-btn svg { width: 16px; height: 16px; }
}

/* ---------- Página da aula ---------- */
.lesson-page { padding-top: 24px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 15px; font-weight: 600; text-decoration: none; color: var(--text-secondary);
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.player {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 24px;
  color: var(--text-secondary); font-size: 16px;
  background: radial-gradient(ellipse at 50% 40%, #24242c 0%, #17171d 70%);
}
.player-empty svg { width: 40px; height: 40px; }
.player-empty strong { color: var(--text); font-size: 18px; font-weight: 600; }
.lesson-info { max-width: 760px; padding-top: 32px; }
.lesson-info h1 { margin: 0 0 12px; font-size: 40px; font-weight: 700; line-height: 1.15; }
.lesson-meta { margin: 0 0 16px; font-size: 13px; line-height: 1.4; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.lesson-info .resumo { margin: 0 0 24px; max-width: 60ch; }
@media (max-width: 767px) {
  .lesson-page { padding-top: 12px; }
  .player { border-radius: var(--radius-card); margin-inline: calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .lesson-info { padding-top: 24px; }
  .lesson-info h1 { font-size: 28px; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover .art-foto { transform: translateY(-50%); }
}

/* ---------- Compra da pós (embaixo de cada fileira) ---------- */
.row-cta { margin-top: 12px; }
.row-cta .btn { gap: 10px; }
@media (max-width: 767px) { .row-cta .btn { width: 100%; } }

/* ---------- Pré-checkout (mesmo fluxo da Black Friday Vitalícia) ---------- */
.compra {
  width: min(100% - 32px, 480px); max-height: calc(100dvh - 32px);
  padding: 0; margin: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-panel);
  overflow: auto;
}
.compra::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.compra-box { position: relative; padding: 32px; }
.compra-fechar {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 0; border-radius: var(--radius-control);
  color: var(--text-secondary); cursor: pointer;
}
.compra-fechar:hover { background: var(--surface-raised); color: var(--text); }
.compra-logo {
  display: flex; align-items: center; justify-content: center;
  height: 88px; padding: 12px 16px; margin: 0 40px 20px 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card);
}
.compra-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.compra-titulo { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; }
.compra-escolhida { margin: 8px 0 20px; font-size: 15px; color: var(--text-secondary); }
.compra-escolhida strong { color: var(--text); font-weight: 600; }
.campo { display: block; margin-bottom: 14px; }
.campo-rotulo { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.campo-input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--control-border); border-radius: var(--radius-control);
  font-size: 16px;
}
.campo-input::placeholder { color: var(--text-secondary); opacity: 1; }
.campo-input:focus { outline: none; border-color: var(--text); }
.campo-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.compra-erro {
  margin: 0 0 14px; padding: 10px 14px;
  background: rgba(255,139,148,.1); border: 1px solid var(--error); border-radius: var(--radius-control);
  color: var(--error); font-size: 14px;
}
/* Botão de pagamento em verde (como na Black), em tom que mantém o texto branco legível (5:1). */
.compra-ir { width: 100%; margin-top: 8px; min-height: 52px; background: #15803d; }
.compra-ir:hover { background: #166534; }
.compra-ir:active { background: #14532d; }
.compra-ir:disabled { cursor: progress; background: #14532d; color: #fff; border-color: transparent; }
.compra-seguro {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 0; font-size: 14px; font-weight: 600;
}
.compra-seguro svg { width: 18px; height: 18px; }
.compra-consentimento { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); text-align: center; }
@media (max-width: 767px) {
  .compra-box { padding: 24px 20px; }
  .compra-logo { height: 72px; }
  .compra-titulo { font-size: 22px; }
}

/* Botão de compra na página da aula */
.lesson-cta { margin-top: 8px; }
@media (max-width: 767px) { .lesson-cta .btn { width: 100%; } }

/* Botões da pós lado a lado: compra + ementa */
.pos-acoes { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ementa { text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
@media (max-width: 767px) { .pos-acoes .btn { width: 100%; } }

/* ---------- Top 4 pós (estilo "Top 10" de streaming, abaixo do vídeo) ---------- */
.top4 .section-title { margin-bottom: 20px; }
.top4-lista {
  list-style: none; margin: 0; padding: 8px 0 4px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  counter-reset: none;
}
.top4-item {
  position: relative; display: flex; align-items: flex-end;
  text-decoration: none; border-radius: var(--radius-card);
}
.top4-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
/* Número grande vazado atrás da capa */
.top4-num {
  flex: none; width: 46%;
  font-family: var(--font-ui); font-weight: 800;
  font-size: clamp(150px, 17vw, 250px); line-height: .74; letter-spacing: -0.08em;
  color: var(--bg);
  -webkit-text-stroke: 3px #6b6b78;
  text-align: right;
  margin-right: -7%;
  user-select: none;
  transition: -webkit-text-stroke-color var(--t);
}
.top4-capa {
  position: relative; z-index: 1;
  width: 61%; height: auto; aspect-ratio: 480 / 693; object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  transition: transform 200ms ease;
}
.top4-item:hover .top4-capa { transform: translateY(-4px); }
.top4-item:hover .top4-num { -webkit-text-stroke-color: #a0a0ad; }
/* O 1 é estreito e ficava escondido atrás da capa: contorno mais forte e quase sem sobreposição. */
.top4-lista > li:first-child .top4-num { -webkit-text-stroke: 4px #a4a4b0; margin-right: -2%; }
.top4-lista > li:first-child .top4-item:hover .top4-num { -webkit-text-stroke-color: #e5e5ec; }
@media (max-width: 1023px) {
  .top4-lista {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .top4-lista::-webkit-scrollbar { display: none; }
  .top4-lista > li { scroll-snap-align: start; }
}
@media (max-width: 767px) {
  .top4-lista { grid-auto-columns: 72%; gap: 8px; }
  .top4-num { font-size: 150px; -webkit-text-stroke-width: 2px; }
  .top4-lista > li:first-child .top4-num { -webkit-text-stroke-width: 3px; }
}
.row:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .top4-item:hover .top4-capa { transform: none; } }

/* ---------- Página da pós (lista de todas as aulas, como a página de uma série) ---------- */
.pos-page { padding-top: 24px; }
.pos-hero {
  display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: end;
  padding: 32px;
  background: linear-gradient(120deg, var(--pos-bg, var(--surface)) 0%, var(--pos-bg2, var(--bg)) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-panel);
}
.pos-hero-capa {
  width: 100%; height: auto; aspect-ratio: 480 / 693; object-fit: cover;
  border-radius: 10px; box-shadow: 0 14px 36px rgba(0,0,0,.55);
}
.pos-hero-rotulo {
  margin: 0 0 10px;
  font-family: var(--pos-fonte-rotulo, var(--font-ui)); font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--pos-rotulo, var(--text-secondary));
}
.pos-hero h1 { margin: 0 0 12px; font-size: 40px; font-weight: 700; line-height: 1.12; max-width: 22ch; }
.pos-hero-meta { margin: 0 0 24px; font-size: 15px; color: var(--text-secondary); }
.pos-hero-meta, .pos-hero h1 { text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.pos-parte .section-title { margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pos-parte .section-title small { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.state-titulo { margin: 0 0 8px; font-size: 24px; font-weight: 700; }
.pos-hero.skeleton { min-height: 360px; }
.pos-hero.skeleton .pos-hero-capa { aspect-ratio: 480 / 693; border-radius: 10px; }
@media (max-width: 767px) {
  .pos-page { padding-top: 12px; }
  .pos-hero { grid-template-columns: 1fr; gap: 20px; padding: 20px; justify-items: start; }
  .pos-hero-capa { width: 56%; max-width: 220px; }
  .pos-hero h1 { font-size: 28px; }
  .pos-hero-cta { width: 100%; }
}

.state.is-error .state-titulo { color: var(--error); }
