/* ==========================================================================
   Carrossel de Formações
   ========================================================================== */

/* -- Section wrapper -- */
.formacoes-carousel-section {
  padding: 60px 0;
  overflow: hidden;
}

.formacoes-carousel-wrapper {
  position: relative;
  margin: 0 auto;
  padding: 0 50px; /* espaço para as setas */
}

/* -- Card base -- */
.formacao-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background-color: #1a2a3a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
  color: #ffffff;
}

.formacao-card:focus-visible {
  outline: 3px solid #5ba4d9;
  outline-offset: 2px;
}

/* -- Overlay gradient -- */
.formacao-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

/* -- Content container -- */
.formacao-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px;
}

/* -- Top area (status badge + CTA) -- */
.formacao-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

/* -- Status badge -- */
.formacao-card__badges {
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.formacao-card__status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  background: #5ba4d9;
  color: #ffffff;
}

.formacao-card__metodologia-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  background: #ffffff;
  color: #1a2a3a;
}

.formacao-card__status--ultimas-vagas {
  background: #f8a12d; /* Orange */
}

.formacao-card__status--esgotado {
  background: #f15223; /* Orangered */
}

.formacao-card__status--inscricoes-abertas,
.formacao-card__status--abertas {
  background: #2ea32e; /* Green */
}

.formacao-card__status--em-breve {
  background: #dca01e;
}

/* -- CTA "Saber mais" -- */
.formacao-card__cta {
  align-self: flex-start;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}

.formacao-card:hover .formacao-card__cta {
  opacity: 0.85;
}

/* -- Info block (bottom) -- */
.formacao-card__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* -- Date -- */
.formacao-card__date {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5ba4d9;
}

/* -- Title -- */
.formacao-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  margin: 0;
}

/* -- Formadores -- */
.formacao-card__formadores {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin: 4px 0 0 0;
}

/* -- Meta (metodologia + duração) -- */
.formacao-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.formacao-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Navegação (setas simples)
   ========================================================================== */

.formacoes-swiper-prev,
.formacoes-swiper-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: #555;
  cursor: pointer;
  transition: color 0.2s ease;
}

.formacoes-swiper-prev:hover,
.formacoes-swiper-next:hover {
  color: #141414;
}

.formacoes-swiper-prev .dashicons,
.formacoes-swiper-next .dashicons {
  font-size: 28px;
  width: 28px;
  height: 28px;
}

.formacoes-swiper-prev {
  left: 0;
}

.formacoes-swiper-next {
  right: 0;
}

.formacoes-swiper-prev.swiper-button-disabled,
.formacoes-swiper-next.swiper-button-disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* Ensure wrapper doesn't clip the arrows */
.formacoes-carousel-wrapper {
  overflow: visible;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 1024px) {
  .formacoes-carousel-wrapper {
    padding: 0 40px;
  }

  .formacao-card__title {
    font-size: 1.2rem;
  }

  .formacao-card__date {
    font-size: 0.8rem;
  }

  .formacao-card__formadores {
    font-size: 0.9rem;
  }

  .formacao-card__meta {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .formacoes-carousel-section {
    padding: 40px 0;
  }

  .formacoes-carousel-wrapper {
    padding: 0 36px;
  }

  .formacao-card {
    aspect-ratio: 1 / 1;
  }

  .formacao-card__content {
    padding: 16px;
  }

  .formacao-card__title {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .formacao-card__date {
    font-size: 0.75rem;
  }

  .formacao-card__formadores {
    font-size: 0.8rem;
  }

  .formacao-card__meta {
    font-size: 0.7rem;
    gap: 8px;
  }

  .formacao-card__status,
  .formacao-card__metodologia-badge {
    font-size: 0.6rem;
    padding: 4px 8px;
  }

  .formacao-card__cta {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .formacoes-carousel-wrapper {
    padding: 0 30px;
  }

  .formacao-card__content {
    padding: 14px;
  }

  .formacao-card__title {
    font-size: 0.95rem;
  }

  .formacao-card__date {
    font-size: 0.7rem;
  }

  .formacao-card__formadores {
    font-size: 0.75rem;
  }

  .formacao-card__meta {
    font-size: 0.65rem;
  }

  .formacao-card__cta {
    font-size: 0.8rem;
  }

  .formacoes-swiper-prev,
  .formacoes-swiper-next {
    width: 32px;
    height: 32px;
  }

  .formacoes-swiper-prev svg,
  .formacoes-swiper-next svg {
    width: 18px;
    height: 18px;
  }
}
