/* ================================================================
   Mega Menu Pro v2.0.0
   Corporate · Modern · Polished
   ================================================================ */

/* ── Tokens (base dark) — overridden by PHP inline style tag ── */
:root {
  --mmp-accent:        #FF9900;
  --mmp-accent-dim:    rgba(255,153,0,.14);
  --mmp-accent-glow:   rgba(255,153,0,.35);
  --mmp-accent-border: rgba(255,153,0,.30);

  --mmp-bg:        #0b1520;
  --mmp-bg-2:      #111e2b;
  --mmp-surface:   #162433;
  --mmp-border:    rgba(255,255,255,.06);
  --mmp-border-2:  rgba(255,255,255,.10);
  --mmp-text:      #c8dce9;
  --mmp-text-hi:   #eaf3fa;
  --mmp-muted:     #5d7d96;
  --mmp-hover-bg:  rgba(255,255,255,.05);

  --mmp-shadow:    0 40px 100px rgba(0,0,0,.65), 0 8px 30px rgba(0,0,0,.4);
  --mmp-radius:    0 0 16px 16px;
  --mmp-speed:     220ms;
  --mmp-ease:      cubic-bezier(.22,.61,.36,1);
  --mmp-header-h:  64px;
  --mmp-z:         999999;
}

/* ── Light theme ─────────────────────────────────────────────── */
.mmp-theme-light {
  --mmp-bg:       #ffffff;
  --mmp-bg-2:     #f7f9fc;
  --mmp-surface:  #eef2f7;
  --mmp-border:   rgba(0,0,0,.07);
  --mmp-border-2: rgba(0,0,0,.11);
  --mmp-text:     #1a2635;
  --mmp-text-hi:  #050d16;
  --mmp-muted:    #64748b;
  --mmp-hover-bg: rgba(0,0,0,.04);
  --mmp-shadow:   0 20px 60px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);
}

/* ── Glass theme ─────────────────────────────────────────────── */
.mmp-theme-glass {
  --mmp-bg:       rgba(9,17,26,.88);
  --mmp-bg-2:     rgba(255,255,255,.04);
  --mmp-surface:  rgba(255,255,255,.07);
  --mmp-border:   rgba(255,255,255,.09);
  --mmp-border-2: rgba(255,255,255,.14);
}

/* ================================================================
   NAV BAR
   ================================================================ */

/* Target Astra's varied markup — wide selector net */
.mmp-wrap nav > ul,
.mmp-wrap > ul,
.mmp-wrap ul.menu,
.mmp-wrap ul.nav-menu,
.mmp-wrap .ast-nav-menu,
.mmp-wrap .main-navigation > ul {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Top-level item */
.mmp-item { position: relative; list-style: none; }

/* ── Nav link ─────────────────────────────────────────────────── */
.mmp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none !important;
  color: inherit;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color var(--mmp-speed) ease;
}

/* Hover / active state */
.mmp-link:hover,
.mmp-link.mmp-active { color: var(--mmp-accent) !important; }

/* Animated underline when active */
.mmp-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 2px;
  background: var(--mmp-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--mmp-speed) var(--mmp-ease);
}
.mmp-link.mmp-active::after { transform: scaleX(1); }

/* Icon, badge, chevron */
.mmp-li { font-size: 15px; line-height: 1; flex-shrink: 0; }

.mmp-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; background: var(--mmp-accent); color: #000;
  border-radius: 4px; padding: 2px 5px; flex-shrink: 0;
}

.mmp-chevron {
  display: flex; align-items: center; opacity: .45; flex-shrink: 0;
  margin-left: 1px;
  transition: transform var(--mmp-speed) var(--mmp-ease), opacity var(--mmp-speed) ease;
}
.mmp-item.mmp-open .mmp-chevron { transform: rotate(180deg); opacity: 1; color: var(--mmp-accent); }

/* ================================================================
   OVERLAY — pointer-events:none so it never blocks the panel
   ================================================================ */
.mmp-overlay {
  position: fixed;
  inset: 0;
  top: var(--mmp-header-h);
  background: rgba(0,0,0,.52);
  z-index: calc(var(--mmp-z) - 2);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity var(--mmp-speed) ease;
}
.mmp-overlay.mmp-ov-on {
  opacity: 1;
  pointer-events: auto;  /* allows click-outside to close */
}

/* ================================================================
   PANEL SHELL
   ================================================================ */
.mmp-panel {
  position: fixed;
  left: 0; right: 0;
  top: var(--mmp-header-h);
  z-index: var(--mmp-z);
  background: var(--mmp-bg);
  border-top: 2px solid var(--mmp-accent);
  border-radius: var(--mmp-radius);
  box-shadow: var(--mmp-shadow);

  /* Hidden */
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity    var(--mmp-speed) var(--mmp-ease),
    transform  var(--mmp-speed) var(--mmp-ease),
    visibility 0ms var(--mmp-speed);
  will-change: opacity, transform;
}

