/* =============================================
   BrandDid Digital – mega-menu.css
   Mega menu, dropdown, desktop hover menu,
   submenu animations, backdrop
   ============================================= */

/* --- Trigger wrapper --- */
.nav-item-mega {
  position: static;
}

/* --- Services button --- */
.nav-link-mega {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray);
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-link-mega:hover,
.nav-item-mega.open .nav-link-mega {
  color: var(--primary);
  background: #fff3ee;
}

.mega-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.nav-item-mega.open .mega-chevron {
  transform: rotate(180deg);
}

/* --- Mega menu panel --- */
.mega-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 998;
  padding: 0 24px;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.28s cubic-bezier(0.4,0,0.2,1),
              transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

.nav-item-mega.open .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.navbar.scrolled ~ * .mega-menu,
.navbar.scrolled .mega-menu {
  top: 62px;
}

/* --- Inner card --- */
.mega-menu-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15,23,42,0.14), 0 4px 16px rgba(255,90,0,0.06);
  overflow: hidden;
  padding: 28px 32px 20px;
}

/* --- Header row --- */
.mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.mega-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.mega-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: -0.01em;
}

.mega-header-right {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.mega-cta-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* --- Divider --- */
.mega-divider {
  height: 1px;
  background: var(--border);
  margin: 0 -32px 22px;
}
.mega-divider + .mega-footer { margin-top: 0; }

/* --- Services grid: 4 columns --- */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

/* --- Individual service item --- */
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 14px;
  border-radius: 12px;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  text-decoration: none;
  position: relative;
  border: 1px solid transparent;
}
.mega-item:hover {
  background: var(--primary-soft);
  border-color: rgba(255,90,0,0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,90,0,0.08);
}
.mega-item:hover .mega-item-title { color: var(--primary); }
.mega-item:hover .mega-item-arrow { opacity: 1; transform: translateX(3px); color: var(--primary); }
.mega-item:hover .mega-icon { transform: scale(1.1); }

/* --- Icon badge --- */
.mega-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
.mega-icon--orange { background: rgba(255,90,0,0.10); color: var(--primary); }
.mega-icon--blue   { background: rgba(59,130,246,0.10); color: #3b82f6; }
.mega-icon--purple { background: rgba(139,92,246,0.10); color: #8b5cf6; }
.mega-icon--green  { background: rgba(34,197,94,0.10); color: #16a34a; }

/* --- Item text --- */
.mega-item-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.mega-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  line-height: 1.3;
}
.mega-item-desc {
  font-size: 0.78rem;
  color: var(--gray-dim);
  line-height: 1.4;
}

/* --- Arrow indicator --- */
.mega-item-arrow {
  opacity: 0;
  flex-shrink: 0;
  margin-top: 3px;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  color: var(--gray-dim);
  align-self: flex-start;
}

/* --- Bottom bar --- */
.mega-footer {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  flex-wrap: wrap;
}
.mega-footer-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray);
}
.mega-footer-cta {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap 0.2s ease, letter-spacing 0.2s ease;
}
.mega-footer-cta:hover { letter-spacing: 0.01em; }

/* --- Overlay backdrop --- */
.mega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 997;
  background: rgba(15,23,42,0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mega-backdrop.visible { display: block; }
