/**
 * Globonex Executive Brand Theme - Full-Width Header Banner & Mega Menu Styles
 *
 * 1. Full Page Width Header Image Banner (100% viewport coverage)
 * 2. Multi-Column Mega Menu Dropdowns across all 4 Header Styles
 *
 * @package Globonex_Billing_Theme
 * @version 1.5.0
 */

/* ==========================================================================
   1. FULL PAGE WIDTH HEADER IMAGE BANNER
   ========================================================================== */

.globonex-page-hero-banner {
  position: relative;
  width: 100%;
  min-height: var(--globonex-banner-height, 360px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-bottom: 2.5rem;
  background-color: var(--header-bg, #1e3e62);
}

.globonex-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 0.8s ease;
  z-index: 1;
}

.globonex-page-hero-banner:hover .globonex-page-hero-bg {
  transform: scale(1.04);
}

.globonex-page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: background 0.3s ease;
}

/* Contrast Overlay Variations */
.globonex-page-hero-banner.overlay-gradient .globonex-page-hero-overlay {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(5, 100, 210, 0.72) 100%);
}

.globonex-page-hero-banner.overlay-dark-heavy .globonex-page-hero-overlay {
  background: rgba(15, 23, 42, 0.78);
}

.globonex-page-hero-banner.overlay-dark-medium .globonex-page-hero-overlay {
  background: rgba(15, 23, 42, 0.52);
}

.globonex-page-hero-banner.overlay-dark-light .globonex-page-hero-overlay {
  background: rgba(15, 23, 42, 0.28);
}

.globonex-page-hero-banner.overlay-none .globonex-page-hero-overlay {
  display: none;
}

/* Banner Content */
.globonex-page-hero-inner {
  position: relative;
  z-index: 3;
  color: #ffffff;
  padding: 3.5rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.globonex-page-hero-banner.align-center .globonex-page-hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.globonex-page-hero-banner.align-left .globonex-page-hero-inner {
  text-align: left;
}

.globonex-page-hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0.4rem 0 0.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.globonex-page-hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  max-width: 760px;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Breadcrumbs inside Hero Banner */
.globonex-page-hero-breadcrumbs {
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.globonex-page-hero-breadcrumbs .page-breadcrumbs {
  margin: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
}

.globonex-page-hero-breadcrumbs .page-breadcrumbs a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.globonex-page-hero-breadcrumbs .page-breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.globonex-page-hero-breadcrumbs .breadcrumb-separator {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0.45rem;
}


/* ==========================================================================
   2. MEGA MENU DROPDOWN SYSTEM
   ========================================================================== */

/* Top-level item relative anchor */
.whmcs-nav-inner,
.whmcs-header-inline-inner,
.whmcs-header-centered-inner,
.whmcs-floating-island-bar {
  position: relative;
}

.whmcs-menu > li.mega-menu,
.whmcs-menu-pills > li.mega-menu,
.whmcs-menu-centered > li.mega-menu,
.whmcs-menu-cyber > li.mega-menu {
  position: static !important;
}

/* The Mega Menu Dropdown Container */
.globonex-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 100%;
  min-width: 860px;
  max-width: 1180px;
  background: var(--header-bg, #1e3e62);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--primary-color, #0564d2);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  padding: 2rem 2.25rem;
  display: none;
  z-index: 10000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-sizing: border-box;
}

/* Hover, Focus, and Mobile/Touch reveal with smooth micro-interaction */
.whmcs-menu > li.mega-menu:hover > .globonex-mega-dropdown,
.whmcs-menu > li.mega-menu:focus-within > .globonex-mega-dropdown,
.whmcs-menu > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
.whmcs-menu-pills > li.mega-menu:hover > .globonex-mega-dropdown,
.whmcs-menu-pills > li.mega-menu:focus-within > .globonex-mega-dropdown,
.whmcs-menu-pills > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
.whmcs-menu-centered > li.mega-menu:hover > .globonex-mega-dropdown,
.whmcs-menu-centered > li.mega-menu:focus-within > .globonex-mega-dropdown,
.whmcs-menu-centered > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
.whmcs-menu-cyber > li.mega-menu:hover > .globonex-mega-dropdown,
.whmcs-menu-cyber > li.mega-menu:focus-within > .globonex-mega-dropdown,
.whmcs-menu-cyber > li.mega-menu.sub-menu-open > .globonex-mega-dropdown {
  display: block;
  animation: globonexMegaSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes globonexMegaSlide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.globonex-mega-inner {
  width: 100%;
}

/* Multi-Column Grid Tracks */
.globonex-mega-grid {
  display: grid;
  gap: 2rem;
  width: 100%;
  align-items: stretch;
}

.globonex-mega-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.globonex-mega-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.globonex-mega-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Column Wrappers */
.globonex-mega-col {
  display: flex;
  flex-direction: column;
}

.globonex-mega-col-header {
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.globonex-mega-col-title-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.globonex-mega-col-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.globonex-mega-col-title-link:hover .globonex-mega-col-title {
  color: var(--primary-color, #38bdf8);
}

.globonex-mega-col-subtitle {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 0.25rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}

/* Links inside Mega Column */
.globonex-mega-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.globonex-mega-links li {
  margin: 0;
  padding: 0;
}

.globonex-mega-links a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}

.globonex-mega-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding-left: 1.15rem;
  transform: translateX(2px);
}

.globonex-mega-links .menu-item-text {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.globonex-menu-desc {
  display: block;
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0.2rem;
}

.globonex-mega-links a:hover .globonex-menu-desc {
  color: #e2e8f0;
}

/* Feature Badges */
.globonex-menu-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.18rem 0.48rem;
  border-radius: 50px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 0.4rem;
  letter-spacing: 0.04em;
}

.badge-hot {
  background: #ef4444;
  color: #ffffff;
}

.badge-new {
  background: #10b981;
  color: #ffffff;
}

.badge-popular {
  background: #f59e0b;
  color: #ffffff;
}

.badge-pro {
  background: #8b5cf6;
  color: #ffffff;
}

.badge-free {
  background: #06b6d4;
  color: #ffffff;
}

/* Featured Promo Card Column */
.globonex-mega-promo-col {
  display: flex;
}

.globonex-mega-promo-card {
  background: var(--primary-gradient, linear-gradient(135deg, #0564d2, #1e3e62));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 1.6rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.globonex-mega-promo-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.65rem;
  color: #ffffff;
  line-height: 1.3;
}

.globonex-mega-promo-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.globonex-mega-promo-btn {
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}

/* Dark Mode Overrides */
html[data-theme="dark"] .globonex-mega-dropdown {
  background: var(--card-bg, #0f172a);
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color, #38bdf8);
}

html[data-theme="dark"] .globonex-mega-col-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Responsive: Mobile Navigation Adaptations */
@media (max-width: 960px) {
  .globonex-mega-dropdown {
    display: none;
    position: static;
    transform: none !important;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
  }

  .whmcs-menu > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
  .whmcs-menu-pills > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
  .whmcs-menu-centered > li.mega-menu.sub-menu-open > .globonex-mega-dropdown,
  .whmcs-menu-cyber > li.mega-menu.sub-menu-open > .globonex-mega-dropdown {
    display: block !important;
  }

  .whmcs-menu > li.mega-menu:hover > .globonex-mega-dropdown {
    animation: none;
  }

  .globonex-mega-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .globonex-page-hero-banner {
    min-height: 240px !important;
    margin-bottom: 1.5rem;
  }

  .globonex-page-hero-inner {
    padding: 2.25rem 1rem;
  }

  .globonex-page-hero-title {
    font-size: 1.85rem;
  }
}
