/* jdi-mega-menu.css — GVD-style hover-reveal mega menu panel */

/* Suppress the existing text-link dropdown everywhere it appears */
.nav-dropdown { display: none !important; }

/* Reset chevron rotation state (we'll flip it on hover of trigger) */
[data-jdi-mega="services"] .lucide-chevron-down,
[data-jdi-mega="about"] .lucide-chevron-down {
  transition: transform 180ms ease;
}
[data-jdi-mega-open] .lucide-chevron-down {
  transform: rotate(180deg);
}

/* Panel container — fixed, full-width, slides down from top */
.jdi-mega {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--jdi-mega-top, 112px);
  z-index: 60;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}
.jdi-mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
}

/* Backdrop dims the page behind the panel while open */
.jdi-mega-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
  z-index: 55;
}
.jdi-mega-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 0s;
}

/* Inner layout: fixed hero + flex row of columns */
.jdi-mega-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 24px 36px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
}

/* Left hero card */
.jdi-mega-hero {
  background: #fcfaf8;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.jdi-mega-hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.jdi-mega-hero-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.jdi-mega-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #50a747;
}
.jdi-mega-hero-title {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.2;
  color: #111;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.jdi-mega-hero-copy {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin: 0;
  flex: 1;
}
.jdi-mega-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: #50a747;
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}
.jdi-mega-hero-cta:hover {
  background: #43913a;
  transform: translateY(-1px);
}
.jdi-mega-hero-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
}
.jdi-mega-hero-phone a {
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

/* Columns grid */
.jdi-mega-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.jdi-mega-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jdi-mega-col-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #eee;
}
.jdi-mega-col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  margin-top: 4px;
}
.jdi-mega-col-head:hover {
  color: #50a747;
}
.jdi-mega-col-head-arrow {
  font-weight: 500;
  color: #50a747;
}
.jdi-mega-col-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin: 0 0 6px;
}
.jdi-mega-col-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jdi-mega-col-sublist a {
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: color 120ms ease;
}
.jdi-mega-col-sublist a:hover {
  color: #50a747;
}

/* Service areas chip grid (col 4 variant) */
.jdi-mega-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.jdi-mega-chips a {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-size: 12px;
  color: #333;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.jdi-mega-chips a:hover {
  background: #50a747;
  border-color: #50a747;
  color: #fff;
}

/* Responsive — hide mega panel on narrow screens (mobile keeps native dropdown) */
@media (max-width: 1023px) {
  .jdi-mega,
  .jdi-mega-backdrop {
    display: none !important;
  }
  .nav-dropdown {
    display: block !important; /* restore for mobile fallback */
  }
}
@media (max-width: 1200px) {
  .jdi-mega-cols {
    grid-template-columns: repeat(3, 1fr);
  }
  .jdi-mega-col:nth-child(n + 4) {
    display: none;
  }
}

/* Reviews menu (13 Oct 2026): three columns after the review columns were merged */
#jdi-mega-testimonials .jdi-mega-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#jdi-mega-testimonials .jdi-mega-col-img {
  aspect-ratio: 16 / 10;
}
