body.about-page .team-section {
  --color-primary: #9f001a;
  --color-primary-light: #ffdae0;
  --color-background: #f5f5f4;
  --color-heading: #2a2523;
  --color-body: #746c64;
  --color-white: #fff;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-weight: 500;
  color: var(--color-body);
  background: var(--color-background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

body.about-page .team-section,
body.about-page .team-section *,
body.about-page .team-section *::before,
body.about-page .team-section *::after { box-sizing: border-box; }
.team-section :is(h2, h3, p) { margin: 0; }
.team-section button { font: inherit; -webkit-tap-highlight-color: transparent; }
.team-section img { display: block; }
.team-section button:focus-visible,
.team-section .team-slider:focus-visible,
.team-section .team-bio:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 6px;
}

.team-section {
  --gutter: clamp(40px, 5.555556vw, 80px);
  --card-gap: clamp(18px, 1.666667vw, 24px);
  --active-width: clamp(300px, 26.666667vw, 384px);
  --active-height: calc(var(--active-width) * 580 / 384);
  --small-width: clamp(220px, 19.444444vw, 280px);
  --small-height: calc(var(--small-width) * 324 / 280);
  --active-left: 15.555556%;
  --active-index: 1;
  --drag-offset: 0px;
  --motion-duration: 300ms;
  --motion-easing: ease-out;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-block: 80px;
  background: var(--color-background);
}

.team-heading {
  margin-inline: var(--gutter);
  margin-bottom: 58px;
}

.team-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 18px;
  line-height: 26px;
  margin-bottom: 16px;
}

.team-eyebrow img { width: 23.786px; height: 12px; }
.team-heading__title { color: var(--color-heading); font-size: 48px; line-height: 60px; font-weight: 800; }
.team-slider { position: relative; outline-offset: -6px; }
.team-window { overflow: hidden; width: 100%; height: var(--active-height); touch-action: pan-y pinch-zoom; cursor: grab; scrollbar-width: none; }
.team-window::-webkit-scrollbar { display: none; }

.team-window,
.team-track {
  direction: ltr;
}

.team-track {
  display: flex;
  align-items: flex-end;
  gap: var(--card-gap);
  height: 100%;
  position: relative;
  left: var(--active-left);
  transform: translateX(calc(-1 * var(--active-index) * (var(--small-width) + var(--card-gap)) + var(--drag-offset)));
}

.team-card {
  position: relative;
  display: block;
  flex: 0 0 var(--small-width);
  width: var(--small-width);
  height: var(--small-height);
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 24px;
  background: var(--color-primary);
  cursor: pointer;
}

.team-card.is-active { flex-basis: var(--active-width); width: var(--active-width); height: var(--active-height); }
.team-card--echo { cursor: default; pointer-events: none; }
.team-card:focus-visible { outline-offset: -5px; outline-color: var(--color-white); }
.team-portrait {
  position: absolute;
  max-width: none;
  width: 110%;
  height: auto;
  left: -5%;
  top: -4.22938%;
  user-select: none;
  pointer-events: none;
}
.team-card--second .team-portrait { top: -5.51111%; }
.team-card--third .team-portrait, .team-card--salehi .team-portrait { top: -0.97778%; }
.team-card.is-active .team-portrait { width: 128.47222%; height: auto; left: -14.23611%; top: 0; }

/* The exported ornaments are mirrored as in the original Figma instance. */
.card-pattern { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.card-pattern::before, .card-pattern::after {
  content: "";
  position: absolute;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: scaleX(-1);
}
.card-pattern::before {
  background-image: var(--team-pattern-top, url("/sections/about-page/assets/team-pattern-top.svg"));
  width: 130.208333%; height: 52.068966%; left: 30.46875%; top: -8.793103%;
}
.card-pattern::after {
  background-image: var(--team-pattern-bottom, url("/sections/about-page/assets/team-pattern-bottom.svg"));
  width: 104.166667%; height: 41.724138%; left: -35.416667%; top: 35.517241%;
}
.team-card.is-active .card-pattern { opacity: 1; }
.team-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(to bottom, rgb(159 0 26 / 0), var(--color-primary));
  opacity: 0;
  pointer-events: none;
}
.team-card.is-active::after { height: calc(var(--active-height) * 80 / 580); opacity: 1; }
.team-card:focus-visible::after { height: calc(var(--active-height) * 80 / 580); opacity: 1; }

