/* 04 — O Programa: pré-requisitos */
.req {
  --req-start-bg: #CA3E7A;
  --req-expert-bg: #320053;
  --req-summer-bg: #BBD485;
  --req-line: #A44BFA;
  padding-block: 80px;
  background: var(--color-white);
  overflow: visible; /* overflow:hidden (de .section) impede o position: sticky dos paineis */
}
.req__container { max-width: calc(1240px + var(--gutter) * 2); }

.req__intro-head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: 40px; }
.req__title { font-weight: var(--fw-light); color: var(--color-primary); }
.req__title strong { font-weight: var(--fw-bold); }
.req__lead { color: var(--color-gray); }

.req__panels { display: flex; flex-direction: column; gap: 40px; }

/* Painel de cada trilha */
.req__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 666px;
  padding: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--color-white);
}
.req__panel--start  { background: var(--req-start-bg); }
.req__panel--expert { background: var(--req-expert-bg); min-height: 0; }
.req__panel--summer { background: var(--req-summer-bg); color: var(--color-secondary); }

.req__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); width: 100%; max-width: 594px; }
.req__intro { line-height: var(--lh-body); color: inherit; }

/* Selo */
.req__tag {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-4);
  background: var(--color-white);
  border-radius: 80px;
  color: var(--color-primary);
}
.req__tag-text { font-size: 32px; font-weight: var(--fw-bold); line-height: 1.45; text-transform: uppercase; white-space: nowrap; }
.req__tag--fixed { width: 148px; }
.req__tag-icon { position: absolute; top: 5px; width: 26.938px; height: 50px; }
.req__tag--fixed .req__tag-icon { right: -9px; }
.req__tag--auto .req__tag-icon { left: calc(100% - 4px); top: 0; }

/* Lista de requisitos + arte */
.req__row { position: relative; width: 100%; }
.req__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 358px));
  gap: var(--space-2);
  max-width: 732px;
}
.req__topic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 130px;
  padding: var(--space-1) var(--space-3);
  background: rgba(50, 0, 83, 0.2);
  border: 1px solid var(--req-line);
  border-radius: var(--radius-md);
  text-align: center;
}
.req__panel--start .req__topic { border-color: var(--color-purple-01); }
.req__panel--summer .req__topic { background: rgba(255, 255, 255, 0.2); color: var(--color-primary); }
.req__topic--wide { grid-column: 1 / -1; min-height: 122px; }
.req__topic--narrow .req__topic-text { max-width: 188px; }
.req__icon { width: 32px; height: 32px; }
.req__topic-text { font-size: 16px; font-weight: var(--fw-bold); line-height: 1.4; }
.req__topic-text span { display: block; font-weight: var(--fw-regular); }

/* Arte lateral (desktop: ancorada à direita da linha, como no Figma) */
.req__gradient {
  position: absolute;
  top: -139px;
  right: -81px;
  width: 394px;
  height: 637px;
  border-radius: 32px;
  background: linear-gradient(to right, #A44BFA, #E694AE);
}
.req__panel--expert .req__gradient { height: 785px; }
.req__deco, .req__person { position: absolute; max-width: none; object-fit: contain; }
.req__person { object-position: bottom; }

.req__panel--start .req__deco   { top: -163px; right: -106px; width: 213px; height: 301px; }
.req__panel--start .req__person { top: -163px; right: -146px; width: 582px; height: 728px; }
.req__panel--expert .req__deco   { top: -139px; right: -113px; width: 231px; height: 265px; }
.req__panel--expert .req__person { top: -115px; right: -34px; width: 456px; height: 837px; }
.req__panel--summer .req__gradient { top: -139px; }
.req__panel--summer .req__deco   { top: -147px; right: -81px; width: 197px; height: 275px; }
.req__panel--summer .req__person { top: -86px; right: -113px; width: 606px; height: 606px; }

/* Arte empilhada abaixo da lista quando falta espaço lateral */
@media (max-width: 1200px) {
  .req__panel, .req__panel--expert { min-height: 0; }
  .req__row { display: flex; flex-direction: column; gap: var(--space-4); }
  .req__topics { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req__art { position: relative; order: 2; height: 300px; margin-bottom: -40px; }
  .req__panel .req__gradient { top: 0; right: 50%; transform: translateX(50%); width: min(394px, 70%); height: 100%; }
  .req__panel .req__deco { top: 0; right: 14%; width: auto; height: 50%; }
  .req__panel .req__person { top: auto; bottom: 0; right: 50%; transform: translateX(50%); width: auto; max-width: 90%; height: 105%; }
}
@media (max-width: 1024px) {
  .req { padding-block: var(--space-6); }
  .req__panel { padding: var(--space-4); }
  .req__panels { gap: var(--space-3); }
}
@media (max-width: 640px) {
  .req { padding-block: var(--space-5); }
  .req__panel { --req-pad: var(--space-2); padding: var(--space-3) var(--req-pad); --snap-dots-color: var(--color-white); }
  .req__panel--summer { --snap-dots-color: var(--color-secondary); }
  .req__intro-head { margin-bottom: var(--space-3); }
  .req__tag-text { font-size: 26px; }
  /* Arte (degrade + deco + pessoa) removida no mobile */
  .req__art { display: none; }
  .req__row { gap: 0; }
  /* Carrossel: sangra ate a borda do painel (cards nao cortam), alinhado pelo padding do painel */
  .req__topics[data-snap] {
    --snap-w: 80%;
    --snap-gap: var(--space-2);
    max-width: none;
    margin-inline: calc(var(--req-pad) * -1);
    padding-inline: var(--req-pad);
    scroll-padding-inline: var(--req-pad);
  }
  .req__topic { min-height: 188px; padding: var(--space-2); }
  .req__topic--wide { grid-column: auto; min-height: 188px; }
  .req__topic--narrow .req__topic-text { max-width: none; }
}

/* ---------- Efeito sticky: cada painel sobrepoe o anterior ao rolar ----------
   --req-top e calculado em js/sections/04-prerequisitos.js (painel mais alto que a tela ancora pela base). */
@media (min-width: 1025px) {
  .req__panel {
    position: sticky;
    top: var(--req-top, 24px);
    box-shadow: 0 -10px 30px rgba(36, 40, 42, 0.16);
  }
  .req__panel--start  { --req-i: 0; }
  .req__panel--expert { --req-i: 1; }
  .req__panel--summer { --req-i: 2; }
}
