.sj-photos {
  --sj-cols: 3;
  --sj-gap: 12px;
  --sj-radius: 6px;
}

.sj-photos__grid {
  display: grid;
  grid-template-columns: repeat(var(--sj-cols), 1fr);
  gap: var(--sj-gap);
}

@media (max-width: 720px) {
  .sj-photos__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .sj-photos__grid { grid-template-columns: 1fr; }
}

.sj-photos__item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--sj-radius);
  background: #f0f0f0;
  text-decoration: none;
}

.sj-photos__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.sj-photos__item:hover img {
  transform: scale(1.04);
}

.sj-photos__class {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

/* Event tile decorations */
.sj-photos__event::after {
  /* subtle dark gradient at bottom-right so the count badge has contrast */
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  pointer-events: none;
}
.sj-photos__count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}
.sj-photos__date {
  position: absolute;
  bottom: 8px;
  right: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.sj-photos__more {
  display: block;
  margin: 18px auto 0;
  padding: 8px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #1f6feb;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.sj-photos__more[disabled] { opacity: 0.5; cursor: default; }

.sj-photos--empty {
  padding: 32px 16px;
  text-align: center;
  color: #777;
}

/* Lightbox */
.sj-lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  cursor: zoom-out;
}
.sj-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.sj-lightbox__caption {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; color: #fff; font-size: 14px;
  padding: 0 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.sj-lightbox__close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.sj-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.sj-lightbox--multi .sj-lightbox__nav { display: flex; }
.sj-lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.sj-lightbox__prev { left: 20px; }
.sj-lightbox__next { right: 20px; }
.sj-lightbox__counter {
  position: absolute; top: 16px; left: 20px;
  color: #fff; font-size: 13px; font-weight: 500;
  background: rgba(0,0,0,0.4); padding: 3px 10px; border-radius: 4px;
}
.sj-lightbox__counter:empty { display: none; }
