/* =================================================================
   Catálogo de Cursos HSC Global
   Prefix: .cat*
   Minimalista, sem imagem. Accordion list + filter chips + search.
   ================================================================= */

.cat {
  --cat-max-text: 720px;
  background: #fff;
  color: var(--ink);
}

/* ---------- HERO ---------- */
.cat-hero {
  position: relative;
  padding: clamp(72px, 10vw, 110px) 0 clamp(60px, 8vw, 90px);
  background: var(--bg-hero);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.cat-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cat-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

.cat-hero__orb {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}
.cat-hero__orb--a { background: rgba(74, 108, 247, 0.45); top: -160px; right: -180px; }
.cat-hero__orb--b { background: rgba(11, 60, 255, 0.30); bottom: -200px; left: -200px; }

.cat-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.cat-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c9d3ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  margin-bottom: 22px;
}

.cat-hero__title {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 auto 18px;
  max-width: 24ch;
}

.cat-hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, #c9d3ff 0%, #fff 50%, #c9d3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cat-hero__sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  color: #d7dbe6;
  max-width: 58ch;
  margin: 0 auto 36px;
}

.cat-hero__stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  flex-wrap: wrap;
}

.cat-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cat-hero__stat-n {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.cat-hero__stat-l {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aeb6c9;
}

/* ---------- FILTROS (dentro do hero, fundo navy) ---------- */
.cat-hero__filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 720px;
  margin: 32px auto 0;
}

/* Variante "vidro" dos campos sobre o fundo escuro do hero */
.cat-hero__filters .cat-filters__search,
.cat-hero__filters .cat-filters__select-wrap {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.65);
}

.cat-hero__filters .cat-filters__search:focus-within,
.cat-hero__filters .cat-filters__select-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.50);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10);
  color: #fff;
}

.cat-hero__filters .cat-filters__search input { color: #fff; }
.cat-hero__filters .cat-filters__search input::placeholder { color: rgba(255, 255, 255, 0.55); }

.cat-hero__filters .cat-filters__select { color: #fff; }
.cat-hero__filters .cat-filters__select option { color: var(--ink); }

.cat-hero__filters .cat-filters__select-caret { color: rgba(255, 255, 255, 0.65); }
.cat-hero__filters .cat-filters__select-wrap:focus-within .cat-filters__select-caret { color: #fff; }

.cat-hero__filters .cat-filters__count {
  flex-basis: 100%;
  text-align: center;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
}
.cat-hero__filters .cat-filters__count span { color: #fff; }

/* Largura dos containers da pagina de catalogo.
   Hero (.cat-hero__inner) mantem a largura global de 1320px.
   Da secao 2 em diante (filtros, lista de cursos, bloco CTA) afunila pra 1000px.
   Scoped em .cat, entao so vale nesta pagina (este style.css carrega so aqui). */
.cat .container:not(.cat-hero__inner) {
  max-width: 1000px;
}

.cat-filters__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(74, 108, 247, 0.20);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 44px;
  flex: 1 1 280px;
  min-width: 240px;
  color: var(--gray-500);
  transition: border-color .2s, box-shadow .2s;
}

.cat-filters__search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.14);
  color: var(--accent);
}

.cat-filters__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  appearance: none;
}

.cat-filters__search input::placeholder { color: var(--gray-500); }

.cat-filters__search input::-webkit-search-cancel-button,
.cat-filters__search input::-webkit-search-decoration { -webkit-appearance: none; }

/* Select de trilha */
.cat-filters__select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(74, 108, 247, 0.20);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 44px;
  min-width: 200px;
  transition: border-color .2s, box-shadow .2s;
}

.cat-filters__select-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.14);
}

.cat-filters__select-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0;
  pointer-events: none;
  white-space: nowrap;
}

.cat-filters__select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0 24px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--brand-navy);
  cursor: pointer;
  outline: 0;
  flex: 1;
  min-width: 0;
}

.cat-filters__select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
  transition: color .2s, transform .2s;
}

