.main-nav a[aria-current="page"] { color: var(--sage-dark); }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.team-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 98px;
  background:
    radial-gradient(circle at 7% 20%, rgba(242,190,149,.24), transparent 25%),
    linear-gradient(135deg, var(--cream), #fff 58%, #eef6fa);
}

.team-hero::after {
  position: absolute;
  right: -110px;
  bottom: -140px;
  width: 390px;
  height: 390px;
  content: "";
  background: rgba(116,173,107,.1);
  border-radius: 50%;
}

.team-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  gap: clamp(55px, 8vw, 100px);
}

.team-hero__copy { min-width: 0; }
.team-hero h1 { font-size: clamp(3rem, 5vw, 4.9rem); }
.team-hero h1 em { color: var(--sage-dark); font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.team-hero__copy > p:not(.eyebrow) { max-width: 620px; margin: 26px 0 0; color: var(--muted); font-size: 1.05rem; }
.team-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 25px; margin-top: 34px; }

.team-hero__visual { position: relative; min-width: 0; padding: 0 20px 25px 0; }
.team-hero__image { overflow: hidden; aspect-ratio: 4 / 3.55; border-radius: 46% 46% 26px 26px; box-shadow: var(--shadow); }
.team-hero__image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.team-hero__stat {
  position: absolute;
  top: 35px;
  left: -35px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--white);
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 17px;
  box-shadow: 0 16px 35px rgba(11,47,104,.22);
}

.team-hero__stat strong { font-size: 1.8rem; line-height: 1; }
.team-hero__stat span { font-size: .7rem; font-weight: 650; line-height: 1.35; }

.team-hero__note {
  position: absolute;
  right: -15px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 245px;
  padding: 17px 19px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 17px;
  box-shadow: 0 18px 42px rgba(11,47,104,.16);
}

