/* ============================================================
   GALERIJA – page styles
   ============================================================ */

.galerija-section {
  padding: 4.5rem 0 5.5rem;
  background: #f4f8fd;
}

/* ===== Grid ===== */

.galerija-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}

@media (min-width: 560px) {
  .galerija-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .galerija-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ===== Card ===== */

.gallery-item {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(11, 95, 174, 0.08);
  box-shadow: 0 4px 18px rgba(8, 61, 113, 0.06);
  transition: transform 0.28s, box-shadow 0.28s;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(8, 61, 113, 0.14);
}

/* Image wrap */
.gallery-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #d0d8e4;
}

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

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

/* Hover overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 61, 110, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* Caption */
.gallery-caption {
  padding: 1.1rem 1.3rem 1.3rem;
}

.gallery-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0c5dac;
  background: rgba(12, 93, 172, 0.09);
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.55rem;
}

.gallery-caption h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0b3d6e;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.gallery-caption p {
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

/* ===== Lightbox ===== */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 20, 45, 0.92);
  z-index: 2000;
  backdrop-filter: blur(6px);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  display: block;
}

.lightbox-caption {
  text-align: center;
  color: #fff;
}

.lightbox-caption span {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent, #f7c948);
  margin-bottom: 0.3rem;
}

.lightbox-caption p {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  margin: 0;
}

/* Control buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(8px);
  z-index: 2200;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-close {
  top: 1.2rem;
  right: 1.2rem;
  width: 46px;
  height: 46px;
  font-size: 1.1rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 639px) {
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
}


.gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  background: #0b3d6e;
}

.gallery-item:hover .gallery-video {
  transform: scale(1.06);
}

.gallery-media-badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 34, 63, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lightbox-inner video {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  display: block;
  background: #000;
}


.gallery-item:focus-visible {
  outline: 3px solid rgba(247, 201, 72, 0.95);
  outline-offset: 4px;
}

.gallery-video[poster] {
  object-fit: cover;
}
