/*
 * IFP EasyFlexGallery – Frontend
 * Scoped with ifp-efg-* to avoid theme/plugin collisions.
 */

.ifp-efg-gallery {
  --ifp-efg-gallery-gap: 16px;
  --ifp-efg-gallery-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--ifp-efg-gallery-cols), minmax(0, 1fr));
  gap: var(--ifp-efg-gallery-gap);
  margin: 0;
  padding: 0;
}

.ifp-efg-gallery-item {
  display: block;
  margin: 0;
  min-width: 0;
}

.ifp-efg-gallery-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ifp-efg-gallery-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.ifp-efg-gallery--grid .ifp-efg-gallery-img {
  aspect-ratio: 4 / 3;
}

.ifp-efg-gallery--masonry {
  align-items: start;
}

.ifp-efg-gallery-caption {
  margin-top: 7px;
  font-size: 0.9em;
  line-height: 1.4;
  opacity: 0.82;
}

.ifp-efg-gallery-notice {
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .ifp-efg-gallery {
    grid-template-columns: repeat(min(2, var(--ifp-efg-gallery-cols)), minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ifp-efg-gallery {
    grid-template-columns: 1fr;
  }
}


/* EasyFlexGallery Header-Slider */
.ifp-efg-slider {
  --ifp-efg-slider-height: 520px;
  --ifp-efg-slider-overlay: 0.35;
  position: relative;
  min-height: var(--ifp-efg-slider-height);
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  color: #fff;
}

.ifp-efg-slider-track,
.ifp-efg-slider-slide {
  position: absolute;
  inset: 0;
}

.ifp-efg-slider-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease, transform 520ms ease;
}

.ifp-efg-slider-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.ifp-efg-slider--slide .ifp-efg-slider-slide {
  transform: translateX(2.5%);
}

.ifp-efg-slider--slide .ifp-efg-slider-slide.is-active {
  transform: translateX(0);
}

.ifp-efg-slider-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.ifp-efg-slider-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--ifp-efg-slider-overlay));
}

.ifp-efg-slider-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--ifp-efg-slider-height);
  max-width: 760px;
  padding: clamp(28px, 6vw, 78px);
}

.ifp-efg-slider--align-center .ifp-efg-slider-content {
  margin: 0 auto;
  text-align: center;
  align-items: center;
}

.ifp-efg-slider--align-right .ifp-efg-slider-content {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

.ifp-efg-slider-headline {
  margin: 0 0 16px;
  color: inherit;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.04;
}

.ifp-efg-slider-text {
  max-width: 650px;
  margin: 0 0 24px;
  color: inherit;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.55;
  opacity: 0.95;
}

.ifp-efg-slider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}

.ifp-efg-slider-button:hover,
.ifp-efg-slider-button:focus {
  color: #111827;
  text-decoration: none;
  transform: translateY(-1px);
}

.ifp-efg-slider-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.ifp-efg-slider-nav--prev {
  left: 16px;
}

.ifp-efg-slider-nav--next {
  right: 16px;
}

.ifp-efg-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.ifp-efg-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.ifp-efg-slider-dot.is-active {
  background: #fff;
}

@media (max-width: 700px) {
  .ifp-efg-slider {
    --ifp-efg-slider-height: min(520px, 78vh);
    border-radius: 12px;
  }

  .ifp-efg-slider-content {
    padding: 54px 22px;
  }

  .ifp-efg-slider-nav {
    display: none;
  }
}


/* EasyFlexGallery Galerie-Lightbox */
.ifp-efg-lightbox[hidden] {
  display: none;
}

.ifp-efg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 42px);
  color: #fff;
}

.ifp-efg-lightbox-open {
  overflow: hidden;
}

.ifp-efg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 24, 0.88);
  backdrop-filter: blur(5px);
}

.ifp-efg-lightbox-stage {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  width: min(1180px, 100%);
  min-height: min(760px, 82vh);
}

.ifp-efg-lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 0;
}

.ifp-efg-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  object-fit: contain;
}

