/* Páginas de conteúdo: scripts, curso, eventos, vídeos, blog, apoio, sorteios e 404 */

/* ------------------------------------------------------------ scripts */
/* mesmo formato do curso (course-layout, course-player, course-modules);
   embaixo do vídeo fica o painel do item escolhido */
.script-panel {
  padding: 18px 4px 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.script-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

.script-panel .course-actions {
  margin-bottom: 20px;
}

.script-summary {
  color: var(--text-dim);
  font-size: 1.02rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-title .icon {
  color: var(--gold);
}

.script-panel .code-box pre {
  font-size: 0.88rem;
}

.script-tip {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--text-mute);
  font-size: 0.9rem;
}

.script-tip .icon {
  flex: none;
  margin-top: 3px;
}

.script-tip.is-warn {
  color: #e9c977;
}

.script-tip a {
  color: inherit;
  font-weight: 700;
}

.script-panel .steps {
  margin-bottom: 10px;
}

.panel-note {
  font-size: 0.86rem;
}

.script-panel .link-list {
  max-width: 420px;
}

/* ícone no lugar do botão de "assistida" do curso: código ou vídeo */
.lesson-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--text-mute);
}

.script-item.is-current .lesson-icon {
  color: var(--gold);
}

.course-modules > .btn {
  justify-self: start;
  margin-top: 6px;
}

.scripts-faq .section-head {
  margin-bottom: 16px;
}

.scripts-faq .callout {
  margin-top: 14px;
}

.source-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.source-card .card-icon {
  margin: 0;
  background: var(--green-tint);
  border-color: rgba(76, 195, 138, 0.35);
  color: var(--green);
}

.source-card strong {
  display: block;
  color: var(--text);
}

.source-card small {
  color: var(--text-mute);
}

.source-card > .icon {
  color: var(--text-mute);
}

/* ------------------------------------------------------------ curso */
.course-progress {
  width: min(100%, 320px);
  padding: 18px 20px;
}

.stat-label {
  margin: 0;
  color: var(--text-mute);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card p.course-progress-value {
  margin: 4px 0 10px;
  color: var(--text-dim);
  font-size: 1rem;
}

.course-progress-value strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.meter {
  display: block;
  height: 6px;
  margin-bottom: 14px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.meter > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  border-radius: inherit;
  transition: width 0.25s ease;
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: start;
  gap: 24px;
}

.course-stage {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

@media (max-width: 960px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-stage {
    position: static;
  }
}

.course-player {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.course-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.course-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.course-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.45));
}

.hero-video-play .icon {
  width: 72px;
  height: 72px;
  padding: 22px 19px 22px 25px;
  background: var(--red);
  border-radius: 50%;
  color: #fff;
  fill: currentColor;
  box-shadow: 0 12px 34px rgba(229, 52, 46, 0.45);
  transition: transform 0.18s ease;
}

.course-poster:hover .hero-video-play .icon {
  transform: scale(1.08);
}

.course-meta {
  padding: 18px 4px 0;
}

.course-meta h2 {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-modules {
  display: grid;
  gap: 10px;
}

.course-module {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.course-module[open] {
  border-color: var(--border-strong);
}

.course-module summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.course-module summary::-webkit-details-marker {
  display: none;
}

.course-module summary:hover {
  background: var(--surface-2);
}

.module-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--gold-tint);
  border: 1px solid rgba(242, 190, 54, 0.35);
  border-radius: 9px;
  color: var(--gold);
  font-weight: 800;
}

.module-title {
  color: var(--text);
  font-weight: 700;
}

.module-title small {
  display: block;
  color: var(--text-mute);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.module-progress {
  padding: 3px 9px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.module-progress.is-complete {
  background: var(--green-tint);
  border-color: rgba(76, 195, 138, 0.45);
  color: var(--green);
}

.lesson-list {
  margin: 0;
  padding: 4px 8px 8px;
  border-top: 1px solid var(--border);
  list-style: none;
}

.lesson {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}

.lesson.is-current {
  background: var(--gold-tint);
}

.lesson-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  color: transparent;
}

.lesson-check:hover {
  border-color: var(--green);
}

.lesson.is-done .lesson-check {
  background: var(--green);
  border-color: var(--green);
  color: #06261a;
}

.lesson-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 6px;
  color: var(--text-dim);
  font-size: 0.93rem;
  line-height: 1.35;
  text-decoration: none;
}

.lesson-link:hover,
.lesson.is-current .lesson-link {
  color: var(--text);
}

.lesson.is-done .lesson-title {
  color: var(--text-mute);
}

.lesson-length {
  flex: none;
  color: var(--text-mute);
  font-size: 0.8rem;
}

.course-reset {
  justify-self: start;
  margin-top: 6px;
}

/* ------------------------------------------------------------ eventos */
.event-search {
  width: min(100%, 340px);
}

.event-search .input {
  padding-block: 13px;
  background: var(--surface);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}

.event-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.event-card:target {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 190, 54, 0.2);
}

.event-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}

.event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-thumb:hover .video-play {
  opacity: 1;
}

.event-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 18px 20px 20px;
}

.event-body h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0;
}

.event-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

.event-videos {
  margin: 2px 0 6px;
  padding: 0;
  list-style: none;
}

.event-videos a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.event-videos .icon {
  color: var(--red);
  fill: currentColor;
}

.event-videos .video-title {
  font-size: 0.92rem;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.event-videos small {
  color: var(--text-mute);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: start;
  gap: 32px;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
}

.guide-main h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.guide-main h2:not(:first-child) {
  margin-top: 36px;
}

.guide-main .callout {
  margin-top: 16px;
}

.guide-videos {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.guide-figure {
  margin: 0;
}

.guide-figure img {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

.guide-figure figcaption {
  margin-top: 10px;
  color: var(--text-mute);
  font-size: 0.86rem;
  text-align: center;
}

/* ------------------------------------------------------------ blog */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 22px;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}

.post-card h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: 0;
}

.post-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.post-meta {
  color: var(--text-mute);
  font-size: 0.86rem;
}

.post-hero h1 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.post-hero .post-meta {
  margin: 0;
}

.post-body {
  padding-top: 32px;
}

.post-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

.post-lead {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.65;
}

.qa {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa li {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.qa h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.qa-num {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.qa p {
  margin: 0 0 12px 38px;
}

.qa p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .qa li {
    padding: 18px;
  }

  .qa p {
    margin-left: 0;
  }
}

.post-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

.more-posts-title {
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.post-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.post-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
}

.post-row h3 {
  margin: 8px 0 4px;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------ apoio */
.pix-single {
  max-width: 560px;
  margin-inline: auto;
  padding: clamp(20px, 4vw, 32px);
}

.pix-card h2 {
  margin: 12px 0 6px;
  font-size: 1.35rem;
}

.pix-card .steps {
  margin: 18px 0;
}

.pix-key {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.pix-key code {
  color: var(--green);
  font-size: 0.86rem;
  word-break: break-all;
  user-select: all;
}

.giveaway-past {
  margin-top: 40px;
}

.giveaway-past .section-head {
  margin-bottom: 0;
}

/* ------------------------------------------------------------ 404 */
.not-found {
  padding-block: clamp(64px, 12vw, 140px);
  text-align: center;
}

.not-found .lead {
  margin-inline: auto;
}

.not-found .actions {
  justify-content: center;
}
