/* ==========================================================================
   Flowace — Header Navigation (redesign)  •  v2
   Loaded from header.php. All menu styling lives here (cacheable, no inline CSS).
   Namespaced with .fa-  — see the Font Awesome reset below.
   ========================================================================== */

:root {
  --fa-orange: #ff5722;
  --fa-orange-2: #ff8f6b;
  --fa-grad: linear-gradient(101.82deg, #ff5722 2.73%, #ff8f6b 96.37%);
  --fa-ink: #1d2939;
  --fa-ink-2: #475467;
  --fa-ink-3: #667085;
  --fa-label: #98a2b3;
  --fa-line: #eaecf0;
  --fa-surface: #ffffff;
  --fa-surface-2: #f9fafb;
  --fa-hover-tint: #f9f2ff;
  --fa-radius: 12px;
  --fa-shadow: 0 12px 32px rgba(16, 24, 40, 0.1);
  --fa-shadow-sm: 0 4px 18px rgba(16, 24, 40, 0.06);
  --fa-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --------------------------------------------------------------------------
   Font Awesome collision reset.
   Several of our class names (.fa-header, .fa-burger, …) collide with Font
   Awesome icon classes, whose CSS injects a glyph via ::before/::after. Our
   header uses inline SVG, never FA glyphs, so we cancel any injected content
   for everything inside the header + banner. High specificity (#id) + !important
   guarantees it beats Font Awesome's `.fa-xxx::before { content: "\fXXX" }`.
   -------------------------------------------------------------------------- */
#fa-header::before,
#fa-header::after,
#fa-header [class*="fa-"]::before,
#fa-header [class*="fa-"]::after,
.fa-compliance::before,
.fa-compliance::after,
.fa-compliance [class*="fa-"]::before,
.fa-compliance [class*="fa-"]::after {
  content: none !important;
}

/* Local box-sizing so width:100% + padding behaves on mobile rows */
.fa-compliance,
.fa-compliance *,
#fa-header,
#fa-header * {
  box-sizing: border-box;
}

/* ---------- Compliance banner ---------- */
.fa-compliance {
  padding: 8px;
  background: linear-gradient(118.88deg, #f9befa 2.26%, #ffd9b6 98.44%);
}
.fa-compliance-text {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: var(--fa-ink);
}
.fa-compliance-text a,
.fa-compliance-text a:hover {
  font-size: inherit;
  text-decoration: underline;
  color: var(--fa-orange);
}

/* ---------- Header shell ---------- */

/* ==========================================================================
   Sticky Header Fixes
   position: sticky fails if any parent element has overflow: hidden.
   We must unset the wrapper overflow and use clip on the body.
   ========================================================================== */
body {
  overflow-x: clip !important;
}
.mainbodywrapper {
  overflow: unset !important;
}

/* Using position: sticky mirrors the old header logic. */
.fa-headroot {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--fa-surface);
}
/* Sit below the WordPress admin bar when an editor is logged in */
body.admin-bar .fa-headroot {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .fa-headroot {
    top: 46px;
  }
}

.fa-header {
  position: relative;
  background: var(--fa-surface);
  font-family: var(--fa-font);
  border-bottom: 1px solid transparent;
  padding: 3px 0 2px 0;
}
.fa-header .fa-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.fa-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}
.fa-bar-left {
  display: flex;
  align-items: center;
  gap: 48px;
  flex: 1;
}
.fa-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.fa-logo img {
  display: block;
  height: 32px;
  width: auto;
}

/* Menu wrapper — full width so nav sits left, actions sit right */
.fa-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

/* ---------- Primary nav ---------- */
.fa-nav {
  display: flex;
}
.fa-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.fa-nav-item {
  position: static;
}
.fa-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #484a61;
  padding: 12px 18px;
  line-height: 16px;
  text-decoration: none;
}
.fa-nav-trigger:hover {
  font-size: 16px;
  line-height: 16px;
  color: var(--fa-ink);
}
.fa-nav-item.is-open > .fa-nav-trigger {
  color: var(--fa-ink);
}
.fa-nav-caret {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.fa-nav-item.is-open > .fa-nav-trigger .fa-nav-caret {
  transform: rotate(180deg);
}

/* ---------- Mega panel (click-to-open) ---------- */
.fa-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0px 18px 44px 0px #11162124;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
  z-index: 100;
}
.fa-nav-item.is-open > .fa-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fa-mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}
.fa-mega-inner.is-full {
  grid-template-columns: 1fr;
}

