/* Home hero only: the original in-flow photo fixes the white frame and page height. */
.hero-photo { isolation: isolate; animation: none !important; transition: none !important; }
.hero-photo::before, .hero-photo::after { animation: none !important; transition: none !important; }
.hero-photo-window > .hero-slide-base,
.hero-photo-window > .hero-slide-overlay {
  object-fit: cover;
  /* The crossfade layers are still photos except during pointer hover. */
}
.hero-photo-window > .hero-slide-base { transition:transform 300ms cubic-bezier(.23,1,.32,1); }
.hero-photo-window > .hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition:opacity 1000ms ease-in-out, transform 300ms cubic-bezier(.23,1,.32,1);
}
.hero-photo-window > .hero-slide-overlay.is-visible { opacity: 1; }
.hero-photo-window > .hero-slide-overlay.is-idle { transition:transform 300ms cubic-bezier(.23,1,.32,1); }
.hero-photo-window > .hero-slide-photo--waiting { object-position: 56% 50%; }
.hero-photo-window > .hero-slide-photo--consultation { object-position: 45% 50%; }
.hero-photo-window > .hero-slide-photo--corridor { object-position: 46% 48%; }
.hero-photo > .photo-label {
  z-index: 2;
  box-sizing: border-box;
  width: 174px;
  height: 38px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  animation: none !important;
  transition: none !important;
}
.hero-slider-controls {
  position: absolute;
  z-index: 3;
  right: 19px;
  bottom: 19px;
  display: flex;
  align-items: center;
  padding: 3px 5px;
  background: #fffdf5ed;
  border: 1px solid #e6e4d6;
  border-radius: 999px;
  box-shadow: 0 2px 9px #203f2930;
  animation: none !important;
  transition: none !important;
}
.hero-slider-toggle {
  border: 0;
  border-radius: 999px;
  color: #245c4b;
  font: inherit;
  cursor: pointer;
  background: transparent;
  min-width: 56px;
  min-height: 44px;
  padding: 0 7px;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.hero-slider-toggle:focus-visible { outline: 3px solid #245c4b; outline-offset: 1px; }
@media (max-width: 767px) {
  .hero-photo-window > .hero-slide-overlay { top: 0; left: 0; width: 100%; }
  .hero-photo-window > .hero-slide-photo--waiting { object-position: 59% 50%; }
  .hero-photo-window > .hero-slide-photo--consultation { object-position: 50% 50%; }
  .hero-photo-window > .hero-slide-photo--corridor { object-position: 43% 48%; }
  .hero-photo > .photo-label { width: 150px; height: 26px; }
  .hero-slider-controls { top: auto; bottom: 10px; right: 10px; padding: 2px 3px; }
  .hero-slider-toggle { min-width: 44px; padding: 0 3px; font-size: 11px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo-window > .hero-slide-overlay { transition: none; }
}

/* Mobile hero decoration only: a horizontally balanced halo behind the unchanged photo. */
@media (max-width: 640px) {
  .hero::before {
    inset: auto -10px 15px -10px;
    height: 72vw;
    border-radius: 44% 44% 36% 36% / 46% 46% 38% 38%;
  }
}

/* Full-bleed hero field; the readable grid and fixed photo frame keep their existing width. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -2;
  background: #fff1e8;
  pointer-events: none;
  animation: none !important;
  transition: none !important;
}

/* Center the hours notice vertically between the service cards and hero. */
#main > .wrap > .notice { margin-bottom: 15px; }
@media (max-width: 767px) {
  #main > .wrap > .notice { margin-bottom: 24px; }
}

@media (min-width: 1600px) {
  .hero {
    width: min(1480px, calc(100vw - 320px));
    margin-left: calc((1160px - min(1480px, calc(100vw - 320px))) / 2);
    min-height: clamp(590px, 36vw, 658px);
    gap: 64px;
  }
  .hero h1 { font-size: 3.45rem; }
  .hero-copy > p { max-width: 460px; font-size: 16px; }
  .hero-photo-window > .hero-slide-base,
  .hero-photo-window > .hero-slide-overlay { height: clamp(470px, 28.4vw, 545px); }
}

/* The old in-flow photo sized the frame. This static mask has exactly its old
   dimensions, rounded top, white inset and caption position; neither layer sizes it. */
.hero-photo-window { position:relative; width:100%; height:425px; border-radius:44% 44% 23px 23px; overflow:hidden; isolation:isolate; }
.hero-photo-window > :is(.hero-slide-base,.hero-slide-overlay) { position:absolute; inset:0; width:100%; height:100%; max-width:none; border-radius:0; object-fit:cover; }
@media (min-width:1450px) { .hero-photo-window { height:485px; } }
@media (max-width:900px) { .hero-photo-window { height:365px; } }
@media (max-width:640px) { .hero-photo-window { height:270px; border-radius:100px 100px 20px 20px; } }
@media (min-width:1600px) { .hero-photo-window { height:clamp(470px,28.4vw,545px); } }

/* The frame, captions, and overlay's opacity crossfade are independent of the
   image transform. Every slide stays still until a fine pointer hovers here. */
.hero-photo-window > :is(.hero-slide-base,.hero-slide-overlay) {
  animation:none;
  transform:none;
  transform-origin:center center;
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .hero-photo-window:hover > :is(.hero-slide-base,.hero-slide-overlay) {
    transform:scale(1.02);
  }
}
@media (prefers-reduced-motion:reduce) {
  .hero-photo-window > :is(.hero-slide-base,.hero-slide-overlay) {
    transform:none !important;
    transition:none !important;
  }
}
