/**
 * Navbar – balanced layout, scroll state, premium mega menus
 * Layout: logo (left) | centered nav | account (right)
 */

.header-spacer {
  height: 90px;
  flex-shrink: 0;
}

/* ---- Responsive: tablet ---- */
@media (max-width: 1024px) {
  #header {
    height: 72px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .header-spacer {
    height: 72px;
  }

  #header .header-inner,
  #header .container-fluid {
    min-height: 72px;
  }

  #header #logo a img {
    height: 40px;
    max-height: 40px;
  }
}

/* ---- Responsive: mobile ---- */
@media (max-width: 768px) {
  #header {
    height: 72px;
  }

  .header-spacer {
    height: 72px;
  }

  #header .header-inner,
  #header .container-fluid {
    min-height: 75px;
  }

  #header #logo a img {
    height: 50px;
    max-height: 50px;
  }

  body.mobile-nav-active #header #mobile-nav-toggle {
    top: 20px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  #header #logo a img {
    height: 32px;
    max-height: 32px;
  }
}

/* Mobile toggle: inside header, hidden on desktop */
.header-mobile-toggle,
#header #mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

#header .header-mobile-toggle:hover,
#header .header-mobile-toggle:focus {
  color: #72cc52;
  outline: none;
}

@media (max-width: 1024px) {
  .header-mobile-toggle,
  #header #mobile-nav-toggle {
    display: flex !important;
  }
}

/* No extra icon on the right: hide Superfish/CSS arrows everywhere */
#header .nav-menu .sf-with-ul:after,
#header .nav-menu .menu-has-children>a:after,
#header .nav-menu>li.nav-account>a:after {
  display: none !important;
}

/* Dropdown icon is in HTML next to text – small, inline, same color as link */
.nav-dropdown-icon {
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.9;
  vertical-align: middle;
}

#header .nav-menu .sf-with-ul {
  padding-right: 16px !important;
}

#header .nav-menu>li.nav-account>a {
  padding-right: 12px !important;
}

/* ---- Header layout: logo | centered nav | account right ---- */
#header .header-inner,
#header .container-fluid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  max-width: 100%;
  padding-bottom: 8px;
}

#header #logo,
#header .header-logo {
  flex-shrink: 0;
  padding: 6px 0 0 0;
}

.header-nav,
#nav-menu-container {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
  margin: 0;
}

.nav-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.nav-menu>li {
  margin-left: 0;
  flex-shrink: 0;
}

.nav-right-spacer {
  margin-left: auto;
  width: 0;
  overflow: hidden;
  padding: 0 !important;
  pointer-events: none;
}

/* Nav items always white so they are always visible (header stays dark on scroll) */
.nav-menu>li>a {
  padding: 12px 16px;
  font-size: 18px;
  white-space: nowrap;
  font-weight: 500;
  color: #fff !important;
  font-family: 'Roboto', sans-serif;
  transition: color 0.2s ease;
}

.nav-menu>li>a .nav-dropdown-icon {
  color: #fff !important;
}

#header .nav-menu>li:hover>a,
#header .nav-menu>li:hover>a .nav-dropdown-icon {
  color: #fe0046 !important;
}

#header .nav-menu>li.menu-active>a,
#header .nav-menu>li.menu-active>a .nav-dropdown-icon {
  color: #fe0046 !important;
}

/* Profile nav item: always white, hover accent */
.nav-menu>li.nav-account .nav-user-name {
  color: #fff !important;
}

#header .nav-menu>li.nav-account:hover .nav-user-name {
  color: #fe0046 !important;
}

/* Keep header dark when scrolled so white nav stays visible – no scroll-based color logic */
#header.scroll-header {
  background: #14344d !important;
}

@media (max-width: 1024px) {

  #nav-menu-container,
  .header-nav {
    display: none !important;
  }
}

/* When menu is open, fix toggle so it stays visible above overlay */
body.mobile-nav-active #header #mobile-nav-toggle {
  position: fixed;
  right: 16px;
  top: 18px;
  z-index: 1001;
  margin: 0;
}

/* ========== Mega menu – premium panel (full-width under header) ========== */
.nav-menu>li.has-mega {
  position: static;
}

.nav-menu ul.dd-mega {
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 !important;
  min-width: 0;
  width: 100%;
  display: none;
  position: fixed;
  top: 88px;
  left: 0;
  right: 0;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(20, 52, 77, 0.2);
  background: #fff;
  border: none;
  border-top: 3px solid #14344d;
  z-index: 999;
}

.nav-menu li:hover>ul.dd-mega,
.nav-menu li.sfHover>ul.dd-mega,
.nav-menu li.has-mega.mega-open>ul.dd-mega {
  display: block !important;
}

.dd-mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
}

.dd-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}

.dd-mega-grid--single {
  grid-template-columns: repeat(2, 1fr);
  max-width: 560px;
  margin: 0 auto;
}

.dd-mega-panel {
  padding: 0;
  min-width: 240px;
}

