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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height, 88px) + 12px);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-text);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Texto corrido — 15px fixo em todo o site */
.prose p,
.article p,
.icon-card p,
.icon-card__doctor,
.icon-card__credential,
.icon-card__summary,
.staff-card p,
.contact-strip p,
.footer-meta,
.feed-lead .excerpt,
.feed-card .excerpt,
.feed-meta,
.hero p,
.page-hero--blog p,
.service-card p,
.team-card p,
.team-card .role,
.quote p,
.about-prose,
.about-prose p,
.about-lead,
.about-list-label,
.about-list li,
.about-photo figcaption,
.contact .form label,
.contact .form input,
.contact .form textarea,
.form-note,
.contact-desk p,
.visit-phones,
.visit-phones a {
  font-size: var(--body-text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
  text-underline-offset: 3px;
}

.shell {
  width: min(var(--shell-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* Rhythm shared by home and inner pages (home.css is not loaded off the front). */
.section {
  padding: var(--space-section) 0;
}

.section h2 {
  margin: 0 0 var(--space-title);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--heading);
  font-weight: 700;
  text-wrap: balance;
}

@media (max-width: 699px) {
  .section {
    padding: var(--space-section-sm) 0;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: auto;
  padding: 10px 0 14px;
  background: transparent;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.site-header.is-scrolled {
  padding: 0;
  background: linear-gradient(180deg, #f5fafb 0%, var(--mist) 100%);
  border-bottom: 1px solid rgba(15, 95, 112, 0.1);
  box-shadow: 0 6px 22px rgba(15, 95, 112, 0.08);
}

.site-header.is-scrolled .topbar {
  display: none;
}

.site-header.is-scrolled .shell {
  gap: 0;
}

.site-header.is-scrolled .nav-shell {
  padding: 14px 0 16px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.site-header .shell {
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.topbar-item svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 95, 112, 0.28);
  background: rgba(15, 95, 112, 0.06);
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-pill:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

body:has(.page-hero) .topbar {
  color: rgba(255, 255, 255, 0.92);
}

body:has(.page-hero) .topbar-pill {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
}

body:has(.page-hero) .topbar-pill:hover {
  background: #fff;
  border-color: #fff;
  color: var(--teal);
}

.nav-shell {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px 8px 22px;
  box-shadow: 0 18px 45px rgba(20, 36, 46, 0.11);
  transition: background 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.logo { display: flex; flex: none; }

.logo img {
  width: 158px;
  height: auto;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.nav a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--teal-deep);
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-current {
  color: var(--orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1.5px solid var(--orange);
  color: var(--orange);
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.btn:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 10px 22px rgba(90, 40, 12, 0.22);
}

.btn-solid:hover {
  background: var(--orange-hot);
  box-shadow: 0 14px 28px rgba(90, 40, 12, 0.26);
}

.nav-cta {
  flex: none;
  align-self: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 95, 112, 0.16);
  border-radius: 12px;
  background: rgba(15, 95, 112, 0.06);
  cursor: pointer;
  flex: none;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.38);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.fab:hover { transform: translateY(-2px); }

.fab svg { width: 30px; height: 30px; fill: currentColor; }

.wa-chat {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.wa-chat__panel {
  width: min(320px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid rgba(15, 95, 112, 0.1);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 40, 48, 0.18);
  overflow: hidden;
  transform-origin: bottom right;
}

.wa-chat__panel[hidden] {
  display: none;
}

.wa-chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--teal);
  color: #fff;
}

.wa-chat__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a7385;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.wa-chat__avatar svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.wa-chat__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: -0.02em;
}

.wa-chat__head span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.82;
}

.wa-chat__body {
  padding: 16px;
  background: #f4fafb;
}

.wa-chat__bubble {
  margin: 0 0 14px;
  max-width: 92%;
  padding: 12px 14px;
  background: #fff;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 6px 16px rgba(15, 95, 112, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.wa-chat__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.wa-chat__cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.wa-chat__cta:hover {
  background: #1ebe5d;
  color: #fff;
}

.wa-chat__toggle {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 18px;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 95, 112, 0.28);
  transition: transform 0.28s var(--ease), background 0.28s var(--ease);
}

.wa-chat__toggle:hover {
  transform: translateY(-2px);
  background: var(--teal-deep);
}

.wa-chat__toggle svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.wa-chat.is-open .wa-chat__toggle {
  background: var(--heading);
}

.wa-chat__icon-close {
  display: none;
}

.wa-chat.is-open .wa-chat__icon-chat {
  display: none;
}

.wa-chat.is-open .wa-chat__icon-close {
  display: block;
}

.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.site-footer img { width: 168px; }

.footer-meta {
  margin: 0;
  color: var(--teal);
  font-weight: 600;
}

.footer-meta a { color: inherit; }

.footer-meta a:hover { color: var(--orange); }

@media (max-width: 1100px) {
  .topbar-address { display: none; }
  .logo img { width: 142px; }
  .nav-shell .nav-cta { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 8px 18px 14px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(20, 36, 46, 0.14);
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .nav a:last-child { border-bottom: 0; }
}

@media (max-width: 699px) {
  :root { --gutter: 18px; }

  .logo img { width: 124px; }
  .nav-shell {
    padding: 6px 10px 6px 14px;
    border-radius: 20px;
  }
  .nav-toggle { width: 44px; height: 44px; }
  .site-footer {
    padding: 24px 0 max(28px, env(safe-area-inset-bottom));
  }
  .site-footer .shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-footer img { width: 148px; }
  .wa-chat {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .wa-chat__panel { width: min(300px, calc(100vw - 24px)); }
  .wa-chat__toggle { width: 52px; height: 52px; border-radius: 16px; }
}
