/* ============================================================
   Team page — matches homepage shell / minimal teal language
   ============================================================ */

body.page-team {
  --shell-teal: #024442;
  --shell-teal-mid: #0a514d;
  --shell-teal-deep: #013a3a;
  --shell-ink: #183331;
  --shell-muted: #677a78;
  --shell-line: #d5dfdd;
  --shell-soft: #f3f6f5;
  --shell-white: #ffffff;
  --shell-radius: 16px;
  --shell-radius-md: 22px;
  --shell-radius-lg: 28px;
  --shell-shadow: 0 12px 30px rgba(15, 62, 59, 0.07);
  --shell-shadow-hover: 0 18px 42px rgba(15, 62, 59, 0.12);
  --shell-content: 1100px;
  --shell-gutter: 24px;

  margin: 0;
  font-family: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
  background: var(--shell-soft);
  color: var(--shell-ink);
  line-height: 1.7;
}

body.page-team .chat-button,
body.page-team .chat-widget {
  display: none !important;
}

/* Ensure header matches homepage chrome */
body.page-team .main-header {
  background: rgba(247, 248, 248, 0.92) !important;
  border-bottom: 1px solid var(--shell-line);
  box-shadow: none !important;
}

body.page-team .container:not(.nav-container) {
  width: min(var(--shell-content), calc(100% - 32px));
  max-width: var(--shell-content);
  margin-inline: auto;
  padding-inline: 0;
  box-sizing: border-box;
}

/* ---------- Hero ---------- */
body.page-team .team-hero {
  position: relative;
  overflow: hidden;
  padding: 56px var(--shell-gutter) 40px;
  text-align: right;
  color: var(--shell-ink);
  background:
    radial-gradient(ellipse 70% 55% at 92% 0%, rgba(2, 68, 66, 0.06), transparent 55%),
    var(--shell-soft);
  border-bottom: none;
}

body.page-team .team-hero::before,
body.page-team .team-hero::after {
  display: none !important;
}

body.page-team .team-hero .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--shell-teal-mid);
  font-size: 0.88rem;
  font-weight: 700;
}

body.page-team .team-hero .hero-kicker::before,
body.page-team .team-hero .hero-kicker::after {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

body.page-team .team-hero h1 {
  margin: 0 0 8px;
  color: var(--shell-teal-mid);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

body.page-team .team-hero .lead {
  margin: 0;
  max-width: 36rem;
  color: var(--shell-muted);
  font-size: 1rem;
  line-height: 1.85;
}

/* ---------- Grid ---------- */
body.page-team .therapists-section {
  padding: 28px var(--shell-gutter) 72px;
  background: var(--shell-white);
}

body.page-team .therapists-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 920px;
  margin-inline: auto;
}

/* ---------- Cards — horizontal list (desktop + mobile) ---------- */
body.page-team .therapist-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(194, 206, 203, 0.72);
  border-radius: var(--shell-radius-lg);
  background: var(--shell-white);
  box-shadow: var(--shell-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: none;
}

body.page-team .therapist-card:hover {
  transform: translateY(-2px);
  border-color: rgba(83, 133, 125, 0.4);
  box-shadow: var(--shell-shadow-hover);
}

body.page-team .therapist-photo {
  position: relative;
  width: 200px;
  min-height: 100%;
  align-self: stretch;
  overflow: hidden;
  background: #e8f0ed;
  border-radius: 0;
}

body.page-team .therapist-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

body.page-team .therapist-header {
  display: none !important;
}

body.page-team .therapist-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
  padding: 20px 22px 18px;
  text-align: right;
}

body.page-team .therapist-name {
  margin: 0 0 4px;
  color: var(--shell-teal-mid);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
}

body.page-team .therapist-degree {
  margin: 0 0 10px;
  color: var(--shell-teal);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
}

body.page-team .therapist-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--shell-muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

body.page-team .info-section {
  display: none;
  margin-bottom: 10px;
}

body.page-team .info-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--shell-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

body.page-team .info-section h4 i {
  color: var(--shell-teal-mid);
  font-size: 0.75rem;
}

body.page-team .info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.page-team .info-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(194, 206, 203, 0.85);
  border-radius: 999px;
  background: #f4f8f6;
  color: #315754;
  font-size: 0.72rem;
  font-weight: 600;
}

body.page-team .therapist-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  max-width: 420px;
}

body.page-team .btn-more-info,
body.page-team .btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.page-team .btn-more-info {
  border: 1px solid rgba(10, 81, 77, 0.28);
  background: transparent;
  color: var(--shell-teal-mid);
}

body.page-team .btn-more-info:hover {
  background: #eef5f2;
}

body.page-team .btn-book {
  border: none;
  background: var(--shell-teal);
  color: #fff;
}

body.page-team .btn-book:hover {
  background: var(--shell-teal-deep);
}

