/* ==========================================================================
   WebSocialTraffic Mega Menu Navigation & Mobile Drawer
   File: assets/css/mega-menu.css
   ========================================================================== */

/* Top Telemetry Ticker */
.wst-top-ticker {
  background: #0b101b;
  color: #94a3b8;
  font-size: 11px;
  padding: 7px 0;
  border-bottom: 1px solid #1e293b;
  position: relative;
  z-index: 50;
}
.wst-top-ticker .wst-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Main Header Bar */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.site-header .wst-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Identity */
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.brand-title strong {
  color: #2563eb;
}
.brand-badge {
  font-size: 10px;
  font-family: var(--wst-font-mono);
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Mega Menu Navigation Bar */
.wst-nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wst-nav-item {
  position: relative;
}

.wst-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: transparent;
}
.wst-nav-link:hover,
.wst-nav-item:hover > .wst-nav-link,
.wst-nav-item.is-active > .wst-nav-link {
  color: #2563eb;
  background: #f1f5f9;
}

.wst-nav-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}
.wst-nav-item:hover .wst-nav-chevron,
.wst-nav-item.is-active .wst-nav-chevron {
  transform: rotate(180deg);
}

/* Mega Menu Dropdown Container */
.wst-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 960px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.02);
  padding: 1.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 100;
}

/* Dropdown Open State */
.wst-nav-item:hover > .wst-mega-dropdown,
.wst-nav-item.is-active > .wst-mega-dropdown,
.wst-mega-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Multi-Column Mega Menu Layout */
.wst-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.wst-mega-col-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wst-mega-item-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}
.wst-mega-item-link:hover {
  background: #f8fafc;
  transform: translateX(3px);
}

.wst-mega-item-icon {
  font-size: 1.35rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  flex-shrink: 0;
}

.wst-mega-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wst-mega-item-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}
.wst-mega-item-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #eff6ff;
  color: #2563eb;
}
.wst-mega-badge-hot {
  background: #fee2e2;
  color: #dc2626;
}
.wst-mega-badge-popular {
  background: #fef3c7;
  color: #b45309;
}

/* Featured Side Column Card */
.wst-mega-card-featured {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 1.25rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wst-mega-card-featured h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}
.wst-mega-card-featured p {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Right Navigation CTAs */
.wst-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile Toggle Button */
.wst-mobile-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.25rem;
  color: #0f172a;
}

/* Mobile Slide-out Drawer */
.wst-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.wst-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.wst-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 85vw;
  background: #ffffff;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.wst-mobile-drawer.is-open {
  transform: translateX(0);
}

.wst-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}
.wst-drawer-close {
  background: #f1f5f9;
  border: none;
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: #64748b;
}

.wst-drawer-menu {
  padding: 1rem;
  flex: 1;
}
.wst-drawer-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.5rem 0;
}
.wst-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
}
.wst-drawer-submenu {
  display: none;
  padding-left: 0.75rem;
  padding-bottom: 0.5rem;
}
.wst-drawer-item.is-expanded .wst-drawer-submenu {
  display: block;
}
.wst-drawer-sublink {
  display: block;
  padding: 0.45rem 0.5rem;
  font-size: 0.8125rem;
  color: #475569;
  text-decoration: none;
}

.wst-drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (max-width: 1024px) {
  .wst-nav-menu,
  .wst-header-actions .wst-btn-secondary {
    display: none;
  }
  .wst-mobile-toggle {
    display: inline-flex;
  }
}