/* ---------- Left content area ---------- */
.fa-mega-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fa-col-label {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 135%;
  letter-spacing: 8%;
  text-transform: uppercase;
  color: #98a2b3;
  margin: 0 0 10px 6px;
}
.fa-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.fa-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Standard menu item */
.fa-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--fa-radius);
  text-decoration: none;
  background: transparent;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  position: relative;
}
.fa-item:hover {
  background: #f9fafb;
  /* box-shadow: var(--fa-shadow-sm); */
}
.fa-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
}
.fa-item-icon img {
  width: 40px;
  height: 40px;
  display: block;
  position: absolute;
  inset: 0;
  transition: opacity 0.2s ease;
}
.fa-item-icon .fa-ic-active {
  opacity: 0;
}
.fa-item:hover .fa-item-icon .fa-ic-default,
.fa-item:focus-visible .fa-item-icon .fa-ic-default {
  opacity: 0;
}
.fa-item:hover .fa-item-icon .fa-ic-active,
.fa-item:focus-visible .fa-item-icon .fa-ic-active {
  opacity: 1;
}
.fa-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fa-item-title {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111621;
  line-height: 135%;
}
.fa-item-desc {
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: #4b5563;
  line-height: 135%;
}

/* Lead item (Product Overview / Integrations / All Industries etc.) */
.fa-item.fa-lead {
  border: 1px solid #f2f4f7;
  background: #f6f9fb52;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
}
.fa-item.fa-lead .fa-lead-inner {
  display: flex;
  gap: 13px;
  align-items: center;
}
.fa-item.fa-lead:hover {
  box-shadow: var(--fa-shadow-sm);
  border-color: #d0d5dd;
}
.fa-lead-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--fa-ink-2);
}
.fa-item.fa-lead:hover .fa-lead-arrow {
  color: var(--fa-orange);
}

/* Two-column Solutions grid */
.fa-solutions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.fa-sol-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Right CTA card ---------- */
.fa-cta-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border-radius: 12px;
  padding: 18px;
  min-height: 240px;
  background: linear-gradient(135deg, #111215 40%, #46221b 100%);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  position: relative;
}
.fa-cta-card:hover {
  color: #fff;
}
.fa-cta-card.has-bg {
  background-size: cover;
  background-position: center;
}
.fa-cta-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fa-cta-eyebrow {
  align-self: flex-start;
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  line-height: 120%;
  font-weight: 700;
  letter-spacing: 6%;
  text-transform: uppercase;
  color: var(--fa-orange);
  background: #fcdbd1;
  padding: 5px 11px;
  border-radius: 999px;
}
.fa-cta-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 128%;
  letter-spacing: -1%;
  color: #fff;
}
.fa-cta-desc {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 150%;
  color: #9ca3af;
}
.fa-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 120%;
  color: #ff5722;
}
.fa-cta-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}
.fa-cta-card:hover .fa-cta-link svg {
  transform: translateX(4px);
}

/* ---------- Right side actions ---------- */
.fa-actions {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-shrink: 0;
}
.fa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: none;
}
.fa-btn-outline {
  color: #1d2939;
  border: 1.5px solid #d0d5dd;
  background: #ffffff;
}
.fa-btn-outline:hover {
  color: #ff5c28;
  font-size: 15px;
  line-height: 1;
}
.fa-btn-solid {
  color: #fff;
  background: #ff5c28;
  transition: box-shadow 0.25s ease;
}
.fa-btn-solid:hover {
  color: #fff;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 4px 20px 0 #ff5c2852;
}

