/* Fichas de curso: layout estável, boa leitura e prioridade para celular. */
#course-root {
  width: 100%;
  max-width: 100%;
  overflow: clip;
}

#course-root .page-hero--photo {
  background-image:
    linear-gradient(90deg, rgb(6 24 17 / 92%) 0%, rgb(6 24 17 / 73%) 42%, rgb(6 24 17 / 12%) 100%),
    var(--course-hero-image, none) !important;
  background-position: center, center 42%;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

#course-root .page-hero__inner {
  width: 100%;
  box-sizing: border-box;
}

#course-root .course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  max-width: 100%;
}

#course-root .course-hero-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
}

#course-root .course-hero-meta svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

#course-root .page-hero h1 {
  max-width: 18ch;
  line-height: .98;
  text-wrap: balance;
}

#course-root .page-hero .lead {
  max-width: 54ch;
  line-height: 1.55;
}

#course-root .section img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

#course-root .course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

#course-root .course-layout > * { min-width: 0; }
#course-root .course-section + .course-section { margin-top: 32px; }
#course-root .course-section h2 { text-wrap: balance; }
#course-root .enroll-card { position: sticky; top: 96px; }
#course-root .check-list,
#course-root .syllabus { padding-left: 1.25rem; }
#course-root li { overflow-wrap: anywhere; }

@media (max-width: 68rem) {
  #site-header .main-nav {
    z-index: 3;
    background: #102b20;
    background-image: linear-gradient(145deg, #102b20, #0b2119 72%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body:has(.main-nav.is-open) { overflow: hidden; }
  body:has(.main-nav.is-open) .gj-contact-actions { display: none; }
}

@media (max-width: 760px) {
  #course-root .page-hero--photo {
    min-height: 0;
    padding: 205px 0 32px;
    background-image:
      linear-gradient(180deg, rgb(7 25 18 / 2%) 0%, rgb(7 25 18 / 12%) 22%, rgb(7 35 24 / 80%) 48%, rgb(7 35 24 / 95%) 100%),
      var(--course-hero-image, none) !important;
    background-position: center, 42% top;
    background-size: 100% 100%, cover;
    background-repeat: no-repeat;
  }

  #course-root .page-hero--photo::before { display: none; }

  #course-root .page-hero__inner {
    gap: 13px;
    padding-inline: clamp(18px, 5vw, 26px);
  }

  #course-root .course-hero-code {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: .76rem;
  }

  #course-root .page-hero h1 {
    max-width: 15ch;
    font-size: clamp(2.55rem, 10vw, 4.2rem);
    line-height: .96;
    letter-spacing: -.015em;
  }

  #course-root .page-hero .lead {
    max-width: 48ch;
    font-size: clamp(1rem, 4.2vw, 1.2rem);
    line-height: 1.5;
  }

  #course-root .course-hero-meta { gap: 7px 15px; }
  #course-root .course-hero-meta > span { font-size: .91rem; }
  #course-root .course-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #course-root .enroll-card { position: static; }
  #course-root .section { padding-block: clamp(32px, 9vw, 50px); }
  #course-root .section-head { margin-bottom: 22px; }
  #course-root .course-section + .course-section { margin-top: 26px; }
  #course-root .check-list,
  #course-root .syllabus { padding-left: 1.15rem; }

  nav.gj-contact-actions {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 7px;
    max-width: calc(100vw - 24px);
  }

  .gj-contact-actions > a.gj-agenda-shortcut,
  .gj-contact-actions > a.gj-whatsapp-shortcut,
  .gj-contact-actions > button[data-chat-open] {
    height: 46px;
    min-height: 46px;
  }

  .gj-contact-actions > a.gj-agenda-shortcut { width: 46px; min-width: 46px; }
  .gj-contact-actions > a.gj-whatsapp-shortcut { min-width: 46px; width: 46px; padding: 0; }
  .gj-contact-actions > a.gj-whatsapp-shortcut span { display: none; }
  .gj-contact-actions > a.gj-whatsapp-shortcut svg { width: 25px; height: 25px; }
  .gj-contact-actions > button[data-chat-open] { min-width: 124px; padding-inline: 12px; }
}

