:root {
  --nav-height: 4rem;
}

/* Global page behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  min-width: 320px;
}

a {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  border-radius: 0.5rem;
  background: #10354a;
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.section-offset {
  scroll-margin-top: var(--nav-height);
}

/* Subtle background treatment for the first viewport */
.hero-pattern {
  background:
    radial-gradient(circle at 18% 25%, rgba(15, 143, 140, 0.13) 0 16%, transparent 17%),
    radial-gradient(circle at 86% 18%, rgba(249, 115, 98, 0.13) 0 12%, transparent 13%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.2));
}

.nav-link,
.mobile-nav-link {
  border-radius: 0.5rem;
  color: #334155;
  font-size: 0.9375rem;
  font-weight: 700;
}

.nav-link {
  display: inline-flex;
  padding: 0.625rem 0.875rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.875rem 0.5rem;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.active,
.mobile-nav-link.active {
  color: #0f8f8c;
  background: #e8f8f4;
}

.clinic-logo img {
  border-radius: 999px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* Reusable section and card styles */
.section-kicker {
  color: #0f8f8c;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title {
  color: #10354a;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  margin-top: 0.6rem;
}

.info-pill {
  border: 1px solid #cceee7;
  border-radius: 999px;
  background: #e8f8f4;
  color: #10354a;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.5rem 0.875rem;
}

.trust-pill,
.hero-stat {
  border: 1px solid rgba(15, 143, 140, 0.18);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(16, 53, 74, 0.08);
}

.trust-pill {
  border-radius: 999px;
  color: #10354a;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.48rem 0.82rem;
}

.hero-stat {
  border-radius: 0.75rem;
  padding: 1rem;
}

.hero-stat span {
  color: #10354a;
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.hero-stat p {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.photo-frame {
  background: #e8f8f4;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

.photo-frame img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.doctor-photo {
  aspect-ratio: 0.88;
  border-radius: 1rem;
}

.doctor-photo img {
  object-position: center top;
}

.service-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at top right, rgba(15, 143, 140, 0.1), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #ffffff 62%, #f4fbfa 100%);
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 15.5rem;
  box-shadow: 0 12px 34px rgba(16, 53, 74, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card::after {
  border: 1px solid rgba(15, 143, 140, 0.16);
  border-radius: 999px;
  content: "";
  height: 4.8rem;
  opacity: 0.7;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 4.8rem;
}

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

.service-card:hover {
  border-color: #bfe5df;
  box-shadow: 0 24px 55px rgba(16, 53, 74, 0.14);
  transform: translateY(-6px);
}

.service-icon {
  align-items: center;
  background: linear-gradient(135deg, #e8f8f4, #ffffff);
  border: 1px solid rgba(15, 143, 140, 0.18);
  border-radius: 0.75rem;
  color: #0f8f8c;
  display: inline-flex;
  height: 3.25rem;
  justify-content: center;
  width: 3.25rem;
}

.service-icon svg {
  height: 1.65rem;
  width: 1.65rem;
}

.service-card h3 {
  color: #10354a;
  font-size: 1.125rem;
  font-weight: 800;
  margin-top: 1.25rem;
}

.service-card p {
  color: #64748b;
  line-height: 1.7;
  margin-top: 0.6rem;
}

.feature-card,
.testimonial-card,
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 53, 74, 0.07);
}

.feature-card {
  padding: 1.4rem;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.feature-card:hover {
  border-color: #bfe5df;
  box-shadow: 0 22px 48px rgba(16, 53, 74, 0.12);
  transform: translateY(-4px);
}

.feature-icon {
  align-items: center;
  background: #e8f8f4;
  border-radius: 0.75rem;
  color: #0f8f8c;
  display: inline-flex;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.feature-icon svg {
  height: 1.55rem;
  width: 1.55rem;
}

.feature-card h3,
.testimonial-card h3 {
  color: #10354a;
  font-size: 1.05rem;
  font-weight: 800;
}

.feature-card h3 {
  margin-top: 1.1rem;
}

.feature-card p,
.testimonial-card p {
  color: #64748b;
  line-height: 1.7;
  margin-top: 0.55rem;
}

.testimonial-card {
  padding: 1.5rem;
}

.testimonial-card img {
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(16, 53, 74, 0.15);
  height: 4.5rem;
  object-fit: cover;
  width: 4.5rem;
}

.testimonial-card h3 {
  margin-top: 1rem;
}

.stars {
  color: #f97362;
  font-size: 1rem;
  letter-spacing: 0;
  margin-top: 1rem;
}

.form-field label {
  color: #10354a;
  display: block;
  font-size: 0.925rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  color: #0f172a;
  outline: none;
  padding: 0.875rem 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #0f8f8c;
  box-shadow: 0 0 0 4px rgba(15, 143, 140, 0.14);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: #dc2626;
}

.error-message {
  color: #b91c1c;
  font-size: 0.8125rem;
  min-height: 1.25rem;
  padding-top: 0.35rem;
}

.contact-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2.5rem 1fr;
}

.contact-item svg {
  color: #7fe1d2;
  height: 1.7rem;
  margin-top: 0.15rem;
  width: 1.7rem;
}

.contact-item h3 {
  font-weight: 800;
}

.contact-item p,
.contact-item a {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

.contact-item a:hover,
footer a:hover {
  color: #fff;
}

.map-frame {
  aspect-ratio: 16 / 6;
  background: #eaf6fb;
  min-height: 20rem;
  position: relative;
}

.map-frame iframe {
  border: 0;
  display: block;
  height: 100%;
  min-height: 20rem;
  width: 100%;
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  align-items: center;
  color: #10354a;
  display: flex;
  font-weight: 800;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  text-align: left;
  width: 100%;
}

.faq-question svg {
  color: #0f8f8c;
  flex: 0 0 auto;
  height: 1.25rem;
  transition: transform 180ms ease;
  width: 1.25rem;
}

.faq-item.is-open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.15rem;
}

.faq-answer p {
  color: #64748b;
  line-height: 1.7;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.floating-button,
.scroll-top {
  align-items: center;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(16, 53, 74, 0.22);
  color: #fff;
  display: inline-flex;
  height: 3.25rem;
  justify-content: center;
  width: 3.25rem;
}

.floating-button:hover,
.scroll-top:hover {
  transform: translateY(-3px);
}

.floating-button svg,
.scroll-top svg {
  height: 1.45rem;
  width: 1.45rem;
}

.scroll-top {
  background: #10354a;
  border: 0;
  bottom: 1.25rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 40;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.social-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.social-link:hover {
  background: #0f8f8c;
  transform: translateY(-2px);
}

.social-link svg {
  height: 1.15rem;
  width: 1.15rem;
}

/* IntersectionObserver toggles this class as content enters view */
.fade-in {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 650ms ease, transform 650ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 640px) {
  .scroll-top {
    right: 1.25rem;
  }
}
