.clinic-hours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: white;
  color: var(--evergreen);
  scroll-margin-top: 6rem;
}

.clinic-hours__period {
  position: relative;
  overflow: hidden;
}

.clinic-hours__period + .clinic-hours__period {
  box-shadow: inset 1px 0 #e4ede3;
}

.clinic-hours__face {
  --hours-orbit-line: #18704e19;
  --hours-orbit-accent: #18704e38;
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(15rem, 24vw, 24rem);
  align-content: center;
  gap: .65rem;
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  text-align: center;
}

.clinic-hours__face::before,
.clinic-hours__face::after {
  position: absolute;
  z-index: -1;
  top: 54%;
  left: 50%;
  width: clamp(15rem, 29vw, 30rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid var(--hours-orbit-line);
  border-top-color: var(--hours-orbit-accent);
  border-radius: 50%;
  background: radial-gradient(circle at 50% .25rem, var(--hours-orbit-accent) .14rem, transparent .18rem);
  animation: orbit 36s linear infinite;
  pointer-events: none;
  content: '';
}

.clinic-hours__face::after {
  width: clamp(12rem, 23vw, 24rem);
  animation: orbit 27s -9s linear infinite reverse;
}

.clinic-hours__day {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.clinic-hours__time {
  margin: 0;
  color: var(--green);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.clinic-hours__face--green {
  --hours-orbit-line: #dcf0d820;
  --hours-orbit-accent: #dcf0d844;
  --hours-wipe-edge: clamp(1.25rem, 4vw, 3rem);
  --hours-wipe-enter: opacity .24s ease-out .1s, mask-size .85s cubic-bezier(.28, .12, .25, 1) .1s;
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--evergreen), var(--green));
  color: white;
  opacity: 0;
  mask-image: linear-gradient(to right, #000 calc(100% - var(--hours-wipe-edge)), transparent);
  mask-position: left top;
  mask-repeat: no-repeat;
  mask-size: 0px 100%;
  /* Fade each panel in place before resetting its mask. */
  transition: opacity .2s ease-out, mask-size 0s .2s;
  pointer-events: none;
}

.clinic-hours__face--green .clinic-hours__time { color: inherit; }

@media (width > 700px) and (hover: hover) {
  .clinic-hours__period:hover .clinic-hours__face--green {
    opacity: 1;
    mask-size: calc(100% + var(--hours-wipe-edge)) 100%;
    transition: var(--hours-wipe-enter);
  }
}

.clinic-location {
  padding-block: clamp(4.75rem, 9vw, 8.5rem);
  background: #edf3e9;
  color: #153c2e;
  scroll-margin-top: 6rem;
}

.clinic-location__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
}

.clinic-location__eyebrow {
  margin: 0 0 1rem;
  color: #33644d;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.clinic-location h2 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-weight: 600;
  letter-spacing: -0.042em;
}

.clinic-location h2 {
  font-size: clamp(3.375rem, 5.6vw, 5.5rem);
  line-height: 0.95;
}

.clinic-location h2 em {
  color: #227448;
  font-weight: inherit;
}

.clinic-location__address {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  margin: 2rem 0 1.6rem;
  font-style: normal;
}

.clinic-location__address strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  font-weight: 700;
}

.clinic-location__address p {
  margin: 0;
  color: #415b4c;
  font-size: 1rem;
  line-height: 1.75;
}

.clinic-location__pin {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid #bdd1c0;
  border-radius: 50%;
  color: #226946;
}

.clinic-location__pin::before {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.65px solid currentColor;
  border-radius: 50% 50% 50% 0;
  content: "";
  transform: translateY(-0.08rem) rotate(-45deg);
}

