/* MeerHeimatLiebe 2.5.2-r108
   - Karten reagieren intelligent auf die verfügbare Breite und werden nicht gequetscht
   - die Kategorienleiste bleibt beim Wechsel sichtbar
   - Logbuch und Download-Kai erhalten dieselbe Höhe */

:root {
  --mhl-r108-header-offset: calc(var(--mhl-r100-header-height, 5.15rem) + .55rem);
  --mhl-r108-card-gap: clamp(.72rem, 1vw, 1rem);
}

/* Der Schnell-an-Deck-Bereich darf Sticky-Elemente und Karten vollständig zeigen. */
.mhl-r107-home-layout,
.mhl-r107-quickdeck {
  overflow: visible !important;
}

/* Kategorienleiste: gleiche Kartenhöhe, Mindestbreite statt Quetschen. */
.mhl-r108-category-bar {
  position: sticky !important;
  top: var(--mhl-r108-header-offset) !important;
  z-index: 9100 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(10.5rem, 1fr)) !important;
  grid-auto-rows: 1fr;
  gap: var(--mhl-r108-card-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: .68rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  border: 1px solid rgba(129, 218, 250, .22);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(91,181,218,.055) 28%, rgba(3,31,51,.88)),
    rgba(3, 36, 56, .82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    0 .55rem 1.35rem rgba(0, 10, 23, .18);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.mhl-r108-category-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .65rem !important;
  min-width: 0 !important;
  min-height: 4.15rem !important;
  height: 100% !important;
  padding: .72rem .82rem !important;
  white-space: normal !important;
  text-wrap: balance;
}

.mhl-r108-category-card > * {
  min-width: 0;
}

/* Merkmalskarten innerhalb der geöffneten Kategorie. */
.mhl-r108-equal-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--mhl-r108-columns, 1), minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr !important;
  align-items: stretch !important;
  gap: var(--mhl-r108-card-gap) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.mhl-r108-equal-card {
  display: flex !important;
  align-items: flex-start !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 7.3rem !important;
  padding: clamp(.78rem, 1vw, 1rem) !important;
  overflow: visible !important;
}

.mhl-r108-equal-card > * {
  min-width: 0;
}

.mhl-r108-equal-card :is(h3, h4, strong) {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.mhl-r108-equal-card :is(p, span) {
  overflow-wrap: break-word;
}

/* Gleich hohe untere Hauptkästen. */
.mhl-r107-lower-grid.mhl-r108-lower-grid {
  align-items: stretch !important;
}

.mhl-r108-lower-grid > .mhl-r107-news-panel,
.mhl-r108-lower-grid > .mhl-r107-download-panel {
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  height: 100% !important;
  min-height: var(--mhl-r108-lower-height, auto) !important;
}

.mhl-r108-lower-grid .mhl-r107-news-list {
  grid-auto-rows: 1fr !important;
  align-items: stretch !important;
  flex: 1 1 auto;
}

.mhl-r108-lower-grid .mhl-r107-news-card {
  height: 100% !important;
}

/* Bild und Inhalt dürfen nie in eine zu schmale Restspalte gezwängt werden. */
.mhl-r107-quickdeck :is(img, picture, video) {
  max-width: 100%;
}