/* ---------- Modal ---------- */
body.page-team .therapist-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(8, 40, 38, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.page-team .therapist-modal.active {
  opacity: 1;
  visibility: visible;
}

body.page-team .modal-content {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  border-radius: 24px 24px 0 0;
  background: var(--shell-white);
  box-shadow: var(--shell-shadow-hover);
  transform: translateY(18px);
  transition: transform 0.25s ease;
}

body.page-team .therapist-modal.active .modal-content {
  transform: translateY(0);
}

body.page-team .modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--shell-line);
  border-radius: 12px;
  background: #f7faf8;
  color: var(--shell-teal-mid);
  box-shadow: none;
  cursor: pointer;
}

body.page-team .modal-hero,
body.page-team .modal-hero-img,
body.page-team #modalAvatar,
body.page-team .modal-avatar {
  display: none !important;
}

body.page-team .modal-header {
  display: block;
  padding: 22px 52px 0 18px;
  border-bottom: none;
  text-align: right;
}

body.page-team .modal-identity h2,
body.page-team .modal-header h2 {
  margin: 0 0 4px;
  color: var(--shell-teal-mid);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
}

body.page-team .modal-identity p,
body.page-team .modal-header p {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.88rem;
}

body.page-team .modal-body {
  padding: 14px 18px 22px;
  text-align: right;
}

body.page-team .modal-section {
  margin-bottom: 14px;
}

body.page-team .modal-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--shell-teal-mid);
  font-size: 0.95rem;
  font-weight: 800;
}

body.page-team .modal-body h3 i {
  font-size: 0.85rem;
}

body.page-team .modal-body p {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.9rem;
  line-height: 1.9;
}

body.page-team .modal-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

body.page-team .modal-btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  background: var(--shell-teal);
  color: #fff !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(2, 68, 66, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

body.page-team .modal-btn-book:hover {
  background: var(--shell-teal-deep);
  transform: translateY(-1px);
}

body.page-team .modal-btn-book i {
  font-size: 1rem;
}

/* ---------- Footer polish ---------- */
body.page-team .main-footer {
  background: #012e2e !important;
}

body.page-team .footer-desc,
body.page-team .footer-links a,
body.page-team .footer-links li,
body.page-team .footer-bottom p,
body.page-team .contact-item,
body.page-team .contact-item a {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.page-team .footer-column h3,
body.page-team .footer-logo span {
  color: #fff !important;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  body.page-team {
    --shell-gutter: 18px;
  }

  body.page-team .therapists-grid {
    max-width: 100%;
    gap: 14px;
  }

  body.page-team .therapist-card {
    grid-template-columns: 168px minmax(0, 1fr);
  }

  body.page-team .therapist-photo {
    width: 168px;
  }
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 760px) {
  body.page-team {
    --shell-gutter: 14px;
  }

  body.page-team .container:not(.nav-container) {
    width: min(var(--shell-content), calc(100% - 28px));
  }

  body.page-team .team-hero {
    padding: 36px var(--shell-gutter) 24px;
  }

  body.page-team .team-hero h1 {
    font-size: 1.45rem;
  }

  body.page-team .team-hero .lead {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  body.page-team .therapists-section {
    padding: 12px var(--shell-gutter) 48px;
    background: var(--shell-soft);
  }

  body.page-team .therapists-grid {
    gap: 12px;
  }

  body.page-team .therapist-card {
    grid-template-columns: 108px minmax(0, 1fr);
    border-radius: 22px;
  }

  body.page-team .therapist-card:hover {
    transform: none;
  }

  body.page-team .therapist-photo {
    width: 108px;
  }

  body.page-team .therapist-content {
    padding: 12px 12px 12px 10px;
  }

  body.page-team .therapist-name {
    font-size: 0.98rem;
    margin-bottom: 2px;
  }

  body.page-team .therapist-degree {
    font-size: 0.72rem;
    margin-bottom: 6px;
  }

  body.page-team .therapist-description {
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
    font-size: 0.74rem;
    line-height: 1.7;
  }

  body.page-team .therapist-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 8px;
    max-width: none;
  }

  body.page-team .btn-more-info,
  body.page-team .btn-book {
    min-height: 36px;
    padding: 8px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    gap: 4px;
  }

  body.page-team .btn-more-info i,
  body.page-team .btn-book i {
    font-size: 0.7rem;
  }

  body.page-team .modal-content {
    border-radius: 22px 22px 0 0;
  }

  body.page-team .modal-btn-book {
    min-height: 46px;
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  body.page-team {
    --shell-gutter: 12px;
  }

  body.page-team .therapist-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  body.page-team .therapist-photo {
    width: 92px;
  }

  body.page-team .therapist-name {
    font-size: 0.9rem;
  }

  body.page-team .therapist-description {
    font-size: 0.7rem;
  }
}

@media (min-width: 761px) {
  body.page-team .therapists-grid {
    gap: 18px;
  }

  body.page-team .therapist-card {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  body.page-team .therapist-photo {
    width: 220px;
    min-height: 100%;
  }

  body.page-team .therapist-description {
    -webkit-line-clamp: 3;
    font-size: 0.92rem;
  }
}

@media (min-width: 900px) {
  body.page-team .therapist-modal {
    align-items: center;
    padding: 24px;
  }

  body.page-team .modal-content {
    border-radius: 24px;
  }
}
