/* ==========================================================================
   Components — reusable, variant-driven building blocks (the design system)
   ========================================================================== */

/* ---------- Logo (color wordmark recolored to white, like Figma) ---------- */
.logo {
  display: block;
  width: 179px;
  height: 61px;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  /* Recolor the green/charcoal wordmark to a single white, as in the design */
  filter: brightness(0) invert(1);
}
.logo--footer { width: 194px; height: 66px; }
.logo--footer img { object-position: left center; }
.logo--dark img { filter: none; }

.btn--header-dark {
  --btn-fg: rgba(0, 0, 0, 0.8);
  height: 40px;
  gap: 8px;
  padding: 8px 18px;
  border-color: rgba(0, 0, 0, 0.8);
  background: transparent;
}
.btn--header-dark:hover { background-color: rgba(0, 0, 0, 0.06); color: #000; }
.btn--header-dark .btn__lock { filter: brightness(0); opacity: 0.8; }
.btn--header-dark .btn__user-icon { color: currentColor; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  color: var(--accent);
  transition: gap var(--dur) var(--ease-out);
}
.link-more:hover { gap: 14px; }
.link-more .btn__arrow::after { background-color: var(--accent); }

.section-title--page {
  font-weight: var(--fw-bold);
  font-size: 26px;
  line-height: 32px;
  color: var(--primary-navy);
  text-transform: capitalize;
}
.section-title--hero {
  font-weight: var(--fw-bold);
  font-size: 34px;
  line-height: 40px;
  color: #fff;
  text-transform: capitalize;
}
.eyebrow--green {
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  line-height: 25px;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent-green);
}
.rule-accent {
  display: block;
  width: 140px;
  height: 2px;
  background: var(--primary-navy);
  border: none;
}
.rule-accent--sm { width: 42px; }

