/* =========================================================
   MANAGEMENT TEAM PAGE — Professional Responsive Design
   ========================================================= */

.team-page {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2vw, 30px) 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(12,124,144,.10), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(198,40,40,.045), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.team-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(12,124,144,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,124,144,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .35;
}

.team-page > .container {
  position: relative;
  z-index: 1;
}

/* Header */
.team-hero {
  max-width: 820px;
  margin-bottom: clamp(24px, 4vw, 36px);
}

.team-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 13px;
  margin-bottom: 12px;
  border: 1px solid rgba(12,124,144,.30);
  border-radius: 999px;
  background: rgba(12,124,144,.10);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.team-heading {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.12;
  letter-spacing: -.007em;
  font-weight: 900;
}

.team-lead {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.65;
}

/* Grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 700px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1080px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

/* Card */
.team-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.022)),
    var(--surface);
  box-shadow: 0 14px 38px rgba(16,22,33,.10);
  transition:
    transform var(--trans-slow),
    border-color var(--trans-fast),
    box-shadow var(--trans-slow);
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(12,124,144,.42);
  box-shadow: 0 20px 56px rgba(0,0,0,.16);
}

/* Photo area */
.team-card-media {
  display: grid;
  place-items: center;
  padding: 24px 20px;
  background:
    linear-gradient(135deg, rgba(26,44,85,.95), rgba(12,124,144,.88));
}

.team-photo-wrap {
  width: min(190px, 70%);
  aspect-ratio: 4 / 4.6;
  overflow: hidden;
  border: 5px solid rgba(255,255,255,.95);
  border-radius: 18px;
  background: #eef3f8;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.team-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--trans-slow);
}

.team-card:hover .team-photo-wrap img {
  transform: scale(1.035);
}

/* Body */
.team-card-body {
  padding: 22px 22px 18px;
  min-width: 0;
}

.team-member-name {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.22;
  letter-spacing: -.007em;
  font-weight: 900;
  text-align: center;
}

.team-member-role {
  margin: 8px 0 14px;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
  text-align: center;
}

.team-info-line,
.team-member-bio {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.team-info-line strong,
.team-member-bio strong {
  color: var(--text);
  font-weight: 850;
}

.team-member-bio {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.team-card-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px 18px;
  background: rgba(12,124,144,.08);
  border-top: 1px solid var(--border);
}

.team-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition:
    transform var(--trans-fast),
    filter var(--trans-fast),
    background var(--trans-fast),
    border-color var(--trans-fast);
}

.team-btn:hover {
  transform: translateY(-1px);
}

.team-btn-primary {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(12,124,144,.22);
}

.team-btn-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

.team-btn-outline {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.team-btn-outline:hover {
  color: var(--accent);
  border-color: rgba(12,124,144,.45);
  background: rgba(12,124,144,.08);
}

/* Empty */
.team-empty {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
}

/* Mobile */
@media (max-width: 640px) {
  .team-page {
    padding: 12px 0 15px;
  }

  .team-hero {
    margin-bottom: 22px;
  }

  .team-heading {
    font-size: clamp(20px, 2.5vw, 26px);
    line-height: 1.12;
  }

  .team-lead {
    font-size: 15px;
    line-height: 1.62;
  }

  .team-grid {
    gap: 16px;
  }

  .team-card {
    border-radius: 22px;
  }

  .team-card-media {
    padding: 20px 16px;
  }

  .team-photo-wrap {
    width: min(170px, 72%);
  }

  .team-card-body {
    padding: 20px 18px 16px;
  }

  .team-card-footer {
    padding: 15px 16px 17px;
  }

  .team-btn {
    flex: 1 1 130px;
  }
}

/* Very small mobile */
@media (max-width: 420px) {
  .team-page .container {
    width: min(100% - 24px, 1200px);
  }

  .team-photo-wrap {
    width: 160px;
  }

  .team-member-name {
    font-size: 21px;
  }
}

/* Light mode */
@media (prefers-color-scheme: light) {
  .team-page {
    background:
      radial-gradient(circle at 8% 8%, rgba(12,124,144,.10), transparent 30%),
      radial-gradient(circle at 92% 10%, rgba(198,40,40,.045), transparent 28%),
      linear-gradient(180deg, #ffffff, #f5f8fb);
  }

  .team-card {
    box-shadow: 0 12px 34px rgba(16,22,33,.085);
  }
}

/* =========================================================
   TEAM PAGE — Mobile Button Size Fix
   ========================================================= */

@media (max-width: 640px) {
  .team-card-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px 16px;
  }

  .team-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 125px;
    max-width: 160px;
    min-height: 38px;
    padding: 9px 14px;
    font-size: 13.5px;
    border-radius: 999px;
  }
}

@media (max-width: 420px) {
  .team-card-footer {
    gap: 8px;
  }

  .team-btn {
    width: auto;
    min-width: 120px;
    max-width: 145px;
    padding: 9px 12px;
    font-size: 13px;
  }
}