/* ===== 06-cursos.css ===== */
.ex-home .ex-courses-section {
  overflow: hidden;
  scroll-margin-top: 104px;
  background:
    radial-gradient(circle at 88% 8%, rgba(23, 104, 231, 0.08), transparent 28%),
    #eef2f6;
}

.ex-home .ex-courses-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: end;
  gap: clamp(34px, 6vw, 84px);
}

.ex-home .ex-courses-heading h2 {
  max-width: 760px;
  margin: 0;
  color: #111b28;
  font-size: clamp(2.35rem, 4.6vw, 4.15rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.ex-home .ex-courses-heading h2 em {
  color: var(--ex-red);
  font-style: normal;
}

.ex-home .ex-courses-heading > p {
  max-width: 510px;
  margin: 0;
  color: #596774;
  font-size: 1rem;
  line-height: 1.72;
}

.ex-home .ex-course-groups {
  margin-top: 52px;
}

.ex-home .ex-course-group + .ex-course-group {
  margin-top: 52px;
}

.ex-home .ex-course-group-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  color: #243140 !important;
  -webkit-text-fill-color: #243140;
  font-size: clamp(1.08rem, 1.7vw, 1.32rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.ex-home .ex-course-group-title::after {
  content: "";
  min-width: 32px;
  height: 1px;
  flex: 1;
  background: rgba(44, 55, 67, 0.16);
}

.ex-home .ex-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ex-home .ex-course-card {
  position: relative;
  min-width: 0;
  min-height: 292px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(44, 55, 67, 0.15);
  border-radius: 3px 3px 18px 18px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(35, 42, 49, 0.065);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.ex-home .ex-course-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--ex-red);
  transition: height 200ms ease;
}

.ex-home .ex-course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(230, 56, 61, 0.42);
  box-shadow: 0 28px 62px rgba(35, 42, 49, 0.12);
}

.ex-home .ex-course-card:hover::before {
  height: 5px;
}

.ex-home .ex-course-code {
  display: block;
  margin-top: 6px;
  color: #b92328;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.48rem, 2.15vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.ex-home .ex-course-card h4 {
  min-height: 2.7em;
  margin: 13px 0 0;
  color: #172330 !important;
  -webkit-text-fill-color: #172330;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ex-home .ex-course-card > p {
  margin: 14px 0 24px;
  color: #65717d;
  font-size: 0.88rem;
  line-height: 1.65;
}

.ex-home .ex-course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(44, 55, 67, 0.12);
  color: #b92328;
  font-size: 0.78rem;
  font-weight: 700;
}

.ex-home .ex-course-card-footer > span:last-child {
  flex: none;
  font-size: 1rem;
  transition: transform 180ms ease;
}

.ex-home .ex-course-card:hover .ex-course-card-footer > span:last-child {
  transform: translate(2px, -2px);
}

@media (max-width: 1024px) {
  .ex-home .ex-courses-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ex-home .ex-courses-heading > p {
    max-width: 680px;
  }

  .ex-home .ex-courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ex-home .ex-course-groups {
    margin-top: 40px;
  }

  .ex-home .ex-course-group + .ex-course-group {
    margin-top: 42px;
  }

  .ex-home .ex-courses-grid {
    grid-template-columns: 1fr;
  }

  .ex-home .ex-course-card {
    min-height: 270px;
    padding: 24px 22px;
  }

  .ex-home .ex-course-code {
    margin-top: 4px;
  }

  .ex-home .ex-course-card h4 {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ex-home .ex-course-card,
  .ex-home .ex-course-card-footer > span:last-child {
    transition: none;
  }

  .ex-home .ex-course-card:hover {
    transform: none;
  }
}

/* Proteção contra estilos globais do tema/Elementor aplicados após a seção. */
.ex-home #exseed-cursos h3.ex-course-group-title {
  color: #243140 !important;
  -webkit-text-fill-color: #243140 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}

.ex-home #exseed-cursos .ex-course-card h3,
.ex-home #exseed-cursos .ex-course-card h4 {
  color: #172330 !important;
  -webkit-text-fill-color: #172330 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}
