/* Photography page: the photo gallery (tabs are in tabs.css) */

/* Gallery: photos shown whole, in columns */

.photo-gallery {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 56px 0 90px;
}

.photo-col {
  flex: 1;
  min-width: 0;
}

.photo-item {
  margin: 0 0 16px;
}

.photo-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-open img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

/* Hover: tint the photo and bring up its title */
.photo-open::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 36, 0);
  transition: background 0.3s ease;
}

.photo-hover-title {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-open:hover::after,
.photo-open:focus-visible::after { background: rgba(10, 22, 36, 0.5); }

.photo-open:hover .photo-hover-title,
.photo-open:focus-visible .photo-hover-title { opacity: 1; transform: none; }

.photo-open:hover img { transform: scale(1.02); }

.photo-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Expanded view ---------- */

body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 18, 0.94);
  color: #fff;
}

.lightbox[hidden] { display: none; }

.lightbox button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.lightbox button[hidden] { display: none; }

.lightbox-stage {
  margin: 0;
  padding: 60px 90px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  display: block;
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 38px !important;
  line-height: 1;
  opacity: 0.8;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  opacity: 0.8;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev svg,
.lightbox-next svg { width: 100%; height: 100%; display: block; }

@media (max-width: 640px) {
  .lightbox-stage { padding: 56px 12px 24px; }
  .lightbox-img { max-width: calc(100vw - 24px); max-height: calc(100vh - 150px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 18px; transform: none; }
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}

.photo-empty {
  flex: 1;
  margin: 40px 0;
  text-align: center;
  color: var(--muted);
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
}
