/* =========================================================
   CRIS Gallery – Single album
   ========================================================= */

.cris-gallery-single-page .cris-gallery-public-section {
  padding-top: 64px;
}

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

.cris-gallery-single-page .cris-gallery-photo-public-grid {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px !important;
  row-gap: 22px !important;
  column-gap: 22px !important;
  columns: auto !important;
  column-count: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
   Kartica fotografije
   ========================================================= */

.cris-gallery-single-page .cris-gallery-photo-public-item {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  display: block !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #edf5f9 !important;
  cursor: zoom-in;
  break-inside: auto !important;
  box-shadow: 0 12px 30px rgba(12, 97, 150, 0.12);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.cris-gallery-single-page .cris-gallery-photo-public-item:hover,
.cris-gallery-single-page .cris-gallery-photo-public-item:focus {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(12, 97, 150, 0.2);
  outline: none !important;
}

.cris-gallery-single-page .cris-gallery-photo-public-item:focus-visible {
  outline: 3px solid #268dc7 !important;
  outline-offset: 4px;
}

/* =========================================================
   Fotografija
   ========================================================= */

.cris-gallery-single-page .cris-gallery-photo-public-item img {
  width: 100%;
  height: 100% !important;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cris-gallery-single-page .cris-gallery-photo-public-item:hover img,
.cris-gallery-single-page .cris-gallery-photo-public-item:focus img {
  transform: scale(1.04);
}

/* =========================================================
   Overlay
   Stalno je vidljiv zbog info panela.
   ========================================================= */

.cris-gallery-single-page .cris-gallery-photo-public-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  display: flex !important;
  align-items: flex-end;
  padding: 14px !important;
  border-radius: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(7, 43, 66, 0) 48%,
    rgba(7, 43, 66, 0.12) 70%,
    rgba(7, 43, 66, 0.4) 100%
  ) !important;
  color: #fff !important;
  text-align: left;
  opacity: 1 !important;
  pointer-events: none;
}

/* =========================================================
   Bijeli blur info panel
   Stalno vidljiv pri dnu fotografije.
   ========================================================= */

.cris-gallery-single-page .cris-gallery-photo-public-info {
  position: relative;
  z-index: 3;
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(4, 35, 53, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Naslov fotografije */

.cris-gallery-single-page .cris-gallery-photo-public-info strong {
  position: static !important;
  inset: auto !important;
  z-index: auto;
  width: auto !important;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #0c6196 !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none !important;
}

/* Opis ili ALT tekst */

.cris-gallery-single-page .cris-gallery-photo-public-info span {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  display: block;
  overflow: hidden;
  margin: 4px 0 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #268dc7 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none !important;
}

/* =========================================================
   Plus ikona
   Vidi se samo na hover/focus.
   ========================================================= */

.cris-gallery-single-page .cris-gallery-photo-public-zoom {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4;
  width: 46px !important;
  height: 46px !important;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 999px !important;
  background: rgba(12, 97, 150, 0.8) !important;
  color: #fff !important;
  font-size: 28px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  text-align: center !important;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  box-shadow: 0 10px 28px rgba(4, 35, 53, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.cris-gallery-single-page
  .cris-gallery-photo-public-item:hover
  .cris-gallery-photo-public-zoom,
.cris-gallery-single-page
  .cris-gallery-photo-public-item:focus
  .cris-gallery-photo-public-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1100px) {
  .cris-gallery-single-page .cris-gallery-photo-public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px !important;
  }
}

/* =========================================================
   Mobilni prikaz
   ========================================================= */

@media (max-width: 650px) {
  .cris-gallery-single-page .cris-gallery-public-section {
    padding-top: 46px;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-grid {
    grid-template-columns: 1fr;
    gap: 14px !important;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-item {
    border-radius: 14px !important;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-overlay {
    padding: 9px !important;
    background: linear-gradient(
      180deg,
      rgba(7, 43, 66, 0) 48%,
      rgba(7, 43, 66, 0.1) 72%,
      rgba(7, 43, 66, 0.34) 100%
    ) !important;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-info {
    padding: 9px 10px;
    border-radius: 10px;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-info strong {
    font-size: 12px;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-info span {
    font-size: 10px !important;
  }

  .cris-gallery-single-page .cris-gallery-photo-public-zoom {
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 22px !important;
    opacity: 1;
    transform: none;
  }

  .cris-gallery-single-page
    .cris-gallery-photo-public-item:hover
    .cris-gallery-photo-public-zoom,
  .cris-gallery-single-page
    .cris-gallery-photo-public-item:focus
    .cris-gallery-photo-public-zoom {
    transform: none;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .cris-gallery-single-page .cris-gallery-photo-public-item,
  .cris-gallery-single-page .cris-gallery-photo-public-item img,
  .cris-gallery-single-page .cris-gallery-photo-public-zoom {
    transition: none !important;
  }
}
