/* =========================================================
   JankoMade Mega Menu Manager – frontend
   ========================================================= */

.jm-dynamic-mega {
  --jm-mega-bg: #120f0c;
  --jm-mega-panel: #18120d;
  --jm-mega-gold: #c8964e;
  --jm-mega-gold-light: #f0c46f;
  --jm-mega-text: #f3e6ce;
  --jm-mega-muted: #d0bfa5;

  display: grid;
  grid-template-columns: repeat(var(--jm-mega-columns, 6), minmax(0, 1fr));
  width: min(1800px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, var(--jm-mega-bg), #211912);
  border: 1px solid rgba(200, 150, 80, .35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .58);
}

.jm-mega-card {
  min-width: 0;
  border-right: 1px solid rgba(200, 150, 80, .18);
}

.jm-mega-card:last-child {
  border-right: 0;
}

.jm-mega-card__image-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f0b08;
}

.jm-mega-card__image,
.jm-mega-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.jm-mega-card__image {
  object-fit: cover;
  filter: brightness(.82) contrast(1.08);
  transition: transform .35s ease, filter .35s ease;
}

.jm-mega-card__placeholder {
  background:
    radial-gradient(circle at 50% 40%, rgba(240, 196, 111, .15), transparent 38%),
    linear-gradient(135deg, #1a120d, #0f0b08);
}

.jm-mega-card__image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 11, 8, .55), transparent 55%);
  pointer-events: none;
}

.jm-mega-card:hover .jm-mega-card__image {
  transform: scale(1.045);
  filter: brightness(.92) contrast(1.08);
}

.jm-mega-card__content {
  padding: 22px 24px 26px;
}

.jm-mega-card__title {
  margin: 0 0 15px !important;
  font-size: clamp(20px, 1.3vw, 27px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
}

.jm-mega-card__title a {
  color: var(--jm-mega-text) !important;
  text-decoration: none !important;
}

.jm-mega-card__title a:hover {
  color: var(--jm-mega-gold-light) !important;
}

.jm-mega-card__children {
  display: grid;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.jm-mega-card__children li {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid rgba(200, 150, 80, .14);
  list-style: none !important;
}

.jm-mega-card__children li:last-child {
  border-bottom: 0;
}

.jm-mega-card__children a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  color: var(--jm-mega-muted) !important;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none !important;
  transition: color .2s ease, padding-left .2s ease;
}

.jm-mega-card__children a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--jm-mega-gold);
  opacity: .72;
}

.jm-mega-card__children a span {
  flex: 1;
}

.jm-mega-card__children a small {
  color: var(--jm-mega-gold);
  font-size: 11px;
}

.jm-mega-card__children a:hover {
  padding-left: 5px;
  color: var(--jm-mega-gold-light) !important;
}

.jm-mega-card__empty {
  margin: 0 !important;
  color: #8f806e !important;
  font-size: 14px;
}

@media (max-width: 1450px) {
  .jm-dynamic-mega {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .jm-dynamic-mega {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .jm-dynamic-mega {
    display: block;
    border: 0;
    box-shadow: none;
  }

  .jm-mega-card {
    border-right: 0;
    border-top: 1px solid rgba(200, 150, 80, .18);
  }

  .jm-mega-card:first-child {
    border-top: 0;
  }

  .jm-mega-card__image-link {
    aspect-ratio: 16 / 7;
  }
}
