/* =========================
   GALERIE
   ========================= */

.brand-gallery {
  width: 100%;

  padding: 160px 24px 100px;

  background-color: var(--color-dark);
  color: var(--color-light);

  box-sizing: border-box;
}


.brand-gallery__container {
  width: 100%;
  max-width: 1280px;

  margin: 0 auto;
}


/* =========================
   ÜBERSCHRIFT
   ========================= */

.brand-gallery__header {
  text-align: center;

  margin-bottom: 60px;
}


.brand-gallery__header h2 {
  margin: 0;

  font-size: var(--font-size-h1);
  line-height: var(--line-height-heading);

  color: var(--color-light);

  font-weight: 700;
}


/* =========================
   MASONRY GALERIE
   ========================= */

.brand-gallery__grid {
  column-count: 3;
  column-gap: 20px;
}


/* =========================
   EINZELNES BILD
   ========================= */

.brand-gallery__item {
  display: block;

  width: 100%;

  margin: 0 0 20px;

  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;

  overflow: hidden;

  break-inside: avoid;

  appearance: none;
}


.brand-gallery__item img {
  display: block;

  width: 100%;
  height: auto;

  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}


.brand-gallery__item:hover img {
  transform: scale(1.025);

  opacity: 0.88;
}


/* =========================
   LIGHTBOX
   ========================= */

.gallery-lightbox {
  position: fixed;

  inset: 0;

  z-index: 5000;

  display: none;

  align-items: center;
  justify-content: center;

  width: 100vw;
  height: 100vh;

  padding: 20px;

  background-color: rgba(0, 0, 0, 0.96);

  box-sizing: border-box;
}


.gallery-lightbox.is-open {
  display: flex;
}


/* =========================
   LIGHTBOX INHALT
   ========================= */

.gallery-lightbox__content {
  width: 95vw;
  height: 92vh;

  display: flex;
  align-items: center;
  justify-content: center;
}


/* =========================
   VERGRÖSSERTES BILD
   ========================= */

.gallery-lightbox__image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}


/* =========================
   SCHLIESSEN BUTTON
   ========================= */

.gallery-lightbox__close {
  position: fixed;

  top: 18px;
  right: 25px;

  z-index: 5001;

  width: 55px;
  height: 55px;

  padding: 0;

  border: 0;

  background-color: rgba(0, 0, 0, 0.45);

  color: var(--color-light);

  font-family: Arial, sans-serif;

  font-size: 48px;
  line-height: 1;

  font-weight: 300;

  cursor: pointer;

  border-radius: 50%;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}


.gallery-lightbox__close:hover {
  color: var(--color-gold);

  background-color: rgba(0, 0, 0, 0.7);
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 991px) {

  .brand-gallery {
    padding: 120px 20px 80px;
  }


  .brand-gallery__grid {
    column-count: 2;
    column-gap: 16px;
  }


  .brand-gallery__item {
    margin-bottom: 16px;
  }


  .brand-gallery__header {
    margin-bottom: 50px;
  }


  .gallery-lightbox {
    padding: 15px;
  }


  .gallery-lightbox__content {
    width: 96vw;
    height: 90vh;
  }

}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {

  .brand-gallery {
    padding: 90px 12px 65px;
  }


  .brand-gallery__header {
    margin-bottom: 40px;
  }


  /* Zwei Spalten auch auf Mobile */

  .brand-gallery__grid {
    column-count: 2;
    column-gap: 10px;
  }


  .brand-gallery__item {
    margin-bottom: 10px;
  }


  /* Lightbox */

  .gallery-lightbox {
    padding: 10px;
  }


  .gallery-lightbox__content {
    width: 96vw;
    height: 88vh;
  }


  .gallery-lightbox__close {
    top: 12px;
    right: 14px;

    width: 46px;
    height: 46px;

    font-size: 42px;
  }

}