html {
  scroll-behavior: smooth;
}

.edgar-portrait { width: 100%; max-width: 420px; margin: 0 auto; padding: 14px 20px 24px 8px; perspective: 1000px; }
.edgar-portrait-frame { position: relative; aspect-ratio: 4 / 5; border: 6px solid white; border-radius: 8px; background: #174c6e; transform-style: preserve-3d; transform: rotateX(var(--portrait-x, 0deg)) rotateY(var(--portrait-y, -5deg)); box-shadow: 12px 16px 0 #174c6e, 18px 22px 0 #a4ce45, 0 28px 35px -20px rgba(12,29,64,.45); transition: transform .25s ease; }
.edgar-portrait-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 3px; }
@media (max-width: 767px) { .edgar-portrait { max-width: 350px; } .edgar-portrait-frame { transform: none; } }
@media (prefers-reduced-motion: reduce) { .edgar-portrait-frame { transform: none; transition: none; } }

.fuuxis-credit { padding: 16px; border-top: 1px solid rgba(255,255,255,.15); text-align: center; }
.fuuxis-credit a { display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; color: #e3eaf1; font-size: 11px; line-height: 1.5; }
.fuuxis-credit strong { color: white; }
.fuuxis-credit a:hover { color: #bf95ff; }
.fuuxis-credit a:focus-visible { outline: 2px solid #bf95ff; outline-offset: 5px; }
.fuuxis-logo { position: relative; display: block; flex: 0 0 30px; width: 30px; height: 32px; overflow: hidden; }
.fuuxis-logo img { position: absolute; width: 76px; max-width: none; height: 61px; left: -25.5px; top: -14.5px; }

#inicio {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-background-photo,
.hero-background-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.hero-background-photo {
  object-fit: cover;
  object-position: 65% center;
}

.hero-video-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 6px;
  background: rgba(12,29,64,.75);
  color: white;
  cursor: pointer;
}
.hero-video-toggle:hover { background: #174c6e; }
.hero-video-toggle:focus-visible { outline: 2px solid #a4ce45; outline-offset: 3px; }
.hero-video-toggle svg { width: 20px; height: 20px; }
#inicio:has(.hero-background-photo) .hero-heartbeat { display: none; }

.hero-background-overlay {
  background: linear-gradient(90deg, #0c1d40 0%, rgba(12,29,64,.94) 32%, rgba(23,76,110,.58) 65%, rgba(23,76,110,.45));
}

.hero-heartbeat {
  position: absolute;
  inset: auto 0 7%;
  width: 100%;
  height: 95px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero-heartbeat path {
  fill: none;
  stroke: #a4ce45;
  stroke-width: 2;
  opacity: .8;
  vector-effect: non-scaling-stroke;
  animation: heartbeat-scroll 4s linear infinite;
}
@keyframes heartbeat-scroll { to { transform: translateX(320px); } }
@media (max-width: 1023px) {
  .hero-background-photo { top: auto; bottom: 0; height: 55%; object-position: 68% center; mask-image: linear-gradient(to bottom, transparent, black 20%); -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%); }
  .hero-background-overlay { background: linear-gradient(180deg, #0c1d40 0%, rgba(12,29,64,.96) 35%, rgba(23,76,110,.5) 70%, rgba(23,76,110,.45)); }
}

section[id], footer[id] {
  scroll-margin-top: 6rem;
}

#consultorio {
  background-image: linear-gradient(rgba(255, 255, 255, .80), rgba(255, 255, 255, .86)), url('../images/clinica-moderna.png');
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
}

#consultorio p {
  color: #42536b;
}

.consultorio-logo {
  display: block;
  width: clamp(240px, 40vw, 360px);
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
}

#mobile-menu {
  display: grid;
  gap: .25rem;
  padding: 0 1rem 1rem;
}

.footer-phone img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

#mobile-menu[hidden] {
  display: none;
}

@media (min-width: 1024px) {
  #mobile-menu {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-heartbeat path { animation: none; }
  html {
    scroll-behavior: auto;
  }
}
