/*
 * Galerie-Übersicht: Kategorie-Kacheln + Teaser-Grid mit Overlay.
 */
.saarland-gallery-overview {
  --st-gallery-text: var(--st-text, var(--color-000));
  --st-gallery-card-bg: var(--st-bg-card, var(--color-transparent));
  --st-gallery-border: var(--st-border, color-mix(in srgb, var(--st-gallery-text) 18%, var(--color-transparent)));
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  color: var(--st-gallery-text);
}

.saarland-gallery-overview__categories {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: clamp(16px, calc(12px + 1.2vw), 28px);
}

.saarland-gallery-category-tiles {
  --gallery-tile-width: clamp(75px, calc(63.176px + 4.223vw), 150px);
  --gallery-tile-height: clamp(50px, calc(42.117px + 2.815vw), 100px);
  --gallery-tile-icon-size: clamp(18px, calc(15.320px + 0.957vw), 35px);
  --gallery-tile-label-padding: clamp(3px, calc(2.054px + 0.338vw), 9px);
  --gallery-tile-gap: clamp(10px, calc(7.733px + 0.597vw), 20px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, var(--gallery-tile-width)));
  justify-content: center;
  gap: var(--gallery-tile-gap);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.saarland-gallery-category-tile {
  display: grid;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
  width: var(--gallery-tile-width);
  height: var(--gallery-tile-height);
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--st-gallery-border);
  color: var(--st-gallery-text);
  background: var(--st-gallery-card-bg);
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.saarland-gallery-category-tile:hover,
.saarland-gallery-category-tile:focus-visible {
  color: var(--st-link-hover, var(--st-gallery-text));
}

.saarland-gallery-category-tile.is-active {
  outline: 2px solid var(--st-accent, var(--color-b0004b));
  outline-offset: 2px;
}

.saarland-gallery-category-tile__icon-wrap {
  display: grid;
  min-height: 0;
  place-items: center;
  background: var(--gallery-cat-color);
}

.saarland-gallery-category-tile__icon {
  width: var(--gallery-tile-icon-size);
  height: var(--gallery-tile-icon-size);
  background: var(--color-fff);
  mask: var(--gallery-cat-icon) center / contain no-repeat;
}

.saarland-gallery-category-tile__label {
  padding: var(--gallery-tile-label-padding);
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
}

.saarland-gallery-overview__results--loading {
  min-height: 120px;
  opacity: 0.55;
}

.saarland-gallery-overview__empty,
.saarland-gallery-overview__prompt {
  margin: 0;
  padding: clamp(16px, 3vw, 32px) 0;
  text-align: center;
  color: var(--st-text-muted, var(--st-gallery-text));
}

.saarland-gallery-overview__prompt {
  font-weight: 600;
}

.saarland-gallery-overview__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(12px, calc(8px + 1vw), 24px);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.saarland-gallery-teaser {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--st-gallery-border);
  background: var(--st-gallery-card-bg);
}

.saarland-gallery-teaser__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.saarland-gallery-teaser__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.saarland-gallery-teaser__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saarland-gallery-teaser__caption {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(48px, 10vw, 90px) clamp(14px, 3vw, 24px) clamp(14px, 3vw, 20px);
  color: var(--color-fff);
  background: linear-gradient(180deg, var(--color-transparent) 0%, var(--color-functional-019) 72%, var(--color-functional-020) 100%);
  pointer-events: none;
  --text: var(--color-fff);
  --st-text: var(--color-fff);
  --st-text-muted: var(--color-fff);
  --r-tx: var(--color-fff);
  --r-h1: var(--color-fff);
  --r-h2: var(--color-fff);
  --r-h3: var(--color-fff);
}

.saarland-gallery-teaser__overlay {
  max-width: 100%;
  color: var(--color-fff);
  text-align: left;
}

.saarland-gallery-teaser__category {
  margin: 0 0 6px;
  color: var(--color-fff);
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.saarland-gallery-teaser__title {
  margin: 0 0 6px;
  color: var(--color-fff);
  font-family: var(--font-heading, sans-serif);
  line-height: 1.15;
}

.saarland-gallery-teaser__date {
  margin: 0;
  color: var(--color-fff);
  font-weight: 600;
  line-height: 1.35;
}

/*
 * Overlay-Text immer #fff (schlägt st-color-scheme Light-Mode #000 !important).
 */
html[data-color-scheme='light'] .saarland-gallery-teaser__caption :where(*),
html[data-color-scheme='dark'] .saarland-gallery-teaser__caption :where(*),
body.darkmode--activated .saarland-gallery-teaser__caption :where(*),
:root:not([data-color-scheme='light']) .saarland-gallery-teaser__caption :where(*) {
  color: var(--color-fff) !important;
  -webkit-text-fill-color: var(--color-fff) !important;
}

