/* ─── Team (Figma 2087:10058) ─── */
.section-team {
  position: relative;
  background: linear-gradient(90deg, #fff9dc 0%, #fff9dc 100%), #fffefc;
  border-top: 1px solid rgba(197, 193, 174, 0.7);
  padding: 60px 80px;
  overflow: hidden;
}

.section-team__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.section-team__title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.31;
  color: var(--red-dark);
  text-align: center;
  margin: 0 0 60px;
}

.section-team__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.team-card {
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(219deg, #39bbc4 28.54%, #21868d 83.8%);
  height: 100%;
}

.team-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(219deg, #39bbc4 28.54%, #21868d 83.8%);
}

.team-card__photo-wrap {
  position: relative;
  height: 320px;
  background: linear-gradient(141deg, #f5f5f5 0%, #e8e8e8 100%);
  overflow: hidden;
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-card__photo-wrap--kalra {
  display: block;
}

.team-card__photo--kalra {
  position: absolute;
  left: 50%;
  top: -61px;
  width: 86%;
  height: 119%;
  max-width: none;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: 72% top;
}

.team-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 28px;
  text-align: left;
}

.team-card__head {
  width: 100%;
  padding-right: 48px;
}

.team-card__name {
  font-size: 28px;
  font-weight: 700;
  line-height: 27.5px;
  color: var(--white);
  margin: 0;
}

.team-card__role {
  font-size: 16px;
  font-weight: 700;
  line-height: 22.5px;
  color: var(--white);
  margin: 0;
}

.team-card__divider {
  width: 100%;
  border-top: 1px solid #e5e5e5;
  padding-top: 10px;
}

.team-card__excerpt {
  width: 100%;
  font-size: 16px;
  line-height: 25.5px;
  color: var(--white);
  margin: 0;
}

.team-card__linkedin {
  position: absolute;
  top: 25px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.team-card__linkedin img {
  width: 16px;
  height: 16px;
}

.team-card__more {
  margin-top: auto;
  padding: 12px 18px;
  border: 2px solid #fcaf17;
  border-radius: 48px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 22.5px;
  color: var(--white);
  cursor: pointer;
}

.team-card__more:hover {
  background: rgba(252, 175, 23, 0.15);
}

/* ─── Team bio modal ─── */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.team-modal[hidden] {
  display: none;
}

.team-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.55);
}

.team-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  height: fit-content;
  flex-shrink: 0;
  margin: auto;
  overflow: hidden;
  border-radius: 16px;
  padding: 40px 44px 36px;
  background: linear-gradient(207deg, #39bbc4 28.54%, #21868d 83.8%);
}

.team-modal__dots {
  position: absolute;
  left: -200px;
  bottom: -140px;
  width: 520px;
  height: 522px;
  max-width: none;
  pointer-events: none;
  opacity: 0.3;
  color: rgba(255, 255, 255, 0.45);
}

.team-modal__close {
  position: absolute;
  top: 21px;
  right: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.team-modal__close img {
  width: 100%;
  height: 100%;
}

.team-modal__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.team-modal__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--white);
  object-fit: cover;
  object-position: center top;
  background: var(--white);
  flex-shrink: 0;
}

.team-modal__photo--kalra {
  object-position: 72% 22%;
}

.team-modal__name {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.25;
  color: var(--white);
  margin: 0;
}

.team-modal__role {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--white);
  margin: 0;
}

.team-modal__role p {
  margin: 0;
}

.team-modal__bio {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: #fefdff;
  text-align: center;
}

.team-modal__bio p {
  margin: 0 0 10px;
}

.team-modal__bio p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .section-team__grid {
    grid-template-columns: 1fr;
    max-width: 405px;
    margin: 0 auto;
  }

  .team-modal__dialog {
    max-width: min(720px, calc(100vw - 32px));
    padding: 36px 28px 28px;
  }
}

@media (max-width: 768px) {
  .section-team {
    padding: 48px 16px;
  }

  .section-team__title {
    margin-bottom: 32px;
  }

  .team-modal {
    padding: 16px;
  }

  .team-modal__dialog {
    max-width: calc(100vw - 24px);
    padding: 28px 16px 22px;
  }

  .team-modal__content {
    gap: 12px;
  }

  .team-modal__photo {
    width: 120px;
    height: 120px;
  }

  .team-modal__bio {
    font-size: 13px;
    line-height: 1.4;
  }

  .team-modal__bio p {
    margin-bottom: 8px;
  }
}