.team-hero__note svg { width: 28px; flex: 0 0 28px; fill: #d27b59; }
.team-hero__note span { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.team-hero__note strong { color: var(--navy); font-size: .85rem; }

.team-directory { background: var(--white); }
.team-directory__heading { margin-bottom: 36px; }

.team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
}

.team-filter {
  min-height: 42px;
  padding: 9px 17px;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.team-filter:hover { color: var(--navy); border-color: #bfcfda; transform: translateY(-1px); }
.team-filter.is-active { color: var(--white); background: var(--navy); border-color: var(--navy); }

.doctor-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.doctor-card[hidden] { display: none; }

.doctor-card {
  --profile-accent: var(--navy);
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 300px;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: repeat(5, auto);
  align-content: start;
  align-items: start;
  gap: 5px 38px;
  padding: 34px 42px 32px;
  background:
    radial-gradient(circle at 8% 50%, color-mix(in srgb, var(--profile-accent) 12%, transparent), transparent 23%),
    linear-gradient(135deg, var(--cream), var(--white));
  border: 1px solid var(--line);
  border-radius: 62px 22px 62px 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.doctor-card:nth-child(even) { border-radius: 22px 62px 22px 62px; }
.doctor-card:hover { border-color: #c8d6df; box-shadow: 0 20px 50px rgba(11,47,104,.11); transform: translateY(-3px); }

.doctor-card--cutout {
  display: block;
  min-height: 698px;
  padding-left: 370px;
}

.doctor-card::before {
  position: absolute;
  top: -75px;
  left: -70px;
  width: 250px;
  height: 250px;
  content: "";
  border: 35px solid color-mix(in srgb, var(--profile-accent) 7%, transparent);
  border-radius: 45% 55% 62% 38%;
  transform: rotate(18deg);
}

.doctor-card > * { position: relative; z-index: 1; }

.doctor-card__top {
  grid-row: 1 / 6;
  grid-column: 1;
  align-self: center;
}

.doctor-card__top--cutout {
  position: absolute;
  top: 18px;
  bottom: auto;
  left: 34px;
  overflow: hidden;
  display: grid;
  width: 290px;
  height: calc(100% - 18px);
  min-height: 680px;
  grid-row: auto;
  grid-column: auto;
  grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
  align-self: auto;
  margin: 0;
  background: rgba(255,255,255,.52);
}

.doctor-cutout {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: flex-end;
  justify-content: center;
}

.doctor-cutout img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 18px rgba(11,47,104,.14));
  transform: none;
  transform-origin: center bottom;
}

.doctor-cutout--flipped img { transform: scaleX(-1); }

.doctor-personal-logo {
  box-sizing: border-box;
  overflow: hidden;
  display: grid;
  height: 100%;
  min-height: 0;
  place-items: center;
  padding: 18px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}

.doctor-personal-logo img {
  display: block;
  width: 86%;
  height: 86%;
  max-width: 245px;
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  opacity: 1;
}

.doctor-card--cutout .doctor-status { top: 10px; right: -8px; left: auto; }

.doctor-avatar {
  overflow: hidden;
  display: flex;
  width: 178px;
  height: 178px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--navy);
  background: var(--sky);
  border: 7px solid rgba(255,255,255,.95);
  border-radius: 50%;
  box-shadow: 0 16px 36px rgba(11,47,104,.14);
  font-weight: 830;
  letter-spacing: .04em;
}

.doctor-avatar > span { font-size: 1.7rem; line-height: 1; }
.doctor-avatar small { max-width: 100px; font-size: .62rem; font-weight: 700; letter-spacing: 0; text-align: center; }
.doctor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.doctor-avatar--portrait img { object-position: center 24%; }

.doctor-card--navy .doctor-avatar { color: var(--white); background: var(--navy); }
.doctor-card--sky .doctor-avatar { background: #dcecf8; }
.doctor-card--peach .doctor-avatar { color: #8a543d; background: var(--peach-soft); }
.doctor-card--sage .doctor-avatar { color: #376638; background: var(--mint); }
.doctor-card--mint .doctor-avatar { color: #33766b; background: #dff3ee; }
.doctor-card--blue .doctor-avatar { color: #fff; background: var(--blue); }
.doctor-card--sand .doctor-avatar { color: #755d32; background: #f5ecd7; }

.doctor-card--navy { --profile-accent: var(--navy); }
.doctor-card--sky { --profile-accent: #78a8cb; }
.doctor-card--peach { --profile-accent: #d9966d; }
.doctor-card--sage { --profile-accent: var(--sage); }
.doctor-card--mint { --profile-accent: #69a99f; }
.doctor-card--blue { --profile-accent: var(--blue); }
.doctor-card--sand { --profile-accent: #c3a467; }

.doctor-status { position: absolute; top: -2px; left: 194px; padding: 7px 11px; color: var(--muted); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 999px; font-size: .62rem; font-weight: 760; white-space: nowrap; }
.doctor-status--open { color: #376638; background: var(--mint); border-color: #c8e3ce; }

.doctor-card__specialty { grid-column: 2; margin: 0 0 3px; color: var(--sage-dark); font-size: .68rem; font-weight: 800; letter-spacing: .08em; line-height: 1.45; text-transform: uppercase; }
.doctor-card h3 { grid-column: 2; margin: 0; color: var(--navy-deep); font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.3; }
.doctor-card__profile { min-width: 0; grid-column: 2; }
.doctor-card__description { grid-column: 2; max-width: 720px; margin: 9px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }

.doctor-credentials { margin-top: 18px; padding: 17px 18px 18px; background: rgba(255,255,255,.64); border: 1px solid color-mix(in srgb, var(--profile-accent) 20%, var(--line)); border-radius: 18px 8px 18px 8px; }
.doctor-credentials h4 { margin: 0 0 14px; color: var(--navy); font-size: .95rem; letter-spacing: .025em; }
.doctor-credentials__hint { display: none; }
.doctor-credentials ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.doctor-credentials li { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: center; gap: 8px; min-height: 122px; padding: 17px 8px 17px 18px; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 13px; }
.doctor-credentials__logo { display: grid; width: 132px; height: 100%; min-height: 106px; grid-row: 1; grid-column: 2; place-items: center; opacity: 1; -webkit-mask-image: none; mask-image: none; transition: transform .25s ease; }
.doctor-credentials__logo img { display: block; width: 102px; height: 102px; object-fit: contain; }
.doctor-credentials__logo img[src$="logo-uady.png"],
.doctor-credentials__logo img[src$="logo-comgo.png"] { width: 124px; height: 124px; }
.doctor-credentials__logo img[src$="logo-uv.png"] { width: 112px; height: 112px; }
.doctor-credentials__copy { position: relative; z-index: 1; display: grid; grid-row: 1; grid-column: 1; align-content: center; gap: 4px; min-width: 0; }
.doctor-credentials li:hover .doctor-credentials__logo { transform: translateX(-3px); }
.doctor-credentials strong { color: var(--navy-deep); font-size: .85rem; line-height: 1.48; }
.doctor-credentials__copy > span { color: #536371; font-size: .79rem; line-height: 1.48; }
.doctor-credentials small { color: var(--sage-dark); font-size: .74rem; font-weight: 780; line-height: 1.45; }
.doctor-credentials__verify { display: inline-flex; width: fit-content; align-items: center; gap: 5px; margin-top: 2px; color: var(--blue); font-size: .69rem; font-weight: 800; line-height: 1.4; text-decoration: none; }
.doctor-credentials__verify span { transition: transform .2s ease; }
.doctor-credentials__verify:hover { text-decoration: underline; }
.doctor-credentials__verify:hover span { transform: translate(2px, -2px); }
.doctor-credentials__verify:focus-visible { border-radius: 4px; outline: 3px solid rgba(15,101,166,.24); outline-offset: 3px; }

.doctor-card__details { display: grid; grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.doctor-card__details li { display: grid; gap: 3px; padding: 11px 14px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 12px; }
.doctor-card__details strong { color: var(--navy); font-size: .82rem; line-height: 1.35; }
.doctor-card__details span { color: var(--muted); font-size: .86rem; line-height: 1.45; }

.doctor-card__action { display: inline-flex; grid-column: 2; align-items: center; justify-self: start; gap: 7px; margin-top: 16px; color: var(--blue); font-size: .92rem; font-weight: 780; line-height: 1.4; text-decoration: none; }
.doctor-card__action span { transition: transform .2s ease; }
.doctor-card__action:hover span { transform: translateX(4px); }

.team-directory__note { max-width: 780px; margin: 27px auto 0; color: #7b8792; font-size: .7rem; text-align: center; }

.team-principles { color: var(--white); background: var(--navy-deep); }
.team-principles__heading { max-width: 720px; margin-bottom: 45px; }
.team-principles__heading .eyebrow { color: var(--peach); }
.team-principles h2 { color: var(--white); }
.team-principles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); }
.team-principles article { padding: 35px; background: var(--navy-deep); }
.team-principles__number { color: var(--peach); font-size: .68rem; font-weight: 850; }
.team-principles h3 { margin: 19px 0 10px; color: var(--white); font-size: 1rem; }
.team-principles article p { margin: 0; color: rgba(255,255,255,.66); font-size: .78rem; line-height: 1.7; }

.team-cta { background: var(--white); }
.team-cta__card {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 70px;
  padding: clamp(42px, 6vw, 70px);
  color: var(--white);
  background:
    radial-gradient(circle at 92% 10%, rgba(116,173,107,.3), transparent 28%),
    var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.team-cta h2 { color: var(--white); }
.team-cta__card > div > p:not(.eyebrow) { margin: 20px 0 0; color: rgba(255,255,255,.72); }
.team-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
.team-cta__actions > a:not(.button) { color: var(--white); font-size: .78rem; font-weight: 720; text-decoration: none; }
.team-cta__actions > a:not(.button):hover { text-decoration: underline; }

@media (max-width: 1040px) {
  .team-hero__grid { gap: 50px; }
  .team-hero__stat { left: -15px; }
  .doctor-card { grid-template-columns: 180px minmax(0, 1fr); gap: 5px 28px; padding-right: 32px; padding-left: 32px; }
  .doctor-card--cutout { padding-left: 315px; }
  .doctor-card__top--cutout { left: 27px; width: 255px; }
  .doctor-avatar { width: 150px; height: 150px; }
  .doctor-status { left: 163px; }
}

@media (max-width: 860px) {
  .team-hero { padding: 62px 0 80px; }
  .team-hero__grid { grid-template-columns: 1fr; gap: 58px; }
  .team-hero__copy { max-width: 700px; }
  .team-hero__visual { width: min(100%, 680px); margin-inline: auto; }
  .team-hero__image { aspect-ratio: 4 / 3.2; }
  .team-principles__grid { grid-template-columns: 1fr; }
  .team-cta__card { grid-template-columns: 1fr; gap: 35px; }

  .doctor-card { grid-template-columns: 150px minmax(0, 1fr); gap: 4px 24px; border-radius: 45px 18px 45px 18px; }
  .doctor-card--cutout { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 32px; }
  .doctor-card--cutout > * { min-width: 0; }
  .doctor-card--cutout .doctor-card__top--cutout {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    overflow: hidden;
    display: grid;
    width: auto;
    height: clamp(440px, 78vw, 620px);
    min-height: 0;
    grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
    grid-row: auto;
    grid-column: 1;
    margin: -34px -32px 24px;
    background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.94), transparent 62%);
  }
  .doctor-card--cutout .doctor-cutout { height: 100%; min-height: 0; }
  .doctor-card--cutout .doctor-cutout img {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin-inline: 0;
    object-fit: contain;
    object-position: center bottom;
  }
  .doctor-card--cutout .doctor-status { top: 20px; right: 20px; left: auto; }
  .doctor-card--cutout .doctor-card__specialty,
  .doctor-card--cutout h3,
  .doctor-card--cutout .doctor-card__profile,
  .doctor-card--cutout .doctor-card__description,
  .doctor-card--cutout .doctor-card__details,
  .doctor-card--cutout .doctor-card__action { grid-column: 1; }
  .doctor-card:nth-child(even) { border-radius: 18px 45px 18px 45px; }
  .doctor-avatar { width: 130px; height: 130px; }
  .doctor-status { left: 140px; }
  .doctor-credentials ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctor-card__details { grid-template-columns: 1fr; gap: 7px; }
  .doctor-card--cutout .doctor-card__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 590px) {
  .team-hero { padding-top: 48px; }
  .team-hero h1 { font-size: clamp(2.35rem, 10vw, 3rem); }
  .team-hero__copy > p:not(.eyebrow) { font-size: .92rem; }
  .team-hero__actions { align-items: stretch; flex-direction: column; }
  .team-hero__actions .button { width: 100%; }
  .team-hero__actions .text-link { align-self: center; }
  .team-hero__visual { padding-right: 0; }
  .team-hero__image { aspect-ratio: 1 / 1.05; border-radius: 44% 44% 22px 22px; }
  .team-hero__stat { top: 25px; left: -4px; }
  .team-hero__note { right: 4px; min-width: 220px; padding: 14px 16px; }

  .team-directory__heading { margin-bottom: 28px; }
  .team-filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding: 0 14px 7px 0; scrollbar-width: thin; }
  .team-filter { flex: 0 0 auto; }
  .doctor-card {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0;
    padding: 28px 23px;
    border-radius: 38px 16px 38px 16px;
  }
  .doctor-card:nth-child(even) { border-radius: 16px 38px 16px 38px; }
  .doctor-card__top { display: flex; grid-row: auto; grid-column: 1; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
  .doctor-card--cutout { grid-template-columns: minmax(0, 1fr); }
  .doctor-card--cutout .doctor-card__top--cutout {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    overflow: hidden;
    display: grid;
    width: auto;
    height: clamp(390px, 112vw, 470px);
    grid-template-rows: minmax(0, 72fr) minmax(0, 28fr);
    min-height: 0;
    margin: -28px -23px 24px;
    background: radial-gradient(circle at 50% 68%, rgba(255,255,255,.88), transparent 58%);
  }
  .doctor-card--cutout .doctor-cutout { height: 100%; min-height: 0; }
  .doctor-card--cutout .doctor-cutout img {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin-inline: 0;
    object-fit: contain;
    object-position: center bottom;
  }
  .doctor-personal-logo { padding: 14px 18px; }
  .doctor-personal-logo img {
    width: 100%;
    height: 100%;
    max-width: 300px;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
  .doctor-card--cutout .doctor-status { top: 20px; right: 20px; left: auto; }
  .doctor-avatar { width: 128px; height: 128px; }
  .doctor-avatar > span { font-size: 1.45rem; }
  .doctor-status { position: static; margin-top: 7px; }
  .doctor-card--cutout .doctor-status { position: absolute; top: 20px; right: 20px; left: auto; margin-top: 0; }
  .doctor-card__specialty, .doctor-card h3, .doctor-card__profile, .doctor-card__description, .doctor-card__details, .doctor-card__action { grid-column: 1; }
  .doctor-card h3 { font-size: 1.35rem; }
  .doctor-credentials__hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -3px 0 11px; color: var(--muted); font-size: .72rem; font-weight: 720; }
  .doctor-credentials ul { display: flex; overflow-x: auto; align-items: stretch; gap: 10px; padding: 0 0 9px; scroll-padding-inline: 0; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-inline: contain; }
  .doctor-credentials li { grid-template-columns: minmax(0, 1fr) 92px; gap: 4px; min-height: 108px; padding: 14px 5px 14px 14px; }
  .doctor-credentials li { flex: 0 0 88%; min-height: 138px; scroll-snap-align: start; }
  .doctor-credentials__logo { width: 92px; min-height: 90px; }
  .doctor-credentials__logo img { width: 78px; height: 78px; }
  .doctor-credentials__logo img[src$="logo-uady.png"],
  .doctor-credentials__logo img[src$="logo-comgo.png"] { width: 88px; height: 88px; }
  .doctor-credentials__logo img[src$="logo-uv.png"] { width: 82px; height: 82px; }
  .doctor-card__details { grid-template-columns: 1fr; }
  .doctor-card--cutout .doctor-card__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-principles article { padding: 29px 25px; }
  .team-cta__card { width: min(calc(100vw - 20px), var(--container)); padding: 40px 25px; border-radius: 24px; }
  .team-cta__actions { align-items: stretch; }
  .team-cta__actions > a:not(.button) { align-self: center; text-align: center; }
}
