/*
* FooGallery Custom CSS
* This file is created by adding custom CSS on FooGallery Settings page in wp-admin
* Created : 21 May 2026, 3:38 pm
*/

/* ================================
   SOMOS FooGallery global
   16:9, linksbündig, sauberes Raster
   ================================ */

/* Galerie-Container */
.foogallery {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  gap: 24px !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* einzelne Galerie-Items: 3 Spalten */
.foogallery .fg-item {
  width: calc((100% - 48px) / 3) !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}

/* 16:9-Bildfläche */
.foogallery .fg-item-inner,
.foogallery .fg-image-wrap,
.foogallery a.fg-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  display: block !important;
}

/* Bild füllt die 16:9-Fläche */
.foogallery img,
.foogallery .fg-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Tablet: 2 Spalten */
@media (max-width: 980px) {
  .foogallery .fg-item {
    width: calc((100% - 24px) / 2) !important;
  }
}

/* Mobile: 1 Spalte */
@media (max-width: 700px) {
  .foogallery {
    gap: 20px !important;
  }

  .foogallery .fg-item {
    width: 100% !important;
  }
}

.foogallery.fg-center {
  justify-content: flex-start !important;
  text-align: left !important;
}

.foogallery .fg-item,
.foogallery .fg-thumb,
.foogallery .fg-image-wrap,
.foogallery .fg-image-wrap img {
  min-width: 0 !important;
}

/* FooGallery Rendering stabilisieren */

.foogallery {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  align-items: start !important;
}

.foogallery .fg-item {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}

.foogallery .fg-item-inner,
.foogallery .fg-image-wrap,
.foogallery a.fg-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  overflow: hidden !important;
  display: block !important;
}

.foogallery img,
.foogallery .fg-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 980px) {
  .foogallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .foogallery {
    grid-template-columns: 1fr !important;
  }
}