.team {
  padding: 40px 0 100px;
}

.team__inner {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}

.team__header {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 48px;
  width: 370px;
}

.team__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.team__eyebrow {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.04em;
  color: var(--color-nav-active);
  text-transform: uppercase;
}

.team__title {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 40px;
  line-height: 150%;
  letter-spacing: 0.01em;
  color: var(--color-heading);
}

.team__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.team__arrow {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 5px;
  border: 1px solid var(--color-heading);
  border-radius: 9999px;
  background: none;
  color: var(--color-heading);
  cursor: pointer;
  flex-shrink: 0;
}

.team__arrow svg {
  width: 30px;
  height: 30px;
}

.team__arrow:disabled {
  border-color: #b7b7b7;
  color: #b7b7b7;
  cursor: not-allowed;
}

.team__track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.team__track::-webkit-scrollbar {
  display: none;
}

.team__card {
  position: relative;
  flex: 0 0 auto;
  width: 415px;
  height: 415px;
  border-radius: 24px;
  background-color: var(--color-heading);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.team__card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 144px;
  background: linear-gradient(180deg, rgba(38, 32, 32, 0) 0%, #262020 100%);
}

.team__card-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team__card-name {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 22px;
  line-height: 26px;
  color: #ffffff;
}

.team__card-role {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: #ffffff;
}

@media (max-width: 960px) {
  .team__inner {
    flex-direction: column;
    gap: 32px;
  }

  .team__header {
    width: 100%;
  }

  .team__title {
    font-size: 28px;
  }

  .team__track {
    width: 100%;
  }

  .team__card {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 480px) {
  .team__card {
    width: 260px;
    height: 260px;
  }
}

/*
 * Figma mobil (390px) dizaynı. Sıra: eyebrow+başlıq → tam-en kvadrat kart → ox düymələri.
 * HTML-də oxlar .team__header-in içindədir — header "display:contents" ilə açılır
 * və uşaqları order ilə yenidən düzülür.
 */
@media (max-width: 600px) {
  .team__inner {
    gap: 24px; /* kart → oxlar */
  }

  .team__header {
    display: contents;
  }

  .team__intro {
    order: 1;
    gap: 16px;
    margin-bottom: 16px; /* başlıq → kart cəmi 40px */
  }

  .team__track {
    order: 2;
  }

  .team__nav {
    order: 3;
    gap: 24px;
  }

  .team__eyebrow {
    font-size: 16px;
    line-height: 20px;
    color: #2386c8;
  }

  .team__title {
    font-size: 24px;
    line-height: 150%;
    color: #0f2942;
  }

  .team__card {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .team__card-overlay {
    height: 121px;
  }

  .team__card-info {
    gap: 8px;
  }

  .team__card-name {
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
  }

  .team__card-role {
    font-size: 13.5px;
    line-height: 16px;
  }

  .team__arrow {
    border-color: #0f2942;
    color: #0f2942;
  }

  .team__arrow svg {
    width: 30px;
    height: 30px;
  }

  .team__arrow:disabled {
    border-color: #b7b7b7;
    color: #b7b7b7;
  }
}

/*
 * Desktop Figma (Frame 1000004430): sol sütun 275px + 80px boşluq + sağa qədər uzanan
 * kart track-i (415px kartlar, 32px ara). Track .page-main-in sağ padding-indən çıxıb
 * ekranın sağ kənarına çatır: çıxma məsafəsi = (100vw − min(100vw, 1440px)) / 2 + --page-pad-x
 * (.page-main max 1440px, mərkəzdədir). Sağ kənarda Fəaliyyətlər-dəki kimi solğunlaşma zolağı.
 */
@media (min-width: 961px) {
  .team {
    --team-bleed: calc((100vw - min(100vw, 1440px)) / 2 + var(--page-pad-x));
    padding-top: 80px; /* bölmələr arası 160px */
  }

  .team__inner {
    position: relative;
    gap: 80px;
  }

  .team__header {
    width: 275px;
  }

  .team__title {
    color: #0f2942;
  }

  .team__eyebrow {
    color: #2386c8;
  }

  .team__track {
    gap: 32px;
    margin-right: calc(-1 * var(--team-bleed));
    padding-right: var(--team-bleed); /* sona çatanda son kart kontent kənarında dayansın */
  }

  .team__arrow {
    border-color: #0f2942;
    color: #0f2942;
  }

  .team__arrow:disabled {
    border-color: #99a1af;
    color: #99a1af;
  }

  /* Figma "Rectangle 23": ekranın sağ kənarında sabit 52px zolaq, #F5F5F5, progressive blur */
  .team__inner::after {
    content: "";
    position: absolute;
    top: 0;
    right: calc(-1 * var(--team-bleed));
    width: 52px;
    height: 415px;
    background: linear-gradient(to right, rgba(245, 245, 245, 0), rgba(245, 245, 245, 0.35));
    pointer-events: none;
    z-index: 1;
  }
}
