/* LB13 Kacheln – Grid + Tile */

.lb13-band {
  container-type: inline-size;
  width: 100%;
}

.lb13-grid {
  --lb13-cols: 4;
  --lb13-gap: 16px;
  display: grid;
  grid-template-columns: repeat(var(--lb13-cols), minmax(0, 1fr));
  /* Zeilenhöhe = Spaltenbreite -> quadratische 1x1-Kacheln */
  grid-auto-rows: calc((100cqw - (var(--lb13-cols) - 1) * var(--lb13-gap)) / var(--lb13-cols));
  grid-auto-flow: dense;
  gap: var(--lb13-gap);
  width: 100%;
}
@supports not (width: 1cqw) {
  .lb13-grid { grid-auto-rows: minmax(160px, auto); }
}

/* Größen */
.lb13-tile--2x1 { grid-column: span 2; }
.lb13-tile--1x2 { grid-row: span 2; }
.lb13-tile--2x2 { grid-column: span 2; grid-row: span 2; }
@container (max-width: 480px) {
  .lb13-tile--2x1, .lb13-tile--2x2 { grid-column: span 1; }
  .lb13-tile--2x2 { grid-row: span 1; }
}

/* Kachel: farbiger Rahmen, helle Innenfläche */
.lb13-tile {
  --lb13-frame: #B8BDC2;
  --lb13-inner: #FFFFFF;
  --lb13-text: #1A1A1A;
  --lb13-radius: 6px;
  --lb13-frame-w: 12px;
  display: block;
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--lb13-frame);
  border-radius: var(--lb13-radius);
  padding: var(--lb13-frame-w);
  color: var(--lb13-text) !important;
  text-decoration: none !important;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.lb13-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
a.lb13-tile:focus-visible { outline: 3px solid var(--lb13-text); outline-offset: 2px; }

.lb13-tile__inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--lb13-inner);
  border-radius: calc(var(--lb13-radius) - 2px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Vollflächig (Highlight) – Innenfläche = Rahmenfarbe */
.lb13-tile--solid .lb13-tile__inner { background: transparent; }

/* Bild */
.lb13-tile__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.lb13-tile--img .lb13-tile__content {
  position: relative;
  margin-top: auto;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  color: #fff;
  padding-top: 40px;
}
.lb13-tile--img .lb13-tile__kicker { color: rgba(255,255,255,.85); }

/* Inhalt */
.lb13-tile__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(8px, 4cqw, 16px);
  flex: 1 1 auto;
  min-height: 0;
  line-height: 1.25;
  overflow: hidden;
  container-type: inline-size;
}
.lb13-tile__kicker {
  font-size: .72em;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}
.lb13-tile__big {
  font-size: clamp(1.8rem, 22cqw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  display: flex; align-items: baseline; gap: .25em;
}
.lb13-tile__big span {
  font-size: .38em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .8;
}
.lb13-tile__title {
  font-size: clamp(.9rem, 9cqw, 1.25rem);
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.lb13-tile__sub {
  font-size: .85em;
  opacity: .85;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lb13-tile__meta {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 2px;
  font-size: .75em;
  opacity: .8;
}
.lb13-tile__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb13-tile__rows {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 2px;
  font-size: .75em;
}
.lb13-tile__rows > div { display: flex; justify-content: space-between; gap: 8px; }
.lb13-tile__rows span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* „mehr…“ */
.lb13-tile--more .lb13-tile__content { justify-content: center; align-items: center; text-align: center; }
.lb13-tile--more .lb13-tile__title { font-size: clamp(1rem, 12cqw, 1.6rem); }

/* Leer-Hinweis */
.lb13-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed #bbb;
  border-radius: 6px;
  font-size: .9em;
  opacity: .7;
}

/* Elementor: Widget-Container nicht einengen */
.elementor-widget-lb13_kacheln .elementor-widget-container,
.elementor-widget-lb13_einsaetze .elementor-widget-container,
.elementor-widget-lb13_berichte .elementor-widget-container,
.elementor-widget-lb13_termine .elementor-widget-container { width: 100%; }
