/* Shared navigation and gallery improvements. Hero slideshow is unchanged. */
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #9a7d57;
  outline-offset: 5px;
}

.menu-toggle {
  min-width: 44px;
  min-height: 44px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

@media (max-width: 920px) {
  .nav-wrap {
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

.gallery-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline-offset: -5px;
  outline-color: #ffffff;
  box-shadow: inset 0 0 0 8px #1e1e1e;
}

body.gallery-is-open {
  overflow: hidden;
}

.gallery-viewer {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 20px;
  background: rgba(16, 16, 16, 0.97);
  color: #fff;
}

.gallery-viewer[open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-viewer::backdrop {
  background: #111;
}

.gallery-viewer__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.gallery-viewer button {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: 300 26px/1 "Inter", sans-serif;
  cursor: pointer;
}

.gallery-viewer button:focus-visible {
  outline-color: #fff;
}

.gallery-viewer button:hover {
  opacity: 0.7;
}

.gallery-viewer__stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.gallery-viewer__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.gallery-viewer__status {
  position: absolute;
  bottom: 8px;
  background: #111;
  padding: 0 12px;
  text-align: center;
}

.gallery-viewer__caption {
  margin: 0 auto;
  text-align: center;
  max-width: 720px;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .gallery-viewer {
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .gallery-viewer__caption {
    font-size: 0.85rem;
  }
}
