:root {
  --team3d-bg: #f5f5f7;
  --team3d-card-bg: rgba(255, 255, 255, 0.9);
  --team3d-border: rgba(15, 23, 42, 0.06);
  --team3d-border-strong: rgba(15, 23, 42, 0.14);
  --team3d-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
  --team3d-shadow-strong: 0 26px 60px rgba(15, 23, 42, 0.45);
  --team3d-text-main: #020617;
  --team3d-text-muted: #6b7280;
  --team3d-accent: #111827;
}

/* Sección principal */
.team3d-section {
  position: relative;
  width: 100%;
  padding: 80px 16px 110px;
  background: radial-gradient(
    circle at top,
    #ffffff 0%,
    #f5f5f7 40%,
    #e5e7eb 100%
  );
  overflow: hidden;
  animation: team3d-section-fade 0.9s ease-out both;
}

.team3d-section__title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: #9ca3af;
  margin: 0 0 26px;
}

/* Contenedor del carrusel */
.team3d-carousel {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* NAV */
.team3d-carousel__nav {
  position: absolute;
  bottom: -20%;
  background: rgba(15, 23, 42, 0.92);
  color: #f9fafb;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease,
    border-color 0.25s ease;
}

.team3d-carousel__nav i {
  font-size: 1.1rem;
}

.team3d-carousel__nav:hover {
  transform: translateY(-2px) scale(1.06);
  background: #020617;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.7);
}

.team3d-carousel__prev {
  left: 38%;
}

.team3d-carousel__next {
  right: 38%;
}

/* BODY + SLIDER */
.team3d-carousel__body {
  width: 100%;
  padding: 10px 0 60px;
  overflow: hidden;
}

.team3d-carousel__slider {
  position: relative;
  transition: transform 1s ease-in-out;
  will-change: transform;
}

/* Item */
.team3d-carousel__item {
  position: relative;
  display: block;
  float: left;
  box-sizing: border-box;
  margin-left: 20px;
  margin-right: 20px;
}

/* Marco 3D */
.team3d-frame {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s ease-in-out;
}

.team3d-frame::after {
  content: '';
  position: absolute;
  bottom: -15%;
  width: 100%;
  height: 40px;
  background: rgba(15, 23, 42, 0.12);
  box-shadow: 0 0 8px 8px rgba(15, 23, 42, 0.08);
  transform: rotateX(90deg) translate3d(0, -20px, 0);
  opacity: 0.75;
}

/* Caras */
.team3d-frame__card {
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 22px;
  border: 1px solid var(--team3d-border-strong);
  background: var(--team3d-card-bg);
  box-shadow: var(--team3d-shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 20px 20px;
  backdrop-filter: blur(16px);
}

/* Cara frontal: contenido del miembro */
.team3d-frame__card--front {
  border-width: 1px 1px 2px;
}

/* Laterales 3D */
.team3d-frame__card--left,
.team3d-frame__card--right {
  top: 0;
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 20px;
  border-color: rgba(15, 23, 42, 0.22);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.8)
  );
  backface-visibility: hidden;
}

.team3d-frame__card--left {
  left: 0;
  border-left-width: 3px;
  transform: translate3d(1px, 0, -40px) rotateY(-90deg);
  transform-origin: 0%;
}

.team3d-frame__card--right {
  right: 0;
  border-right-width: 3px;
  transform: translate3d(-1px, 0, -40px) rotateY(90deg);
  transform-origin: 100%;
}

/* CONTENIDO DEL MIEMBRO */
.team3d-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(15, 23, 42, 0.2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26);
  margin-bottom: 12px;
}

.team3d-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team3d-name {
  margin: 4px 0 2px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--team3d-text-main);
}

.team3d-role {
  margin: 0 0 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.team3d-bio {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--team3d-text-muted);
}

/* Redes sociales */
.team3d-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.team3d-social__link {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  color: #111827;
  font-size: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease, color 0.2s ease;
}

.team3d-social__link:hover {
  transform: translateY(-2px) scale(1.07);
  border-color: #111827;
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.5);
}

/* Colores por red (opcional) */
.team3d-social__link--x:hover {
  background: #000000;
}
.team3d-social__link--linkedin:hover {
  background: #0a66c2;
}
.team3d-social__link--instagram:hover {
  background: radial-gradient(
    circle at 30% 110%,
    #fdf497 0%,
    #fd5949 35%,
    #d6249f 60%,
    #285aeb 90%
  );
}
.team3d-social__link--facebook:hover {
  background: #1877f2;
}

/* Item activo puede tener un poco más de escala / sombra */
.team3d-carousel__item--active .team3d-frame__card--front {
  box-shadow: var(--team3d-shadow-strong);
  transform: translateZ(8px);
}

/* =========================
   ANIMACIONES / EFECTOS
   ========================= */

@keyframes team3d-section-fade {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1024px) {
  .team3d-carousel__prev {
    left: 32%;
  }
  .team3d-carousel__next {
    right: 32%;
  }
}

@media (max-width: 768px) {
  .team3d-section {
    padding: 60px 12px 80px;
  }

  .team3d-carousel__prev {
    left: 28%;
  }
  .team3d-carousel__next {
    right: 28%;
  }
}

@media (max-width: 560px) {
  .team3d-carousel__prev {
    left: 25%;
    bottom: -18%;
  }
  .team3d-carousel__next {
    right: 25%;
    bottom: -18%;
  }
}
