:root {
  color-scheme: light;
  --forest: #07382b;
  --deep: #062b22;
  --lime: #c6ea9d;
  --cream: #faf9f3;
  --ink: #12352a;
  --muted: #476454;
  --radius: 18px;
  --content-width: 1160px;
  --page-gutter: 24px;
  --whatsapp-size: 56px;
  --whatsapp-right: calc(16px + env(safe-area-inset-right));
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 700 1rem/1.5 Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, summary:focus-visible, .card-slider:focus-visible { outline: 3px solid #358964; outline-offset: 4px; }
.hero a:focus-visible, .site-footer a:focus-visible { outline-color: var(--lime); }
.container { width: min(calc(100% - 2 * var(--page-gutter)), var(--content-width)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 8px; transform: translateY(-160%); background: white; padding: 12px; }
.skip-link:focus { transform: none; }

.site-header { background: var(--cream); }
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { width: 146px; height: 66px; overflow: hidden; display: grid; align-content: center; flex: 0 0 auto; }
.brand img { width: 146px; height: auto; }
.header-inner nav { display: flex; gap: 28px; margin-left: auto; font-size: .9rem; font-weight: 650; }
.header-route { padding: 9px 15px; border: 1px solid #b8c9ba; border-radius: 999px; font-size: .875rem; font-weight: 750; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); color: white; }
.hero-grid { display: grid; align-items: center; min-height: clamp(440px, 43vw, 610px); padding-block: 48px; }
.open-status { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 17px; color: var(--lime); font-size: .84rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.open-status::before { content: ""; width: 8px; height: 8px; background: var(--lime); border-radius: 50%; }
h1, h2 { letter-spacing: -.035em; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(3rem, 5.2vw, 5rem); max-width: 13ch; text-wrap: balance; }
.hero-lead { max-width: 42ch; text-wrap: balance; font-size: clamp(1.12rem, 1.8vw, 1.42rem); line-height: 1.35; color: #e2eee5; margin: 18px 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 48px; padding: 10px 18px; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 999px; font-weight: 750; }
.button-primary { color: var(--deep); background: var(--lime); }
.button-primary:hover { background: #ddf6c3; }
.button-secondary { color: white; border-color: #7f9b8c; }
.button-secondary:hover { background: #184c3b; }
.hero address { margin-top: 18px; color: #d0e2d6; font-size: .9rem; font-style: normal; }
.hero-photo {
  overflow: hidden;
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: min(62%, 864px);
  margin: 0;
  mask-image: linear-gradient(90deg, transparent, black 26%);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 61%;
  animation: hero-enter 4s ease-out both;
}
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #062b22 5%, #062b22e9 34%, #062b226c 62%, #062b221a); }
.hero-copy { max-width: 620px; }
@keyframes hero-enter {
  from { transform: scale(1.035); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo img { animation: none; }
}

.structure-section, .team-section { padding-block: clamp(42px, 6vw, 78px); }
.structure-section { background: #eaf0e7; }
h2 { font-size: clamp(2rem, 3.8vw, 3.65rem); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 25px; align-items: start; }
.gallery-card { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--cream); }
.gallery-card:first-child { grid-column: span 2; }
.gallery-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.surgery-photo { display: block; overflow: hidden; }
.surgery-photo img { aspect-ratio: 16 / 9; object-position: center bottom; scale: 1.15; transform-origin: center bottom; }
.gallery-reception img { object-position: center 58%; }
.gallery-inpatient img { object-position: center 62%; }
.gallery-consultation img { object-position: center 44%; }
.gallery-card img.structure-lab { object-position: center 42%; }
.gallery-card img.structure-xray { object-position: center 58%; }
.gallery-card summary { position: relative; display: block; list-style: none; cursor: pointer; }
.gallery-card summary::-webkit-details-marker { display: none; }
.gallery-card summary:focus-visible { outline-offset: -4px; }
.gallery-card summary:hover .gallery-label { background: #e1eddb; }
.gallery-label { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 5px; padding: 8px 12px; font-size: .92rem; }
.gallery-label::after { content: "+"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #dbe9d5; font-size: 1.05rem; }
.gallery-card[open] .gallery-label::after { content: "−"; }
.gallery-description { margin: 0; padding: 0 12px 12px; color: var(--muted); font-size: .86rem; line-height: 1.35; }

.team-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.slider-controls { display: flex; gap: 8px; flex: 0 0 auto; }
.slider-controls button { width: 44px; height: 44px; border: 1px solid #b8c9ba; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; font-size: 1.2rem; }
.slider-controls button:hover { background: #eaf0e7; }
.card-slider { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; margin-top: 25px; padding-bottom: 13px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: #8dab95 transparent; }
.team-card { scroll-snap-align: start; border: 1px solid #d6e0d5; border-radius: var(--radius); background: white; overflow: hidden; }
.team-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 25%; background: #eaf0e7; }
.team-card img.team-photo-andressa { object-position: center 38%; }
.team-card > div { padding: 13px 15px 16px; }
.team-card h3 { margin: 0 0 4px; font-size: 1.2rem; line-height: 1.18; }
.team-card .role { margin: 0; color: var(--muted); font-size: .84rem; }
.site-footer { background: var(--deep); color: white; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 18px;
  padding-inline-end: max(0px, calc(
    var(--whatsapp-right) + var(--whatsapp-size) + 10px -
    max(var(--page-gutter), (100% - var(--content-width)) / 2)
  ));
  font-size: .88rem;
}
.footer-inner a { color: var(--lime); font-weight: 700; padding-block: 5px; }

.whatsapp-float {
  position: fixed;
  z-index: 4;
  right: var(--whatsapp-right);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: var(--whatsapp-size);
  height: var(--whatsapp-size);
  border: 2px solid white;
  border-radius: 50%;
  background: #13774c;
  color: white;
  box-shadow: 0 4px 16px #062b2255;
}
.whatsapp-float:hover { background: #0f623e; }

@media (max-width: 760px) {
  :root { --content-width: 580px; --page-gutter: 16px; }
  .header-inner { min-height: 60px; justify-content: space-between; gap: 12px; }
  .brand { width: 125px; height: 58px; }
  .brand img { width: 125px; }
  .header-inner nav { display: none; }
  .hero-grid { min-height: 475px; align-items: end; padding-block: 100px 28px; }
  h1 { max-width: none; font-size: clamp(2.5rem, 12vw, 3.25rem); }
  .hero-lead { margin-block: 12px 17px; }
  .hero address { margin-top: 13px; }
  .button { padding-inline: 13px; font-size: .875rem; }
  .hero-photo { inset: 0 0 30%; width: 100%; mask-image: none; }
  .hero-photo img { object-position: center 59%; }
  .hero::after { background: linear-gradient(0deg, #062b22 38%, #062b22dd 49%, #062b228f 70%, #062b220d); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .surgery-photo img { aspect-ratio: 16 / 10; }
  .gallery-label { font-size: .82rem; padding-inline: 8px; }
  .gallery-description { font-size: .8rem; padding-inline: 8px; }
  .card-slider { grid-auto-columns: min(78%, 295px); }
}

@media (max-width: 390px) {
  .team-heading { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 360px) {
  .gallery-label { padding-inline: 6px; gap: 4px; font-size: .75rem; }
  .gallery-label::after { width: 18px; height: 18px; }
}
