
/* =========================================================
   GALERIJA – stilovi samo za stranicu galerija.html
   Meni, naslovi i zajednička dugmad su u style.css
   ========================================================= */

/* ---------- Zaglavlje stranice ---------- */
.gl-head {
  background: var(--navy);
  color: #fff;
  padding: 72px 0 64px;
}

.gl-head h1 {
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.gl-head p {
  max-width: 46ch;
  margin-top: 14px;
  font-size: 1.2rem;
  color: #dbe5f8;
}

/* ---------- Filteri ---------- */
.gl-main {
  padding: 36px 0 88px;
}

.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.gl-chip {
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 0.95rem 'Barlow', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gl-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.gl-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.gl-chip:focus-visible,
.gl-item button:focus-visible,
.gl-lb-btn:focus-visible {
  outline: 3px solid var(--accent, #e8742c);
  outline-offset: 3px;
}

/* ---------- Mreža fotografija ---------- */
.gl-grid {
  columns: 3 280px;
  column-gap: 16px;
}

.gl-item {
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sky);
}

.gl-item.is-hidden {
  display: none;
}

.gl-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.gl-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s;
}

.gl-item button:hover img {
  transform: scale(1.04);
}

/* ---------- Lightbox: uvećana fotografija ---------- */
.gl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 72px;
  background: rgba(8, 16, 34, 0.95);
}

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

.gl-lb-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 100%;
}

/* Prikazuje se samo fotografija – bez natpisa i broja. */
.gl-lb-figure figcaption {
  display: none !important;
}

.gl-lb-figure img {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: contain;
}

/* ---------- Kontrolna dugmad ---------- */
.gl-lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.gl-lb-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.gl-lb-prev {
  left: 20px;
}

.gl-lb-next {
  right: 20px;
}

.gl-lb-close {
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .gl-head {
    padding: 52px 0 44px;
  }

  .gl-grid {
    columns: 2 150px;
    column-gap: 10px;
  }

  .gl-item {
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .gl-lightbox {
    padding: 60px 44px;
  }

  .gl-lb-figure img {
    max-width: 100%;
    max-height: 75vh;
  }

  .gl-lb-prev {
    left: 6px;
  }

  .gl-lb-next {
    right: 6px;
  }

  .gl-lb-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
  }

  .gl-lb-close {
    top: 12px;
    right: 12px;
  }
}

/* ---------- Smanjeno kretanje ---------- */
@media (prefers-reduced-motion: reduce) {
  .gl-item img,
  .gl-chip,
  .gl-lb-btn {
    transition: none;
  }

  .gl-item button:hover img {
    transform: none;
  }
}