/* Visible */
.mmp-panel.mmp-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity    var(--mmp-speed) var(--mmp-ease),
    transform  var(--mmp-speed) var(--mmp-ease),
    visibility 0ms;
}

/* Subtle top-right radial glow */
.mmp-panel::before {
  content: '';
  position: absolute;
  top: -60px; right: 10%;
  width: 320px; height: 220px;
  background: radial-gradient(ellipse, var(--mmp-accent-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Glass backdrop */
.mmp-theme-glass.mmp-panel {
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
}

/* ── Scrollable inner ─────────────────────────────────────────── */
.mmp-panel-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 48px 28px;
  max-height: calc(100vh - var(--mmp-header-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--mmp-surface) transparent;
}
.mmp-panel-inner::-webkit-scrollbar { width: 4px; }
.mmp-panel-inner::-webkit-scrollbar-thumb { background: var(--mmp-surface); border-radius: 99px; }

/* ================================================================
   PANEL BODY GRID
   ================================================================ */
.mmp-body { display: grid; }

/* Column count */
.mmp-c2 { grid-template-columns: repeat(2,1fr); }
.mmp-c3 { grid-template-columns: repeat(3,1fr); }
.mmp-c4 { grid-template-columns: repeat(4,1fr); }
.mmp-c5 { grid-template-columns: repeat(5,1fr); }

/* Featured layout: list + card */
.mmp-l-featured { grid-template-columns: 1fr 290px; gap: 0 40px; align-items: start; }

/* Span helpers */
.mmp-span2 { grid-column: span 2; }
.mmp-span3 { grid-column: span 3; }

/* ================================================================
   COLUMN
   ================================================================ */
.mmp-col {
  padding: 0 28px 4px;
  border-right: 1px solid var(--mmp-border);
}
.mmp-col:first-child { padding-left: 0; }
.mmp-col:last-child  { padding-right: 0; border-right: none; }

/* In featured layout the column section has no dividers */
.mmp-l-featured .mmp-col { border-right: none; padding: 0; }

/* ── Column heading ───────────────────────────────────────────── */
.mmp-col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mmp-border-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--mmp-muted);
}
.mmp-col-icon { font-size: 13px; }

/* ================================================================
   ITEM LIST
   ================================================================ */
.mmp-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mmp-item-row { margin: 0 !important; }

/* ── Service link row ─────────────────────────────────────────── */
.mmp-link-row {
  display: grid;
  grid-template-columns: 36px 1fr 14px;
  align-items: center;
  gap: 11px;
  padding: 7px 10px 7px 8px;
  border-radius: 8px;
  text-decoration: none !important;
  color: var(--mmp-text) !important;
  transition: background var(--mmp-speed) ease, transform 200ms ease;
}
.mmp-link-row:hover {
  background: var(--mmp-hover-bg);
  transform: translateX(3px);
}

/* Media */
.mmp-media {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}

.mmp-media-icon {
  background: var(--mmp-accent-dim);
  border: 1px solid var(--mmp-accent-border);
  font-size: 18px; line-height: 1;
  transition: background var(--mmp-speed) ease, border-color var(--mmp-speed) ease;
}
.mmp-link-row:hover .mmp-media-icon {
  background: var(--mmp-accent-dim);
  border-color: var(--mmp-accent);
}

.mmp-media-img img { width: 100%; height: 100%; object-fit: cover; }

/* Minimal dot for items without icon */
.mmp-media-dot {
  width: 6px !important; height: 6px !important;
  border-radius: 50%; background: var(--mmp-muted);
  margin-left: 15px;
  border: none !important;
  transition: background var(--mmp-speed) ease;
}
.mmp-link-row:hover .mmp-media-dot { background: var(--mmp-accent); }

/* Text block */
.mmp-row-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.mmp-row-title {
  font-size: 13px; font-weight: 500; color: var(--mmp-text-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
  transition: color var(--mmp-speed) ease;
}
.mmp-link-row:hover .mmp-row-title { color: var(--mmp-accent) !important; }

.mmp-row-desc {
  font-size: 11.5px; line-height: 1.4; color: var(--mmp-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Inline tag (badge) */
.mmp-tag {
  font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; background: var(--mmp-accent); color: #000;
  border-radius: 3px; padding: 1px 5px; flex-shrink: 0;
}

/* Arrow */
.mmp-row-arrow {
  font-size: 11px; color: var(--mmp-accent);
  opacity: 0; flex-shrink: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}
.mmp-link-row:hover .mmp-row-arrow { opacity: 1; transform: translateX(2px); }

/* ================================================================
   SECTION HEADING & DIVIDER
   ================================================================ */
.mmp-section-head {
  font-size: 9.5px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--mmp-muted);
  margin: 14px 0 7px;
  display: flex; align-items: center; gap: 5px;
}
.mmp-hr {
  border: none !important;
  border-top: 1px solid var(--mmp-border) !important;
  margin: 8px 0 !important;
}

/* ================================================================
   FEATURED CARD
   ================================================================ */
.mmp-feat {
  border: 1px solid var(--mmp-border-2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--mmp-surface);
  align-self: start;
  transition: transform var(--mmp-speed) var(--mmp-ease),
              border-color var(--mmp-speed) ease,
              box-shadow var(--mmp-speed) ease;
}
.mmp-feat:hover {
  transform: translateY(-4px);
  border-color: var(--mmp-accent-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.3), 0 0 0 1px var(--mmp-accent-border);
}

.mmp-feat-link {
  display: flex; flex-direction: column;
  text-decoration: none !important; color: inherit !important;
}

.mmp-feat-img {
  width: 100%; height: 152px; overflow: hidden; position: relative;
}
.mmp-feat-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55) 100%);
}
.mmp-feat-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms ease;
}
.mmp-feat:hover .mmp-feat-img img { transform: scale(1.06); }

