/* Pagina de um curso e o texto rico das descricoes. */

.course { padding-top: clamp(16px, 2.4vw, 28px); padding-bottom: clamp(64px, 8vw, 104px); display: flex; flex-direction: column; gap: 28px; }

.course__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.course__main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.course__cover { width: 100%; max-width: 560px; height: auto; border-radius: 24px; display: block; background: var(--bg-soft); }

.course__details { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.course__detail { padding: 16px 18px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.course__detail dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.course__detail dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }

/* Quadro de preco: acompanha a rolagem em telas largas; em telas estreitas vem antes do conteudo. */
.course__buy { order: -1; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: #FFFFFF; box-shadow: 0 18px 40px -28px rgba(13, 1, 53, .35); }
.course__price { display: flex; flex-direction: column; gap: 4px; }
.course__price-old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.course__price-main { font-family: var(--font-title); font-weight: 800; font-size: 32px; letter-spacing: -0.02em; line-height: 1.1; }
.course__price-extra { font-size: 15px; color: var(--muted); }
.course__price-consult { font-family: var(--font-title); font-weight: 700; font-size: 20px; }
.course__cta { height: 54px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 700; font-size: 16px; text-align: center; }
.course__help { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

@media (min-width: 900px) {
  .course__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .course__buy { order: 0; position: sticky; top: 104px; }
}

/* --- Texto rico (descricoes vindas do site antigo, depois do painel) --- */
.rich-text { font-size: 16px; line-height: 1.7; color: var(--navy); overflow-wrap: anywhere; }
.rich-text > * { margin: 0 0 16px; }
.rich-text > *:last-child { margin-bottom: 0; }
.rich-text h2, .rich-text h3, .rich-text h4 { font-family: var(--font-title); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin-top: 28px; }
.rich-text h2 { font-size: 24px; }
.rich-text h3 { font-size: 20px; }
.rich-text h4 { font-size: 17px; }
.rich-text ul, .rich-text ol { padding-left: 22px; }
.rich-text li { margin-bottom: 6px; }
.rich-text a { color: var(--gold-ink); text-decoration: underline; }
.rich-text a:hover { color: var(--gold-ink-hover); }
.rich-text img { max-width: 100%; height: auto; border-radius: 12px; }
.rich-text iframe { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 16px; }
/* Grades de aulas sao tabelas largas: rolam para o lado dentro do proprio quadro, sem estourar a pagina. */
.rich-text table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.rich-text th, .rich-text td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.rich-text th { background: var(--bg-soft); font-weight: 700; }
.rich-text tr:nth-child(even) td { background: #FBFBFD; }

/* Quadro "IA FMB" na coluna de compra e a janela do simulador (M115). */
.course__ia { margin-top: 6px; padding: 16px; border-radius: 16px; background: var(--gold-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.course__ia-tag { padding: 4px 10px; border-radius: 999px; background: var(--navy); color: var(--gold); font-size: 12px; font-weight: 700; }
.course__ia-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--navy); }
.course__ia-button { align-self: stretch; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 700; font-size: 15px; }

/* Uma rolagem so: a janela cabe na tela e nao rola; quem rola e o simulador, que ocupa a altura que sobra. */
.ia-modal { width: min(1180px, calc(100vw - 24px)); max-width: none; height: min(920px, calc(100vh - 24px)); height: min(920px, calc(100dvh - 24px)); max-height: none; padding: 16px; border: 0; border-radius: 28px; background: var(--navy); color: #FFFFFF; overflow: hidden; }
.ia-modal[open] { display: flex; flex-direction: column; }
.ia-modal .ia-demo { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ia-modal .ia-demo__bar { flex: none; }
.ia-modal .ia-demo__frame { flex: 1 1 auto; height: auto; min-height: 0; }
.ia-modal::backdrop { background: rgba(13, 1, 53, .72); }
.ia-modal__head { flex: none; margin: -16px -16px 0; padding: 20px 22px 14px; background: var(--navy); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Navegador sem <dialog>: fechada, a janela nao aparece no meio da pagina. Aberta, a pagina de tras nao rola. */
.ia-modal:not([open]) { display: none; }
html:has(dialog[open]) { overflow: hidden; }
.ia-modal__title { margin: 0; font-family: var(--font-title); font-weight: 800; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.02em; }
.ia-modal__close { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); background: transparent; color: #FFFFFF; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.ia-modal__close:hover { background: rgba(255, 255, 255, .12); }
.ia-modal__note { flex: none; margin: 12px 6px 2px; font-size: 13px; line-height: 1.6; color: #A9B4C4; }
