/*
 * Frisian Orchard — Module 7: Gallery Shell
 */

.fo-gallery-shell__intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

@media (min-width: 992px) {
  .fo-gallery-shell__intro-grid {
    grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    gap: clamp(2rem, 4vw, 3rem);
  }
}

.fo-gallery-shell__intro {
  min-width: 0;
}

.fo-gallery-shell__intro .fo-heading-lg {
  color: var(--fo-text-white);
  margin: 0.75rem 0 0;
}

.fo-gallery-shell__intro .fo-subtitle {
  display: block;
}

.fo-gallery-shell__intro-actions {
  margin-top: 1.5rem;
}

.fo-gallery-shell__widget {
  min-width: 0;
}

/* Startseite: Bulliboard-Captions in der Galerie-Vorschau ausblenden */
#gallery .bb-masonry-caption,
#gallery .bb-masonry-type,
#gallery .bb-masonry-item > figcaption {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
}

#gallery .bb-masonry-item {
  padding-bottom: 0;
}

.fo-gallery-shell__layout--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  .fo-gallery-shell__layout--split {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
  }
}

.fo-gallery-shell--combined .fo-gallery-shell__cta {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--fo-glass-bg);
  border: 1px solid var(--fo-glass-border);
  border-radius: 8px;
  min-width: 0;
}

.fo-gallery-shell--combined .fo-gallery-shell__form {
  margin-top: 1.5rem;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 991px) {
  .fo-gallery-shell__intro-actions {
    margin-top: 1.25rem;
  }
}

.fo-gallery-shell__engel {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.fo-gallery-shell__engel-header {
  max-width: 42rem;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.fo-gallery-shell__engel-header .fo-heading-lg {
  color: var(--fo-text-white);
  margin: 0.75rem 0 0;
}

.fo-gallery-shell__engel-header .fo-subtitle {
  display: block;
}

.fo-gallery-shell__engel-header .fo-body {
  margin: 0.75rem 0 0;
}

#gallery .fo-gallery-shell__engel .bb-masonry-caption,
#gallery .fo-gallery-shell__engel .bb-masonry-type,
#gallery .fo-gallery-shell__engel .bb-masonry-item > figcaption,
.fo-gallery-page .fo-gallery-shell__engel .bb-masonry-caption,
.fo-gallery-page .fo-gallery-shell__engel .bb-masonry-type,
.fo-gallery-page .fo-gallery-shell__engel .bb-masonry-item > figcaption {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
}

#gallery .fo-gallery-shell__engel .bb-masonry-item,
.fo-gallery-page .fo-gallery-shell__engel .bb-masonry-item {
  padding-bottom: 0;
}

/* ── Vom Honigdorf: Honeycomb gallery grid ── */
.fo-gallery-shell__header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.fo-gallery-shell__header .fo-heading-lg {
  color: var(--fo-text-white);
}

.fo-gallery-honeycomb .bb-masonry-gallery {
  display: grid !important;
  column-count: unset !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .fo-gallery-honeycomb .bb-masonry-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .fo-gallery-honeycomb .bb-masonry-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.125rem;
  }
}

.fo-gallery-honeycomb .bb-masonry-item {
  break-inside: avoid;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1.08;
  clip-path: var(--fo-hex-clip);
  overflow: hidden;
  border: 1px solid rgba(var(--fo-gold-rgb), 0.25);
  background: var(--fo-bg-charcoal);
}

.fo-gallery-honeycomb .bb-masonry-link,
.fo-gallery-honeycomb .bb-masonry-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fo-gallery-shell__footer {
  margin-top: 2rem;
  text-align: center;
}

.fo-ghost-btn--wide {
  min-width: min(100%, 28rem);
}

/* Bulliboard lightbox — luxury theme skin (single handler via bulliboard-public.js) */
#bb-lightbox.bb-lightbox {
  z-index: 10000;
  background: rgba(8, 8, 6, 0.92);
  padding: 1.5rem;
}

#bb-lightbox.bb-lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 85vh;
  border: 1px solid var(--fo-glass-border);
}

#bb-lightbox .bb-lightbox-close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--fo-gold-rgb), 0.12);
  border: 1px solid var(--fo-glass-border);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--fo-text-white);
  transition: background var(--fo-transition);
}

#bb-lightbox .bb-lightbox-close:hover {
  background: rgba(var(--fo-gold-rgb), 0.22);
}

body:has(#bb-lightbox.bb-lightbox.is-open) {
  overflow: hidden;
}

@media (max-width: 767px) {
  .fo-gallery-honeycomb .bb-masonry-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fo-gallery-honeycomb .bb-masonry-item {
    clip-path: none;
    border-radius: 6px;
    aspect-ratio: 1 / 1;
  }
}
