/* ==========================================================================
   DreaInno Enterprise Mega-Menu Styles
   Architecture: 4-Column Dropdown with Spotlight Card & Category Chevrons
   Theme: Obsidian Glassmorphism with Coral/Orange Accent Headers
   ========================================================================== */

:root {
  --mega-menu-bg: rgba(6, 9, 17, 0.98);
  --mega-accent-orange: #ff5533;
  --mega-accent-orange-hover: #ff7254;
  --mega-text-muted: #94a3b8;
  --mega-text-white: #ffffff;
  --mega-border: rgba(255, 255, 255, 0.09);
  --mega-border-glow: rgba(255, 85, 51, 0.25);
}

/* ── Backdrop Overlay ── */
.mega-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mega-menu-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* ── Full-Width Mega-Menu Container ── */
.dreainno-mega-menu {
  position: fixed;
  top: 72px; /* Directly beneath the header */
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--mega-menu-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-top: 1px solid var(--mega-border);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 100px -10px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 0, 0, 0.6);
  z-index: 9995;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  max-height: calc(100vh - 78px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dreainno-mega-menu.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  position: relative;
}

/* ── Close Button (Top Right) ── */
.mega-menu-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--mega-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.mega-menu-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── 4-Column Grid Layout ── */
.mega-menu-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1.25fr 1.45fr;
  gap: 36px;
  padding-top: 10px;
}

.mega-column {
  display: flex;
  flex-direction: column;
}

.mega-subgroup {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Category Headings with Chevrons ── */
.mega-category-title {
  color: var(--mega-accent-orange);
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mega-category-title:hover {
  color: var(--mega-accent-orange-hover);
}

.mega-category-title .chevron {
  font-size: 0.95em;
  display: inline-block;
  transition: transform 0.2s ease;
}

.mega-category-title:hover .chevron {
  transform: translateX(3px);
}

/* ── Service Link Lists ── */
.mega-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mega-link-item {
  position: relative;
}

.mega-service-link {
  color: #94a3b8;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  padding: 2px 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.mega-service-link:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.mega-service-link:focus-visible {
  outline: 2px solid var(--mega-accent-orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ── Spotlight Column ── */
.mega-spotlight-col {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.mega-spotlight-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 14px;
}

.mega-spotlight-card {
  background: rgba(12, 18, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.mega-spotlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 85, 51, 0.4);
}

.mega-spotlight-img-wrap {
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.mega-spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mega-spotlight-card:hover .mega-spotlight-img {
  transform: scale(1.03);
}

.mega-spotlight-body {
  padding: 20px 22px 24px;
  background: linear-gradient(180deg, rgba(14, 28, 38, 0.85) 0%, rgba(8, 16, 24, 0.98) 100%);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.mega-spotlight-title {
  color: #ffffff;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.mega-spotlight-desc {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.mega-spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mega-spotlight-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spotlight-arrow {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  line-height: 1;
  transition: color 0.15s;
}

.spotlight-arrow:hover {
  color: #ffffff;
}

.spotlight-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.spotlight-dot.active {
  background: var(--mega-accent-orange);
  width: 8px;
  height: 8px;
}

.mega-spotlight-action {
  color: #38bdf8;
  font-size: 0.80rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.mega-spotlight-action:hover {
  color: #ffffff;
}

/* ── Mobile & Tablet Responsiveness ── */
@media (max-width: 1100px) {
  .mega-menu-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .mega-spotlight-col {
    grid-column: span 2;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 0;
    padding-top: 24px;
  }
}

@media (max-width: 768px) {
  .dreainno-mega-menu {
    top: 64px;
  }
  .mega-menu-inner {
    padding: 24px 20px 40px;
  }
  .mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .mega-spotlight-col {
    grid-column: span 1;
  }
}