.clinic-location__pin::after {
  position: absolute;
  top: 0.97rem;
  left: 1.13rem;
  width: 0.27rem;
  height: 0.27rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.closing-button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 100vw;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.closing-button--route {
  border-color: #739782;
  color: #184d36;
}

.closing-button--route:hover {
  border-color: #184d36;
  background-color: #184d36;
  color: white;
}

.clinic-map {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid #cad8ca;
  border-radius: 1.5rem;
  background: #f8faf6;
  box-shadow: 0 1.1rem 2.5rem #183a2510;
}

.clinic-map img {
  display: block;
  width: 100%;
  height: clamp(18rem, 31vw, 24rem);
  object-fit: cover;
  background: #dce8db;
}

.clinic-map__link {
  position: absolute;
  inset: 0;
  color: #153c2e;
  text-decoration: none;
}

.clinic-map__link:focus-visible { outline-offset: -4px; }

.clinic-map__marker {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.55rem;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  background: #176542;
  color: white;
  box-shadow: 0 .2rem .6rem #103c3b66;
}

.clinic-map__link:hover .clinic-map__marker { background: #0b3828; }

.clinic-map__action, .clinic-map__credit {
  position: absolute;
  right: .6rem;
  background: #f8faf6;
  color: #184d36;
}

.clinic-map__action {
  top: .6rem;
  padding: .45rem .75rem;
  border: 1px solid #cad8ca;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
}

.clinic-map__credit {
  bottom: .45rem;
  padding: .12rem .4rem;
  border-radius: .25rem;
  font-size: .76rem;
  text-underline-offset: .18em;
}

.clinic-footer {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: radial-gradient(ellipse at 5% 0%, #164936, #0b3426 58%);
  color: #f5f8ee;
}

.clinic-footer::before {
  --footer-orbit-size: clamp(21rem, 42vw, 39rem);
  position: absolute;
  z-index: -1;
  inset: calc(var(--footer-orbit-size) * -.72) 4vw auto auto;
  width: var(--footer-orbit-size);
  aspect-ratio: 1;
  border: 1px solid #8fcaa824;
  border-top-color: #8fcaa860;
  border-radius: 50%;
  box-shadow: 0 0 0 2.1rem #7ebd990b;
  animation: orbit 48s linear infinite;
  pointer-events: none;
  content: '';
}

.clinic-footer__inner {
  padding-inline: clamp(1.25rem, 5vw, 6rem);
}

.clinic-footer p,
.clinic-footer address {
  color: #c3d7c8;
}

.clinic-footer__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .75fr) minmax(0, 1fr) max-content;
  align-items: start;
  gap: clamp(1.7rem, 5vw, 5.5rem);
  padding-block: clamp(3.5rem, 5.5vw, 6rem);
}

.clinic-footer__brand a {
  display: inline-block;
}

.clinic-footer__brand img {
  display: block;
  width: 8.25rem;
  height: auto;
  filter: brightness(0) invert(1);
}

.clinic-footer__brand p {
  margin: 1rem 0 0;
  font-size: 0.94rem;
  line-height: 1.65;
}

.clinic-footer h3 {
  margin: 0 0 0.75rem;
  color: #f5f8ee;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
}

.clinic-footer__columns ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clinic-footer__columns li a,
.clinic-footer__route {
  display: inline-flex;
  min-height: 2.1rem;
  align-items: center;
  color: #c3d7c8;
  font-size: 0.94rem;
  text-decoration: none;
  text-underline-offset: 0.27em;
}

.clinic-footer__columns li a:hover,
.clinic-footer__route:hover {
  color: #fff;
  text-decoration: underline;
}

.clinic-footer__columns address {
  font-size: 0.94rem;
  font-style: normal;
  line-height: 1.85;
}

.clinic-footer__location {
  text-align: end;
}

.clinic-footer__route {
  gap: .45rem;
  margin-top: .55rem;
}

.clinic-footer__route .icon {
  width: 1rem;
  height: 1rem;
}

.clinic-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem clamp(1rem, 3vw, 3rem);
  padding-block: 1rem;
  padding-block-end: calc(5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #7ca68b45;
  font-size: 0.84rem;
}

.clinic-footer__legal p {
  margin: 0;
}

.clinic-footer__credit {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .55rem;
  color: #c3d7c8;
  text-decoration: none;
  text-underline-offset: .27em;
}

.clinic-footer__credit:hover {
  color: white;
  text-decoration: underline;
}

.clinic-footer__credit img {
  width: 3.5rem;
  height: auto;
  filter: brightness(0) invert(1);
}

.clinic-footer__legal .clinic-footer__registrations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-inline-start: auto;
}