.mmp-feat-body {
  padding: 18px; display: flex; flex-direction: column; gap: 7px;
}

.mmp-feat-badge {
  display: inline-flex;
  font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--mmp-accent);
  background: var(--mmp-accent-dim);
  border: 1px solid var(--mmp-accent-border);
  border-radius: 5px; padding: 2px 8px; width: fit-content;
}

.mmp-feat-title {
  font-size: 14px; font-weight: 600; color: var(--mmp-text-hi);
  display: block; line-height: 1.35;
}

.mmp-feat-desc {
  font-size: 12px; line-height: 1.6; color: var(--mmp-muted); margin: 0;
}

.mmp-feat-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--mmp-accent);
}
.mmp-feat-arr { display: inline-block; transition: transform 200ms ease; }
.mmp-feat:hover .mmp-feat-arr { transform: translateX(5px); }

/* ================================================================
   FOOTER CTA BAR
   ================================================================ */
.mmp-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 13px 48px;
  margin: 12px -48px -28px;
  border-top: 1px solid var(--mmp-border);
  background: rgba(0,0,0,.18);
}
.mmp-theme-light .mmp-footer { background: var(--mmp-bg-2); }
.mmp-theme-glass .mmp-footer { background: rgba(255,255,255,.04); }

.mmp-footer-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  text-decoration: none !important;
  color: var(--mmp-accent) !important;
  padding: 7px 16px;
  border-radius: 7px;
  border: 1px solid var(--mmp-border-2);
  background: transparent;
  transition: background var(--mmp-speed) ease,
              border-color var(--mmp-speed) ease,
              transform 150ms ease;
}
.mmp-footer-btn:hover {
  background: var(--mmp-accent-dim);
  border-color: var(--mmp-accent-border);
  transform: translateX(2px);
}
.mmp-footer-btn:hover .mmp-feat-arr { transform: translateX(4px); }

/* ================================================================
   CLOSE BUTTON
   ================================================================ */
.mmp-close {
  position: absolute; top: 16px; right: 20px; z-index: 10;
  background: none; border: none; cursor: pointer;
  color: var(--mmp-muted); padding: 7px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  transition: background 180ms ease, color 180ms ease;
}
.mmp-close:hover { background: var(--mmp-hover-bg); color: var(--mmp-text-hi); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .mmp-c4, .mmp-c5 { grid-template-columns: repeat(3,1fr); }
  .mmp-l-featured  { grid-template-columns: 1fr 250px; gap: 0 28px; }
  .mmp-panel-inner { padding: 28px 32px 24px; }
  .mmp-footer      { padding: 12px 32px; margin: 12px -32px -24px; }
}

@media (max-width: 768px) {
  .mmp-panel {
    top: 0 !important; border-radius: 0;
    height: 100dvh; overflow-y: auto;
    transform: translateX(-100%) !important;
    transition: transform var(--mmp-speed) var(--mmp-ease) !important;
  }
  .mmp-panel.mmp-visible { transform: translateX(0) !important; }
  .mmp-panel-inner { padding: 60px 20px 100px; max-height: none; }
  .mmp-body { grid-template-columns: 1fr !important; }
  .mmp-l-featured { gap: 0; }
  .mmp-col { padding: 0 0 16px !important; border-right: none !important; border-bottom: 1px solid var(--mmp-border); }
  .mmp-feat { display: none; }
  .mmp-footer { position: sticky; bottom: 0; margin: 16px -20px -100px; }
}

@media print { .mmp-panel, .mmp-overlay { display: none !important; } }
