/* Shared foundation for the clinic template */

:root {
  --ink: #17324d;
  --ink-soft: #61778b;
  --teal: #4c8c82;
  --teal-dark: #34766f;
  --teal-pale: #e7f2ef;
  --blue-pale: #eef5f8;
  --sand: #f7f0e7;
  --coral: #e47773;
  --coral-dark: #d86461;
  --surface: #ffffff;
  --surface-soft: #fbfcfb;
  --line: #e4ebe9;
  --shadow-card: 0 0.75rem 1.5rem rgba(23, 50, 77, 0.07);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 0.2rem solid rgba(76, 140, 130, 0.42);
  outline-offset: 0.2rem;
}

.container {
  width: calc(100% - 64px);
  max-width: 1440px;
  margin-inline: auto;
}

main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3.5rem;
}

.section > .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section > .container.faq-layout {
  flex-direction: row;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

.eyebrow {
  margin: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.55rem;
}

.section-title {
  margin: 0;
  font-size: 40px;
}

.section-lead {
  margin: 0;
  color: var(--ink-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 14px;
  transition: color 160ms ease;
}

.text-link:hover,
.site-nav a:hover,
.footer-nav a:hover {
  color: var(--teal-dark);
}

.arrow-icon {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(228, 235, 233, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(0.75rem);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 5.75rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.brand__name {
  font-size: 24px;
  font-weight: 700;
}

.brand__caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.2px;
}

.site-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.footer-nav-scroll {
  display: contents;
}

.scroll-shadow-shell {
  position: relative;
  isolation: isolate;
}

.scroll-shadow-shell::before,
.scroll-shadow-shell::after {
  position: absolute;
  z-index: 3;
  top: 1px;
  bottom: 1px;
  width: 2.75rem;
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity 180ms ease;
}

.scroll-shadow-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(23, 50, 77, 0.16), rgba(23, 50, 77, 0.07) 42%, rgba(23, 50, 77, 0));
}

.scroll-shadow-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(23, 50, 77, 0.16), rgba(23, 50, 77, 0.07) 42%, rgba(23, 50, 77, 0));
}

.scroll-shadow-shell.has-left-shadow::before,
.scroll-shadow-shell.has-right-shadow::after {
  opacity: 1 !important;
  transition: none;
}

.site-nav {
  flex: 1 1 auto;
  justify-content: center;
}

.site-nav a,
.footer-nav a {
  color: var(--ink);
  font-size: 13.12px;
  white-space: nowrap;
  transition: color 160ms ease;
}

.header-contact {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1rem;
}

.phone-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink);
}

.phone-link .icon {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--teal-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.phone-link span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  white-space: nowrap;
}

.phone-link strong {
  font-size: 15.2px;
  font-weight: 700;
}

.phone-link small {
  color: var(--ink-soft);
  font-size: 11.52px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 0.7rem;
  padding: 0.82rem 1.2rem;
  font-size: 13.76px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-0.1rem);
}

.button--primary {
  background: var(--coral);
  color: var(--surface);
}

.button--primary:hover {
  background: var(--coral-dark);
}

.button--teal {
  width: 100%;
  background: var(--teal);
  color: var(--surface);
}

.button--teal:hover {
  background: var(--teal-dark);
}

.button--soft {
  border-radius: 0.7rem;
  padding: 0.62rem 0.85rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-size: 12.48px;
  font-weight: 700;
}

.button--soft:hover {
  background: #d6eae5;
}

.menu-toggle {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem;
  background: transparent;
}

.menu-toggle > span:not(.sr-only) {
  width: 1.45rem;
  height: 0.12rem;
  border-radius: 999px;
  background: var(--ink);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
}

.field__icon {
  position: absolute;
  left: 0.85rem;
  color: var(--ink-soft);
}

.field__icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.field input,
.service-form__field input {
  width: 100%;
  border: 1px solid #d8e4e1;
  border-radius: 0.7rem;
  padding: 0.82rem 0.85rem 0.82rem 2.45rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.76px;
  outline: none;
}

.service-form__field input {
  padding-left: 0.9rem;
}

.field input::placeholder,
.service-form__field input::placeholder {
  color: #8799a7;
}

.field input:focus,
.service-form__field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 0.2rem rgba(76, 140, 130, 0.12);
}

.form-note,
.form-success {
  margin: 0;
  font-size: 10.88px;
}

.form-note {
  color: #87949e;
}

.form-success {
  color: var(--teal-dark);
  font-weight: 700;
}

.card-tag {
  margin: 0;
  color: var(--teal-dark);
  font-size: 11.2px;
  font-weight: 700;
  text-transform: uppercase;
}

.round-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-top: auto;
  border-radius: 50%;
  background: var(--surface);
  color: var(--teal-dark);
  box-shadow: 0 0.35rem 1rem rgba(46, 93, 95, 0.12);
  transition: background-color 160ms ease, transform 160ms ease;
}

