/* صفحه تیم — چیدمان متناوب مثل نمونه‌کارها */

.section-team .page-header {
  margin-bottom: 2.75rem;
}

.team-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* RTL: ستون اول = راست — پیش‌فرض عکس راست، متن چپ */
.team-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas: "visual content";
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--radius-lg, 18px);
  scroll-margin-top: 1.5rem;
  direction: rtl;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.35s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.35s var(--ease);
}

.team-row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--glass-border));
}

/* ردیف زوج: متن راست، عکس چپ */
.team-row--reverse {
  grid-template-areas: "content visual";
}

.team-row__visual {
  grid-area: visual;
  position: relative;
  min-width: 0;
}

.team-row__media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.team-row:hover .team-row__media {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.team-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-row__placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: grid;
  place-items: center;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    var(--bg)
  );
}

.team-row__content {
  grid-area: content;
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.team-row__tagline {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.team-row__name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.team-row:hover .team-row__name {
  color: var(--accent);
}

.team-row__role {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.team-row__bio {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.team-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.team-row__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.team-row__social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.team-row__social a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

@media (max-width: 899px) {
  .team-row,
  .team-row--reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "content";
  }
}

@media (min-width: 900px) {
  .team-stack {
    gap: 1.75rem;
  }
}
