/* Shared project photo gallery — dashboard + public detail */

.project-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

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

@media (min-width: 1024px) {
  .project-photo-grid--sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f8fafc;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 10 / 7;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.project-photo-thumb:hover {
  border-color: #fdba74;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.08);
  transform: translateY(-1px);
}

.project-photo-thumb:focus-visible {
  outline: 2px solid var(--dashboard-brand, #bf5f0b);
  outline-offset: 2px;
}

.project-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.15s;
}

.project-photo-thumb:hover img {
  opacity: 0.88;
}

.project-photo-thumb__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 0.35);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.project-photo-thumb:hover .project-photo-thumb__overlay,
.project-photo-thumb:focus-visible .project-photo-thumb__overlay {
  opacity: 1;
}

.project-photo-thumb__overlay svg {
  width: 1.75rem;
  height: 1.75rem;
}

.project-photo-thumb__caption {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: #334155;
}

.project-photo-thumb--inline {
  width: 5.5rem;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 0.5rem;
}

.public-project-timeline__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.public-project-timeline__photo.project-photo-thumb {
  width: 5.5rem;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 0.5rem;
}

/* Dashboard image modal */
#imageModal {
  background: rgb(15 23 42 / 0.72);
  backdrop-filter: blur(4px);
}

#imageModal:not(.hidden) {
  display: flex;
}

#imageModal .project-gallery-modal__panel {
  width: min(100%, 56rem);
}

#imageModal .project-gallery-modal__image-wrap {
  min-height: 12rem;
}

#modalImage {
  display: block;
  margin: 0 auto;
}
