/* ==========================================================================
   SAJ Dental Clinic — "Meet the Team" section
   Scope: every selector is under .saj-meet-team. Visual values are CSS
   custom properties so they can map to future Elementor widget controls.
   ========================================================================== */

/* Standalone preview page only (meet-team.html) */
.saj-meet-team-preview {
  margin: 0;
  background: #FFFFFF;
}

.saj-meet-team {
  /* ---- Brand ---- */
  --mt-navy: #0B2340;
  --mt-navy-soft: #105181;
  --mt-blue: #1269A8;
  --mt-orange: #F4511E;
  --mt-orange-strong: #D6400F;
  --mt-light-blue: #EAF5FC;
  --mt-frame-bg: #EEF4F9;
  --mt-text: #44516A;
  --mt-muted: #6A7485;
  --mt-line: rgba(11, 35, 64, 0.14);

  /* ---- Type ---- */
  --mt-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --mt-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mt-heading-size: clamp(38px, 4.5vw, 68px);   /* secondary scale, below the hero heading */

  /* ---- Layout ---- */
  --mt-gutter: clamp(20px, 3.4vw, 56px);
  --mt-spacing: clamp(56px, 6vw, 96px);
  --mt-portrait-width: clamp(320px, 36vw, 560px);
  --mt-portrait-ratio: 0.95;                      /* width / height */
  --mt-portrait-radius: clamp(28px, 2.6vw, 40px);
  --mt-portrait-position: 42% 20%;               /* lead image focal point */
  --mt-aside-width: clamp(240px, 23vw, 380px);   /* right clinic image */
  --mt-aside-height: clamp(520px, 50vw, 800px);
  --mt-aside-position: 50% 40%;
  --mt-member-radius: 22px;
  --mt-member-position: 50% 18%;
  --mt-team-max: 1160px;

  --mt-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- Section background image (set to none to use the gradient only) ---- */
  --mt-bg-image: url("../images/team-bg.png");
  --mt-bg-position: center top;

  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: var(--mt-spacing) 0 calc(var(--mt-spacing) * 1.1);
  background-color: #F7FAFD;
  background-image:
    var(--mt-bg-image),
    linear-gradient(180deg, #FBFDFF 0%, #F3F8FC 55%, #F7FAFD 100%);
  background-position: var(--mt-bg-position), center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  font-family: var(--mt-font-body);
  color: var(--mt-text);
  -webkit-font-smoothing: antialiased;
}

.saj-meet-team *,
.saj-meet-team *::before,
.saj-meet-team *::after {
  box-sizing: border-box;
}

.saj-meet-team svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Decorative background shapes
   ========================================================================== */
.saj-meet-team__shape {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

/* Soft curve wrapping the right image (upper right). */
.saj-meet-team__shape--top {
  top: -6%;
  right: -6vw;
  width: calc(var(--mt-aside-width) + 14vw);
  height: calc(var(--mt-aside-height) + 12%);
  border-radius: 58% 0 0 62% / 46% 0 0 54%;
  background: linear-gradient(200deg, rgba(234, 245, 252, 0.95) 0%, rgba(240, 246, 251, 0.6) 60%, rgba(255, 255, 255, 0) 100%);
}

/* Large sweeping curve from the lower right. Hidden while the background
   image (which has its own waves) is in use — remove "display: none" to
   bring it back with a plain gradient background. */
.saj-meet-team__shape--bottom {
  display: none;
  right: -18vw;
  bottom: -26vw;
  width: 62vw;
  height: 52vw;
  border-radius: 62% 38% 0 0 / 58% 52% 0 0;
  background: linear-gradient(160deg, rgba(228, 238, 246, 0.85), rgba(243, 248, 252, 0.2));
}

/* ==========================================================================
   Right-side clinic image (optional, independent)
   ========================================================================== */
.saj-meet-team__aside {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: var(--mt-aside-width);
  height: var(--mt-aside-height);
  margin: 0;
}

.saj-meet-team__aside-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Organic silhouette: generous rounded shoulder, long sweep to the right edge. */
  /* border-radius: 62% 0 0 100% / 34% 0 0 66%; */
  background: var(--mt-light-blue);
}

.saj-meet-team__aside-image {
  position: absolute;
  top: -5%;
  left: 0;
  display: block;
  width: 100%;
  height: 110%;                       /* headroom for the subtle parallax */
  /* object-fit: cover;
  object-position: var(--mt-aside-position); */
}

/* ==========================================================================
   A. Introduction
   ========================================================================== */
.saj-meet-team__intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--mt-portrait-width) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 4vw, 64px);
  /* the right column stops before the clinic image */
  padding: 0 calc(var(--mt-aside-width) + clamp(16px, 2vw, 32px)) 0 var(--mt-gutter);
}

/* ---- Lead portrait ---- */
.saj-meet-team__lead {
  position: relative;
}

