/* AMB Child-Theme — Galerie: Bento-Grid, Hover-Overlay, Lightbox
   Quelle: zusammenhängender Abschnitt aus der urspr. style.css (Reihenfolge bewahrt) */

/* ============================================================
   GALERIE — Bento Masonry Grid
   ============================================================ */
.amb-gallery-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.amb-filter-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 50px;
  border: 2px solid #E2E8F0;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}
.amb-filter-btn:hover,
.amb-filter-btn.active {
  background: #F97316;
  border-color: #F97316;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
.amb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 14px;
}
.amb-gallery-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease,
              transform 0.55s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s ease;
}
.amb-gallery-item.amb-visible {
  opacity: 1;
  transform: translateY(0);
}
.amb-gallery-item:hover {
  box-shadow: 0 20px 50px rgba(249,115,22,0.2);
  transform: translateY(-6px) scale(1.015) !important;
  z-index: 2;
}
.amb-gallery-item.span-2-col  { grid-column: span 2; }
.amb-gallery-item.span-2-row  { grid-row:    span 2; }
.amb-gallery-item.span-2-both { grid-column: span 2; grid-row: span 2; }

.amb-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.amb-gallery-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 25%, rgba(249,115,22,0.18) 0%, transparent 55%);
  pointer-events: none;
}
.amb-gallery-item-emoji {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  display: block;
  text-align: center;
}
.amb-gallery-item.span-2-both .amb-gallery-item-emoji { font-size: 80px; margin-bottom: 16px; }
.amb-gallery-item:hover .amb-gallery-item-emoji { transform: scale(1.2) translateY(-5px); }
.amb-gallery-item-label {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  position: relative;
  z-index: 1;
  margin: 0 !important;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.amb-gallery-item.span-2-both .amb-gallery-item-label { font-size: 20px; }
.amb-gallery-item.span-2-col  .amb-gallery-item-label { font-size: 15px; }
.amb-gallery-item-cat {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4) !important;
  margin: 5px 0 0 !important;
  position: relative;
  z-index: 1;
  text-align: center;
}
/* Hover overlay */
.amb-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(249,115,22,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}
.amb-gallery-item:hover .amb-gallery-overlay { opacity: 1; }
.amb-gallery-overlay-icon {
  font-size: 42px;
  display: block;
  transform: scale(0.6);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.amb-gallery-item:hover .amb-gallery-overlay-icon { transform: scale(1); }
.amb-gallery-overlay-text {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin: 8px 0 0 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease 0.07s, transform 0.25s ease 0.07s;
}
.amb-gallery-item:hover .amb-gallery-overlay-text { opacity: 1; transform: translateY(0); }

/* Photo caption bar */
.amb-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 14px 12px;
  background: linear-gradient(0deg, rgba(15,23,42,0.88) 0%, transparent 100%);
  z-index: 1;
  transition: opacity 0.25s ease;
}
.amb-gallery-item:hover .amb-gallery-caption { opacity: 0; }

/* Lightbox */
#amb-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,15,28,0.96);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
}
#amb-lightbox.amb-lb-open { display: flex; }
#amb-lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
  display: block;
}
#amb-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1000000;
}
#amb-lightbox-close:hover { background: rgba(249,115,22,0.75); }
#amb-lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  pointer-events: none;
}

/* Responsive */
@media (max-width: 980px) {
  .amb-gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 190px; }
}
@media (max-width: 640px) {
  .amb-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; }
  .amb-gallery-item.span-2-both { grid-column: span 2; grid-row: span 1; }
  .amb-gallery-item.span-2-row  { grid-row: span 1; }
}