.chip-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-medium);
  font-size: 18px;
  line-height: 26px;
  color: #555;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid transparent;
  white-space: nowrap;
  flex: none;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.chip-nav--active {
  background: var(--surface-green-soft);
  border-color: rgba(40, 93, 143, 0.2);
  color: var(--text-body);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-fg: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  line-height: normal;
  color: var(--btn-fg);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    opacity var(--dur) var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn__arrow {
  width: 6px;
  height: 10px;
  flex: none;
  position: relative;
  transition: transform 0.3s var(--ease-out);
}
/* Chevron arrowhead — mask lives on ::after so ::before is not clipped by it */
.btn__arrow::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
/* Stem that grows leftward from the chevron base on hover → Figma → arrow animation */
.btn__arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(100% - 1px);
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translateY(-50%) scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .btn__arrow {
  transform: translateX(5px);
}
.btn:hover .btn__arrow::before {
  transform: translateY(-50%) scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover .btn__arrow { transform: translateX(3px); }
  .btn:hover .btn__arrow::before { transform: translateY(-50%) scaleX(1); }
}

/* Match Elementor-generated (0,3,0) specificity to ensure line-height is enforced */
.blog-archive__main .blog-archive__card .blog-archive__more,
.blog-related .blog-related__card .blog-related__more {
  line-height: 1;
  gap: 10px;
}

.btn--primary { --btn-fg: var(--color-white); background-color: var(--primary); }
.btn--primary:hover { background-color: #18304a; }

.btn--white { --btn-fg: var(--primary); background-color: var(--color-white); }
.btn--white:hover { background-color: #e3ebf3; }

.btn--outline {
  --btn-fg: var(--color-white);
  background-color: transparent;
  border-color: var(--color-white);
}
.btn--outline:hover { background-color: rgba(255, 255, 255, 0.12); }

/* Dark outlined — for light/white backgrounds */
.btn--dark {
  --btn-fg: var(--text-body, #333333);
  background-color: transparent;
  border-color: var(--text-body, #333333);
}
.btn--dark:hover { background-color: var(--text-body, #333333); --btn-fg: #fff; color: #fff; }

.btn--header {
  --btn-fg: var(--on-dark-80);
  height: 40px;
  gap: 8px;
  padding: 8px 18px;
  border-color: var(--on-dark-80);
}
.btn--header:hover { background-color: rgba(255, 255, 255, 0.12); color: #fff; }

/* Patient Login portal icon — broken ring + chevron (13×18 SVG) */
.btn__user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 13px;
  height: 18px;
  color: currentColor;
  position: relative; /* anchor for the hover stem ::before */
}
.btn__user-icon svg {
  display: block;
  width: 13px;
  height: 18px;
}
/* Override hardcoded stroke="black" so the icon inherits button color */
.btn__user-icon svg path {
  stroke: currentColor !important;
  fill: none !important;
}
.btn__lock { width: 16px; height: 16px; flex: none; }

.btn:focus-visible { outline-offset: 4px; }

/* ---------- Eyebrow label (icon + uppercase accent text) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: var(--ls-eyebrow-lg);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow__icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-white);
  position: relative;
}
.eyebrow__icon::after {
  content: "";
  position: absolute;
  top: 8.7px; right: 8.7px; bottom: 8.7px; left: 8.7px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 4.5h4.5v4.5c0 2.5-1.6 4-4.5 4.5V11c1.2-.3 1.8-1 1.8-2.2H3zM10 4.5h4.5v4.5c0 2.5-1.6 4-4.5 4.5V11c1.2-.3 1.8-1 1.8-2.2H10z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 4.5h4.5v4.5c0 2.5-1.6 4-4.5 4.5V11c1.2-.3 1.8-1 1.8-2.2H3zM10 4.5h4.5v4.5c0 2.5-1.6 4-4.5 4.5V11c1.2-.3 1.8-1 1.8-2.2H10z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Badge (pill caption) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 2px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-badge);
  background: var(--color-white);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-black);
  text-align: center;
}

/* ---------- Chips (selectable reasons) ---------- */
.chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}
.chips-outer { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.chips-col  { display: flex; flex-direction: column; gap: 6px; }
.chips-head { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: #1b2b38; }
.chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 45px;
  padding: 12px 11px;
  border-radius: var(--radius-chip);
  background: var(--surface-green-chip);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  line-height: 22px;
  text-transform: capitalize;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.chip__dot {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--text-body);
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.chip:hover { color: var(--text-body); }
.chip--active { color: var(--text-body); }
.chip--active .chip__dot { background: var(--primary-navy); border-color: var(--primary-navy); }

/* ---------- Avatar group (social proof) ---------- */
.avatars { display: flex; }
.avatars__item {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--color-white);
  overflow: hidden;
  margin-right: -10px;
}
.avatars__item:last-child { margin-right: 0; }
.avatars__item img { width: 100%; height: 100%; object-fit: cover; }
.avatars__item--count {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-green);
  color: var(--text-ink);
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 14px;
  overflow: visible;
}

/* ---------- Play button ---------- */
.play-btn {
  position: absolute;
  top: 50%; right: auto; bottom: auto; left: 50%;
  transform: translate(-50%, -50%);
  width: 91px;
  height: 91px;
  border-radius: 50%;
  background: rgba(40, 93, 143, 0.4);
  display: grid;
  place-items: center;
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.play-btn svg { width: 59px; height: 59px; fill: var(--color-white); }
.play-btn:hover { background: rgba(40, 93, 143, 0.65); transform: translate(-50%, -50%) scale(1.06); }

/* ---------- Round nav button ---------- */
.round-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-navy);
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.round-btn--ghost { background: transparent; border: 1px solid var(--primary-navy); }
.round-btn:hover { transform: scale(1.08); }
.round-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.round-btn__arrow {
  width: 9px;
  height: 16px;
  background-color: var(--color-white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.round-btn--ghost .round-btn__arrow { background-color: var(--primary-navy); }
.round-btn__arrow--left { transform: scaleX(-1); }

/* ---------- Social icons ---------- */
.socials {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 26px; /* client QA 2026-07: icons need more breathing room */
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials li { flex: none; }
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 29.308px;
  height: 29.308px;
  aspect-ratio: 1 / 1; /* true circle — never squished */
  border-radius: 50%;
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out);
}
.socials a:hover { transform: translateY(-3px); }
.socials a:not(.socials__chip) img {
  width: 29.308px;
  height: 29.308px;
  object-fit: contain;
}
.socials__chip { background: var(--color-white); }
.socials__chip img {
  width: 19.538px;
  height: 19.538px;
  object-fit: contain;
}

/* ---------- Email form ---------- */
.email-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  width: 100%;
  padding: 0 12px 2px;
  background: var(--on-dark-05);
  border-bottom: 1px solid var(--color-white);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.email-form input {
  flex: 1;
  height: 100%;
  font-size: var(--fs-body);
  line-height: 24px;
  color: var(--color-white);
}
.email-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.email-form button { display: grid; place-items: center; padding: 6px; }
.email-form__arrow {
  width: 18px;
  height: 11px;
  background-color: var(--color-white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 11'%3E%3Cpath d='M1 5.5h15M12 1l4.5 4.5L12 10' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 11'%3E%3Cpath d='M1 5.5h15M12 1l4.5 4.5L12 10' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform var(--dur) var(--ease-out);
}
.email-form button:hover .email-form__arrow { transform: translateX(3px); }

/* ---------- Shared section title ---------- */
.section-title {
  font-family: var(--font-sans);
  font-weight: var(--fw-h2);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  color: var(--text-primary);
  text-transform: capitalize;
}

/* ---------- Horizontal rule (gradient hairline) ---------- */
.rule { flex: 1; height: 1px; background: var(--border); min-width: 1px; }

/* ==========================================================================
   Global Typography Defaults
   Headings → bold. Body copy → regular weight.
   NO !important on class-name selectors so Elementor style controls can override.
   ========================================================================== */

/* ── Bare element defaults (safe to enforce; Elementor wrapper adds specificity) ── */
h1 { font-weight: var(--fw-display); }
h2 { font-weight: var(--fw-h2); }
h3 { font-weight: var(--fw-h3); }
h4 { font-weight: var(--fw-h4); }
h5 { font-weight: var(--fw-h5); }
h6 { font-weight: var(--fw-h5); }

/* ── Title / heading class defaults — NO !important so Elementor controls win ── */
[class*="__title"],
[class*="__name"],
[class*="__heading"],
[class*="section-title"],
[class*="tmc-timeline__title"],
[class*="tmc-founder__name"],
[class*="tmc-unique-care__title"],
[class*="tmc-about-doc"],
[class*="tmc-staff-bio__title"],
[class*="tmc-press-tabs__panel-title"],
[class*="tmc-therapies__group-title"],
[class*="tmc-mission__title"] {
  font-weight: var(--fw-bold);
}

/* ── Body paragraphs — NO !important so Elementor typography controls win ── */
p,
[class*="__text"],
[class*="__para"],
[class*="__bullet"],
[class*="__body"] p,
[class*="__desc"],
[class*="__copy"] {
  font-weight: var(--fw-regular);
  color: inherit;
}

/* ── Paragraph baseline size ── */
p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ── Spans inside body copy: inherit everything ── */
p span,
[class*="__text"] span,
[class*="__para"] span,
[class*="__bullet"] span {
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
}

/* ── Uploaded eyebrow icon ── */
.eyebrow__img {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 0;
}

/* ── Eyebrow / badge / chip labels: keep their own sizes, just set weight ── */
.eyebrow,
.eyebrow--green,
.badge,
.chip,
.chip-nav,
[class*="__eyebrow"],
[class*="__kicker"],
[class*="__source"] {
  font-weight: var(--fw-medium);
}

/* ==========================================================================
   Photo portrait controls & Head-Overflow (head-pop) effect
   ========================================================================== */

/* Object-position helpers — applied via widget PHP class toggle */
.team-card__photo--object-top img,
.member__photo--object-top img,
.tmc-founder__photo--object-top img {
  object-position: top center !important;
}
.team-card__photo--object-bottom img,
.member__photo--object-bottom img {
  object-position: bottom center !important;
}
.team-card__photo--object-center img,
.member__photo--object-center img {
  object-position: center !important;
}

/*
 * HEAD-POP EFFECT
 * When .team-section--head-pop / .team--head-pop is set:
 *  - Section gets extra top padding equal to --head-pop-offset
 *  - Photo containers pull up by the same value (negative margin-top)
 *  - Result: photo tops float above the section background colour,
 *    with the subject's head prominently showing above the green band
 *
 * Usage: set the Elementor SECTION background to the desired colour,
 * enable the toggle, and the photos will "pop" above that band.
 */
.team-section--head-pop,
.team--head-pop {
  --head-pop-offset: 70px;    /* overridden by the Elementor slider */
  padding-top: var(--head-pop-offset) !important;
  overflow: visible;
}
.team-section--head-pop .team-card__photo,
.team--head-pop .member__photo {
  margin-top: calc(-1 * var(--head-pop-offset));
  position: relative;
  z-index: 1;
}

/* Card body sits below the photo; no extra top padding needed */
.team-section--head-pop .team-card__body,
.team--head-pop .member { /* member text already after photo */ }

/* Ensure section title/intro doesn't shift when head-pop is on */
.team-section--head-pop .team-section__title {
  position: relative;
  z-index: 1;
}
.team--head-pop .team__intro {
  position: relative;
  z-index: 1;
}

/* =================== VIDEO LIGHTBOX =================== */
.tmc-video-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.tmc-video-modal[hidden] { display: none; }
.tmc-video-modal.is-open { pointer-events: auto; }
.tmc-video-modal.is-open { opacity: 1; }
.tmc-video-modal__backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 20, 30, 0.85);
  cursor: pointer;
}
.tmc-video-modal__dialog {
  position: relative;
  width: min(960px, 100%);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.tmc-video-modal.is-open .tmc-video-modal__dialog { transform: scale(1); }
.tmc-video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.tmc-video-modal__frame iframe,
.tmc-video-modal__frame video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.tmc-video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}
.tmc-video-modal__close:hover { background: rgba(255, 255, 255, 0.28); }
@media (max-width: 600px) {
  .tmc-video-modal { padding: 16px; }
  .tmc-video-modal__close { top: -40px; }
}

/* ============================================================
   iOS < 14.5 compat: flex gap fallbacks for components
   ============================================================ */
.no-flex-gap .link-more > * + *          { margin-left: 8px; }
.no-flex-gap .link-more:hover > * + *    { margin-left: 14px; }
.no-flex-gap .footer__nav > * + *        { margin-top: var(--space-3); }
.no-flex-gap .socials > * + *            { margin-left: 26px; }
.no-flex-gap .header__nav > * + *        { margin-left: 8px; }
.no-flex-gap .cp-nav > * + *             { margin-top: 10px; }

/* iOS < 15 compat: aspect-ratio for components */
.no-aspect-ratio .quote__avatar { width: 64px; height: 64px; }
.no-aspect-ratio .video-block__media { padding-top: 56.25%; height: 0; } /* 16:9 */
