/*
 * GTS Theme — Mega Menu Styles
 * Styles for the Services mega-menu dropdown panel.
 */

/* ── Mega Menu Panel ─────────────────────────────────────────────────────── */
.mega-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  width: 580px;
  background: #0F2236;
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 8px;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  box-shadow: 0 24px 48px rgba(0,0,0,0.45);
  z-index: 300;
}

/* Open state — triggered by parent li:hover or .is-open class */
.has-mega-menu:hover > .mega-menu-panel,
.has-mega-menu.is-open > .mega-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

/* ── Grid of service links ───────────────────────────────────────────────── */
.mega-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
}

.mega-menu-item {
  display: block;
  padding: 11px 14px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mega-menu-item:hover {
  background: rgba(201,168,76,0.08);
}

.mega-item-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #E8E4DC;
  margin-bottom: 2px;
  line-height: 1.3;
}

.mega-item-desc {
  display: block;
  font-size: 11px;
  color: #5A7090;
  line-height: 1.4;
}

/* ── Footer row ─────────────────────────────────────────────────────────── */
.mega-menu-footer {
  border-top: 1px solid rgba(201,168,76,0.1);
  padding-top: 12px;
}

.mega-view-all {
  font-size: 13px;
  font-weight: 500;
  color: #C9A84C;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.mega-view-all:hover {
  color: #D4B55E;
}

/* ── Chevron ─────────────────────────────────────────────────────────────── */
.nav-chevron {
  margin-left: 5px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  vertical-align: middle;
  color: #7B8FA6;
}

.has-mega-menu:hover .nav-chevron,
.has-mega-menu.is-open .nav-chevron,
.menu-item-has-children:hover .nav-chevron {
  transform: rotate(180deg);
}

/* ── nav-toggle link styling ─────────────────────────────────────────────── */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #C5CEDA;
  padding: 8px 14px;
  border-radius: 3px;
  transition: color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-toggle:hover { color: #E8E4DC; }

/* ── Mobile: disable mega-menu, show flat list ───────────────────────────── */
@media (max-width: 900px) {
  .mega-menu-panel {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border: none;
    border-radius: 0;
    padding: 8px 0 8px 20px;
    display: none; /* shown via JS toggle */
  }
  .has-mega-menu.is-open > .mega-menu-panel { display: block; }
  .mega-menu-grid { grid-template-columns: 1fr; }
}