.round-link:hover {
  background: var(--teal-pale);
  transform: translateX(0.1rem);
}

.round-link .arrow-icon {
  width: 1rem;
  height: 1rem;
}

.service-list,
.doctor-list,
.clinic-list,
.review-list,
.article-list,
.docs-list,
.symptom-list,
.steps-list,
.feature-grid,
.preparation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.doctor-card,
.clinic-card,
.review-card,
.article-card,
.step-card,
.feature-card,
.symptom-card,
.expert-note {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.doctor-card {
  flex: 1 1 0;
  align-items: stretch;
  gap: 1rem;
  padding: 0.7rem;
}

.doctor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12.16px;
}

.chip:hover,
.chip.is-active {
  border-color: var(--teal);
  background: var(--teal-pale);
  color: var(--teal-dark);
}

.slider {
  display: flex;
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 1rem;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.slider::-webkit-scrollbar {
  display: none;
}

.slider:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 0.2rem;
}

.doctor-list.slider .doctor-card {
  flex: 0 0 calc(25% - 0.75rem);
  scroll-snap-align: start;
}

.slider-controls {
  display: flex;
  gap: 0.45rem;
}

.slider-controls .round-link {
  margin: 0;
  border: 1px solid var(--line);
}

.is-hidden {
  display: none !important;
}

.doctor-card__photo {
  display: flex;
  flex: 0 1 40%;
  min-width: 0;
}

.doctor-card__photo img {
  width: 100%;
  aspect-ratio: 1.05;
  border-radius: 0.8rem;
  object-fit: cover;
}

.doctor-card__body {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.25rem 0.25rem 0.25rem 0;
}

.doctor-card__body h3,
.clinic-card h3,
.review-card h3,
.article-card h3,
.step-card h3,
.feature-card h3,
.symptom-card h3,
.expert-note h3 {
  margin: 0;
  font-size: 16.8px;
}

.doctor-card__role,
.doctor-card__body > p:not(.doctor-card__role),
.clinic-card p:not(.card-tag),
.review-card p,
.article-card p:not(.card-tag),
.step-card p,
.feature-card p,
.symptom-card p,
.expert-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.12px;
}

.doctor-card__role {
  font-size: 12.8px;
}

.clinic-card {
  flex: 1 1 30rem;
  flex-direction: row;
  padding: 0.7rem;
}

.clinic-card__visual {
  display: flex;
  flex: 0 1 40%;
  align-items: flex-end;
  min-height: 10rem;
  border-radius: 0.75rem;
  padding: 0.9rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-size: 11.2px;
  font-weight: 700;
}

.clinic-card__visual--north {
  background: linear-gradient(145deg, #dcefeb, #a8c9c2);
}

.clinic-card__visual--center {
  background: linear-gradient(145deg, #f6e6d6, #d9bca2);
}

.clinic-card__body {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem;
}

.clinic-card__body .text-link,
.article-card .text-link,
.expert-note .text-link {
  margin-top: auto;
}

.review-card,
.article-card,
.step-card,
.feature-card,
.symptom-card,
.expert-note {
  flex: 1 1 15rem;
  padding: 1.25rem;
}

.review-card__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.review-card__head span,
.rating-summary {
  color: var(--coral-dark);
}

.review-card small,
.rating-summary small,
.docs-list span {
  color: var(--ink-soft);
  font-size: 11.52px;
}

.price-layout,
.faq-layout,
.expert-layout,
.split-banner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.price-list,
.faq-list {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-layout > .section-heading__copy {
  flex: 1 1 0;
  min-width: 0;
}

.price-row,
.price-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
  color: var(--ink);
  font-size: 14.4px;
}

.price-row:hover {
  color: var(--teal-dark);
}

.price-note {
  display: flex;
  flex: 0 1 22rem;
  flex-direction: column;
  gap: 0.6rem;
  border-radius: 1rem;
  padding: 1.35rem;
  background: var(--sand);
}

.price-note h3 {
  margin: 0;
  font-size: 18.4px;
}

.price-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.12px;
}

.price-note .button {
  align-self: flex-start;
}

.price-details {
  border-bottom: 1px solid var(--line);
}

.price-details summary,
.faq-list summary {
  cursor: pointer;
}

.price-details summary {
  border-bottom: 0;
  list-style-position: inside;
}

.price-details p,
.faq-list details p {
  margin: 0 0 0.9rem 1.2rem;
  color: var(--ink-soft);
  font-size: 13.12px;
}

.symptom-cloud,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.symptom-cloud a,
.tag-list a {
  border: 1px solid rgba(76, 140, 130, 0.28);
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 12.48px;
}

.symptom-cloud a:hover,
.tag-list a:hover {
  background: var(--teal-pale);
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rating-summary strong {
  font-size: 29.6px;
}

.rating-summary span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 12px;
}

.split-banner {
  align-items: center;
  justify-content: space-between;
  border-radius: 1.1rem;
  padding: 1.75rem 2rem;
  background: var(--blue-pale);
}

.split-banner h2 {
  margin: 0.45rem 0;
  font-size: 28.8px;
}

.split-banner p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
}

