/* Hostel page gallery */

.hostel-gallery-section {
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.hostel-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 280px;
  gap: 1.25rem;
}

.hostel-gallery-status {
  margin: -1rem 0 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

.hostel-gallery-status:empty {
  display: none;
}

.hostel-gallery-action {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.hostel-gallery-action button[hidden] {
  display: none;
}

.hostel-gallery-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  outline: none;
}

.hostel-gallery-item:focus-visible {
  box-shadow: 0 0 0 4px var(--accent-gold), var(--shadow-md);
}

.hostel-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hostel-gallery-item::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(7, 25, 44, 0.9));
}

.hostel-gallery-item:hover img {
  transform: scale(1.06);
}

.hostel-gallery-item figcaption {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  left: 1.25rem;
  z-index: 1;
  color: #fff;
}

.hostel-gallery-item figcaption strong,
.hostel-gallery-item figcaption span {
  display: block;
}

.hostel-gallery-item figcaption strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.hostel-gallery-item figcaption span {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
}

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

.hostel-lightbox {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(3, 13, 25, 0.94);
}

.hostel-lightbox-content {
  display: flex;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hostel-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

.hostel-lightbox-content p {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.hostel-lightbox-close {
  position: absolute;
  z-index: 1;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.hostel-lightbox-close:hover,
.hostel-lightbox-close:focus-visible {
  background: var(--accent-gold);
  color: var(--primary);
}

.hostel-lightbox-open {
  overflow: hidden;
}

@media (min-width: 1500px) {
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hostel-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 310px;
  }
}

@media (max-width: 1024px) {
  .features-grid,
  .hostel-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .features-grid,
  .hostel-gallery-grid {
    grid-template-columns: 1fr;
  }

  .hostel-gallery-grid {
    grid-auto-rows: 260px;
  }

  .hostel-gallery-item figcaption strong {
    font-size: 1.02rem;
  }

  .hostel-gallery-item figcaption span {
    font-size: 0.76rem;
  }
}

@media (max-width: 480px) {
  .hostel-gallery-grid {
    grid-auto-rows: 220px;
  }

  .hostel-gallery-item figcaption {
    right: 0.9rem;
    bottom: 0.9rem;
    left: 0.9rem;
  }

  .feature-card {
    padding: 1.5rem;
  }
}
