.team-section {
  background: #201A46;
  padding: var(--spacing-16) 0;
}

.team-container {
  display: flex;
  gap: 40px;
  justify-content: space-between;
}

.team-slider-wrapper {
  position: relative;
  width: 67%;
  overflow: hidden;
}

.slider-viewport {
  position: relative;
  width: 100%;
  height: 850px;
  overflow: hidden;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1;
  opacity: 0;
  transform: scale(0.95);
}

.slide img {
  max-height: 100%;
  max-width: none;
  object-fit: cover;
  width: 100%;
  height: 100%;

}

.slide:not(.active) {
  opacity: 0.6;
  transform: scale(0.9);
}

.slide-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 471px;
  padding: 26px 29px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 16.001px;
  background: #FFF;
}

.slide-info .role {
  color: #201A46;
  font-family: Helvetica;
  font-size: 16px;
  font-weight: 300;
}

.slide-info .name {
  color: #201A46;
  font-size: 56px;
  font-weight: 800;
  line-height: 56px;
  text-transform: uppercase;
}

.read-more-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
  color: #201A46;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.more-info {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.slider-controls {
  position: absolute;
  top: 10px;
  left: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.arrow-button {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 4px;
  background: #FFF;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.slider-counter {
  color: #FFF;
  font-family: Helvetica;
  font-size: 32px;
  font-weight: 300;
}

.slide.active {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.arrow-img {
  width: 18px;
  height: 30px;
}

.team-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-title {
  font-weight: 850;
  text-transform: uppercase;
  color: #fff;

  font-size: 80px;
  font-style: normal;
  line-height: 0.92;
  width: 50%;
  position: relative;
  z-index: 2;
}

.team-contact-box {
  border-radius: 16px;
  background: #8543FF;
  display: flex;
  align-items: flex-end;
  height: 50%;
  padding: 40px 55px;
}

.contact-link {
  font-family: Helvetica;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.up-arrow {
  transform: rotate(0deg);
}

.down-arrow {
  transform: rotate(180deg);
}

.more-info {
  display: none;
}

.more-info.visible {
  display: block;
}

@media (max-width: 1100px) {
  .team-container {
    flex-direction: column;
    align-items: center;
  }

  .team-slider-wrapper {
    width: 71%;
  }

  .team-contact-box {
    display: none;
  }

  .team-title {
    text-align: center;
    width: 100%;
  }

  .team-right-panel {
    order: -1;
    margin-bottom: var(--spacing-8);
  }

  .slide img {
    border-radius: 16px 16px 0 0;
  }

  .read-more-toggle .arrow {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
  }

  .more-info.visible + .read-more-toggle .arrow,
  .read-more-toggle.active .arrow {
    transform: rotate(180deg);
  }
}

@media (max-width: 768px) {  
  .team-title {
    font-size: 40px;
  }
  
  .team-slider-wrapper {
    width: 100%;
  }

  .slider-viewport {
    overflow: visible;
    height: auto;
  }

  .slider-track {
    height: auto;
  }

  .slide {
    position: relative;
    height: auto;
    margin-bottom: var(--spacing-8);
  }

  .slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px 16px 0 0;
  }

  .slide-info {
    width: 100%;
    position: relative;
    border-radius: 0 0 16px 16px;
    background: #fff;
    margin-top: 0;
    z-index: 2;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
  }

  .slide {
    display: none;
  }

  .slide.active {
    display: block;
  }
}
