/* Linhas douradas em movimento, discretas e acessíveis. */
.button,
.nav nav,
.professional-card,
.gallery-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button::before,
.professional-card::before,
.gallery-item::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: -70%;
  bottom: -70%;
  left: -35%;
  width: 18%;
  pointer-events: none;
  transform: rotate(16deg) translateX(-220%);
  background: linear-gradient(90deg,transparent,rgba(255,240,197,.68),transparent);
  transition: transform .8s cubic-bezier(.2,.75,.25,1);
}
.button:hover::before,
.professional-card:hover::before,
.gallery-item:hover::before { transform: rotate(16deg) translateX(900%); }

.nav nav::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 7%;
  right: 7%;
  bottom: 0;
  height: 1px;
  opacity: .72;
  background: linear-gradient(90deg,transparent,var(--gold2),transparent);
  transform: translateX(-120%);
  animation: menuGoldLine 7s ease-in-out infinite;
}
.nav nav a { transition: color .3s ease,background .3s ease,box-shadow .3s ease; }
.nav nav a:hover {
  box-shadow: inset 0 0 0 1px rgba(224,204,157,.18),0 0 18px rgba(200,173,114,.08);
}

.photo-slots.expanded {
  grid-template-columns: 1.2fr .8fr .8fr;
}
.photo-slots.expanded button:nth-child(4) { grid-column: 1 / 2; }
.photo-slots.expanded button:nth-child(5) { grid-column: 2 / 4; }
.photo-slots.expanded button:nth-child(n+4) { min-height: 250px; }

.clinic-gallery {
  padding: 115px max(7vw,24px);
  background: var(--paper);
}
.gallery-heading {
  display: grid;
  grid-template-columns: .35fr 1fr .7fr;
  gap: 5vw;
  align-items: end;
  margin-bottom: 52px;
}
.gallery-heading h2 {
  margin: 0;
  font: 400 clamp(2.4rem,4vw,4.2rem)/1.08 var(--display);
  letter-spacing: -.035em;
}
.gallery-heading > p:last-child { color: var(--muted); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  grid-auto-rows: 230px;
  gap: 13px;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px dashed rgba(168,137,79,.38);
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(145deg,rgba(234,219,188,.34),rgba(255,253,248,.72));
  cursor: pointer;
  transition: border-color .3s ease,transform .3s ease,background .3s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--gold-deep);
  background: linear-gradient(145deg,rgba(234,219,188,.58),rgba(255,253,248,.88));
}
.gallery-item i {
  font: 400 32px/1 var(--display);
  color: var(--gold-deep);
}
.gallery-item span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.gallery-wide { grid-column: span 2; }
.gallery-tall { grid-row: span 2; }

@keyframes menuGoldLine {
  0%,18% { transform: translateX(-120%); opacity: 0; }
  35%,55% { opacity: .8; }
  75%,100% { transform: translateX(120%); opacity: 0; }
}

@media (max-width:850px) {
  .photo-slots.expanded { grid-template-columns: 1fr; }
  .photo-slots.expanded button:nth-child(4),
  .photo-slots.expanded button:nth-child(5) { grid-column: auto; }
  .clinic-gallery { padding: 85px 24px; }
  .gallery-heading { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 190px; }
  .gallery-tall { grid-row: span 2; }
}

@media (max-width:480px) {
  .clinic-gallery { padding-inline: 18px; }
  .gallery-heading h2 { font-size: 2.35rem; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .gallery-wide,.gallery-tall { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion:reduce) {
  .nav nav::after { animation: none; }
  .button::before,.professional-card::before,.gallery-item::before { display: none; }
}