/* ---------- Hamburger ---------- */
.fa-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  margin-left: auto;
  position: relative;
}
.fa-burger span {
  position: absolute;
  width: 22px;
  height: 2.5px;
  border-radius: 4px;
  background: var(--fa-orange);
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}
.fa-burger span:nth-child(1) {
  transform: translateY(-7px);
}
.fa-burger span:nth-child(3) {
  transform: translateY(7px);
}
.fa-burger.is-open span:nth-child(1) {
  transform: rotate(45deg);
}
.fa-burger.is-open span:nth-child(2) {
  opacity: 0;
}
.fa-burger.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ==========================================================================
   Tablet landscape / small desktop  (992px – 1199px)
   Full nav + both CTAs need ~1040px inner width; below ~1200px the row
   overflows and the solid button clips. Compress spacing to fit without
   dropping to the hamburger yet.
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199px) {
  .fa-bar-left {
    gap: 24px;
  }
  .fa-nav-list {
    gap: 8px;
  }

  .fa-nav-trigger,
  .fa-nav-trigger:hover {
    padding: 10px 10px;
    font-size: 15px;
  }
  .fa-nav-caret {
    width: 14px;
    height: 14px;
  }

  .fa-actions {
    gap: 10px;
  }

  .fa-btn,
  .fa-btn-outline:hover,
  .fa-btn-solid:hover {
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* ==========================================================================
   Tablet / Mobile  (<= 991px)
   ========================================================================== */
@media (max-width: 991px) {
  .fa-header .fa-container {
    padding: 0 16px;
  }
  .fa-bar {
    min-height: 60px;
  }
  .fa-burger {
    display: flex;
  }
  .fa-bar-left {
    gap: 0;
  }
  .fa-logo {
    margin-right: auto;
  }

  /* Off-canvas panel */
  .fa-menu {
    position: fixed;
    top: var(--fa-header-offset, 60px);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 32px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: block; /* stack nav above actions */
    z-index: 998;
  }
  .fa-menu.is-open {
    transform: translateX(0);
  }

  /* Full-width nav rows, chevron pinned to the far right, uniform height */
  .fa-nav {
    width: 100%;
  }
  .fa-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .fa-nav-item {
    width: 100%;
    border-bottom: 1px solid var(--fa-line);
  }

  .fa-menu .fa-nav-trigger {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
    min-height: 56px; /* same height for Product / Solutions / Resources */
    padding: 0 4px;
    font-size: 17px;
    color: var(--fa-ink);
  }
  .fa-nav-caret {
    width: 18px;
    height: 18px;
  }

  /* Mega becomes an in-flow accordion */
  .fa-mega {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    display: none;
    transition: none;
  }
  .fa-nav-item.is-open > .fa-mega {
    display: block;
  }

  .fa-mega-inner {
    display: block;
    padding: 0 0 14px;
    max-width: none;
  }
  .fa-groups,
  .fa-solutions {
    display: block;
  }
  .fa-sol-col {
    margin-bottom: 8px;
  }
  .fa-col-label {
    margin: 14px 0 6px 12px;
  }

  .fa-item {
    padding: 10px 12px;
  }
  .fa-item-icon,
  .fa-item-icon img {
    width: 34px;
    height: 34px;
  }
  .fa-item-title {
    font-size: 15px;
  }
  .fa-item-desc {
    font-size: 12.5px;
  }
  .fa-item .fa-item-icon .fa-ic-active {
    display: none;
  }

  /* Hide editorial CTA cards on small screens */
  .fa-cta-card {
    display: none;
  }

  /* Action buttons inside the panel, full width */
  .fa-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 4px 0;
    margin-top: 8px;
  }
  .fa-actions .fa-btn {
    width: 100%;
    padding: 13px 18px;
    font-size: 15px;
  }

  .fa-header.menu-open {
    border-bottom-color: var(--fa-line);
  }
  body.fa-no-scroll {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .fa-compliance-text {
    font-size: 13.5px;
  }
  .fa-logo img {
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fa-mega,
  .fa-menu,
  .fa-item,
  .fa-nav-caret,
  .fa-btn,
  .fa-item-icon img {
    transition: none !important;
  }
}
