﻿.gallery .item,
.detail-card .hero-image,
.detail-card .detail-image,
.card .hero-image {
  cursor: zoom-in;
}

.gallery .item {
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery .item:hover,
.gallery .item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 26px 56px rgba(58, 50, 40, 0.16);
}

.gallery .item:focus-visible,
.detail-card .hero-image:focus-visible,
.detail-card .detail-image:focus-visible,
.card .hero-image:focus-visible {
  outline: 2px solid rgba(191, 168, 125, 0.9);
  outline-offset: 4px;
}

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 20, 15, 0.76);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  padding: 20px 20px 16px;
  background: rgba(247, 242, 234, 0.98);
  border: 1px solid rgba(191, 168, 125, 0.26);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(58, 50, 40, 0.08);
  color: #3A3228;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(58, 50, 40, 0.14);
  outline: none;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  border-radius: 18px;
  background: #EFE7DA;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
}

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

.lightbox-loading {
  color: #5A4D3E;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.lightbox-caption {
  margin-top: 14px;
  padding-right: 36px;
  color: #3A3228;
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .lightbox-modal {
    padding: 14px;
  }

  .lightbox-dialog {
    padding: 16px 16px 14px;
    border-radius: 18px;
  }

  .lightbox-stage {
    min-height: 220px;
  }

  .lightbox-caption {
    font-size: 14px;
  }
}