.team-description {
  position: absolute;
  left: calc(var(--active-left) + var(--active-width) + var(--card-gap));
  top: 32px;
  width: 368px;
  max-width: calc(100% - var(--active-left) - var(--active-width) - var(--card-gap) - var(--gutter));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 27px;
}
.team-bio { width: 100%; min-height: 80px; max-height: 120px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; font-size: 14px; line-height: 20px; }
.team-bio::-webkit-scrollbar { display: none; }
.team-divider { width: 160px; height: 1px; margin-top: -1px; }
.team-identity h3 { font-size: 18px; line-height: 26px; font-weight: 800; color: var(--color-heading); }
.team-identity p { margin-top: 4px; font-size: 16px; line-height: 24px; }
.team-description [hidden] { display: none; }

.slider-controls { position: absolute; top: calc(var(--active-height) - var(--small-height) - 76px); right: var(--gutter); display: flex; align-items: center; gap: 12px; direction: ltr; }
.slider-controls[hidden] { display: none; }
.slider-control {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  width: 50px;
  border: 0;
  border-radius: 40px;
  background: var(--color-primary);
  color: var(--color-primary);
  cursor: pointer;
}
/* Increase the touch target without changing the 36px visual from Figma. */
.slider-control::before { content: ""; position: absolute; inset: -5px 0; }
.slider-control--prev { padding: 2px 16px 2px 2px; }
.slider-control--next { padding: 2px 2px 2px 16px; }
.control-circle { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-white); }
.control-arrow { display: block; width: 24px; height: 24px; background: currentColor; mask: var(--control-icon) center / contain no-repeat; -webkit-mask: var(--control-icon) center / contain no-repeat; }
.slider-control--prev .control-arrow { transform: rotate(180deg); }
.slider-control:disabled { cursor: default; background: var(--color-primary-light); color: var(--color-primary-light); }
@media (hover: hover) {
  .team-card:not(.team-card--echo):hover::after { height: calc(var(--active-height) * 80 / 580); opacity: 1; }
  .slider-control:not(:disabled):hover { background: #56000e; }
  .slider-control:not(:disabled):hover .control-circle { background: var(--color-primary-light); }
}
.slider-control:not(:disabled):active { background: #56000e; }
.slider-control:not(:disabled):active .control-circle { background: var(--color-primary-light); }
.slider-control, .control-circle { transition: background-color var(--motion-duration) var(--motion-easing); }

.team-slider.is-ready .team-track { transition: transform var(--motion-duration) var(--motion-easing); }
.team-slider.is-ready .team-card { transition: flex-basis var(--motion-duration) var(--motion-easing), height var(--motion-duration) var(--motion-easing); }
.team-slider.is-ready .team-portrait { transition: width var(--motion-duration) var(--motion-easing), left var(--motion-duration) var(--motion-easing), top var(--motion-duration) var(--motion-easing); }
.team-slider.is-ready .card-pattern { transition: opacity var(--motion-duration) var(--motion-easing); }
.team-slider.is-ready .team-card::after { transition: opacity var(--motion-duration) var(--motion-easing), height var(--motion-duration) var(--motion-easing); }
.team-slider.is-dragging .team-track { transition: none; }
.team-slider.is-dragging .team-window, .team-slider.is-dragging .team-card { cursor: grabbing; }
.team-slider.is-resizing .team-track,
.team-slider.is-resizing .team-card,
.team-slider.is-resizing .team-portrait { transition: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1380px) and (min-width: 901px) {
  .team-description { top: 8px; gap: 16px; }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .team-bio { font-size: 13px; line-height: 18px; }
}

@media (max-width: 900px) {
  .team-section {
    --gutter: 32px;
    --active-width: min(384px, calc(100vw - 112px));
    --small-width: 240px;
    --card-gap: 20px;
    --active-left: calc((100% - var(--active-width)) / 2);
    padding-block: 56px;
  }
  .team-heading { margin-bottom: 36px; }
  .team-heading__title { font-size: 42px; line-height: 54px; max-width: 680px; }
  .team-description { position: relative; inset: auto; width: auto; max-width: 600px; margin: 28px auto 0; padding-inline: var(--gutter); gap: 24px; }
  .team-bio { min-height: 60px; }
  .team-identity { padding-right: 120px; }
  .slider-controls { top: auto; bottom: 4px; right: max(var(--gutter), calc((100% - 600px) / 2 + var(--gutter))); }
}

@media (max-width: 600px) {
  .team-section { --gutter: 24px; --active-width: calc(100vw - 80px); --small-width: 180px; --card-gap: 16px; padding-block: 40px; }
  .team-heading { margin-bottom: 32px; }
  .team-eyebrow { font-size: 16px; line-height: 24px; margin-bottom: 12px; }
  .team-heading__title { font-size: 32px; line-height: 42px; }
  .team-card { border-radius: 20px; }
  .team-description { margin-top: 24px; gap: 24px; }
  .team-bio { min-height: 100px; }
  .team-identity h3 { font-size: 17px; }
  .team-identity p { font-size: 14px; line-height: 22px; }
}

@media (max-width: 359px) {
  .team-section { --gutter: 20px; --active-width: calc(100vw - 64px); }
  .team-heading__title { font-size: 29px; line-height: 38px; }
  .team-identity { padding-right: 100px; }
  .team-bio { min-height: 120px; }
  .slider-controls { gap: 8px; }
  .slider-control { width: 44px; }
  .slider-control--prev { padding-right: 10px; }
  .slider-control--next { padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .team-slider.is-ready .team-track,
  .team-slider.is-ready .team-card,
  .team-slider.is-ready .team-portrait,
  .team-slider.is-ready .card-pattern,
  .team-slider.is-ready .team-card::after,
  .slider-control, .control-circle { transition: none; }
}

html[dir="rtl"] .team-section :is(.team-heading, .team-description) {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body.about-page .team-section {
  font-family: "Yekan Bakh FaNum", Tahoma, sans-serif;
}

html[dir="rtl"] .team-section .team-description {
  align-items: flex-start;
}

/* Keep the Persian carousel geometry and navigation in reading order. */
html[dir="rtl"] body.about-page .team-section { font-weight: 400; }
html[dir="rtl"] .team-section .team-eyebrow { margin-bottom: 16px; }
html[dir="rtl"] .team-section .team-track {
  direction: rtl;
  left: auto;
  right: var(--active-left);
  transform: translateX(calc(var(--active-index) * (var(--small-width) + var(--card-gap)) + var(--drag-offset)));
}
html[dir="rtl"] .team-section .team-identity h3 { font-weight: 700; }
html[dir="rtl"] .team-section .team-identity p { margin-top: 4px; }
html[dir="rtl"] .team-section .slider-controls { direction: rtl; }
html[dir="rtl"] .team-section .slider-control--prev { padding: 2px 2px 2px 16px; }
html[dir="rtl"] .team-section .slider-control--next { padding: 2px 16px 2px 2px; }
html[dir="rtl"] .team-section .slider-control--prev .control-arrow { transform: none; }
html[dir="rtl"] .team-section .slider-control--next .control-arrow { transform: rotate(180deg); }
@media (min-width: 901px) {
  html[dir="rtl"] .team-section .team-heading { margin-bottom: 54px; }
  html[dir="rtl"] .team-section .team-heading__title { line-height: 64px; }
  html[dir="rtl"] .team-section .team-description {
    left: auto;
    right: calc(var(--active-left) + var(--active-width) + var(--card-gap));
  }
  html[dir="rtl"] .team-section .slider-controls {
    left: var(--gutter);
    right: auto;
    top: calc(var(--active-height) - var(--small-height) - 72px);
  }
}
@media (max-width: 900px) {
  html[dir="rtl"] .team-section .team-heading__title { margin-left: auto; margin-right: 0; }
  html[dir="rtl"] .team-section .team-identity { padding-right: 0; padding-left: 120px; }
  html[dir="rtl"] .team-section .slider-controls {
    left: max(var(--gutter), calc((100% - 600px) / 2 + var(--gutter)));
    right: auto;
  }
}
@media (max-width: 600px) {
  html[dir="rtl"] .team-section .team-eyebrow { margin-bottom: 12px; }
}
@media (max-width: 359px) {
  html[dir="rtl"] .team-section .team-identity { padding-left: 100px; }
  html[dir="rtl"] .team-section .slider-control--prev { padding-left: 10px; }
  html[dir="rtl"] .team-section .slider-control--next { padding-right: 10px; }
}