@media (max-width: 380px) {
  #course-root .page-hero--photo { padding-top: 210px; }
  #course-root .page-hero h1 { font-size: clamp(2.35rem, 10vw, 2.8rem); }
  #course-root .page-hero__inner { padding-inline: 17px; }
  nav.gj-contact-actions { right: max(9px, env(safe-area-inset-right)); gap: 6px; }
  .gj-contact-actions > a.gj-agenda-shortcut,
  .gj-contact-actions > a.gj-whatsapp-shortcut { width: 42px; min-width: 42px; }
  .gj-contact-actions > button[data-chat-open] { min-width: 116px; padding-inline: 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #site-header .main-nav,
  #site-header .main-nav li { transition: none; }
}

/* Approved composition: photograph and real HTML text share the same banner. */
#course-root .page-hero {padding-block:64px;min-height:500px;display:flex;align-items:center;}
#course-root .page-hero::before{display:none;}
#course-root .course-hero-code .tech-label{color:#c0dccd;}
#course-root .course-hero-cta{min-height:48px;border-radius:7px;background:#08a852;box-shadow:none;padding:12px 22px;}
#course-root .page-hero h1{font-size:clamp(3rem,5vw,5rem);max-width:17ch;}
#course-root .page-hero .lead{max-width:46ch;}
@media(max-width:760px){
 #course-root .page-hero{min-height:0;display:block;padding:36px 0;}
 #course-root .page-hero--photo{padding:205px 0 30px;}
 #course-root .page-hero h1{font-size:clamp(2.5rem,10.5vw,3.9rem);max-width:17ch;text-wrap:initial;line-height:1;}
 #course-root .page-hero .lead{font-size:1rem;line-height:1.5;}
 #course-root .page-hero__inner{gap:15px;}
 #course-root .course-hero-code{font-size:.72rem;letter-spacing:.1em;}
 #course-root .course-hero-cta{font-size:1rem;margin-top:2px;}
}

/* REV49: breathing room between benefits, class heading, details and actions. */
#course-root .check-list {margin-block:20px 0;}
#course-root .check-list li {line-height:1.6;margin-bottom:14px;}
#course-root h2:has(+ #turmas-embed) {margin:48px 0 24px;line-height:1.15;}
.turma-grid {display:grid;gap:24px;align-items:start;}
.turma-card {padding:28px;min-width:0;border:1px solid #dce5df;border-radius:16px;box-shadow:0 4px 16px #102b2009;}
.turma-card .turma-card__head {display:flex;flex-wrap:wrap;gap:12px 16px;align-items:center;justify-content:space-between;margin-bottom:24px;}
.turma-card .turma-card__seg {line-height:1.5;letter-spacing:.1em;}
.turma-card .turma-badge {white-space:normal;line-height:1.3;}
.turma-card .turma-card__title {font-size:1.5rem;line-height:1.25;margin:0 0 24px;overflow-wrap:break-word;}
.turma-card .turma-card__label {display:block;font-size:.88rem;line-height:1.5;margin-top:10px;font-weight:500;}
.turma-card .turma-card__meta {list-style:none;padding:0;margin:0 0 26px;display:grid;gap:12px;}
.turma-card .turma-card__meta li {display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:space-between;line-height:1.5;margin:0;color:#526159;font-size:1rem;}
.turma-card .turma-card__meta strong {font-weight:600;color:#243d30;}
.turma-card > .btn {width:100%;box-sizing:border-box;min-height:48px;padding:12px 16px;white-space:normal;line-height:1.4;font-size:1rem;border-radius:9px;box-shadow:none;}
.turma-card > .btn--primary {background:#09874a;border:1px solid #09874a;color:white;}
.turma-card > .btn--ghost {margin-top:12px;background:white;border:1px solid #b8d3c3;color:#14613d;}
#turmas-embed > p:last-child {margin:28px 0 0;line-height:1.6;}
#turmas-embed > p:last-child a {display:inline-block;padding-block:8px;text-underline-offset:4px;}
@media(max-width:760px){
 #course-root h2:has(+ #turmas-embed) {margin-top:40px;margin-bottom:24px;font-size:2rem;}
 .turma-card {padding:22px;}
 .turma-card .turma-card__head {align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:22px;}
 .turma-card .turma-card__title {font-size:1.45rem;line-height:1.3;}
 #course-root:has(#turmas-embed) {padding-bottom:80px;}
 nav.gj-contact-actions {gap:8px;bottom:calc(10px + env(safe-area-inset-bottom));}
 .gj-contact-actions > a.gj-agenda-shortcut,
 .gj-contact-actions > a.gj-whatsapp-shortcut {width:44px;min-width:44px;height:44px;min-height:44px;padding:0;}
 .gj-contact-actions > a.gj-whatsapp-shortcut span {display:none;}
 .gj-contact-actions > button[data-chat-open] {height:44px;min-height:44px;min-width:118px;padding-inline:12px;font-size:12px;}
}

/* REV51: desktop course pages, with readable columns and a compact timetable. */
@media (min-width: 1024px) {
 #course-root > .section > .container,
 #course-root .page-hero > .container {width:min(1160px,calc(100% - 80px));max-width:1160px;margin-inline:auto;}
 #course-root .page-hero {min-height:520px;padding-block:64px;background-position:center,center 42%;}
 #course-root .page-hero--photo {background-image:linear-gradient(90deg,#102f22 0%,rgb(16 47 34 / 97%) 30%,rgb(16 47 34 / 75%) 47%,rgb(16 47 34 / 8%) 72%),var(--course-hero-image,none)!important;}
 #course-root .page-hero__inner {display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding-inline:0;}
 #course-root .page-hero h1 {font-size:clamp(3rem,4.3vw,4rem);line-height:1.04;letter-spacing:-.015em;max-width:16ch;margin:0;}
 #course-root .page-hero .lead {font-size:1.08rem;line-height:1.7;max-width:45ch;margin:0;}
 #course-root .course-hero-meta {margin:0;font-size:.95rem;color:#d4e5db;}
 #course-root .course-hero-cta {margin-top:4px;}
 #course-root > .section {padding-block:64px;}
 #course-root > .section:has(#turmas-embed) {background:#f3f7f4;border-block:1px solid #dfe8e1;}
 #course-root > .section:has(#turmas-embed) > .container {display:grid;grid-template-columns:240px minmax(0,1fr);gap:48px;align-items:start;}
 #course-root .section-head:has(+ #turmas-embed) {margin:4px 0 0;}
 #course-root .section-head:has(+ #turmas-embed) h2 {font-size:2.6rem;line-height:1.08;margin-top:16px;max-width:10ch;}
 #course-root #turmas-embed {min-width:0;}
 #course-root #turmas-embed .turma-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:24px;}
 #course-root #turmas-embed .turma-card {padding:28px;display:grid;grid-template-columns:1fr 1fr;gap:0 12px;align-content:start;}
 #course-root #turmas-embed .turma-card__head,
 #course-root #turmas-embed .turma-card__title,
 #course-root #turmas-embed .turma-card__meta {grid-column:1/-1;}
 #course-root #turmas-embed .turma-card__title {font-size:1.65rem;margin-bottom:22px;}
 #course-root #turmas-embed .turma-card__meta {display:grid;grid-template-columns:1fr 1fr;column-gap:28px;row-gap:14px;padding-bottom:22px;border-bottom:1px solid #e1e9e3;}
 #course-root #turmas-embed .turma-card__meta li {justify-content:flex-start;gap:8px;font-size:.94rem;}
 #course-root #turmas-embed .turma-card__meta li:last-child {grid-column:1/-1;color:#087641;font-weight:600;}
 #course-root #turmas-embed .turma-card > .btn {font-size:.9rem;min-height:46px;margin-top:0;padding-inline:12px;}
 #course-root #turmas-embed > p:last-child {margin-top:18px;font-size:.94rem;}
 #course-root .course-layout {grid-template-columns:minmax(0,1fr) 320px;gap:72px;align-items:stretch;}
 #course-root .course-layout > aside {min-width:0;}
 #course-root .enroll-card {top:100px;padding:28px;border-radius:14px;box-shadow:0 6px 24px #1235220a;border:1px solid #dce6df;}
 #course-root .enroll-card h3 {font-size:1.8rem;line-height:1.2;margin-bottom:16px;}
 #course-root .enroll-card .price-note {line-height:1.65;}
 #course-root .enroll-card .btn {box-shadow:none;white-space:normal;min-height:46px;font-size:.92rem;border-radius:8px;}
 #course-root .enroll-card .btn--primary {background:#09874a;}
 #course-root .enroll-card .btn--ghost {background:white;color:#14613d;border:1px solid #b8d3c3;}
 #course-root .course-section + .course-section {margin-top:40px;padding-top:32px;border-top:1px solid #e0e9e3;}
 #course-root .course-section h2 {font-size:2.1rem;line-height:1.15;margin-bottom:20px;}
 #course-root .course-section .lead {font-size:1.05rem;line-height:1.75;}
 #course-root .check-list li {font-size:1rem;line-height:1.7;margin-bottom:12px;}
 #course-root .syllabus li {padding-block:14px;line-height:1.6;}
 #course-root .container--narrow {max-width:860px;}
 #course-root .faq summary {padding-block:22px;font-size:1rem;}
}
@media (min-width:1024px){
 #course-root > .section > .container {padding-inline:0;}
 #course-root #turmas-embed .turma-card__title {display:block;}
 #course-root #turmas-embed .turma-card__label {display:block;font-size:.88rem;margin-top:10px;}
}
