.single-team-wrapper {
  display: flex;
  gap: 80px;
  position: relative;
  min-height: 100vh;
}

.single-team-left,
.single-team-right {
  position: relative;
  z-index: 2;
}

.single-team-bg-svg {
  position: absolute !important;
  pointer-events: none;
  z-index: 1;
  display: block;
  height: auto;
  width: auto;
}

.team-single-shape-1 {
  top: -10%;
  left: 0;
  z-index: 3;
}

.team-single-shape-2 {
  top: -10%;
  left: 0;
}

@media screen and (max-width: 992px) {
  .team-single-shape-1 {
    top: -8%;
  }

  .team-single-shape-2 {
    top: -8%;
  }
}

@media screen and (max-width: 768px) {
  .team-single-shape-1 {
    top: -5%;
  }

  .team-single-shape-2 {
    top: -5%;
  }
}

@media screen and (max-width: 568px) {
  .team-single-shape-1 {
    top: -2%;
  }

  .team-single-shape-2 {
    top: -2%;
  }
}

@media screen and (max-width: 425px) {
  .team-single-shape-1 {
    top: 0;
  }

  .team-single-shape-2 {
    top: 0;
  }
}

@media screen and (max-width: 1400px) {
  .single-team-wrapper {
    gap: 60px;
  }
}
@media screen and (max-width: 1200px) {
  .single-team-wrapper {
    gap: 40px;
  }
}
.single-team-left {
  flex: 0 0 450px;
  max-width: 100%;
}

.single-team-right {
  z-index: 5;
  flex: 1;
  min-width: 0;
  gap: 64px;
  display: flex;
  flex-direction: column;
}

.team-profile-image .profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 400px;
  left: 150px;
  position: absolute;
  object-fit: cover;
}

@media screen and (max-width: 600px) {
  .team-profile-image .profile-photo {
    width: 250px;
    height: 250px;
  }
}

.single-team-content {
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 48px;
}

.single-team-header,
.single-team-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-short-bio {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.team-section h2 {
  margin-bottom: 32px;
}

.single-team-content,
.single-team-cards-carousel .carousel-controls {
  padding-right: 64px;
}

.single-team-cards-carousel.grid-mode {
  margin-right: 64px;
}

@media screen and (max-width: 1000px) {
  .team-section h2 {
    padding: 0 64px;
  }
  .single-team-wrapper {
    flex-direction: column;
  }
  .single-team-left {
    flex: 0 0 350px;
  }
  .team-profile-image .profile-photo {
    position: relative;
    left: 0;
    margin: 0 auto;
    display: block;
  }

  .single-team-header {
    align-items: center;
  }
  .single-team-header h1 {
    text-align: center;
  }
  .single-team-content,
  .single-team-cards-carousel .carousel-controls {
    padding: 0 64px;
  }
  .single-team-cards-carousel.grid-mode {
    margin: 0 64px;
  }
  .single-team-cards-carousel.carousel-mode {
    padding-left: 64px;
  }
}
@media screen and (max-width: 768px) {
    .team-section h2 {
    padding: 0 16px;
  }
  .team-profile-image .profile-photo {
    margin: auto;
    left: 0;
  }
  .single-team-content,
  .single-team-cards-carousel .carousel-controls {
    padding: 0 16px;
  }
  .single-team-cards-carousel.grid-mode {
    margin: 0 16px;
  }
  .single-team-cards-carousel.carousel-mode {
    padding-left: 16px;
  }
}

/* ==========================================================================
   CAROUSEL & CARDS
   ========================================================================== */

/* Grid mode (1-2 items) */
.single-team-cards-carousel.grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-content: start; /* Para que las tarjetas se alineen a la izquierda si son pocas */
  gap: 32px;
  max-width: calc(2 * 400px + 20px);
}

/* Card size */
.single-team-cards-carousel .news-card,
.single-team-cards-carousel .project-card {
  max-width: 400px;
  width: 100%;
  margin: inherit;
}

/* Carousel mode */
.single-team-cards-carousel.carousel-mode {
  position: relative;
  overflow: hidden;
  padding-bottom: 72px;
}

/* Pista scrollable */
.single-team-cards-carousel .carousel-track {
  display: flex;
  gap: 32px;
  align-items: stretch;
  padding: 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  box-sizing: border-box;
  touch-action: pan-y;
}

.single-team-cards-carousel .carousel-track > * {
  flex: 0 0 auto;
  width: min(400px, calc(100% - 32px));
  scroll-snap-align: start;
  box-sizing: border-box;
}

.single-team-cards-carousel .carousel-track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.single-team-cards-carousel .carousel-track::-webkit-scrollbar {
  display: none;
}

.single-team-cards-carousel .carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
  z-index: 50;
}

.carousel-btns {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
}

.single-team-cards-carousel .carousel-controls .control {
  margin-top: 0;
}

.single-team-cards-carousel .carousel-controls .control[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* dots */
.single-team-cards-carousel .carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}
.single-team-cards-carousel .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(105, 25, 63, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.single-team-cards-carousel .carousel-dot.active {
  background: rgba(105, 25, 63, 1);
}

/* responsive small */
@media (max-width: 700px) {
  .single-team-cards-carousel {
    padding-bottom: 72px;
  }
  .single-team-cards-carousel .carousel-track {
    gap: 12px;
    padding: 8px;
  }
}