/* ===== Team Section ===== */
.team {
  padding: 0;
  background: var(--color-gray-bg);
  overflow: hidden;
}

.team .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

/* Team Image */
.team__image {
  flex: 0 1 45%;
  min-width: 0;
  position: relative;
  align-self: flex-end;
}

.team__image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 993px) {
  .team__image img {
    padding-top: 50px;
  }
}

/* Founder Label */
.team__founder-label {
  position: absolute;
  bottom: 30%;
  right: 0;
  transform: translateX(20%);
  z-index: 2;
}

.team__founder-name {
  background: var(--color-red);
  color: var(--color-white);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.team__founder-role {
  background: var(--color-white);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  margin-top: -4px;
  margin-left: 18px;
  display: inline-block;
}

/* Team Info */
.team__info {
  padding: 20px;
  flex: 1;
}

.team__info .section-label {
  margin-bottom: 8px;
}

.team__info .section-title {
  margin-bottom: 16px;
}

.team__description {
  font-size: 24px;
  line-height: 1.4;
  color: var(--color-black);
  margin-bottom: 40px;
}

/* Team Carousel */
.team__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.team__members {
  display: flex;
  gap: 20px;
  overflow: hidden;
  /* Show exactly 4 items: 4*120px + 3*20px gaps = 540px */
  width: calc(4 * 120px + 3 * 20px);
  flex-shrink: 0;
}

.team__member {
  flex: 0 0 120px;
  text-align: center;
}

.team__member-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-gray-card);
  margin-bottom: 8px;
}

.team__member-avatar.active {
  outline: 3px solid var(--color-red);
  outline-offset: 3px;
}

.team__member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team__member-name {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--color-black);
}

/* Carousel Arrows */
.team__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
  border: none;
}

.team__arrow--prev {
  background: var(--color-white);
  border: 1px solid var(--color-gray-mid);
}

.team__arrow--next {
  background: var(--color-white);
  border: 1px solid var(--color-gray-mid);
}

.team__arrow:hover {
  opacity: 0.8;
}

.team__arrow svg {
  width: 8px;
  height: 14px;
}

.team__arrow--prev svg {
  stroke: var(--color-gray-mid);
}

.team__arrow--next svg {
  stroke: var(--color-gray-mid);
}

/* === Responsive === */
@media (max-width: 1200px) {
  .team__image {
    flex: 0 1 40%;
  }
  .team__description {
    font-size: 20px;
  }
}

@media (max-width: 992px) {
  .team .container {
    flex-direction: column;
    text-align: center;
    overflow: hidden;
  }
  .team__image {
    display: none;
  }
  .team__founder-label {
    display: none;
  }
  .team__carousel {
    justify-content: center;
    max-width: 100%;
  }
  .team__members {
    overflow: hidden;
    width: calc(4 * 120px + 3 * 20px);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .team {
    padding: 30px 0;
  }
  .team__description {
    font-size: 18px;
  }
  .team__member {
    flex: 0 0 80px;
  }
  .team__member-avatar {
    width: 80px;
    height: 80px;
  }
  .team__member-name {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .team__members {
    width: calc(4 * 80px + 3 * 20px);
    max-width: 100%;
  }
  .team__founder-name {
    font-size: 14px;
    padding: 6px 12px;
  }
  .team__founder-role {
    font-size: 12px;
    padding: 4px 12px;
  }
}

@media (max-width: 576px) {
  .team .container {
    gap: 24px;
    padding: 0 16px;
  }
  .team__image {
    max-width: 250px;
  }
  .team__carousel {
    gap: 8px;
  }
  .team__members {
    gap: 12px;
  }
  .team__member {
    flex: 0 0 70px;
  }
  .team__member-avatar {
    width: 70px;
    height: 70px;
  }
  .team__members {
    width: calc(4 * 70px + 3 * 12px);
    max-width: 100%;
  }
  .team__member-name {
    font-size: 11px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