.cat-filters__select-wrap:focus-within .cat-filters__select-caret {
  color: var(--accent);
}

.cat-filters__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  margin: 0;
  white-space: nowrap;
}

.cat-filters__count span {
  color: var(--brand-navy);
  font-weight: 800;
}

@media (max-width: 720px) {
  .cat-hero__filters { gap: 10px; }
  .cat-filters__search { flex: 1 1 100%; }
  .cat-filters__select-wrap { flex: 1 1 100%; }
  .cat-filters__count { flex: 1 1 100%; }
}

/* ---------- LIST ---------- */
.cat-list {
  padding: clamp(48px, 6vw, 72px) 0 clamp(60px, 7vw, 90px);
  background: #fff;
}

.cat-group {
  margin-bottom: clamp(36px, 5vw, 56px);
}

.cat-group:last-of-type { margin-bottom: 0; }

.cat-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 108, 247, 0.12);
  margin-bottom: 14px;
}

.cat-group__title {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
  margin: 0;
}

.cat-group__count {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.cat-group__count span {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

/* Hide the whole group when it has no visible rows */
.cat-group.is-empty { display: none; }

/* ---------- ROWS ---------- */
.cat-row {
  position: relative;
  border-bottom: 1px solid var(--gray-100);
  border-radius: 0;
  background: #fff;
  margin: 0;
  transition:
    background .32s cubic-bezier(.16,1,.3,1),
    border-color .32s cubic-bezier(.16,1,.3,1),
    box-shadow .32s cubic-bezier(.16,1,.3,1),
    border-radius .32s cubic-bezier(.16,1,.3,1),
    margin .32s cubic-bezier(.16,1,.3,1);
}

.cat-row[hidden] { display: none; }

.cat-row:last-of-type { border-bottom: 0; }

/* Row open = card destacado (accent border, shadow, margin, radius) */
.cat-row[open] {
  background: linear-gradient(180deg, #ffffff 0%, var(--off-white) 100%);
  border: 1px solid rgba(74, 108, 247, 0.35);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(74, 108, 247, 0.08),
    0 24px 56px -16px rgba(1, 16, 114, 0.18),
    0 8px 24px -8px rgba(74, 108, 247, 0.16);
  margin: 18px 0;
  z-index: 1;
}

/* Faixa accent fina à esquerda quando aberto, reforça o "isto aqui pertence a este curso" */
.cat-row[open]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(74, 108, 247, 0.0));
  border-radius: 3px;
}

/* Quando abre, esconde o border-bottom da row anterior pra dar respiro */
.cat-row[open] + .cat-row { border-top: 0; }

.cat-row__sum {
  list-style: none;
  display: grid;
  grid-template-columns: 110px 1fr 28px;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
  cursor: pointer;
  transition: background .22s ease, padding .22s ease;
  outline: none;
  border-radius: 14px;
}

.cat-row__sum::-webkit-details-marker { display: none; }
.cat-row__sum::marker { display: none; content: ''; }

.cat-row__sum:hover {
  background: rgba(74, 108, 247, 0.04);
}

.cat-row__sum:focus-visible {
  background: rgba(74, 108, 247, 0.08);
  box-shadow: inset 0 0 0 2px rgba(74, 108, 247, 0.40);
}

.cat-row[open] .cat-row__sum {
  padding: 22px 22px 14px 26px;
  background: transparent;
}

.cat-row__badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 108, 247, 0.10);
  border: 1px solid rgba(74, 108, 247, 0.18);
  padding: 5px 10px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}

.cat-row[open] .cat-row__badge {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cat-row__title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.4;
  letter-spacing: -0.005em;
  transition: color .22s ease, font-weight .22s ease;
}

.cat-row[open] .cat-row__title {
  font-weight: 700;
}

/* Numero do curso no catalogo (01..31), estavel por ordem.
   Gerado via attr(data-num) setado no JS — fora do textContent,
   entao nao interfere na busca. */