.clinic-location a:focus-visible,
.clinic-footer a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.clinic-whatsapp {
  --whatsapp-inset: clamp(1rem, 1.6vw, 1.5rem);
  position: fixed;
  z-index: 10;
  right: calc(var(--whatsapp-inset) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--whatsapp-inset) + env(safe-area-inset-bottom, 0px));
  display: grid;
  width: 3.5rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #ffffff52;
  border-radius: 50%;
  background: var(--green);
  color: white;
  box-shadow: 0 5px 22px #0b352735;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s var(--ease-out);
}

.clinic-whatsapp .icon {
  width: 1.65rem;
  height: 1.65rem;
}

.clinic-whatsapp:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--evergreen);
}

.clinic-whatsapp__hint {
  position: absolute;
  right: calc(100% + .55rem);
  padding: .55rem .8rem;
  border-radius: .65rem;
  background: var(--evergreen);
  color: white;
  font-size: .82rem;
  font-weight: 650;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  translate: .4rem 0;
  animation: clinic-whatsapp-hint 10s ease-in-out infinite;
}

.clinic-whatsapp:focus-visible .clinic-whatsapp__hint {
  animation: none;
  opacity: 1;
  translate: 0;
}

@media (hover: hover) {
  .clinic-whatsapp:hover {
    transform: translateY(-.15rem);
    background: var(--evergreen);
  }

  .clinic-whatsapp:hover .clinic-whatsapp__hint {
    animation: none;
    opacity: 1;
    translate: 0;
  }
}

@keyframes clinic-whatsapp-hint {
  0%, 64%, 100% { opacity: 0; translate: .4rem 0; }
  70%, 92% { opacity: 1; translate: 0; }
}

@media (max-width: 880px) {
  .clinic-location__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinic-footer__columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .clinic-hours {
    grid-template-columns: minmax(0, 1fr);
    scroll-margin-top: 4.5rem;
  }

  .clinic-hours__period + .clinic-hours__period { box-shadow: inset 0 1px #e4ede3; }

  .clinic-hours__face { min-height: clamp(12.5rem, 25svh, 15rem); }

  .clinic-hours__face--green {
    opacity: 1;
    mask-size: calc((100% + var(--hours-wipe-edge)) * var(--hours-scroll-fill, 0)) 100%;
    transition: mask-size .16s ease-out;
  }
}

@media (max-width: 520px) {
  .clinic-location {
    padding-block: 4.2rem;
    scroll-margin-top: 4.5rem;
  }

  .clinic-location__address {
    gap: 0.75rem;
  }

  .clinic-location__address p {
    line-height: 1.55;
  }

  .clinic-map img {
    height: 17rem;
  }

  .clinic-footer__columns {
    gap: 1.6rem 1rem;
    padding-block: 2.5rem;
  }

  .clinic-footer__brand,
  .clinic-footer__location {
    grid-column: 1 / -1;
  }

  .clinic-footer__columns li a,
  .clinic-footer__route {
    min-height: 2.75rem;
    overflow-wrap: anywhere;
  }

  .clinic-footer__legal {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-footer__legal .clinic-footer__registrations {
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clinic-whatsapp__hint { animation: none; }
  .clinic-whatsapp:hover { transform: none; }

  .clinic-hours__face::before,
  .clinic-hours__face::after { animation: none; }

  .clinic-hours .clinic-hours__period .clinic-hours__face--green { transition: none; }

  .closing-button {
    transition: none;
  }
}
