/* ============================================================
   gallery.css — PhotoSwipe gallery grid + customisation
   Single Responsibility: only gallery/portfolio styles
   ============================================================ */

/* ---- Gallery grid ---- */
.pswp-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.pswp-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1 / 1;
  background: var(--ds-bg-alt);
  position: relative;
}

.pswp-gallery a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.pswp-gallery a:hover img {
  transform: scale(1.06);
}

.pswp-gallery a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,42,.55) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.pswp-gallery a:hover::after {
  opacity: 1;
}

/* placeholder state when image hasn't been added yet */
.pswp-gallery a.gallery-placeholder {
  cursor: default;
  pointer-events: none;
}

.pswp-gallery a.gallery-placeholder::before {
  content: attr(data-index);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  border: 1.5px dashed rgba(47,128,237,.25);
  border-radius: 6px;
}

/* ---- PhotoSwipe UI overrides ---- */
.pswp {
  --pswp-bg: #0D1B2A;
  --pswp-icon-color: #fff;
  --pswp-icon-color-secondary: rgba(255,255,255,.5);
  --pswp-icon-stroke-color: #0D1B2A;
  --pswp-icon-stroke-width: 2px;
  --pswp-placeholder-bg: #152438;
}

.pswp__bg { background: rgba(13,27,42,.96); }

.pswp__button {
  border-radius: 8px;
  transition: background .2s ease;
}

.pswp__button:hover {
  background: rgba(47,128,237,.2);
}

.pswp__counter {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .95rem;
  letter-spacing: .08em;
}

/* ---- Instagram wrapper ---- */
.instagram-wrapper {
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.gallery-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.gallery-header i {
  font-size: 1.4rem;
  color: var(--primary-light);
}

.gallery-header-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ds-text-dim);
  font-weight: 600;
}

.gallery-header-text a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

.gallery-header-text a:hover {
  color: #fff;
}

/* ---- Responsive gallery ---- */
@media (max-width: 767px) {
  .pswp-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 479px) {
  .pswp-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