.ifp-efg-lightbox-caption {
  max-width: 820px;
  margin-top: 14px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.ifp-efg-lightbox-close,
.ifp-efg-lightbox-nav {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.ifp-efg-lightbox-close:hover,
.ifp-efg-lightbox-close:focus,
.ifp-efg-lightbox-nav:hover,
.ifp-efg-lightbox-nav:focus {
  background: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.ifp-efg-lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 4;
  width: 44px;
  height: 44px;
  font-size: 32px;
  line-height: 1;
}

.ifp-efg-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  font-size: 42px;
  line-height: 0.8;
  transform: translateY(-50%);
}

.ifp-efg-lightbox-nav--prev {
  left: 8px;
}

.ifp-efg-lightbox-nav--next {
  right: 8px;
}

.ifp-efg-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: -6px;
  z-index: 4;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateX(-50%);
}


.ifp-efg-lightbox--full-size {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
}

.ifp-efg-lightbox--full-size .ifp-efg-lightbox-stage {
  width: auto;
  min-width: 100%;
  min-height: 100%;
}

.ifp-efg-lightbox--full-size .ifp-efg-lightbox-figure {
  align-items: flex-start;
  padding: 46px 72px 64px;
}

.ifp-efg-lightbox--full-size .ifp-efg-lightbox-image {
  max-width: none;
  max-height: none;
}

