/* ============================================================
   header.css — styles scoped to the site-wide header/navbar
   ============================================================ */

/* Sticky transparent navbar */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 12;
  background-color: var(--landingBackground);
  border-bottom: 1px solid var(--layoutBorderColor);

  transition: background-color 0.3s ease;
}

/* ── Hero-mode: full-width edge padding, no container constraint ──────
   .header-nav-inner owns ALL container sizing — no Bootstrap .container
   class is used, so there is zero cascade competition or flash.
─────────────────────────────────────────────────────────────── */
.header-nav-inner {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 30px;
  padding-right: 30px;
  transition: all 0.5s ease-in-out;
}

header.header--no-transition .header-nav-inner {
  transition: none !important;
}

header.header--hero .header-nav-inner {
  max-width: 100%;
  padding-left: clamp(28px, 4vw, 64px);
  padding-right: clamp(20px, 4vw, 56px);
}

/* Optional: slightly tinted background once user has scrolled */
header.header--scrolled {
  /* background-color: var(--landingBackground);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08); */
}

/* Brand logo sizing */
.navbar-brand img {
  /* height: 40px; */
  width: auto;
}

/* ── Logo swap on scroll ────────────────────────────────────────── */
.logo-wrap {
  display: grid;
  place-items: center start;
}
.navbar-brand .logo-wrap .logo-default {
  grid-area: 1 / 1;
  height: 55px;
  width: auto;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  will-change: opacity, transform;
}
.logo-default {
  opacity: 1;
  transform: translateY(0);
}
.logo-scrolled {
  grid-area: 1 / 1;
  width: auto;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  will-change: opacity, transform;
  height: 35px;
  opacity: 0;
  transform: translateY(7px);
  pointer-events: none;
}
header.header--scrolled .logo-default {
  opacity: 0;
  transform: translateY(-7px);
  pointer-events: none;
}
header.header--scrolled .logo-scrolled {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Nav link base */
.navbar-nav .nav-link {
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
  padding-inline: 0.85rem;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--secondaryMastercolor);
}

/* Dropdown toggle chevron */
.navbar-nav .nav-link .fa-chevron-down {
  transition: transform 0.2s ease;
}

.navbar-nav .nav-link[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
  border-radius: 8px;
  padding: 0.4rem 0;
  min-width: 160px;
  margin-top: 4px;
}

.dropdown-item {
  font-size: 14px;
  padding: 0.5rem 1.2rem;
  color: var(--primaryTextColor);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: var(--secondaryMastercolorLite);
  color: #f66320;
}

/* Mobile toggler */
.navbar-toggler {
  border: none;
  padding: 4px 6px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Mobile collapsed nav */
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-bottom: 0;
  }

  .navbar-nav .nav-link {
    padding-block: 0.5rem;
    padding-inline: 0;
  }
}

/* ============================================================
   MEGA-MENU — site theme (light / orange)
   ============================================================ */

/* Nav toggle */
.mega-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.mega-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.mega-toggle.is-open .mega-chevron {
  transform: rotate(180deg);
}

/* ── Panel container ── */
.mega-panel {
  display: none;
  position: fixed;
  top: 73px;
  left: 0;
  width: 100%;
  background: var(--landingBackground);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  animation: megaFadeIn 0.2s ease both;
}

.mega-panel.is-open {
  display: block;
}

/* ── Mini Panel (e.g. Company dropdown) ── */
.mini-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: white;
  border: 1px solid var(--layoutBorderColor);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 9999;
  animation: megaFadeIn 0.2s ease both;
  margin-top: 5px;
}

.mini-panel.is-open {
  display: block;
}

.mini-panel-list {
  display: flex;
  flex-direction: column;
}

.mini-nav-item {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.mini-nav-item:hover {
  background: var(--secondaryMastercolorLite);
  color: var(--secondaryMastercolor);
}

@keyframes megaFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 3-col inner layout ── */
.mega-panel-inner {
  display: grid;
  grid-template-columns: 300px 1fr 220px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 400px;
}

/* ── Column shared ── */
.mega-col {
  padding: 32px 28px;
}

.mega-col--left {
  border-right: 1px solid var(--layoutBorderColor);
}

.mega-col--center {
  padding: 32px 36px;
  background: var(--landingBackground);
}

.mega-col--right {
  border-left: 1px solid var(--layoutBorderColor);
  padding: 32px 24px;
}

/* Column headings */
.mega-col-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--layoutBorderColor);
}

/* ── LEFT: nav item list ── */
.mega-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-nav-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.16s ease;
}

.mega-nav-item:hover {
  background: var(--secondaryMastercolorLite);
}

.mega-nav-item.is-active {
  background: var(--secondaryMastercolorLite);
  border-left: 3px solid var(--secondaryMastercolor);
  padding-left: 9px;
}

.mega-nav-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}

.mega-nav-item:hover .mega-nav-item-title,
.mega-nav-item.is-active .mega-nav-item-title {
  color: var(--secondaryMastercolor);
}

.mega-nav-item-desc {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.4;
}

/* ── CENTER: static promo card ── */
.mega-promo-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 0;
}

.mega-promo-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--secondaryMastercolor);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 18px;
}

.mega-promo-title {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin: 0 0 14px;
}

.mega-promo-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.65;
  margin: 0 0 28px;
}

/* Stats row */
.mega-promo-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 32px;
}

.mega-promo-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-promo-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--secondaryMastercolor);
  line-height: 1;
}

.mega-promo-stat-sup {
  font-size: 16px;
  font-weight: 700;
  vertical-align: super;
}

