/* Ementa da landing page (components/product_ementa.html): previa de 10 linhas com degrade, VER EMENTA e o modal com o
   drill down curso > modulo > aula */
/* as landing pages sao escuras (theme-cinema, course-story): cores proprias, como o bloco antigo (product-syllabus.css) */
.em-bloco { --em-txt: #edf1f4; --em-forte: #ffffff; --em-dim: #b7c2cd; --em-linha: #ffffff1f; --em-num: #ffb274; --em-caixa: #191e23;
  --em-caixa-alto: #222a31; width: min(1080px, calc(100% - 32px)); margin: 72px auto; color: var(--em-txt); }
.em-cab { margin-bottom: 20px; }
.em-cab h2 { color: var(--em-forte); margin: 8px 0 6px; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.03em; }
.em-totais { margin: 0; color: var(--em-dim); font-size: .95rem; }

.em-previa { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--em-linha);
  /* degrade: as ultimas linhas se dissolvem no fundo, qualquer que seja a cor dele */
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%); mask-image: linear-gradient(to bottom, #000 45%, transparent 100%); }
.em-previa li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: baseline; padding: 14px 4px;
  border-bottom: 1px solid var(--em-linha); }
.em-num { color: var(--em-num); font-weight: 700; font-variant-numeric: tabular-nums; }
.em-curso { color: var(--em-forte); font-weight: 600; line-height: 1.35; }
.em-meta { color: var(--em-dim); font-size: .875rem; white-space: nowrap; }
.em-acao { position: relative; display: flex; justify-content: center; margin-top: -24px; }
.em-botao { min-height: 52px; padding: 0 36px; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: #1d1306;
  font: inherit; font-weight: 700; letter-spacing: .06em; cursor: pointer; box-shadow: 0 10px 24px rgba(255, 117, 0, .28); }
.em-botao:hover { filter: brightness(.96); }
.em-botao:focus-visible, .em-fechar:focus-visible, .em-modal summary:focus-visible { outline: 3px solid #ffad68; outline-offset: 2px; }

/* modal */
.em-modal { width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 24px;
  background: var(--em-caixa); color: var(--em-txt); border: 1px solid #ffffff26; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.em-modal[open] { display: flex; flex-direction: column; }
.em-modal::backdrop { background: rgba(5, 6, 7, .72); }
.em-modal-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 16px;
  border-bottom: 1px solid var(--em-linha); }
.em-modal-cab h2 { color: var(--em-forte); margin: 0 0 4px; font-size: 1.35rem; line-height: 1.2; }
.em-fechar { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--em-dim);
  font-size: 1.75rem; line-height: 1; cursor: pointer; }
.em-fechar:hover { background: var(--em-caixa-alto); color: var(--em-forte); }
.em-modal-corpo { overflow-y: auto; padding: 8px 16px 24px; overscroll-behavior: contain; }

.em-modal summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 8px; cursor: pointer; }
.em-modal summary::-webkit-details-marker { display: none; }
.em-sum-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.em-sum-txt strong { color: var(--em-forte); font-weight: 600; line-height: 1.35; }
.em-sum-txt small { color: var(--em-dim); font-size: .825rem; }
.em-mais { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--em-caixa-alto); position: relative; }
.em-mais::before, .em-mais::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px;
  background: var(--em-num); border-radius: 2px; transition: transform .2s; }
.em-mais::after { transform: rotate(90deg); }
details[open] > summary .em-mais::after { transform: rotate(0); }
.em-curso-d { border-bottom: 1px solid var(--em-linha); }
.em-curso-d[open] > summary { background: var(--em-caixa-alto); border-radius: 14px; }
.em-modulos { padding: 4px 0 12px 44px; }
.em-modulo-d > summary { padding: 10px 8px; }
.em-modulo-d > summary strong { font-weight: 500; }
.em-aulas { margin: 0 0 8px; padding: 0 8px 0 28px; color: #cdd5dd; font-size: .9rem; }
.em-aulas li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--em-linha); }
.em-dur { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .em-bloco { margin: 48px auto; }
  .em-previa li { grid-template-columns: 32px 1fr; }
  .em-meta { grid-column: 2; }
  .em-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .em-modulos { padding-left: 12px; }
  .em-aulas { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .em-mais::before, .em-mais::after { transition: none; } }
