/* Section image zoom lightbox */

.image-zoom {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 1.5rem);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.image-zoom.is-open {
  opacity: 1;
  visibility: visible;
}

.image-zoom__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

.image-zoom__hint {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.image-zoom__close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.image-zoom__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.image-zoom__stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.04);
  touch-action: pan-x pan-y pinch-zoom;
}

.image-zoom__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-zoom__img.is-zoomed {
  transform: scale(1.75);
  cursor: zoom-out;
}

.image-zoom__caption {
  flex-shrink: 0;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.image-zoom__footer {
  flex-shrink: 0;
  margin-top: 0.75rem;
  text-align: center;
}

.image-zoom__link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 0.625rem 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.image-zoom__link:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Zoomable section images — tap/click affordance */
[data-zoomable] {
  cursor: zoom-in;
  position: relative;
}

[data-zoomable]::after {
  content: "";
  position: absolute;
  right: 0.625rem;
  bottom: 0.625rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(0, 20, 84, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 1rem no-repeat;
  pointer-events: none;
  opacity: 0.85;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

a[data-zoomable]::after {
  z-index: 2;
}

@media (min-width: 768px) {
  [data-zoomable]::after {
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  [data-zoomable]:hover::after {
    opacity: 0.9;
  }
}

@media (max-width: 767px) {
  .image-zoom {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .image-zoom__hint {
    font-size: 0.5625rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    max-width: 14rem;
  }

  .image-zoom__caption {
    display: none;
  }

  .image-zoom__img.is-zoomed {
    transform: none;
    width: 180%;
    max-width: none;
  }

  .image-zoom__close {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-zoom,
  .image-zoom__img {
    transition: none;
  }
}
