/* ==========================================================================
   CARROSSEL 3D / COVERFLOW: CICLO COM-UNICA
   ========================================================================== */

.secao-ciclo {
  padding: 80px 20px 90px;
  background-color: #f8fafc;
  overflow: hidden;
  position: relative;
}

.container-ciclo {
  max-width: 1200px;
  margin: 0 auto;
}

.ciclo-header {
  text-align: center;
  margin-bottom: 40px;
}

.subtitulo-pills {
  display: inline-block;
  background: #e2e8f0;
  color: #1f37a2;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.ciclo-header h2 {
  font-size: 2.2rem;
  color: #1e293b;
  margin-bottom: 10px;
  font-weight: 800;
}

.ciclo-header p {
  color: #64748b;
  font-size: 1.1rem;
}

/* Container do Slider */
.carrossel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Palco 3D para CoverFlow Real */
.carrossel-track {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  user-select: none;
}

/* Card Individual (Base com posicionamento absoluto para fluidez 3D total) */
.ciclo-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.6s ease,
              opacity 0.6s ease,
              box-shadow 0.6s ease;
  will-change: transform, filter, opacity;
  pointer-events: none;
}

/* Card Ativo Central em Destaque NÍTIDO e AMPLIADO */
.ciclo-card.active {
  transform: translate(-50%, -50%) scale(1.1) translateZ(50px);
  filter: blur(0px);
  opacity: 1;
  box-shadow: 0 25px 50px rgba(31, 55, 162, 0.22);
  z-index: 10;
  pointer-events: auto;
}

/* Vizinhos Imediatos (Esquerda 1 e Direita 1) */
.ciclo-card.pos-prev-1 {
  transform: translate(calc(-50% - 240px), -50%) scale(0.88) rotateY(15deg);
  filter: blur(4px);
  opacity: 0.65;
  z-index: 5;
  pointer-events: auto;
}

.ciclo-card.pos-next-1 {
  transform: translate(calc(-50% + 240px), -50%) scale(0.88) rotateY(-15deg);
  filter: blur(4px);
  opacity: 0.65;
  z-index: 5;
  pointer-events: auto;
}

/* Vizinhos Segundos (Esquerda 2 e Direita 2) */
.ciclo-card.pos-prev-2 {
  transform: translate(calc(-50% - 440px), -50%) scale(0.74) rotateY(25deg);
  filter: blur(8px);
  opacity: 0.35;
  z-index: 3;
  pointer-events: auto;
}

.ciclo-card.pos-next-2 {
  transform: translate(calc(-50% + 440px), -50%) scale(0.74) rotateY(-25deg);
  filter: blur(8px);
  opacity: 0.35;
  z-index: 3;
  pointer-events: auto;
}

/* Ocultos / Fundo distante */
.ciclo-card.pos-hidden {
  transform: translate(-50%, -50%) scale(0.5);
  filter: blur(12px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  visibility: hidden;
}

/* Faixa de Categoria Superior */
.card-tag {
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-align: center;
  padding: 10px 0;
  text-transform: uppercase;
}

.tag-laranja { background-color: #fa9c00; }
.tag-azul    { background-color: #1f37a2; }
.tag-verde   { background-color: #1eb112; }

/* Enquadramento da Imagem */
.card-img-wrap {
  width: 100%;
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-wrap img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ciclo-card.active:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* Bloco Azul Inferior com Conteúdo */
.card-conteudo {
  background-color: #1f37a2;
  color: #ffffff;
  padding: 22px 20px 26px;
  flex-grow: 1;
  text-align: left;
}

.card-conteudo h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.card-conteudo p {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e2e8f0;
  margin: 0;
}

/* Indicadores de Bolinhas (Dots) */
.carrossel-dots {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background-color: #94a3b8;
  transform: scale(1.2);
}

.dot.active {
  background-color: #1f37a2;
  width: 28px;
  border-radius: 6px;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .ciclo-header h2 {
    font-size: 1.7rem;
  }

  .carrossel-track {
    height: 480px;
  }

  /* Em telas menores, os cards de 2º nível são ocultos e 1º nível mais recolhidos */
  .ciclo-card.pos-prev-2,
  .ciclo-card.pos-next-2 {
    display: none;
  }

  .ciclo-card.pos-prev-1 {
    transform: translate(calc(-50% - 150px), -50%) scale(0.78);
    opacity: 0.35;
    filter: blur(5px);
  }

  .ciclo-card.pos-next-1 {
    transform: translate(calc(-50% + 150px), -50%) scale(0.78);
    opacity: 0.35;
    filter: blur(5px);
  }

  .ciclo-card.active {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 15px 35px rgba(31, 55, 162, 0.2);
  }
}