.saj-meet-team__portrait-frame {
  position: relative;
  aspect-ratio: var(--mt-portrait-ratio);
  overflow: hidden;
  border-radius: var(--mt-portrait-radius);
  background: var(--mt-frame-bg);
  box-shadow: 0 40px 80px -50px rgba(11, 35, 64, 0.45);
}

.saj-meet-team__portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mt-portrait-position);
}

/* Orange sweep in the lower-right corner of the portrait (as in the design). */
.saj-meet-team__portrait-frame::after {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -20%;
  width: 46%;
  height: 58%;
  border-radius: 60% 0 0 0 / 70% 0 0 0;
  background: linear-gradient(150deg, rgba(244, 81, 30, 0) 30%, rgba(244, 81, 30, 0.55) 62%, rgba(244, 81, 30, 0.9) 100%);
  pointer-events: none;
}

/* ---- Floating profile card (independent of the image) ---- */
.saj-meet-team__profile-card {
  position: absolute;
  left: clamp(12px, 1.6vw, 22px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  max-width: calc(100% - 28px);
  padding: clamp(16px, 1.6vw, 24px) clamp(16px, 1.6vw, 24px) clamp(16px, 1.6vw, 24px) clamp(18px, 2vw, 28px);
  border-radius: clamp(18px, 1.8vw, 26px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 50px -28px rgba(11, 35, 64, 0.45);
}

.saj-meet-team__profile-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.saj-meet-team__profile-name {
  margin: 0 0 4px;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--mt-navy);
}

.saj-meet-team__profile-role,
.saj-meet-team__profile-org {
  margin: 0;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.4;
  color: var(--mt-muted);
}

.saj-meet-team__profile-link {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(44px, 3.6vw, 52px);
  height: clamp(44px, 3.6vw, 52px);
  border-radius: 50%;
  background: var(--mt-orange);
  color: #FFFFFF;
  box-shadow: 0 12px 24px -12px rgba(244, 81, 30, 0.8);
  transition: background-color 0.35s ease, transform 0.45s var(--mt-ease);
}

.saj-meet-team__profile-link svg {
  width: 45%;
  height: 45%;
  stroke-width: 2;
  transition: transform 0.45s var(--mt-ease);
}

.saj-meet-team__profile-link:hover,
.saj-meet-team__profile-link:focus-visible {
  background: var(--mt-orange-strong);
}

.saj-meet-team__profile-link:hover svg,
.saj-meet-team__profile-link:focus-visible svg {
  transform: translateX(3px);
}

/* ---- Text content ---- */
.saj-meet-team__content {
  min-width: 0;
}

.saj-meet-team__eyebrow,
.saj-meet-team__team-title {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  font-family: var(--mt-font-body);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mt-blue);
}

.saj-meet-team__eyebrow-line {
  display: block;
  flex: 0 0 auto;
  width: clamp(48px, 7vw, 100px);
  height: 1px;
  background: var(--mt-blue);
  opacity: 0.6;
  transform-origin: 0 50%;
}

.saj-meet-team__heading {
  margin: clamp(18px, 2.4vw, 30px) 0 clamp(20px, 2.4vw, 30px);
  font-family: var(--mt-font-display);
  font-size: var(--mt-heading-size);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--mt-navy);
}

/* Each line is a mask for the reveal animation. */
.saj-meet-team__heading-line {
  display: block;
  overflow: hidden;
  padding: 0.02em 0.14em 0.1em 0;
  margin-bottom: -0.1em;
}

.saj-meet-team__heading-inner {
  display: inline-block;
}

.saj-meet-team__heading-highlight {
  font-style: italic;
  color: var(--mt-orange);
}

.saj-meet-team__description {
  max-width: 33rem;
  margin: 0;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.65;
  color: var(--mt-text);
}

/* ---- Features ---- */
.saj-meet-team__features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 32px);
  max-width: 34rem;
  margin: clamp(30px, 3.4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.saj-meet-team__feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--mt-navy);
}

.saj-meet-team__feature-icon {
  display: grid;
  place-items: center;
  width: clamp(58px, 4.8vw, 72px);
  height: clamp(58px, 4.8vw, 72px);
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--mt-light-blue);
  color: var(--mt-blue);
}

.saj-meet-team__feature-icon svg {
  width: 46%;
  height: 46%;
}

.saj-meet-team__feature-label {
  font-size: clamp(14.5px, 1.1vw, 17px);
  font-weight: 500;
  line-height: 1.35;
}

.saj-meet-team__feature-label span {
  display: block;
}

.saj-meet-team__rule {
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--mt-orange);
}

/* ==========================================================================
   B. Team members
   ========================================================================== */
.saj-meet-team__team {
  position: relative;
  z-index: 1;
  max-width: var(--mt-team-max);
  margin: clamp(56px, 6vw, 96px) auto 0;
  padding: 0 var(--mt-gutter);
}

