/* NH Mega-Menü – Styles (orientiert am Prototyp) */

:root {
  --nhmm-accent: #144aa7;
  --nhmm-dark: #073575;
  --nhmm-ink: #131c2b;
  --nhmm-muted: #6b7280;
  --nhmm-line: #dce1e8;
  --nhmm-card: #f3f4f6;
  --nhmm-panel: #ffffff;
}

/* Hauptpunkt: Pfeil-Indikator */
.nhmm-has-mega > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.45em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  vertical-align: middle;
}

.nhmm-has-mega.is-open > a::after {
  transform: translateY(2px) rotate(-135deg);
}

/* Aktiver Hauptpunkt: blau hinterlegt, solange das Panel offen ist */
.nhmm-has-mega.is-open > a {
  background: var(--nhmm-accent);
  color: #ffffff;
}

/* Panel: liegt im Fluss unter der Navigation und ist nur bei .is-open sichtbar */
.nhmm-panel {
  display: none;
  background: var(--nhmm-panel);
  color: var(--nhmm-ink);
  box-shadow: 0 5px 15px rgba(19, 35, 59, 0.125);
  border-radius: 0 0 7px 7px;
  margin: 0 auto 12px;
  max-width: 1240px;
}

.nhmm-panel.is-open {
  display: block;
}

.nhmm-inner {
  padding: 18px;
}

.nhmm-heading {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nhmm-muted);
}

/* Layout „Spalten mit Teaser“ (wie Prototyp) */
.nhmm-inner--columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 3.3fr);
  gap: 25px;
}

.nhmm-teaser {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nhmm-teaser-img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 8px;
}

.nhmm-teaser-title {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  font-weight: 700;
  color: var(--nhmm-dark);
}

.nhmm-teaser-text {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--nhmm-muted);
}

.nhmm-teaser-link {
  display: block;
  padding: 4px 0;
  font-weight: 700;
  color: var(--nhmm-accent);
  text-decoration: none;
}

.nhmm-teaser-link:hover {
  text-decoration: underline;
}

.nhmm-cols {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--nhmm-cols, 3), minmax(0, 1fr));
  gap: 25px;
  align-items: start;
  min-width: 0;
}

/* Spalten-Überschrift: dunkelblau und fett */
.nhmm-panel .nhmm-col > a {
  display: block;
  padding: 0 0 7px;
  font-size: 16px;
  font-weight: 700;
  color: var(--nhmm-dark);
  text-decoration: none;
  border: 0;
  background: none;
}

.nhmm-panel .nhmm-col > a:hover {
  text-decoration: underline;
}

.nhmm-panel .nhmm-col > .nhmm-list {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nhmm-col--wide > .nhmm-list {
  columns: 2;
  column-gap: 24px;
}

.nhmm-panel .nhmm-col > .nhmm-list li {
  margin: 0;
  padding: 0;
  break-inside: avoid;
}

.nhmm-panel .nhmm-col > .nhmm-list a {
  display: block;
  padding: 4px 0;
  font-size: 15px;
  color: var(--nhmm-ink);
  text-decoration: none;
  border: 0;
  background: none;
}

.nhmm-panel .nhmm-col > .nhmm-list a:hover,
.nhmm-panel .nhmm-col > .nhmm-list a:focus-visible {
  color: var(--nhmm-accent);
  text-decoration: underline;
}

/* Layout „Ressorts & Beitrags-Karten“ */
.nhmm-panel--cards .nhmm-inner {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 32px;
}

.nhmm-panel .nhmm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
}

.nhmm-panel .nhmm-list li {
  margin: 0;
  padding: 0;
}

.nhmm-panel--cards .nhmm-list a {
  display: block;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--nhmm-ink);
  text-decoration: none;
  border: 0;
  background: none;
}

.nhmm-panel--cards .nhmm-list a:hover,
.nhmm-panel--cards .nhmm-list a:focus-visible {
  color: var(--nhmm-accent);
}

.nhmm-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.nhmm-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--nhmm-card);
  border-radius: 12px;
  color: var(--nhmm-ink);
  text-decoration: none;
}

.nhmm-card:hover .nhmm-card-title,
.nhmm-card:focus-visible .nhmm-card-title {
  color: var(--nhmm-accent);
}

.nhmm-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.nhmm-card-noimg {
  background: #d1d5db;
}

.nhmm-card-body {
  display: block;
  padding: 12px 14px 14px;
}

.nhmm-card-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.nhmm-card-date {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--nhmm-muted);
}

/* Mobil */
@media (max-width: 1000px) {
  .nhmm-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nhmm-panel--cards .nhmm-inner {
    grid-template-columns: 1fr;
  }

  .nhmm-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .nhmm-inner--columns {
    grid-template-columns: 1fr;
  }

  /* Teaser-Spalte fällt auf dem Handy weg, wie im Prototyp */
  .nhmm-teaser {
    display: none;
  }

  .nhmm-cols {
    grid-template-columns: 1fr;
  }

  .nhmm-col--wide > .nhmm-list {
    columns: 1;
  }

  .nhmm-cards {
    grid-template-columns: 1fr;
  }
}