.split-banner .button {
  flex: 0 0 auto;
  width: auto;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-radius: 1.1rem;
  padding: 2rem 2.25rem;
  background: var(--sand);
}

.cta__copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cta__copy h2 {
  margin: 0;
  font-size: 33.6px;
}

.cta__copy p {
  margin: 0;
  color: var(--ink-soft);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.faq-list summary {
  color: var(--ink);
  font-size: 14.4px;
  font-weight: 700;
}

.docs-list a {
  display: flex;
  flex: 1 1 15rem;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.95rem;
  color: var(--ink);
}

.docs-list a:hover {
  border-color: var(--teal);
}

.site-footer {
  padding-block: 3rem 1.5rem;
}

.site-footer__main,
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__main {
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
}

.site-footer__bottom {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 11.52px;
}

.site-footer__bottom div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mobile-bar {
  display: none;
}

@media (max-width: 900px) {
  .container {
    width: calc(100% - 48px);
  }

  main {
    gap: 2.5rem;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .site-nav {
    position: fixed;
    z-index: 25;
    top: calc(5.75rem + 1px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - 5.75rem - 1px);
    order: 3;
    display: none;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 1rem 0.75rem;
    background: var(--surface);
    box-shadow: 0 1rem 2rem rgba(23, 50, 77, 0.12);
  }

  .header-contact {
    order: 1;
  }

  .menu-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .site-nav a {
    border-top: 1px solid var(--line);
    padding-block: 0.8rem;
  }

  .site-nav a:first-child {
    border-top: 0;
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .header-contact {
    margin-left: auto;
  }

  .phone-link small {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .section-heading .text-link,
  .section-heading .slider-controls {
    align-self: flex-start;
  }

  .price-layout,
  .faq-layout,
  .expert-layout {
    flex-direction: column;
  }

  .section > .container.faq-layout {
    flex-direction: column;
  }

  .price-note,
  .expert-note,
  .faq-layout > .section-heading__copy {
    flex-basis: auto;
    width: 100%;
  }

  .price-list,
  .faq-list {
    width: 100%;
  }

  .doctor-card {
    flex-basis: calc(50% - 0.5rem);
  }

  .doctor-list.slider .doctor-card {
    flex-basis: calc(50% - 0.5rem);
  }
}

@media (max-width: 704px) {
  .container {
    width: calc(100% - 32px);
  }

  .site-header__inner {
    min-height: 5.75rem;
  }

  .header-contact .phone-link,
  .button--header {
    display: none;
  }

  .header-contact {
    display: none;
  }

  .section-title {
    font-size: 30.4px;
  }

  .clinic-card,
  .doctor-card {
    flex-basis: 100%;
  }

  .doctor-list.slider .doctor-card {
    flex-basis: 100%;
    flex-direction: column;
  }

  .doctor-list.slider .doctor-card__photo {
    flex-basis: auto;
    width: 100%;
  }

  .doctor-list.slider .doctor-card__photo img {
    aspect-ratio: 1.75;
  }

  .clinic-card {
    flex-direction: column;
  }

  .clinic-card__visual {
    flex-basis: auto;
    width: 100%;
  }

  .price-row,
  .price-details summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .split-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.35rem;
  }

  .split-banner h2 {
    font-size: 24.8px;
  }

  .split-banner .button {
    width: 100%;
  }

  .cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
    padding: 1.35rem;
  }

  .cta__copy {
    min-width: 0;
  }

  .cta__copy h2 {
    font-size: 28.8px;
  }

  .cta .button {
    width: 100%;
  }

  .site-footer__main,
  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__main {
    gap: 1.25rem;
  }

  .footer-nav-scroll {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: var(--surface-soft);
  }

  .footer-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 1.35rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .footer-nav::-webkit-scrollbar {
    display: none;
  }

  .footer-nav a {
    flex: 0 0 auto;
    padding-block: 0.5rem;
  }

  .site-footer__bottom > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-footer__bottom > div > span {
    display: none;
  }

  .mobile-bar {
    position: sticky;
    bottom: 0;
    z-index: 15;
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -0.35rem 1rem rgba(23, 50, 77, 0.1);
  }

  .mobile-bar a {
    flex: 1 1 0;
    padding: 0.68rem 0.5rem;
    border-radius: 0.65rem;
    text-align: center;
    font-size: 12.48px;
    font-weight: 700;
  }

  .mobile-bar a:first-child {
    border: 1px solid var(--line);
    color: var(--ink);
  }

  .mobile-bar a:last-child {
    background: var(--coral);
    color: var(--surface);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