.ifp-efg-lightbox-download {
  position: absolute;
  right: 48px;
  bottom: -6px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.ifp-efg-lightbox-download:hover,
.ifp-efg-lightbox-download:focus {
  background: #fff;
  color: #111827;
  text-decoration: none;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.ifp-efg-lightbox-download[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .ifp-efg-lightbox {
    padding: 14px;
  }

  .ifp-efg-lightbox-stage {
    min-height: 76vh;
  }

  .ifp-efg-lightbox-image {
    max-height: 72vh;
    border-radius: 10px;
  }

  .ifp-efg-lightbox-nav {
    top: auto;
    bottom: 18px;
    width: 42px;
    height: 42px;
    font-size: 36px;
    transform: none;
  }

  .ifp-efg-lightbox-nav--prev {
    left: 18px;
  }

  .ifp-efg-lightbox-nav--next {
    right: 18px;
  }

  .ifp-efg-lightbox-close {
    top: 8px;
    right: 8px;
  }

  .ifp-efg-lightbox-counter {
    bottom: 28px;
  }

  .ifp-efg-lightbox-download {
    right: 50%;
    bottom: 78px;
    transform: translateX(50%);
  }

  .ifp-efg-lightbox--full-size .ifp-efg-lightbox-figure {
    padding: 64px 14px 120px;
  }

  .ifp-efg-lightbox-caption {
    max-width: calc(100% - 24px);
    border-radius: 14px;
  }
}


/* EasyFlexGallery Filter-Leiste */
.ifp-efg-gallery-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.ifp-efg-gallery-filter {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 9px 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ifp-efg-gallery-filter:hover,
.ifp-efg-gallery-filter:focus,
.ifp-efg-gallery-filter.is-active {
  background: #111827;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.ifp-efg-gallery-item[hidden] {
  display: none !important;
}


/* EasyFlexGallery Design-Presets seit 1.1.0 */
.ifp-efg-gallery--aspect-natural .ifp-efg-gallery-img {
  aspect-ratio: auto;
  object-fit: contain;
}

.ifp-efg-gallery--aspect-1-1 .ifp-efg-gallery-img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ifp-efg-gallery--aspect-4-3 .ifp-efg-gallery-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ifp-efg-gallery--aspect-16-9 .ifp-efg-gallery-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ifp-efg-gallery--aspect-3-4 .ifp-efg-gallery-img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ifp-efg-gallery--hover-zoom .ifp-efg-gallery-link,
.ifp-efg-gallery--hover-fade .ifp-efg-gallery-link,
.ifp-efg-gallery--caption-overlay .ifp-efg-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.ifp-efg-gallery--hover-zoom .ifp-efg-gallery-img,
.ifp-efg-gallery--hover-lift .ifp-efg-gallery-item,
.ifp-efg-gallery--hover-fade .ifp-efg-gallery-img {
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.ifp-efg-gallery--hover-zoom .ifp-efg-gallery-link:hover .ifp-efg-gallery-img,
.ifp-efg-gallery--hover-zoom .ifp-efg-gallery-link:focus .ifp-efg-gallery-img {
  transform: scale(1.035);
}

.ifp-efg-gallery--hover-lift .ifp-efg-gallery-item:hover,
.ifp-efg-gallery--hover-lift .ifp-efg-gallery-item:focus-within {
  transform: translateY(-3px);
}

.ifp-efg-gallery--hover-fade .ifp-efg-gallery-link:hover .ifp-efg-gallery-img,
.ifp-efg-gallery--hover-fade .ifp-efg-gallery-link:focus .ifp-efg-gallery-img {
  opacity: 0.78;
}

.ifp-efg-gallery--caption-overlay .ifp-efg-gallery-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  opacity: 1;
}

.ifp-efg-gallery--caption-overlay .ifp-efg-gallery-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}


/* Galerie-Archiv */
.ifp-efg-gallery-archive {
  --ifp-efg-archive-gap: 18px;
  --ifp-efg-archive-cols: 3;
  display: block;
  margin: 0 0 28px;
}

.ifp-efg-gallery-archive--filter-extra {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: start;
  gap: var(--ifp-efg-archive-gap);
}

.ifp-efg-gallery-archive-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.ifp-efg-gallery-archive--filter-extra .ifp-efg-gallery-archive-filterbar {
  position: sticky;
  top: 24px;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
}

.ifp-efg-gallery-archive-filterbar-title {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.ifp-efg-gallery-archive-grid {
  display: grid;
  grid-template-columns: repeat(var(--ifp-efg-archive-cols), minmax(0, 1fr));
  gap: var(--ifp-efg-archive-gap);
}

.ifp-efg-gallery-archive-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.ifp-efg-gallery-archive-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

.ifp-efg-gallery-archive-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ifp-efg-gallery-archive-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 42px;
  color: #94a3b8;
}

.ifp-efg-gallery-archive-body {
  padding: 14px;
}

.ifp-efg-gallery-archive-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.ifp-efg-gallery-archive-description {
  margin: 0 0 10px;
  color: #475569;
  line-height: 1.5;
}

.ifp-efg-gallery-archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.ifp-efg-gallery-archive-meta span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.ifp-efg-gallery-archive-shortcode {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 900px) {
  .ifp-efg-gallery-archive,
  .ifp-efg-gallery-archive--filter-extra {
    display: block;
  }

  .ifp-efg-gallery-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ifp-efg-gallery-archive--filter-extra .ifp-efg-gallery-archive-filterbar {
    position: static;
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .ifp-efg-gallery-archive-grid {
    grid-template-columns: 1fr;
  }
}


/* EasyFlexGallery Elementor/Archive external filter variants */
.ifp-efg-gallery-archive-filterbar--external {
  margin: 0 0 18px;
}

.ifp-efg-gallery-archive-filterbar--pills .ifp-efg-gallery-filter {
  border-radius: 999px;
}

.ifp-efg-gallery-archive-filterbar--tabs {
  gap: 0;
  border-bottom: 1px solid #dbe4f0;
}

.ifp-efg-gallery-archive-filterbar--tabs .ifp-efg-gallery-filter {
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
}

.ifp-efg-gallery-archive-filter-select {
  width: 100%;
  max-width: 360px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}


/* EasyFlexGallery 1.5.0 – Galerie-Archiv Kategorien + Pagination */
.ifp-efg-gallery-archive-categorybar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.ifp-efg-gallery-category {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 9px 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ifp-efg-gallery-category:hover,
.ifp-efg-gallery-category:focus,
.ifp-efg-gallery-category.is-active {
  background: #111827;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.ifp-efg-gallery-archive-categorybar--tabs {
  gap: 0;
  border-bottom: 1px solid #dbe4f0;
}

.ifp-efg-gallery-archive-categorybar--tabs .ifp-efg-gallery-category {
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
}

.ifp-efg-gallery-archive-category-select {
  width: 100%;
  max-width: 360px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.ifp-efg-gallery-archive-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0;
}

.ifp-efg-gallery-archive-pagination[hidden] {
  display: none !important;
}

.ifp-efg-gallery-archive-page {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  padding: 10px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ifp-efg-gallery-archive-page:hover,
.ifp-efg-gallery-archive-page:focus {
  background: #111827;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.ifp-efg-gallery-archive-page:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.ifp-efg-gallery-archive-page-status {
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
}

.ifp-efg-gallery-archive--no-results .ifp-efg-gallery-archive-grid::after {
  content: "Keine Galerien für diese Auswahl gefunden.";
  display: block;
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed rgba(100, 116, 139, 0.45);
  border-radius: 14px;
  color: #64748b;
  text-align: center;
}



/* EasyFlexGallery 1.6.0 – Kategorie-Bilder und Icons */
.ifp-efg-gallery-archive-categorybar--with-media .ifp-efg-gallery-category,
.ifp-efg-gallery-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ifp-efg-gallery-category-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  line-height: 1;
}

.ifp-efg-gallery-category-visual--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ifp-efg-gallery-category-visual--dashicon {
  font-size: 16px;
  width: 24px;
  height: 24px;
}

.ifp-efg-gallery-category-visual--text {
  font-size: 14px;
  font-weight: 700;
}

.ifp-efg-gallery-archive-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
}

.ifp-efg-gallery-category-chip {
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.2;
}

.ifp-efg-gallery-category.is-active .ifp-efg-gallery-category-visual,
.ifp-efg-gallery-category:hover .ifp-efg-gallery-category-visual,
.ifp-efg-gallery-category:focus .ifp-efg-gallery-category-visual {
  background: rgba(255, 255, 255, 0.18);
}


/* EasyFlexGallery 1.7.0 – Kategorie-Icon-System */
.ifp-efg-gallery-category-visual--icon img,
.ifp-efg-gallery-category-visual--icon svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.ifp-efg-gallery-category-visual--icon i,
.ifp-efg-gallery-category-visual--icon .dashicons {
  font-size: 16px;
  line-height: 1;
}

.ifp-efg-gallery-category-icon--image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ifp-efg-gallery-category-icon--svg svg,
.ifp-efg-gallery-category-visual--icon svg {
  width: 18px;
  height: 18px;
}

.ifp-efg-gallery-category-icon--text {
  font-size: 14px;
  font-weight: 700;
}


/* Dynamische Galerie-Auswahl seit 1.8.0 */
.ifp-efg-gallery-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.ifp-efg-gallery-picker--tabs {
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  gap: 0;
}

.ifp-efg-gallery-picker-item {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ifp-efg-gallery-picker--pills .ifp-efg-gallery-picker-item,
.ifp-efg-gallery-picker--buttons .ifp-efg-gallery-picker-item {
  border-radius: 999px;
}

.ifp-efg-gallery-picker--tabs .ifp-efg-gallery-picker-item {
  border-width: 0 0 3px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.ifp-efg-gallery-picker-item:hover,
.ifp-efg-gallery-picker-item:focus,
.ifp-efg-gallery-picker-item.is-active {
  background: #111827;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.ifp-efg-gallery-picker--tabs .ifp-efg-gallery-picker-item:hover,
.ifp-efg-gallery-picker--tabs .ifp-efg-gallery-picker-item:focus,
.ifp-efg-gallery-picker--tabs .ifp-efg-gallery-picker-item.is-active {
  background: transparent;
  color: #111827;
  border-bottom-color: #111827;
  box-shadow: none;
}

.ifp-efg-gallery-picker-thumb {
  display: inline-flex;
  width: 34px;
  height: 34px;
  overflow: hidden;
  flex: 0 0 auto;
  align-self: flex-start;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.ifp-efg-gallery-picker-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ifp-efg-gallery-picker-title {
  font-weight: 700;
}

.ifp-efg-gallery-picker-count {
  opacity: 0.78;
  font-size: 0.86em;
  white-space: nowrap;
}

.ifp-efg-gallery-picker-item {
  flex-wrap: nowrap;
}

.ifp-efg-gallery-picker--with-teaser .ifp-efg-gallery-picker-item {
  align-items: flex-start;
}

.ifp-efg-gallery-picker-text {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ifp-efg-gallery-picker-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em;
  min-width: 0;
}

.ifp-efg-gallery-picker-teaser {
  display: block;
  margin-top: 2px;
  max-width: 26em;
  min-height: 1.35em;
  font-size: 0.86em;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.76;
}

.ifp-efg-gallery-picker-teaser--empty {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.ifp-efg-gallery-picker-item.is-active .ifp-efg-gallery-picker-teaser,
.ifp-efg-gallery-picker-item:hover .ifp-efg-gallery-picker-teaser,
.ifp-efg-gallery-picker-item:focus .ifp-efg-gallery-picker-teaser {
  opacity: 0.9;
}

.ifp-efg-gallery-picker-select {
  width: 100%;
  max-width: 360px;
  min-height: 42px;
  margin: 0 0 18px;
}

.ifp-efg-dynamic-gallery {
  margin: 0 0 28px;
}

.ifp-efg-dynamic-gallery-items {
  display: contents;
}

.ifp-efg-dynamic-gallery-pagination {
  grid-column: 1 / -1;
  margin-top: 18px;
}

.ifp-efg-dynamic-gallery--no-results::after {
  content: "Keine Bilder für die gewählte Galerie gefunden.";
  display: block;
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
  color: #475569;
}

@media (max-width: 700px) {
  .ifp-efg-gallery-picker {
    gap: 8px;
  }

  .ifp-efg-gallery-picker-item {
    width: 100%;
    justify-content: flex-start;
  }

  .ifp-efg-gallery-picker--tabs .ifp-efg-gallery-picker-item {
    width: auto;
  }
}


/* Galerie-Texte (Teaser + Content) */
.ifp-efg-gallery-text {
    margin: 0 0 1.25rem;
}

.ifp-efg-gallery + .ifp-efg-gallery-text {
    margin: 1.25rem 0 0;
}

.ifp-efg-gallery-teaser {
    margin: 0 0 .75rem;
    font-size: 1.08rem;
    line-height: 1.55;
    font-weight: 600;
}

.ifp-efg-gallery-content {
    line-height: 1.7;
}

.ifp-efg-gallery-content > :first-child {
    margin-top: 0;
}

.ifp-efg-gallery-content > :last-child {
    margin-bottom: 0;
}

.ifp-efg-gallery-text-empty {
    margin: 0;
    opacity: .75;
    font-style: italic;
}

.ifp-efg-gallery-archive-content {
    margin-top: .65rem;
    font-size: .95rem;
    line-height: 1.55;
}

.ifp-efg-gallery-archive-content p {
    margin: 0;
}

.ifp-efg-dynamic-gallery-texts {
    margin-bottom: 1.25rem;
}

.ifp-efg-dynamic-gallery-text[hidden] {
    display: none !important;
}

.ifp-efg-dynamic-gallery-text-title {
    margin: 0 0 .45rem;
}


/* 1.14.0 – Picker details, text tiles and reveal animations */
.ifp-efg-gallery-picker-item {
  flex-wrap: wrap;
}

.ifp-efg-gallery-picker-title,
.ifp-efg-gallery-picker-count,
.ifp-efg-gallery-picker-teaser {
  min-width: 0;
}

.ifp-efg-gallery-picker-count {
  font-size: 0.84em;
  opacity: 0.72;
}

.ifp-efg-gallery-picker-teaser {
  flex-basis: 100%;
  margin-top: -3px;
  padding-left: 0;
}

.ifp-efg-gallery-picker-thumb + .ifp-efg-gallery-picker-title ~ .ifp-efg-gallery-picker-teaser {
  margin-left: calc(38px + 10px);
}

.ifp-efg-gallery-text-tile {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ifp-efg-gallery-text-tile .ifp-efg-gallery-text {
  margin: 0;
}

.ifp-efg-dynamic-gallery-text-tile[hidden] {
  display: none !important;
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready .ifp-efg-gallery-reveal {
  opacity: 0;
  will-change: transform, opacity;
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-fade-up .ifp-efg-gallery-reveal {
  transform: translateY(18px);
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-slide-up .ifp-efg-gallery-reveal {
  transform: translateY(34px);
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-slide-left .ifp-efg-gallery-reveal {
  transform: translateX(28px);
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-zoom-in .ifp-efg-gallery-reveal {
  transform: scale(0.96);
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready .ifp-efg-gallery-reveal.is-in-view {
  opacity: 1;
  transform: none;
  transition:
    opacity 580ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--ifp-efg-item-delay, 0ms),
    transform 580ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--ifp-efg-item-delay, 0ms);
}

.ifp-efg-gallery--anim-none .ifp-efg-gallery-reveal,
.ifp-efg-gallery--animate:not(.ifp-efg-gallery--animate-ready) .ifp-efg-gallery-reveal,
.ifp-efg-gallery-reveal.is-filtered-out,
.ifp-efg-gallery-reveal.is-paginated-out {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ifp-efg-gallery--animate .ifp-efg-gallery-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .ifp-efg-gallery-picker-thumb + .ifp-efg-gallery-picker-title ~ .ifp-efg-gallery-picker-teaser {
    margin-left: 0;
  }
}


/* 1.15.3–1.15.6 – robust Elementor-safe reveal animation fallback/adaptation */
.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready .ifp-efg-gallery-reveal.is-in-view {
  animation-duration: .58s;
  animation-timing-function: cubic-bezier(.22,.61,.36,1);
  animation-fill-mode: both;
  animation-delay: var(--ifp-efg-item-delay, 0ms);
}

.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-fade-up .ifp-efg-gallery-reveal.is-in-view { animation-name: ifpEfgRevealFadeUp; }
.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-fade-in .ifp-efg-gallery-reveal.is-in-view { animation-name: ifpEfgRevealFadeIn; }
.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-slide-up .ifp-efg-gallery-reveal.is-in-view { animation-name: ifpEfgRevealSlideUp; }
.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-slide-left .ifp-efg-gallery-reveal.is-in-view { animation-name: ifpEfgRevealSlideLeft; }
.ifp-efg-gallery--animate.ifp-efg-gallery--animate-ready.ifp-efg-gallery--anim-zoom-in .ifp-efg-gallery-reveal.is-in-view { animation-name: ifpEfgRevealZoomIn; }

@keyframes ifpEfgRevealFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ifpEfgRevealFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ifpEfgRevealSlideUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ifpEfgRevealSlideLeft { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ifpEfgRevealZoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }


/* 1.15.6 – dynamische Elementor-Listings bleiben bei Animation sichtbar-safe.
   Die eigentliche Animation wird pro Shortcode-Instanz scoped ausgegeben. */
.ifp-efg-gallery--listing-animate .ifp-efg-gallery-reveal {
  opacity: 1;
  visibility: visible;
}


/* 1.15.8 – dynamische Elementor-Listings: CSS-only, pagination-safe animation.
   Kein opacity:0-Grundzustand und kein globales Reveal-Init nötig. */
.ifp-efg-gallery--listing-animate .ifp-efg-gallery-reveal {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none;
}

.ifp-efg-gallery--listing-animate .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) {
  animation-duration: .58s;
  animation-timing-function: cubic-bezier(.22,.61,.36,1);
  animation-fill-mode: both;
  animation-delay: var(--ifp-efg-item-delay, 0ms);
}

.ifp-efg-gallery--listing-animate.ifp-efg-gallery--anim-fade-up .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) { animation-name: ifpEfgRevealFadeUp; }
.ifp-efg-gallery--listing-animate.ifp-efg-gallery--anim-fade-in .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) { animation-name: ifpEfgRevealFadeIn; }
.ifp-efg-gallery--listing-animate.ifp-efg-gallery--anim-slide-up .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) { animation-name: ifpEfgRevealSlideUp; }
.ifp-efg-gallery--listing-animate.ifp-efg-gallery--anim-slide-left .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) { animation-name: ifpEfgRevealSlideLeft; }
.ifp-efg-gallery--listing-animate.ifp-efg-gallery--anim-zoom-in .ifp-efg-gallery-reveal.is-in-view:not([hidden]):not(.is-filtered-out):not(.is-paginated-out) { animation-name: ifpEfgRevealZoomIn; }

.ifp-efg-gallery--listing-animate .ifp-efg-dynamic-gallery-pagination {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ifp-efg-gallery--listing-animate .ifp-efg-gallery-reveal {
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}


/* Galerie-Bildtexte (Überschrift/Beschreibung) */
.ifp-efg-gallery-image-headline,
.ifp-efg-gallery-image-description,
.ifp-efg-gallery-image-caption-text {
  display: block;
}

.ifp-efg-gallery-image-headline {
  margin-bottom: 3px;
  font-weight: 700;
}

.ifp-efg-gallery-image-description {
  opacity: 0.92;
}

.ifp-efg-gallery-image-caption-text {
  margin-top: 3px;
  opacity: 0.82;
}
