body { font-family: 'NeoSans', 'Neo Sans Pro', system-ui, sans-serif; }
#senai-enrollment { width: 100%; min-width: 0; }
#senai-enrollment iframe { display: block; width: 100%; border: 0; background: transparent; }
#inscricao { scroll-margin-top: 80px; }
/* Keep the course title beside its icon and the audience badge on the right. */
#cursos .course-card > div:first-child {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-areas: "icon badge" "icon title" "icon subtitle";
  column-gap: 18px;
  row-gap: 8px;
  align-items: start;
  text-align: left;
}
#cursos .course-card > div:first-child > * { min-width: 0; max-width: 100%; }
#cursos .course-card > div:first-child > .icon-box-yellow { grid-area: icon; align-self: end; margin: 0; }
#cursos .course-card > div:first-child > div:last-child { display: contents; }
#cursos .course-card > div:first-child span { grid-area: badge; justify-self: end; display: inline-block; }
#cursos .course-card h3 { grid-area: title; min-width: 0; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
#cursos .course-card > div:first-child p { grid-area: subtitle; min-width: 0; margin: 0; }

/* The hero uses a background video; keep its layer stable on small screens. */
@media (min-width: 768px) and (max-width: 1023px) {
  #root section:has(> div > video) > div:has(h1) { padding-inline: 32px; }
}
@media (max-width: 767px) {
  #root section:has(> div > video) { min-height: 100svh; padding-bottom: 64px; }
  #root section:has(> div > video) > div:has(h1) {
    padding: 128px 20px 0;
    min-width: 0;
  }
  #root section:has(> div > video) > [data-parallax] { transform: none !important; }
  #root section:has(> div > video) video { object-fit: cover; object-position: 73% center; }
  #root section:has(> div > video) h1 {
    font-size: clamp(36px, 10.7vw, 64px);
    line-height: 1.04;
    margin-bottom: 24px;
  }
  #root section:has(> div > video) h1 + div { gap: 8px; margin-bottom: 28px; }
  #root section:has(> div > video) p { font-size: clamp(20px, 5.5vw, 28px); }
  #root section:has(> div > video) .hero-badge { padding: 8px 14px; font-size: clamp(14px, 3.6vw, 16px); }
  #root section:has(> div > video) .btn-yellow {
    max-width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    white-space: normal;
    text-align: center;
  }
}

/* Allow contact text to shrink inside the card before it needs to wrap. */
#contato .contact-card { min-width: 0; }
#contato .contact-card > div:last-child { min-width: 0; }
#contato .contact-card > div:first-child > div { margin: 0; }
#contato .contact-card p { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  #cursos .course-card { padding: 28px 24px; }
  #cursos .course-card > div:first-child { grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; }
  #cursos .course-card > div:first-child > .icon-box-yellow { width: 56px; height: 56px; border-radius: 16px; }
  #cursos .course-card > div:first-child > .icon-box-yellow img { width: 32px; height: 32px; }
  #cursos .course-card h3 { font-size: clamp(20px, 5.2vw, 24px); }
  #contato .contact-card {
    flex-direction: column;
    gap: 18px;
    padding: 28px 24px;
    text-align: center;
  }
  #contato .contact-card > div:last-child { width: 100%; }
  #contato .contact-card p:first-child {
    font-size: clamp(18px, 4.8vw, 24px);
    line-height: 1.35;
  }
  #contato .contact-card p + p { margin-top: 5px; font-size: 16px; }
}
@media (max-width: 400px) {
  #cursos .course-card > div:first-child {
    grid-template-areas: "icon badge" "title title" "subtitle subtitle";
    row-gap: 12px;
    align-items: center;
  }
}
@media (max-width: 480px) {
  #inscricao div:has(> #senai-enrollment) { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
