/* Mega-Menü-Panel. Wird als Kind des Menüpunkts mit Klasse `has-wohnpark-megamenu`
   eingefügt. Der Trigger-Menüpunkt benötigt im Theme `position: relative`. */

.has-wohnpark-megamenu {
  position: relative;
}

.wp-megamenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1152px, calc(100vw - 32px));
  background: #fff;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25);
  padding: 28px 32px 20px;
  z-index: 50;
  display: none;
  margin-top: -5px;
}
.has-wohnpark-megamenu.is-open > .wp-megamenu,
.has-wohnpark-megamenu:focus-within > .wp-megamenu {
  display: block;
}

/* Hover-Brücke: unsichtbarer Streifen zum Trigger, der Hover-Abrisse verhindert */
.wp-megamenu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.wp-megamenu__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.wp-megamenu__colhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #405910;
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 2px solid #eaf4d9;
  margin-bottom: 10px;
}
.wp-megamenu__colhead:hover {
  color: #2a3d08;
}
.wp-megamenu__count {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
}
.wp-megamenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wp-megamenu__item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
}
.wp-megamenu__item a:hover {
  background: #f9fafb;
}
.wp-megamenu__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wp-megamenu__nr {
  font-weight: 600;
  min-width: 32px;
}
.wp-megamenu__meta {
  color: #6b7280;
  font-size: 13px;
}
.wp-megamenu__item--verkauft a {
  opacity: 0.55;
}
.wp-megamenu__empty {
  font-size: 13px;
  color: #9ca3af;
  padding: 6px 0;
}
.wp-megamenu__footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}
.wp-megamenu__cta {
  display: inline-block;
  background: #94c13d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}
.wp-megamenu__cta:hover {
  background: #7a9f32;
  color: #fff;
}

@media (max-width: 900px) {
  .wp-megamenu {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 0;
  }
  .wp-megamenu__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
@media (max-width: 560px) {
  .wp-megamenu__grid {
    grid-template-columns: 1fr;
  }
}
