/* ============ IMAGE LIGHTBOX ============ */

.zoomable {
  cursor: zoom-in;
}

figure:has(.zoomable),
.house-img:has(.zoomable) {
  position: relative;
}

figure:has(.zoomable)::after,
.house-img:has(.zoomable)::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(23, 23, 19, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3ECDD' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

figure:has(.zoomable):hover::after,
.house-img:has(.zoomable):hover::after {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(15, 15, 12, 0.94);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-figure {
  max-width: 92vw;
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.97);
  transition: transform 0.25s ease;
}

.lightbox-overlay.active .lightbox-figure {
  transform: scale(1);
}

.lightbox-figure img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox-caption {
  margin-top: 16px;
  color: #EAE0CB;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-align: center;
  min-height: 1em;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(243, 236, 221, 0.35);
  background: rgba(23, 23, 19, 0.5);
  color: #F3ECDD;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(23, 23, 19, 0.85);
  transform: rotate(90deg);
}

@media (max-width: 640px) {
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .lightbox-overlay {
    padding: 16px;
  }
}