.mega-promo-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* CTA button */
.mega-promo-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 11px 22px;
  background: var(--secondaryMastercolor);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 24px;
  text-decoration: none;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.mega-promo-cta:hover {
  background: #d4541a;
  color: #fff;
  transform: translateY(-1px);
}

/* ── RIGHT: quick links ── */
.mega-quick-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-quick-link {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid var(--layoutBorderColor);
  transition:
    color 0.16s ease,
    padding-left 0.16s ease;
}

.mega-quick-link:last-child {
  border-bottom: none;
}

.mega-quick-link:hover {
  color: var(--secondaryMastercolor);
  padding-left: 6px;
}

/* ── Feature Flag Hidden Elements ── */
.fp-stage-release {
  display: block; /* Default: visible */
}

.fp-stage-release[style*="display: none"] {
  display: none !important;
}

/* ── Industries / Company panels: slim 2-col variant ── */
.mega-panel--slim .mega-panel-inner {
  grid-template-columns: 1fr 340px;
  min-height: 0;
}

/* Grid of icon+label tiles */
.mega-col--grid {
  border-right: 1px solid #e5e7eb;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mega-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
  text-align: center;
}

.mega-grid-item:hover {
  background: var(--secondaryMastercolorLite);
  border-color: #f6632033;
}

.mega-grid-icon {
  font-size: 26px;
  line-height: 1;
}

.mega-grid-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

.mega-grid-item:hover .mega-grid-label {
  color: var(--secondaryMastercolor);
}

/* Right card column inside slim panels */
.mega-col--card {
  background: var(--landingBackground);
  padding: 32px 28px;
  display: flex;
  align-items: center;
}

.mega-col--card .mega-promo-card {
  padding: 0;
}

/* ── Hide on mobile ── */
@media (max-width: 991.98px) {
  .mega-panel {
    display: none !important;
  }
}

/* ── Company mega-menu icon inside nav items ── */
.mega-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--secondaryMastercolorLite);
  flex-shrink: 0;
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1;
}

.mega-nav-item:hover .mega-nav-icon,
.mega-nav-item.is-active .mega-nav-icon {
  background: var(--secondaryMastercolor);
}

/* Slim panel adjustments */
.mega-panel--slim .mega-panel-inner {
  grid-template-columns: 340px 1fr;
  min-height: 0;
}

.mega-panel--slim .mega-col--card {
  border-left: 1px solid var(--layoutBorderColor);
}

/* ============================================================
   MOBILE SIDEBAR
   ============================================================ */

/* Hamburger button */
.mob-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  padding-left: 0;
  padding-right: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.18s ease;
}

.mob-menu-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.mob-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primaryTextColor, #111827);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    width 0.25s ease;
}

/* Animate to X when open */
.mob-menu-btn.is-open .mob-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mob-menu-btn.is-open .mob-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mob-menu-btn.is-open .mob-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.mob-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mob-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar drawer */
.mob-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100dvh;
  background: #fff;
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.mob-sidebar.is-open {
  transform: translateX(0);
}

/* Sidebar header row */
.mob-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mob-sidebar-logo img {
  height: 38px;
  width: auto;
}

.mob-sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.mob-sidebar-close:hover {
  background: #e5e7eb;
}

.mob-sidebar-close svg {
  width: 18px;
  height: 18px;
  color: #374151;
}

/* Scrollable nav area */
.mob-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
}

/* Plain nav links (Industries, Company) */
.mob-nav-link {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.mob-nav-link:hover {
  background: #f9fafb;
  color: #f66320;
}

/* Accordion for Solutions */
.mob-nav-accord {
  border-bottom: 1px solid #f3f4f6;
}

.mob-nav-accord-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease;
}

.mob-nav-accord-btn:hover {
  background: #f9fafb;
}

.mob-accord-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.mob-nav-accord.is-open .mob-accord-chevron {
  transform: rotate(180deg);
}

.mob-nav-accord.is-open .mob-nav-accord-btn {
  color: #f66320;
}

/* Accordion body */
.mob-accord-body {
  display: none;
  padding: 0 16px 16px;
  background: #fafafa;
}

.mob-accord-body.is-open {
  display: block;
}

/* Individual solution items — flat list, no tabs */
.mob-sol-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.16s ease;
}

.mob-sol-item:hover {
  background: var(--secondaryMastercolorLite);
}

.mob-sol-item.is-active {
  background: var(--secondaryMastercolorLite);
  border-left: 3px solid var(--secondaryMastercolor);
  padding-left: 5px;
}

.mob-sol-item.is-active .mob-sol-label {
  color: var(--secondaryMastercolor);
}

.mob-sol-item.is-active .mob-sol-icon {
  background: var(--secondaryMastercolor);
  color: #fff;
}

.mob-sol-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--secondaryMastercolorLite);
  color: var(--secondaryMastercolor);
  flex-shrink: 0;
  margin-top: 1px;
}

.mob-sol-icon svg {
  width: 16px;
  height: 16px;
}

.mob-sol-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}

.mob-sol-item:hover .mob-sol-label {
  color: var(--secondaryMastercolor);
}

.mob-sol-desc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.4;
}

/* Footer CTA */
.mob-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mob-sidebar-footer .primaryButton {
  display: flex;
  width: 100%;
  justify-content: center;
}

@media (min-width: 576px) {
  .header-nav-inner {
    max-width: 540px;
  }
  .header-nav-inner{
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 768px) {
  .header-nav-inner {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .mob-menu-btn,
  .mob-overlay,
  .mob-sidebar {
    display: none !important;
  }
  .header-nav-inner {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .header-nav-inner {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .header-nav-inner {
    max-width: 1320px;
  }
}