/* Override style.css so mega items stay one row (icon left, text right, 2 lines only) */
.nav-menu ul.dd-mega .dd-mega-link,
.nav-menu .dd-mega-link {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  padding: 6px 10px 19px 10px;
}

.nav-menu ul.dd-mega li.dd-mega-inner:hover {
  transform: none;
}

/* Mega menu: combined global colors #14344d, #72cc52, #fe0046 */
.dd-mega-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #14344d;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(20, 52, 77, 0.12);
  font-family: 'Roboto', sans-serif;
}

/* One row per item: icon left (spans both text lines), title + sub text right */
.dd-mega-link {
  align-items: stretch;
  gap: 14px;
  padding: 12px 8px;
  margin-bottom: 4px;
  margin-top: 4px;
  text-decoration: none;
  color: #14344d !important;
  transition: background 0.2s, color 0.2s;
  border-radius: 8px;
  margin-left: -8px;
  margin-right: -8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.dd-mega-link:first-child {
  margin-top: 0;
}

.dd-mega-link:last-child {
  margin-bottom: 0;
}

.dd-mega-link:hover {
  background: rgba(114, 204, 82, 0.08);
  color: #14344d !important;
}

.dd-mega-link:hover .dd-mega-text strong {
  color: #fe0046;
}

/* Icon: left, fixed width, stretches to cover both title and sub text lines */
.dd-mega-icon {
  width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 10px;
  background: rgba(20, 52, 77, 0.08);
  color: #72cc52;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s, color 0.2s;
}

.dd-mega-link:hover .dd-mega-icon {
  background: #72cc52;
  color: #fff;
}

/* Alternate accent: second column icons use red accent */
.dd-mega-panel:nth-child(2) .dd-mega-icon {
  color: #fe0046;
  background: rgba(254, 0, 70, 0.08);
}

.dd-mega-panel:nth-child(2) .dd-mega-link:hover .dd-mega-icon {
  background: #fe0046;
  color: #fff;
}

.dd-mega-panel:nth-child(2) .dd-mega-link:hover .dd-mega-text strong {
  color: #14344d;
}

/* Text block: title on first line, sub text below – stays in one column so item is one row */
.dd-mega-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.dd-mega-text strong {
  font-size: 15px;
  font-weight: 600;
  color: #14344d;
  font-family: 'Roboto', sans-serif;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-mega-text em {
  font-size: 13px;
  font-weight: 400;
  color: #5a5a5a;
  font-style: normal;
  font-family: Georgia, serif;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-mega-link:hover .dd-mega-text em {
  color: #14344d;
}

/* About Us mega: Connect panel – social row */
.dd-mega-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-right: 0;
  padding-top: 12px;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid rgba(20, 52, 77, 0.1);
}

.dd-mega-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(20, 52, 77, 0.08);
  color: #14344d;
  font-size: 18px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.dd-mega-social__link:hover {
  background: #5A9AFC;
  color: #fff;
  transform: translateY(-2px);
}

/* Connect panel (3rd): blue accent for icons/social */
.dd-mega-panel--connect .dd-mega-icon {
  color: #5A9AFC;
  background: rgba(90, 154, 252, 0.1);
}

.dd-mega-panel--connect .dd-mega-link:hover .dd-mega-icon {
  background: #5A9AFC;
  color: #fff;
}

.dd-mega-panel--connect .dd-mega-link:hover .dd-mega-text strong {
  color: #14344d;
}

.dd-mega-panel--connect .dd-mega-social {
  margin-right: 0;
  padding-right: 0;
}

/* Ensure header doesn't clip mega */
#header {
  position: fixed;
  z-index: 1005;
}

/* Standard dropdown (Blogs, Account) */
.nav-menu ul.dd-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  padding: 10px 6px !important;
  min-width: 200px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 52, 77, 0.12);
  background: #fff;
  border: 1px solid #e8eef4;
  border-top: 2px solid #5A9AFC;
}

.nav-menu ul.dd-dropdown li a {
  padding: 10px 16px !important;
  border-radius: 8px;
  font-size: 15px;
  display: block;
  color: #14344d !important;
}

.nav-menu ul.dd-dropdown li a:hover {
  background: rgba(90, 154, 252, 0.08);
  color: #5A9AFC !important;
}

.nav-menu .menu-has-children>a .sf-sub-indicator,
.nav-menu ul.dd-mega .sf-sub-indicator {
  display: none;
}

/* Account dropdown: align right, global colors, readable font size */
.nav-menu>li.nav-account>ul.dd-dropdown {
  left: auto;
  right: 0;
  transform: none;
  border-top-color: #5A9AFC;
}

/* Profile nav item: always visible – white on dark header, dark on scrolled white header */
.nav-menu>li.nav-account .nav-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff !important;
}

.nav-menu>li.nav-account>a {
  color: #fff !important;
}

