/* ===========================
   GALERIE – PREMIUM STYLE
   =========================== */

body.gallery-page {
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-page-main {
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 0 20px 60px;
  box-sizing: border-box;
}

/* ===========================
   HERO
   =========================== */

.gallery-hero {
  text-align: center;
  margin-bottom: 34px;
}

.gallery-hero h1 {
  margin: 0 0 10px;
  font-size: 2.4rem;
  font-weight: 300;
  color: #ffffff;
}

.gallery-subline {
  max-width: 820px;
  margin: 0 auto 24px;
  color: #b8b8b8;
  line-height: 1.7;
  font-size: 1rem;
}

/* ===========================
   KATEGORIE NAV / CHIPS
   =========================== */

.gallery-category-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 34px;
  max-width: 1100px;
}

.gallery-category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8d8d8;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.gallery-category-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ===========================
   KATEGORIE ABSCHNITTE
   =========================== */

.gallery-category-section {
  margin-bottom: 50px;
}

.gallery-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-category-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 400;
  color: #f3f3f3;
}

.gallery-category-count {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: #dcdcdc;
  font-size: 0.9rem;
}

/* ===========================
   GRID
   =========================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.gallery-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.gallery-thumb-button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: block;
  cursor: pointer;
}

.gallery-thumb {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: #161616;
  transition: transform 0.35s ease, filter 0.25s ease;
}

.gallery-card:hover .gallery-thumb {
  transform: scale(1.03);
  filter: brightness(1.03);
}

.gallery-caption {
  padding: 14px 16px 16px;
  color: #d4d4d4;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

/* ===========================
   EMPTY STATE
   =========================== */

.gallery-empty {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
  color: #a8a8a8;
  padding: 30px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===========================
   LIGHTBOX
   =========================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.55);
  background: #111;
}

.lightbox-caption {
  margin-top: 14px;
  color: #e7e7e7;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 28px;
  font-size: 34px;
  line-height: 1;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-close:hover {
  color: #cfcfcf;
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 46px;
  line-height: 1;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  border-radius: 10px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.16);
}

#lightboxPrev {
  left: 24px;
}

#lightboxNext {
  right: 24px;
}

/* ===========================
   BACK TO TOP
   =========================== */

#backToTop {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #2a2a2a;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.2s ease;
  z-index: 9998;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  background: #3a3a3a;
}

/* ===========================
   MOBILE / TABLET
   =========================== */

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .gallery-thumb {
    height: 230px;
  }
}

@media (max-width: 700px) {
  .gallery-page-main {
    margin: 28px auto 0;
    padding: 0 14px 50px;
  }

  .gallery-hero h1 {
    font-size: 1.9rem;
  }

  .gallery-subline {
    font-size: 0.96rem;
  }

  .gallery-category-nav {
    gap: 10px;
    margin-bottom: 28px;
  }

  .gallery-category-chip {
    font-size: 0.9rem;
    padding: 9px 14px;
  }

  .gallery-category-head {
    align-items: center;
    gap: 10px;
  }

  .gallery-category-head h2 {
    font-size: 1.2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gallery-thumb {
    height: 250px;
  }

  .lightbox-arrow {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }

  #lightboxPrev {
    left: 12px;
  }

  #lightboxNext {
    right: 12px;
  }

  .lightbox-close {
    top: 16px;
    right: 18px;
  }

  #backToTop {
    right: 18px;
    bottom: 18px;
  }
}