/* ======== ESTRUTURA PRINCIPAL ======== */
.nossosInstrutores {
  padding: 60px 0;
  background: #f6f6f6;
  user-select: none;
}

.carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-top: 40px;
  width: 100%;
  /* cursor: grab; */
}
/* .carousel-wrapper.grabbing {
  cursor: grabbing;
} */

.card-link {
  display: block; /* cobre toda a área do card */
  width: 100%;
  height: auto;
}

.carousel-track {
  display: flex;
  margin: 70px 0;
  gap: 40px;
  width: max-content;
  animation: scroll 38s linear infinite; /* mais lento */
  will-change: transform;
}

.carousel-wrapper:hover .carousel-track {
  animation-play-state: paused;
}

/* ======== CARDS VIDRO AZUL ======== */
.card {
  flex: 0 0 auto;
  width: 260px;
  padding: 25px 20px;
  border-radius: 20px;
  text-align: center;
  position: relative; /* importante: span absoluto ficará relativo ao card */
  overflow: hidden;
  z-index: 0;
  color: #fff;
  transition: transform 0.4s ease, box-shadow 0.4s ease;

  /* Fundo vidro azul degradê */
  background: linear-gradient(
    180deg,
    rgb(159 203 253 / 70%) 0%,
    rgba(21 82 153) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);

  /* Sombra interna e externa */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2),
    0 0 15px rgba(255, 255, 255, 0.05) inset;
}

/* Pseudo-elemento para borda degradê seguindo o border-radius */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px; /* largura da borda */
  border-radius: 20px; /* mesmo do card */
  background: linear-gradient(244deg, #14519752, #ffffff 60%, #4e80ba8a);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* Hover desktop */
.card:hover {
  transform: translateY(-10px) scale(1.08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(255, 255, 255, 0.1) inset;
}

/* ======== IMAGEM ======== */
.instrutor-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 15px; /* mantém a foto no topo como antes */
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: saturate(0.7) brightness(0.95);
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.card:hover .instrutor-img {
  transform: scale(1.04);
  filter: saturate(1.2) brightness(1.05);
}

/* ======== EFEITOS DE BRILHO ======== */
.card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 100%
  );
  mix-blend-mode: screen;
  opacity: 0.5;
  filter: blur(6px);
  animation: shine 3s linear infinite;
}

.card:hover::after {
  opacity: 0.7;
}

/* ======== TEXTO ======== */
/* NOTE: position trocado para static para que a profissão (span) possa ser posicionada
   em relação ao .card (que é position: relative) — assim a profissão NÃO será afetada
   pela transformação do bloco de texto no :hover. */
.instrutor-info {
  position: static; /* alterado para static */
  transition: transform 0.4s ease;
  padding-bottom: 45px; /* espaço reservado para o cargo fixo */
}

.instrutor-info b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #edcc45; /* Nome amarelo */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ======== PROFISSÃO FIXA NO FUNDO (agora posicionada relativo ao .card) ======== */
.instrutor-info span {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: color 0.3s ease;

  position: absolute; /* posiciona em relação ao .card (que é relative) */
  bottom: 20px; /* margin-bottom desejada */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px); /* evita overflow nas laterais */
  text-align: center;
  z-index: 4; /* garante ficar acima dos pseudo-elements */
  box-sizing: border-box;
}

/* Hover desktop */
.card:hover .instrutor-info span {
  color: #fff; /* Profissão permanece branca */
}

/* removi a transformação que movia todo o bloco .instrutor-info no hover,
   para que a profissão não se mova junto com o nome/foto. */
/* .card:hover .instrutor-info {
  transform: translateY(12px);
} */

/* ======== ANIMAÇÃO DO CARROSSEL ======== */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-25%);
  }
}

/* ======== RESPONSIVIDADE ======== */

/* Tablet */
@media (max-width: 992px) {
  .carousel-track {
    gap: 30px;
  }

  .card {
    width: 250px;
    padding: 22px;
    transform: none !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  }

  .card:hover {
    transform: none !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  }

  .instrutor-img {
    filter: none;
    transform: none !important;
  }

  .card:hover .instrutor-img {
    transform: none !important;
    filter: none;
  }

  .instrutor-info span {
    color: #fff !important;
    position: absolute; /* mantém a profissão fixa no mobile/tablet */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    z-index: 4;
  }

  .card:hover .instrutor-info {
    transform: none !important;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .carousel-track {
    gap: 20px;
  }

  .card {
    width: 200px;
    padding: 18px;
    transform: none !important;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
  }

  .card:hover {
    transform: none !important;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
  }

  .instrutor-img {
    filter: none;
    transform: none !important;
  }

  .card:hover .instrutor-img {
    transform: none !important;
    filter: none;
  }

  .instrutor-info b,
  .instrutor-info span {
    font-size: 18px;
  }

  .instrutor-info span {
    color: #fff !important;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    z-index: 4;
  }

  .card:hover .instrutor-info {
    transform: none !important;
  }
}
