/* ============================================
   GALERIJA — STYLES (galerija.html + galerije.html)
   ============================================ */

.gal-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
}
.gal-back:hover { color: var(--secondary-dark); }

.gal-opis {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 36px;
}

.gal-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  background: var(--bg-hero);
  border-radius: var(--radius);
}

/* --- Polna mreža fotografij (galerija.html) --- */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gal-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-hero);
  aspect-ratio: 4 / 3;
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gal-item:hover img { transform: scale(1.04); }

/* --- Video dogodka: nad mrežo fotografij, v širini opisa --- */
.gal-videos {
  max-width: 720px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.gal-videos:empty { display: none; margin: 0; }
.gal-video-featured {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  background: #000;
}

/* --- Foto kredit: tik pod mrežo fotografij --- */
.gal-credit {
  margin-top: 12px;
  text-align: right;
  font-size: 8px;
  color: var(--text-muted);
}
.gal-credit:empty { display: none; margin: 0; }

/* --- Financer/sofinancer: pod galerijo, logotip levo + besedilo desno --- */
.gal-sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 720px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.gal-sponsor:empty { display: none; margin: 0; padding: 0; border: 0; }
.gal-sponsor-logo {
  flex: 0 0 auto;
  width: 110px;
  height: auto;
}
.gal-sponsor-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}
.gal-sponsor-text-left { text-align: left; }
@media (max-width: 600px) {
  .gal-sponsor { flex-direction: column; gap: 12px; }
  .gal-sponsor-logo { width: 90px; }
}

/* --- Seznam albumov (galerije.html) --- */
.gal-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.gal-card {
  display: block;
  color: inherit;
}
.gal-card-img,
.gal-card-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
  margin-bottom: 12px;
}
.gal-card-empty {
  background: var(--bg-hero);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}
.gal-card-title {
  font-size: 17px;
  font-weight: 700;
  transition: color 0.2s;
}
.gal-card:hover .gal-card-title { color: var(--secondary); }

@media (max-width: 900px) {
  .gal-list-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gal-list-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* --- Lightbox (deljen z galerija.html) --- */
.gal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.gal-lightbox.open { display: flex; }
.gal-lb-img-wrap {
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-lb-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  user-select: none;
}
.gal-lb-close,
.gal-lb-prev,
.gal-lb-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: var(--font);
  line-height: 1;
}
.gal-lb-close:hover,
.gal-lb-prev:hover,
.gal-lb-next:hover { background: rgba(255,255,255,0.22); }
.gal-lb-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 26px; }
.gal-lb-prev,
.gal-lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 36px; }
.gal-lb-prev { left: 20px; }
.gal-lb-next { right: 20px; }
.gal-lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-family: var(--font);
  pointer-events: none;
}
