/* GALLERY */
.gallery-section {
  padding: 4rem 10% 2rem 10%;
  background-color: #f9f9f6;
  font-family: 'Red Hat Mono', serif;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 15px;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* Dinamične veličine */
.gallery-grid img.wide { grid-column: span 3; grid-row: span 2; }
.gallery-grid img.tall { grid-row: span 2; }
.gallery-grid img.large { grid-column: span 2; grid-row: span 2; }

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.lightbox-image {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.close {
  position: absolute; top: 40px; right: 60px;
  font-size: 40px; color: #fff;
  cursor: pointer; transition: color 0.3s;
}

.close:hover { color: #B68D40; }

.prev, .next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 50px; color: #B68D40; cursor: pointer; padding: 20px;
}

.prev:hover, .next:hover { color: #fff; }
.prev { left: 50px; } .next { right: 50px; }

/* ---------------------------
   MOBILE VERSION
--------------------------- */
@media (max-width: 768px) {
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 stupca */
    grid-auto-rows: 150px; /* visina redova */
    gap: 10px;
    grid-auto-flow: dense; /* popunjava praznine */
    width: 90%;
    margin: 0 auto;
  }

  .gallery-section {
    padding: 1rem 1% 1rem 1%;
  }

  .gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }

  .gallery-grid img.wide,
  .gallery-grid img.large {
    grid-column: span 2; /* zauzima oba stupca */
    grid-row: span 2;
  }
}