.cat-row__title::before {
  content: attr(data-num);
  margin-right: 12px;
  color: var(--gray-400);
  font-weight: 700;
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.cat-row[open] .cat-row__title::before {
  color: var(--accent);
}

.cat-row__meta {
  font-size: 0.92rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.cat-row__meta b {
  font-weight: 800;
  color: var(--brand-navy);
}

.cat-row__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(74, 108, 247, 0.06);
  color: var(--gray-500);
  transition: transform .32s cubic-bezier(.4,0,.2,1), background .22s, color .22s;
}

.cat-row__sum:hover .cat-row__chevron { background: rgba(74, 108, 247, 0.12); color: var(--accent); }

.cat-row[open] .cat-row__chevron {
  transform: rotate(180deg);
  background: var(--accent);
  color: #fff;
}

@media (max-width: 720px) {
  .cat-row__sum {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    padding: 16px 12px;
  }
  .cat-row__badge {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .cat-row__title {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .cat-row__meta {
    grid-column: 2;
    grid-row: 1;
  }
  .cat-row__chevron {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
  .cat-row[open] .cat-row__sum { padding: 18px 14px 12px 18px; }
}

/* ---------- ROW BODY (expanded) ---------- */
/* JS controla altura via max-height pra animacao suave.
   Em estado default (sem JS), <details> nativo apenas mostra/esconde. */
.cat-row__body {
  padding: 6px 28px 26px 28px;
  position: relative;
}

/* Divider sutil entre header e body do card */
.cat-row[open] .cat-row__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(74, 108, 247, 0.18) 0%,
    rgba(74, 108, 247, 0.10) 50%,
    transparent 100%);
}

.cat-row__data {
  max-width: 780px;
}

.cat-row__desc {
  margin: 0 0 22px;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--gray-700);
}

.cat-row__data dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.cat-row__data dl > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: baseline;
}

.cat-row__data dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.cat-row__data dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

.cat-row__campanha {
  margin: 18px 0 0;
}

.cat-row__campanha a {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 108, 247, 0.10);
  border: 1px solid rgba(74, 108, 247, 0.30);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .18s, transform .18s;
}

.cat-row__campanha a:hover {
  background: rgba(74, 108, 247, 0.18);
  transform: translateY(-1px);
}

/* bloco do CTA, logo abaixo do conteudo */
.cat-row__turmas {
  margin-top: 22px;
  display: flex;
}

.cat-row__turmas-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.cat-row__turmas ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-row__turmas li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.cat-row__turma-tag {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-navy);
  background: rgba(74, 108, 247, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
}

.cat-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  transition: background .18s, transform .18s, box-shadow .2s;
  margin-top: auto;
  align-self: flex-start;
}

.cat-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(74, 108, 247, 0.28);
}

.cat-cta--white {
  background: #fff;
  color: var(--brand-navy);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}
.cat-cta--white:hover {
  background: var(--off-white);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

@media (max-width: 880px) {
  .cat-row__body {
    padding: 4px 16px 24px 16px;
  }
  .cat-row__data dl > div {
    grid-template-columns: 110px 1fr;
    gap: 12px;
  }
}

.cat-empty {
  text-align: center;
  font-size: 0.95rem;
  color: var(--gray-500);
  padding: 48px 24px;
  margin: 0;
  background: var(--off-white);
  border: 1px dashed rgba(74, 108, 247, 0.30);
  border-radius: 12px;
}

/* ---------- CTA BLOCK ---------- */
.cat-cta-block {
  padding: clamp(48px, 6vw, 80px) 0 clamp(72px, 9vw, 110px);
  background: var(--off-white);
}

.cat-cta-block__card {
  position: relative;
  background: var(--bg-hero);
  color: #fff;
  border-radius: 20px;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 56px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 70px rgba(1, 16, 114, 0.18);
}

.cat-cta-block__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 70%);
}

.cat-cta-block__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #c9d3ff;
  margin-bottom: 14px;
}

.cat-cta-block__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.16;
  max-width: 28ch;
  margin: 0 auto 12px;
}

.cat-cta-block__desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #d7dbe6;
  max-width: 52ch;
  margin: 0 auto 26px;
}
