:root {
  --ink: #222644;
  --navy: #02273b;
  --blue: #0e5aaf;
  --lime: #a8cd52;
  --surface: #f2f6f6;
  --line: #d8e2e5;
  color: var(--ink);
  font-family: Lato, system-ui, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid #3a8aed; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.5rem, 6.7vw, 5.4rem); font-weight: 800; letter-spacing: -.055em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -.035em; }
h3 { font-size: 1.3rem; }
p { margin-block: .75rem 0; }
address { font-style: normal; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.section { padding-block: clamp(3.2rem, 7vw, 6rem); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; inset: .75rem auto auto .75rem; color: white; background: var(--blue); padding: .7rem 1rem; }
.masthead {
  background: linear-gradient(90deg, rgba(2, 39, 59, .94), rgba(2, 39, 59, .75) 49%, rgba(2, 39, 59, .35)), url('/assets/centro-cirurgico.jpg') center 41% / cover;
  background-color: var(--navy);
  color: white;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #ffffff44; min-height: 94px; }
.brand { flex: none; }
.topbar nav { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2.25rem); }
.topbar nav a { text-decoration: none; font-size: .96rem; font-weight: 700; padding-block: .55rem; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: #c6ed7d; }
.menu-button { display: none; }
.hero { padding-block: clamp(3rem, 6.4vw, 6.5rem); }
.hero h1 { max-width: 13ch; }
.hero p { max-width: 38ch; font-size: clamp(1.12rem, 2.7vw, 1.5rem); }
.masthead--home .hero { padding-block: clamp(4.5rem, 12vw, 9rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid transparent; border-radius: .35rem; padding: .64rem 1.25rem; color: var(--navy); background: var(--lime); text-decoration: none; font-weight: 800; cursor: pointer; text-align: center; }
.button:hover { background: #c4e890; }
.hero-actions .button + .button { color: white; background: #02273b92; border-color: #ffffffa0; }
.hero-actions .button + .button:hover { background: var(--navy); }
.service-overview { background: var(--navy); color: white; padding-block: 3.2rem; text-align: center; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-block: 1.5rem; }
.service-grid a { display: grid; justify-items: center; gap: .8rem; padding: 1rem .65rem; border: 1px solid #ffffff35; border-radius: .4rem; text-decoration: none; font-weight: 750; }
.service-grid a:hover { background: #ffffff15; }
.service-grid img { height: 65px; width: 65px; object-fit: contain; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.card { overflow: hidden; background: var(--surface); border-radius: .45rem; }
.card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.card > div { padding: 1.35rem; }
.text-link { color: var(--blue); font-weight: 750; text-underline-offset: 3px; }
.card .text-link, .contact-info .text-link { display: inline-block; margin-top: .65rem; }
.about, .callout { padding-block: 3.8rem; background: linear-gradient(90deg, #02273bf5, #02273ba0), url('/assets/consulta.jpg') center / cover; color: white; }
.about .wrap > div { max-width: 42rem; }
.about .button, .callout .button { margin-top: 1.15rem; }
.home-contact { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.home-contact address { margin-top: .8rem; }
.feature-row { display: grid; grid-template-columns: minmax(180px, 29%) minmax(0, 1fr); gap: clamp(1.3rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(1.5rem, 4vw, 3rem); border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.feature-row:first-child { padding-top: 0; }
.feature-row:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-row .photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .45rem; }
.feature-row h2 { font-size: clamp(1.28rem, 2.1vw, 2rem); }
.feature-row ul { padding-inline-start: 1.2rem; margin-bottom: 0; }
.feature-row li + li { margin-top: .2rem; }
.registration { color: var(--blue); font-weight: 750; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 5rem); }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info h3 { margin-top: 1.4rem; }
.contact-info a { overflow-wrap: anywhere; }
.contact-form { display: grid; gap: .35rem; background: var(--surface); padding: clamp(1.2rem, 3vw, 2rem); border-radius: .45rem; }
.contact-form h2 { font-size: 1.6rem; }
.contact-form p { margin: 0 0 .4rem; }
.contact-form label { font-weight: 700; margin-top: .45rem; }
.contact-form input, .contact-form textarea { display: block; width: 100%; padding: .55rem .68rem; border: 1px solid #9aafb8; border-radius: .3rem; background: white; color: var(--ink); }
.contact-form .button { justify-self: start; margin-top: .65rem; }
.map-section { padding-bottom: 4rem; }
.map-section iframe { width: 100%; height: 365px; margin-top: 1rem; border: 0; border-radius: .45rem; background: var(--surface); }
.footer { background: var(--navy); color: white; padding-block: 3rem 1rem; }
.footer-grid { display: grid; grid-template-columns: .85fr 1fr 1.25fr; gap: 2rem; }
.footer h2 { font-size: 1.3rem; margin-bottom: .65rem; }
.footer p { margin: 0 0 1rem; }
.footer address a { text-underline-offset: 3px; }
.socials { display: flex; gap: 1rem; }
.copyright { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ffffff34; }
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; min-height: 0; }
  .menu-button { display: block; color: white; background: transparent; border: 1px solid #ffffff82; border-radius: .35rem; padding: .45rem .85rem; cursor: pointer; }
  .topbar nav { display: none; flex-flow: column; align-items: stretch; gap: 0; width: 100%; padding-bottom: .8rem; }
  .topbar nav.is-open { display: flex; }
  .topbar nav a { padding-inline: .3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .wrap { width: min(100% - 2rem, 1120px); }
  .brand img { width: 140px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .cards, .feature-row, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .feature-row .photo { max-width: 320px; }
  .feature-row { gap: 1rem; }
  .home-contact { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
