.lte-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin: 20px 0;
  padding: 16px 18px;
  background: #f6f7f8;
  border-radius: 12px;
}
.lte-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #444;
}
.lte-filter-field span {
  font-weight: 600;
}
.lte-filter-field select,
.lte-filter-field input[type="search"] {
  padding: 8px 10px;
  border: 1px solid #d5d8dc;
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
}
.lte-filter-submit {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: #1e293b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lte-filter-submit:hover {
  background: #0f172a;
}
.lte-filter-reset {
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  align-self: center;
}
@media (max-width: 560px) {
  .lte-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .lte-filter-field select,
  .lte-filter-field input[type="search"] {
    min-width: 0;
    width: 100%;
  }
}

.lte-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin: 30px 0;
}
.lte-gallery--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .lte-gallery--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .lte-gallery--cols-4 {
    grid-template-columns: 1fr;
  }
}
.lte-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 10px 24px -16px rgba(0,0,0,0.2);
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.lte-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 16px 30px -16px rgba(0,0,0,0.28);
  color: inherit;
}
.lte-card-image {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #f1f2f4;
}
/* Statt Hintergrundbild jetzt ein echtes <img>: so greifen die
   WordPress-Bildgrößen (srcset/sizes), Lazy Loading und der Alt-Text. */
.lte-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lte-card-body {
  padding: 16px 18px;
}
.lte-card-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.lte-card-body p {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
.lte-empty {
  color: #777;
}

/* Seitennavigation der Übersicht */
.lte-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 10px;
}
.lte-pagination .page-numbers {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid #d5d8dc;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.2;
}
.lte-pagination a.page-numbers:hover {
  border-color: #1e293b;
}
.lte-pagination .page-numbers.current {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
  font-weight: 600;
}
.lte-pagination .page-numbers.dots {
  border: none;
  padding: 7px 4px;
}
.lte-pagination-info {
  font-size: 13px;
  color: #777;
  margin-left: auto;
}
@media (max-width: 560px) {
  .lte-pagination-info {
    margin-left: 0;
    width: 100%;
  }
}

/* Detailseite eines einzelnen Events */
.lte-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 6% 90px;
}
.lte-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0f9c92;
  text-decoration: none;
  margin-bottom: 18px;
}
.lte-detail-back:hover { color: #0d2b36; }
.lte-hidden-notice {
  background: #fff7e6;
  border-left: 4px solid #e8b84b;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  color: #6b4e00;
  margin-bottom: 22px;
}
.lte-detail-hero {
  width: 100%;
  height: 360px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 26px;
  position: relative;
  background: #f1f2f4;
}
.lte-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lte-detail-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0f9c92;
  margin-bottom: 6px;
}
.lte-detail h1 {
  font-size: 32px;
  margin: 0 0 20px;
  color: #0d2b36;
}
.lte-detail-text {
  font-size: 16px;
  line-height: 1.7;
  color: #3c4a58;
  white-space: pre-line;
  margin-bottom: 36px;
}
/* Enthält die Langbeschreibung HTML, übernehmen dessen Absätze die
   Zeilenumbrüche - pre-line würde dann doppelte Abstände erzeugen. */
.lte-detail-text--html {
  white-space: normal;
}
.lte-detail-gallery {
  --lte-cols: 4;
  --lte-row-height: 220px;
}
.lte-gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f2f4;
}
.lte-gallery-item img {
  display: block;
  cursor: zoom-in;
  transition: opacity .15s ease, transform .3s ease;
}
.lte-gallery-item:hover img { opacity: .9; }

/* Bildunterschrift: liegt als Streifen über dem unteren Bildrand und
   erscheint beim Überfahren; in der Lightbox steht sie immer. */
.lte-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 9px;
  font-size: 13px;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.lte-gallery-item:hover .lte-gallery-caption,
.lte-gallery-item:focus-within .lte-gallery-caption { opacity: 1; }
@media (hover: none) {
  /* Touchgeräte kennen kein Hover - dort dauerhaft einblenden. */
  .lte-gallery-caption { opacity: 1; }
}

/* --- Layout 1: Raster (gleich große Kacheln, zugeschnitten) --- */
.lte-layout-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.lte-layout-raster .lte-gallery-item { height: 150px; }
.lte-layout-raster .lte-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Layout 2: Masonry (Spalten, Originalseitenverhältnis) --- */
.lte-layout-masonry {
  column-count: var(--lte-cols);
  column-gap: 12px;
}
.lte-layout-masonry .lte-gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  display: inline-block;
  width: 100%;
}
.lte-layout-masonry .lte-gallery-item img {
  width: 100%;
  height: auto;
}

/* --- Layout 3: Justified (Zeilen gleicher Höhe, per JS berechnet) --- */
.lte-layout-justified {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.lte-layout-justified .lte-gallery-item {
  /* Vor der JS-Berechnung ein brauchbarer Fallback über das
     Seitenverhältnis, damit nichts springt. */
  height: var(--lte-row-height);
  width: calc(var(--lte-ratio) * var(--lte-row-height));
  flex: 0 0 auto;
}
.lte-layout-justified .lte-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Layout 4: Mosaik (großes Leitbild + kleine Kacheln) --- */
.lte-layout-mosaik {
  display: grid;
  grid-template-columns: repeat(var(--lte-cols), minmax(0, 1fr));
  grid-auto-rows: calc(var(--lte-row-height) / 2);
  grid-auto-flow: dense;
  gap: 12px;
}
.lte-layout-mosaik .lte-gallery-item {
  grid-column: span 1;
  grid-row: span 2;
}
/* Erstes Bild und danach jedes siebte als großes Leitbild über 2x2 Felder -
   daraus entsteht das gemischte Mosaik statt einer gleichförmigen Reihe. */
.lte-layout-mosaik .lte-gallery-item:nth-child(7n+1) {
  grid-column: span 2;
  grid-row: span 4;
}
.lte-layout-mosaik .lte-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .lte-layout-masonry { column-count: 2; }
  .lte-layout-mosaik { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lte-layout-masonry { column-count: 1; }
  .lte-layout-mosaik {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 90px;
  }
  .lte-layout-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lte-layout-raster .lte-gallery-item { height: 120px; }
}

/* Einfache Lightbox für die Galeriebilder */
.lte-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 43, 54, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
}
.lte-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  touch-action: pan-y;
  cursor: grab;
  will-change: transform;
}
.lte-lightbox-figure:active { cursor: grabbing; }
.lte-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 10px;
  object-fit: contain;
}
.lte-lightbox-caption {
  color: #e7eef1;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  max-width: 760px;
}
.lte-lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  letter-spacing: .04em;
}
.lte-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}
.lte-lightbox-prev, .lte-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
}
.lte-lightbox-prev { left: 6px; }
.lte-lightbox-next { right: 6px; }

@media (max-width: 640px) {
  .lte-detail-hero { height: 220px; }
  .lte-detail h1 { font-size: 24px; }
}
