.photo-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

@media (min-width: 900px) {
  .photo-item:nth-child(9n + 1),
  .photo-item:nth-child(9n + 6) {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}

.photo-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.12);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  cursor: zoom-in;
}

.photo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  border-color: rgba(10, 132, 255, 0.25);
}

.photo-item img {
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease, filter 0.3s ease;
  filter: var(--media-tone-filter, none);
}

.photo-item img.loaded {
  opacity: 1;
}

/* Lightbox Component Styles */
/* Lightbox Component Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 2rem;
}

@media (max-width: 620px) {
  .modal-backdrop {
    padding: 1rem 0;
  }
}

.modal {
  position: relative;
  width: min(1200px, 95vw);
  height: 88vh;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.18);
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  display: grid;
  grid-template-rows: 1fr auto;
}

@media (max-width: 620px) {
  .modal {
    width: 100vw;
    height: calc(100vh - 2rem);
    border-radius: 16px 16px 0 0;
  }
}

.modal img {
  max-width: calc(100% - 2.5rem);
  max-height: calc(88vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid rgba(60, 60, 67, 0.18);
  background: rgba(255, 255, 255, 0.95);
  color: #1d1d1f;
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.close-btn:hover {
  background: rgba(10, 132, 255, 0.12);
  border-color: rgba(10, 132, 255, 0.3);
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(60, 60, 67, 0.18);
  color: #1d1d1f;
  width: 3rem;
  height: 4.5rem;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.nav-button:hover {
  background: rgba(10, 132, 255, 0.12);
  border-color: rgba(10, 132, 255, 0.3);
}

.nav-prev {
  left: 1rem;
  border-radius: 0 8px 8px 0;
}

.nav-next {
  right: 1rem;
  border-radius: 8px 0 0 8px;
}

.photo-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  border: 1px solid rgba(60, 60, 67, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.share-button {
  top: auto;
  bottom: 1.75rem;
  right: 1.25rem;
  width: auto;
  height: auto;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid rgba(10, 132, 255, 0.4);
  box-shadow: 0 14px 26px rgba(10, 132, 255, 0.25);
}

.share-button:hover {
  background: #0a6fe6;
  border-color: rgba(10, 132, 255, 0.5);
}

.photo-counter {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(60, 60, 67, 0.18);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.thumbnail-strip {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(60, 60, 67, 0.18);
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
  height: 120px;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: transparent;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.3);
  border-radius: 6px;
}

.thumbnail {
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  background: rgba(226, 232, 240, 0.5);
}

.thumbnail:hover {
  opacity: 0.8;
}

.thumbnail.active {
  opacity: 1;
  border-color: rgba(10, 132, 255, 0.55);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.photo-gallery .badge {
  align-self: flex-start;
  cursor: default;
  border: 1px solid rgba(60, 60, 67, 0.14);
  box-shadow: none;
  backdrop-filter: blur(8px);
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-subtle);
  border-radius: 10px;
}