.saj-meet-team__team-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(22px, 2.4vw, 34px);
}

.saj-meet-team__values {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mt-blue);
}

.saj-meet-team__values-sep {
  opacity: 0.5;
  letter-spacing: 0;
}

.saj-meet-team__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 34px);
}

.saj-meet-team__member {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  text-align: center;
}

.saj-meet-team__member-frame {
  width: 100%;
  aspect-ratio: 1.14;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--mt-member-radius);
  background: var(--mt-frame-bg);
  box-shadow: 0 22px 40px -32px rgba(11, 35, 64, 0.5);
}

.saj-meet-team__member-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mt-member-position);
  transition: transform 0.8s var(--mt-ease);
}

.saj-meet-team__member:hover .saj-meet-team__member-image {
  transform: scale(1.04);
}

.saj-meet-team__member-name {
  margin: 0 0 4px;
  font-family: var(--mt-font-body);
  font-size: clamp(15.5px, 1.2vw, 18px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--mt-navy-soft);
}

.saj-meet-team__member-role {
  margin: 0;
  font-size: clamp(14px, 1.02vw, 15.5px);
  line-height: 1.4;
  color: var(--mt-muted);
}

/* ==========================================================================
   Focus
   ========================================================================== */
.saj-meet-team a:focus-visible {
  outline: 3px solid var(--mt-blue);
  outline-offset: 3px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Laptop 1024–1279: slimmer clinic image, tighter columns */
@media (max-width: 1279.98px) {
  .saj-meet-team {
    --mt-aside-width: clamp(180px, 17vw, 220px);
    --mt-portrait-width: clamp(320px, 38vw, 460px);
    --mt-heading-size: clamp(36px, 4.2vw, 54px);
  }

  .saj-meet-team__features {
    gap: 12px;
  }
}

/* Tablet 768–1023 */
@media (max-width: 1023.98px) {
  .saj-meet-team {
    --mt-gutter: clamp(20px, 4vw, 40px);
    --mt-heading-size: clamp(34px, 5.4vw, 46px);
    --mt-portrait-width: 42%;
  }

  /* The decorative clinic image would crowd the columns: it is hidden here. */
  .saj-meet-team__aside,
  .saj-meet-team__shape--top {
    display: none;
  }

  .saj-meet-team__intro {
    padding: 0 var(--mt-gutter);
    align-items: start;
  }

  .saj-meet-team__features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .saj-meet-team__profile-card {
    left: 10px;
    bottom: 10px;
    gap: 12px;
    padding: 12px 12px 12px 16px;
  }

  .saj-meet-team__profile-org {
    display: none;
  }

  .saj-meet-team__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 32px;
  }

  /* 3 + 2 layout: the second row is centred */
  .saj-meet-team__member {
    grid-column: span 2;
  }

  .saj-meet-team__member:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

/* Mobile < 768: stacked composition */
@media (max-width: 767.98px) {
  .saj-meet-team {
    --mt-gutter: 20px;
    --mt-heading-size: clamp(32px, 9vw, 40px);
    --mt-spacing: 56px;
  }

  .saj-meet-team__intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .saj-meet-team__portrait-frame {
    aspect-ratio: 0.9;
  }

  .saj-meet-team__profile-org {
    display: block;
  }

  .saj-meet-team__eyebrow,
  .saj-meet-team__team-title {
    font-size: 11px;
    letter-spacing: 0.24em;
    gap: 14px;
  }

  .saj-meet-team__eyebrow-line {
    width: 36px;
  }

  .saj-meet-team__description {
    font-size: 16px;
  }

  .saj-meet-team__features {
    gap: 10px;
  }

  .saj-meet-team__feature-label {
    font-size: 14px;
  }

  .saj-meet-team__team-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .saj-meet-team__values {
    font-size: 10.5px;
    letter-spacing: 0.2em;
    gap: 10px;
  }

  .saj-meet-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .saj-meet-team__member,
  .saj-meet-team__member:nth-child(4) {
    grid-column: auto;
  }

  /* Odd last card spans both columns, centred at a single-card width. */
  .saj-meet-team__member:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 8px);
  }

  .saj-meet-team__shape--bottom {
    width: 120vw;
    height: 100vw;
    right: -50vw;
    bottom: -40vw;
  }
}

/* Very narrow phones: features stack into a compact list, team in one column */
@media (max-width: 359.98px) {
  .saj-meet-team__features {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .saj-meet-team__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .saj-meet-team__member:last-child:nth-child(odd) {
    width: 100%;
  }

  .saj-meet-team__profile-card {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .saj-meet-team *,
  .saj-meet-team *::before,
  .saj-meet-team *::after {
    transition-duration: 0.01ms !important;
  }
}
