/* Casos clínicos */
.cases-section,
.testimonials-section {
  background: var(--surface);
}

.case-card {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.case-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zoomable-image {
  cursor: zoom-in;
}

.zoomable-image:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  padding: 72px 24px 28px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.92);
  place-items: center;
  transition: opacity 180ms ease;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox.is-open {
  opacity: 1;
}

.image-lightbox__figure {
  display: grid;
  max-width: min(94vw, 1200px);
  max-height: calc(100vh - 100px);
  margin: 0;
  gap: 12px;
  place-items: center;
}

.image-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}

.image-lightbox__caption {
  margin: 0;
  color: #ffffff;
  font-size: 0.9rem;
  text-align: center;
}

.image-lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  place-items: center;
  font-size: 1.75rem;
  line-height: 1;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
  color: #111111;
  background: var(--accent);
}

body.lightbox-open {
  overflow: hidden;
}

.case-half {
  position: relative;
  display: grid;
  height: 50%;
  color: color-mix(in srgb, var(--muted) 55%, transparent);
  place-items: center;
}

.case-half + .case-half {
  border-top: 1px solid var(--line);
}

.case-half span {
  position: absolute;
  top: 9px;
  left: 10px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

.case-half svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.case-caption {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

