/**
 * Bridge3 — Shared course cards and carousel styles.
 * Used by home, cursos, loja, curso-single and other pages that render course cards.
 */

/* ============ CURSOS (carrossel) — Figma 289:5107 ============ */
.cursos.section {
  background: var(--CInza-50, #f3f3f3);
  padding-block: 96px;
}
.cursos__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.cursos__head h2 {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 40px;
  line-height: normal;
  letter-spacing: 0;
  color: var(--Azul-700, #192C3A);
}
.cursos__footer {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.cursos__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  color: var(--Azul-700, #192C3A);
  border-radius: 4px;
}
.cursos__all:hover {
  color: var(--c-teal);
}
.cursos__all .icon {
  width: 18px;
  height: 18px;
}
.cursos__viewport {
  overflow-x: hidden;
  overflow-y: visible;
}
.cursos__track {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 380px;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cursos__track::-webkit-scrollbar {
  display: none;
}
.cursos__sentinel {
  min-width: 1px;
  max-width: 1px;
}
.course-card {
  position: relative;
  z-index: 0;
  scroll-snap-align: start;
  min-width: 380px;
  max-width: 380px;
  width: 380px;
  height: 595px;
  max-height: 595px;
  background: var(--branco-100, #fefefe);
  border: 1px solid var(--cursos-ciano-border, #76cccf);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.08), 0 4px 4px rgba(0, 0, 0, 0.12);
  transition:
    box-shadow var(--t),
    transform var(--t-fast);
}
.course-card:hover {
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}
.course-card__media {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  height: 150px;
  padding: 16px;
  overflow: hidden;
  background: var(--c-surface-soft, #ebebeb);
  /* Inner radius = card 16px − 1px border so cover meets the cyan stroke */
  border-radius: 15px 15px 0 0;
  text-decoration: none;
  color: inherit;
}
.course-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.course-card__placeholder {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--grad-teal);
}
.badge {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 60px;
  color: #000;
  background: var(--CInza-50, #f3f3f3);
  line-height: normal;
  white-space: nowrap;
}
.badge--ao-vivo,
.badge--em-breve,
.badge--turma-nova {
  background: var(--CInza-50, #f3f3f3);
  color: #000;
}
.course-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 24px;
}
.course-card__main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.course-card__top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}
.course-card__certs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-height: 60px;
  height: 60px;
  flex-shrink: 0;
  width: 100%;
  overflow: visible;
}
.course-card__certs-names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 6px 4px;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 60px;
  overflow: visible;
}
.course-card__certs-names > li {
  min-width: 0;
  max-width: 100%;
}
.course-card__certs-names .course-card__tag {
  color: var(--c-navy, #294458);
}
.course-card__certs-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 138px;
  height: 60px;
  flex-shrink: 0;
  overflow: visible;
}
.course-card__certs-logos img {
  display: block;
  height: 31px;
  width: auto;
  object-fit: contain;
}
.course-card__certs-logos .course-card__cert-logo--gri {
  width: 142px;
  height: 31px;
}
/* Knock out the opaque white canvas on IFRS. GRI is RGBA — multiply
   would composite transparent pixels against a black backing. */
.course-card__certs-logos .course-card__cert-logo--ir {
  width: 91px;
  height: 31px;
  mix-blend-mode: multiply;
}
.course-card__copy,
.course-card__headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.course-card__title {
  margin: 0;
  height: 66px;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  color: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  flex-shrink: 0;
}
.course-card__title a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card__desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #0a0a0a;
  margin: 0;
  /* Reserve 3 lines when empty. Do not set a fixed height — it fought
     -webkit-line-clamp and clipped descenders / mid-line ellipsis. */
  min-height: 4.5em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex-shrink: 0;
}
.course-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
  flex-shrink: 0;
  width: 100%;
}
.course-card__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.course-card__cell dt {
  margin: 0;
  padding-left: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #4a5565;
  white-space: nowrap;
}
.course-card__cell dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #222;
  max-width: 100%;
}
.course-card__pill,
.course-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  background: var(--CInza-50, #f3f3f3);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  line-height: normal;
  padding: 4px 8px;
  border-radius: 60px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
/* Course data (Datas, Duração, Formato…): plain text, wraps when long. */
.course-card__grid .course-card__pill {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: unset;
  text-align: left;
  line-height: 1.35;
  height: auto;
  flex-shrink: 1;
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #0a0a0a;
}
.course-card__pill--muted {
  background: transparent;
  color: #0a0a0a;
  padding: 0;
  border-radius: 0;
}
.course-card__grid .course-card__pill--azul {
  background: transparent;
  color: #0a0a0a;
  padding: 0;
  border-radius: 0;
}
.course-card__grid .course-card__pill--proxima {
  display: inline-flex;
  width: auto;
  background: var(--c-azul-100, #c3daf1);
  color: #222;
  padding: 4px 8px;
  border-radius: 60px;
}
.course-card__grid .course-card__pill--em-breve {
  display: inline-flex;
  width: auto;
  background: var(--sucesso-100, #c5e9cd);
  color: #222;
  padding: 4px 8px;
  border-radius: 60px;
}
.course-card__grid .course-card__pill--urgente {
  display: inline-flex;
  width: auto;
  background: #d93e39;
  color: #fff;
  padding: 4px 8px;
  border-radius: 60px;
}
.course-card__pill--azul,
.course-card__pill--proxima {
  background: var(--c-azul-100, #c3daf1);
  color: #222;
}
.course-card__pill--em-breve {
  background: var(--sucesso-100, #c5e9cd);
  color: #222;
}
.course-card__pill--urgente {
  background: #d93e39;
  color: #fff;
}
.course-card__cta,
.course-card__actions {
  margin-top: auto;
  flex-shrink: 0;
}
.course-card__actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.course-card__cta {
  width: 100%;
  min-height: 48px;
  padding: 14px 20px;
  text-align: center;
  box-shadow: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.course-card__actions .course-card__cta {
  flex: 1;
  width: auto;
  margin-top: 0;
  min-height: 48px;
}
.course-card__cta:hover {
  box-shadow: none;
  transform: none;
}
.course-card__cart {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--c-navy, #294458);
  border-radius: 8px;
  background: #fff;
  color: var(--c-navy, #294458);
  display: grid;
  place-items: center;
  text-decoration: none;
}
.course-card__cart:hover {
  color: var(--c-accent, #c1681b);
  border-color: var(--c-accent, #c1681b);
}
.cursos__nav {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
  margin-top: 0;
}
.cursos__btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-line);
  background: #fff;
  color: var(--c-navy);
  font-size: 1.2rem;
}
.cursos__btn:hover {
  background: var(--c-navy);
  color: #fff;
}
.cursos__empty {
  text-align: center;
  color: var(--c-muted);
}

@media (max-width: 760px) {
  .cursos.section {
    padding-block: 64px;
  }
  .cursos__head {
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
  }
  .cursos__head h2 {
    flex: 1 1 auto;
    min-width: 0;
    /* Width of “cursos online” at 32px — wraps after “Próximos”, not mid-phrase. */
    max-width: 6.125em;
    font-size: 32px;
    line-height: 1.15;
  }
  .cursos__nav {
    flex-shrink: 0;
    align-self: center;
  }
  .cursos__footer {
    margin-top: 24px;
  }
  .cursos__all {
    display: inline-flex;
    min-height: 48px;
    padding: 14px 20px;
    border-radius: 4px;
    background: var(--c-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
  }
  .cursos__all .icon {
    display: none;
  }
  .cursos__all:hover {
    color: #fff;
    background: var(--c-accent-700);
  }
  .cursos__track {
    grid-auto-columns: min(100%, 380px);
  }
  .course-card {
    width: min(100%, 380px);
    min-width: 0;
    max-width: 380px;
  }
}
