/* ============================================================
   Mega-Menu — Full Width Edge-to-Edge Design
   ============================================================ */

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes megaMenuSlideIn {
  from {
    opacity: 0;
    transform: scaleY(0.96);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes megaMenuLinkIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes statCountUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Panel ─────────────────────────────────────────────────── */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw; /* Full screen width */
  transform-origin: top center;

  /* Solid clean background as per design */
  background: var(--bg-white, #ffffff);
  
  /* Borders */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* ── Open state ─────────────────────────────────────────────── */
/* Transparent hover-bridge: covers the gap between nav link and panel */
.nav-item-dropdown:hover > .nav-link::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 100px; /* covers the massive gap from the 90px logo header */
  display: block;
  z-index: 999;
}

.nav-item-dropdown:hover .mega-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  animation: megaMenuSlideIn 0.28s cubic-bezier(0.34, 1.26, 0.64, 1) forwards;
}

/* ── Inner layout ────────────────────────────────────────────── */
.mega-menu .submenu-container {
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  width: 100%;
  max-width: var(--container-width, 1200px);
  margin: 0 auto; /* Center within the 100vw */
  padding: 28px 24px 36px;
}

/* Left column: Company info */
.mega-menu .submenu-info {
  padding-block: 0;
  padding-inline: 0 24px;
  border-right: 1px solid rgba(234, 234, 234, 0.7);
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
}

.mega-menu .submenu-info-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.mega-menu .submenu-info-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.mega-menu .submenu-info-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background-color: var(--accent-gold);
}

.mega-menu .submenu-info-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

.mega-menu .submenu-info-desc + .submenu-info-desc {
  margin-top: 12px;
}

.mega-menu .submenu-info-desc .fi {
  margin-right: 6px;
  font-size: 1.1em;
  border-radius: 2px;
}

.mega-menu .submenu-info-desc .fi:last-child {
  margin-right: 0;
}

/* Social block in Publications Menu */
.submenu-social-invite {
  margin-bottom: 12px !important;
}

.submenu-social-links {
  display: flex;
  gap: 12px;
}

.submenu-social-links .social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(197, 168, 128, 0.05);
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  border: 1px solid rgba(197, 168, 128, 0.1);
}

.submenu-social-links .social-icon:hover {
  background: var(--accent-gold);
  color: var(--primary-color);
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.submenu-contact-info {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(197, 168, 128, 0.2);
}

.submenu-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}

.submenu-contact-link:last-child {
  margin-bottom: 0;
}

.submenu-contact-link:hover {
  color: var(--accent-gold);
}

.submenu-contact-link i {
  font-size: 1.2rem;
  color: var(--accent-gold);
}

/* ── Links column ───────────────────────────────────────────── */
.mega-menu .submenu-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px;
}

.mega-menu .submenu-links li {
  width: 100%;
  list-style: none;
}

/* Section headers within submenu */
.mega-menu .submenu-links li:not(:has(a)) {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 12px;
  margin-bottom: 4px;
  padding-left: 10px;
  pointer-events: none;
}

.mega-menu .submenu-links li:not(:has(a)):first-child {
  margin-top: 0;
}

/* ── Animated link rows ─────────────────────────────────────── */
.mega-menu .submenu-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: none;
  letter-spacing: normal;
  position: relative;
  transition: color 0.22s ease, background 0.22s ease;
  text-decoration: none;
}

/* Staggered entrance per-item */
.nav-item-dropdown:hover .mega-menu .submenu-links li:nth-child(1) a { animation: megaMenuLinkIn 0.28s 0.05s ease both; }
.nav-item-dropdown:hover .mega-menu .submenu-links li:nth-child(2) a { animation: megaMenuLinkIn 0.28s 0.10s ease both; }
.nav-item-dropdown:hover .mega-menu .submenu-links li:nth-child(3) a { animation: megaMenuLinkIn 0.28s 0.15s ease both; }
.nav-item-dropdown:hover .mega-menu .submenu-links li:nth-child(4) a { animation: megaMenuLinkIn 0.28s 0.20s ease both; }

/* Link icon badge */
.mega-menu .submenu-link-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(197, 168, 128, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--accent-gold);
  transition: background 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover state */
.mega-menu .submenu-links a:hover,
.mega-menu .submenu-links li.active a {
  color: var(--primary-color);
  background: rgba(197, 168, 128, 0.08);
}

.mega-menu .submenu-links a:hover .submenu-link-icon,
.mega-menu .submenu-links li.active a .submenu-link-icon {
  background: var(--accent-gold);
  color: #000;
  transform: scale(1.1) rotate(-5deg);
}

/* ── Right column: preview panel ─────────────────────────────── */
.mega-menu .submenu-preview {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 4px;
  /* Removed border radius as per image */
}

.mega-menu .submenu-preview img,
.mega-menu .submenu-preview canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease;
  opacity: 0;
  z-index: 1;
}

.mega-menu .submenu-preview img.active,
.mega-menu .submenu-preview canvas.active {
  opacity: 1;
  filter: brightness(.8);
}

.mega-menu .submenu-preview-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 60px 16px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.25) 85%, transparent 100%);
  color: white;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 2;
  transform: translateY(8px);
}

.mega-menu .submenu-preview-content.active {
  opacity: 1;
  transform: translateY(0);
}

.mega-menu .submenu-preview-content h4 {
  color: var(--accent-gold);
  margin-bottom: 6px;
  font-size: 1.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

.mega-menu .submenu-preview-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}