/* The office preview and photo gallery use the site's Bodoni heading face. */
.clinic-preview,
.clinic-gallery {
  --clinic-ink: #001b3d;
  --clinic-body: #394b5c;
  --clinic-paper: #f7f2e8;
  --clinic-line: #cfbf99;
  --clinic-gutter: clamp(1rem, 5vw, 4.5rem);
}

.clinic-preview {
  padding: clamp(2rem, 5vw, 4.5rem) var(--clinic-gutter);
}

.clinic-preview__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "photo copy";
  max-width: 68rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--clinic-line);
  border-radius: 1.35rem;
  background: var(--clinic-paper);
  color-scheme: light;
}

.clinic-preview__copy {
  grid-area: copy;
  align-self: center;
  padding: clamp(1.5rem, 3.8vw, 3.75rem);
  text-align: left;
}

.clinic-preview__copy::before {
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-bottom: 1.15rem;
  background: #a3843c;
  content: "";
}

.clinic-preview__title,
.clinic-gallery__title {
  margin: 0;
  color: var(--clinic-ink);
  font: 400 clamp(2.1rem, 3.9vw, 3.6rem)/1.06 var(--font-display, Georgia, serif);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.clinic-preview__text,
.clinic-gallery__hint {
  max-width: 37ch;
  margin: .9rem 0 0;
  color: var(--clinic-body);
  font: 400 1.075rem/1.5 var(--font-body, Georgia, serif);
}

.clinic-preview__link,
.clinic-gallery-jump,
.clinic-gallery__item figcaption,
.clinic-lightbox button,
.clinic-lightbox__count,
.clinic-lightbox__fallback {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.clinic-preview__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 46px;
  max-width: 100%;
  margin-top: 1.4rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--clinic-ink);
  border-radius: 999px;
  background: var(--clinic-ink);
  color: #fff9e9;
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.35;
}

.clinic-preview__link span,
.clinic-gallery__item figcaption > span {
  color: inherit;
}

.clinic-preview__link:hover {
  background: #163650;
  color: white;
}

.clinic-preview__photo {
  grid-area: photo;
  display: grid;
  align-content: center;
  min-width: 0;
  background: #e6dcc9;
}

.clinic-preview__photo img,
.clinic-gallery__item picture,
.clinic-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
}

.clinic-gallery-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .25rem;
  color: #f2d895;
  text-decoration: underline;
  text-underline-offset: .23em;
  font-size: .95rem;
}

.clinic-gallery {
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--clinic-gutter);
  border-block: 1px solid var(--clinic-line);
  background: var(--clinic-paper);
  color-scheme: light;
  scroll-margin-top: calc(var(--hdr-h, 80px) + 1rem);
}

.clinic-gallery__inner {
  max-width: 68rem;
  margin: 0 auto;
}

.clinic-gallery__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 2rem;
  margin-bottom: clamp(1.25rem, 3vw, 2.3rem);
}

.clinic-gallery__hint {
  margin: 0;
  font-size: 1rem;
}

.clinic-gallery__rooms,
.clinic-gallery__details {
  display: grid;
  gap: clamp(.75rem, 2vw, 1.5rem);
  align-items: start;
}

.clinic-gallery__rooms {
  grid-template-columns: minmax(0, 16fr) repeat(2, minmax(0, 9fr));
}

.clinic-gallery__details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.clinic-gallery__item {
  display: block;
  min-width: 0;
  border-radius: .75rem;
  color: var(--clinic-ink);
  text-decoration: none;
}

.clinic-gallery__item figure {
  margin: 0;
}

.clinic-gallery__item img {
  border: 1px solid rgba(72, 55, 33, .18);
  border-radius: .75rem;
  background: #e7dfd0;
}

.clinic-gallery__item figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .62rem .1rem 0;
  color: var(--clinic-ink);
  font-size: .96rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.clinic-gallery__item:hover figcaption {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.clinic-gallery__arrow {
  flex: 0 0 auto;
  font-size: 1rem;
}

.clinic-preview__link:focus-visible,
.clinic-gallery__item:focus-visible {
  outline: 3px solid #234e68;
  outline-offset: 4px;
}

.clinic-gallery-jump:focus-visible,
.clinic-lightbox :focus-visible {
  outline: 3px solid #f6d783;
  outline-offset: 3px;
}

html.clinic-lightbox-open {
  overflow: hidden;
}

.clinic-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(64rem, calc(100% - 2rem));
  max-width: 100%;
  height: min(52rem, calc(100vh - 2rem));
  height: min(52rem, calc(100dvh - 2rem));
  max-height: 100%;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #506174;
  border-radius: 1rem;
  background: #091c32;
  color: #fcf6e8;
  color-scheme: dark;
}

.clinic-lightbox:not([open]) {
  display: none;
}

.clinic-lightbox::backdrop {
  background: rgba(2, 12, 24, .89);
}

.clinic-lightbox__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 12rem;
}

.clinic-lightbox__bar,
.clinic-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem clamp(.65rem, 2vw, 1.25rem);
}

.clinic-lightbox__title {
  margin: 0;
  color: #fcf6e8;
  font: 400 1.35rem/1.2 var(--font-display, Georgia, serif);
}

.clinic-lightbox button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: .3rem .8rem;
  border: 1px solid #7f8d99;
  border-radius: 999px;
  background: #102941;
  color: #fff9ec;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
}

.clinic-lightbox button:hover {
  background: #24435b;
}

.clinic-lightbox__stage {
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #051221;
}

.clinic-lightbox__stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.clinic-lightbox__stage [hidden] {
  display: none;
}

.clinic-lightbox__fallback {
  padding: .75rem;
  color: #f6dc9b;
  text-decoration: underline;
}

.clinic-lightbox__status {
  margin: 0;
  text-align: center;
}

.clinic-lightbox__caption,
.clinic-lightbox__count {
  display: block;
  color: #fcf6e8;
}

.clinic-lightbox__caption {
  font: 400 clamp(1.08rem, 2vw, 1.4rem)/1.2 var(--font-display, Georgia, serif);
}

.clinic-lightbox__count {
  margin-top: .15rem;
  color: #d2c6ac;
  font-size: .8rem;
  line-height: 1.25;
}

@media (max-width: 42rem) {
  .clinic-preview__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "copy";
    max-width: 34rem;
  }
  .clinic-gallery__rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clinic-gallery__rooms > :first-child {
    grid-column: 1 / -1;
  }
  .clinic-lightbox {
    width: calc(100% - 1rem);
    height: calc(100vh - 1.5rem);
    height: calc(100dvh - 1.5rem);
  }
}

@media (max-width: 24rem) {
  .clinic-gallery__item figcaption {
    font-size: .88rem;
  }
}

@media (forced-colors: active) {
  .clinic-gallery__item img,
  .clinic-preview__inner,
  .clinic-lightbox,
  .clinic-lightbox button {
    border: 1px solid CanvasText;
  }
  .clinic-gallery__item figcaption,
  .clinic-preview__link,
  .clinic-gallery-jump {
    color: LinkText;
  }
}