.nav-menu>li.nav-account:hover>a,
.nav-menu>li.nav-account:hover .nav-user-name {
  color: #fe0046 !important;
}

.nav-menu>li.nav-account ul.dd-dropdown li a:hover {
  color: #5A9AFC !important;
  background: rgba(90, 154, 252, 0.08);
}

/* ========== Mobile nav ========== */
/* Panel must stay visible (clone must not inherit .header-nav hide rule) */
#mobile-nav.mobile-nav-panel,
#mobile-nav {
  display: block !important;
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 998;
  overflow-y: auto;
  transition: left 0.3s ease;
}

#mobile-nav {
  background: linear-gradient(180deg, #14344d 0%, #1a4060 100%) !important;
  padding-top: 72px !important;
  width: 300px;
  max-width: min(300px, 88vw);
  left: -300px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  -webkit-overflow-scrolling: touch;
}

#mobile-nav .nav-right-spacer {
  display: none !important;
}

/* Start with submenus (mega/dropdown) collapsed; JS toggles on tap */
#mobile-nav .menu-has-children > ul {
  display: none;
}

/* Single chevron from HTML only – no CSS arrow, no duplicate icon */
#mobile-nav .menu-has-children > a::after,
#mobile-nav .sf-with-ul::after {
  display: none !important;
}

/* Override style.css: keep HTML chevron inline (left of text), not absolute right */
#mobile-nav .menu-has-children > a .nav-dropdown-icon,
#mobile-nav ul .menu-has-children .fa-chevron-down,
#mobile-nav ul .menu-has-children .fa-chevron-up {
  position: static !important;
  margin-left: 6px;
  padding: 0 !important;
  vertical-align: middle;
}

#mobile-nav ul li a {
  color: #fff !important;
  padding: 14px 20px !important;
  font-size: 15px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Top-level menu titles: smaller on mobile for better fit */
#mobile-nav > ul > li > a {
  font-size: 15px !important;
  font-weight: 500 !important;
  font-family: 'Roboto', sans-serif;
}

@media (max-width: 480px) {
  #mobile-nav {
    padding-top: 72px !important;
    width: 280px;
    max-width: 92vw;
  }

  #mobile-nav ul li a {
    padding: 14px 16px !important;
    font-size: 14px !important;
  }

  #mobile-nav > ul > li > a {
    font-size: 14px !important;
  }
}

#mobile-nav ul li a:hover {
  color: #72cc52 !important;
  background: rgba(255, 255, 255, 0.05);
}

#mobile-nav .menu-has-children > a {
  font-weight: 500 !important;
}

#mobile-nav ul ul li a {
  /* padding-left: 36px !important; */
  font-size: 14px !important;
}

/* Mobile: mega as simple list */
#mobile-nav .dd-mega {
  position: static !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  max-width: none !important;
  border: none !important;
  border-top: none !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px;
  margin: 4px 12px 12px !important;
  padding: 16px 12px !important;
}

#mobile-nav .dd-mega-inner {
  max-width: none;
  padding: 0;
}

#mobile-nav .dd-mega-grid {
  display: block;
  gap: 0;
}

#mobile-nav .dd-mega-panel {
  margin-bottom: 16px;
}

#mobile-nav .dd-mega-panel:last-child {
  margin-bottom: 0;
}

#mobile-nav .dd-mega-heading {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

#mobile-nav .dd-mega-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 10px 0 !important;
  margin: 0;
  color: #fff !important;
}

#mobile-nav .dd-mega-icon {
  order: 1;
  flex-shrink: 0;
}

#mobile-nav .dd-mega-text {
  order: 2;
  min-width: 0;
}

#mobile-nav .dd-mega-link:hover {
  background: transparent !important;
  color: #72cc52 !important;
}

#mobile-nav .dd-mega-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

#mobile-nav .dd-mega-text strong {
  color: #fff;
  font-size: 14px;
}

#mobile-nav .dd-mega-text em {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

#mobile-nav .dd-mega-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  margin-left: 0;
  padding-top: 12px;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#mobile-nav .dd-mega-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
}

#mobile-nav .dd-mega-social__link:hover {
  background: #72cc52;
  color: #fff;
}

#mobile-body-overly {
  background: rgba(20, 52, 77, 0.85) !important;
}

body.mobile-nav-active #mobile-nav-toggle {
  position: fixed;
  right: 16px;
  top: 22px;
  z-index: 1001;
}

body.mobile-nav-active #mobile-nav-toggle i {
  color: #fff !important;
}

/* User & Sign In */
.nav-user-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.nav-user-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.nav-user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-cta-btn {
  background: #72cc52 !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 17px !important;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta-btn:hover {
  background: #5ab845 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-menu form {
  margin: 0;
}

.nav-menu .dud-logout {
  display: block;
  padding: 10px 16px !important;
  color: #14344d !important;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
}

.nav-menu .dud-logout:hover {
  color: #fe0046 !important;
  background: rgba(254, 0, 70, 0.06);
}