/* Final UI bug-fix layer: behavior states, mobile polish, and render fallbacks */
.dropdown:not(.open):hover .dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown.open .chev {
  transform: rotate(180deg);
}

.drop-label {
  cursor: pointer;
}

.site-header > .cta-btn {
  border: 1.5px solid var(--navy);
  box-shadow: 0 14px 28px -22px rgba(15,31,61,.55);
}

.site-header > .cta-btn:hover {
  background: #1e3a5f;
  border-color: #1e3a5f;
  transform: translateY(-1px);
}

.premium-hub.logo-hub {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.premium-hub.logo-hub img {
  width: 118px !important;
  height: 118px !important;
  max-width: 118px !important;
  max-height: 118px !important;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(15,31,61,.16));
}

/* Platform page: restore visible white circle around logo hub */
.platform-hero .premium-hub.logo-hub {
  background: #fff !important;
  border: 2px solid #dbeafe !important;
  box-shadow: 0 8px 32px -12px rgba(37,99,235,.22), 0 0 0 10px rgba(219,234,254,.35) !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* "Unified Infrastructure" text sits INSIDE the circle — no line collision */
.platform-hero .premium-hub.logo-hub small {
  display: block !important;
  position: static !important;
  white-space: normal;
  text-align: center;
  max-width: 80px;
  color: #1d4ed8;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 4px;
}

.platform-hero .premium-hub.logo-hub img {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  filter: none;
}

/* Home page orbit text hub */
.hero-text-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  width: 168px;
  height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border: 2px solid #dbeafe;
  border-radius: 50%;
  box-shadow: 0 8px 32px -12px rgba(37,99,235,.22), 0 0 0 10px rgba(219,234,254,.35);
  padding: 16px;
}

.hero-text-hub strong {
  display: block;
  color: #0f1f3d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-text-hub span {
  display: block;
  color: #2563eb;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .hero-text-hub {
    width: 120px;
    height: 120px;
    padding: 10px;
  }
  .hero-text-hub strong { font-size: 10px; }
  .hero-text-hub span { font-size: 8px; }
}

/* Hero logo ring — replaces transparent hub on home page */
.hero-logo-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
}

@media (max-width: 640px) {
  .hero-logo-ring {
    width: 110px;
    height: 110px;
  }
  .hero-logo-ring img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
  }
}

.platform-hero .premium-hub.logo-hub {
  z-index: 6;
}

.premium-orbit svg.orbit-lines {
  z-index: 1;
}

.premium-orbit-card {
  z-index: 5;
}

.eyebrow {
  color: #1d4ed8;
  font-weight: 900;
}

.eyebrow.green {
  color: #0f766e;
}

.learn,
.text-link,
.resource-card a {
  text-underline-offset: 4px;
}

.learn:hover,
.text-link:hover,
.resource-card a:hover {
  text-decoration: underline;
}

.metric-header em,
.percentage {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534 !important;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.metric-header em.blue,
.percentage.blue {
  background: #dbeafe;
  color: #1d4ed8 !important;
}

.blueprint-flow .side strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.blueprint-flow .before strong {
  background: #fee2e2;
  color: #991b1b;
}

.blueprint-flow .after strong {
  background: #dcfce7;
  color: #166534;
}

.blueprint-flow .flow-arrow {
  color: transparent;
  font-size: 0;
}

.blueprint-flow .flow-arrow::before {
  content: "\2192";
  color: #047857;
  font-size: 24px;
  font-weight: 900;
}

.flow-arrows span {
  color: transparent;
  font-size: 0;
}

.flow-arrows span::before {
  content: "\2193";
  color: #2563eb;
  font-size: 22px;
  font-weight: 900;
}

.platform-bar {
  background: linear-gradient(135deg, #1744d8, #2563eb);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px -32px rgba(37,99,235,.62);
}

.platform-bar-title {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  min-height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
}

.systems-row {
  padding: 14px;
  border-radius: 14px;
  background: #f1f5f9;
}

.outcomes-row {
  padding: 14px;
  border-radius: 14px;
  background: #ecfdf5;
}

.platform-compare {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-premium);
}

.platform-compare th,
.platform-compare td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
}

.platform-compare th {
  color: #fff;
  font-weight: 900;
}

.platform-compare th:first-child {
  background: #475569;
}

.platform-compare th:last-child {
  background: var(--blue);
}

.platform-compare tr:nth-child(odd) td {
  background: #f8fbff;
}

.platform-compare td:first-child::before {
  content: "\2715";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
}

.platform-compare td:last-child::before {
  content: "\2713";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.portal,
.micro-ui {
  position: relative;
  border: 1px solid #cfe0ff;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px -38px rgba(15,31,61,.5);
}

.portal::before,
.micro-ui::before {
  content: "";
  display: block;
  height: 14px;
  background: linear-gradient(90deg, #0f1f3d, #2563eb);
}

.value-card:nth-child(1) { background: #f0fdfa; border-color: #ccfbf1; }
.value-card:nth-child(2) { background: #eff6ff; border-color: #bfdbfe; }
.value-card:nth-child(3) { background: #f5f3ff; border-color: #ddd6fe; }
.value-card:nth-child(4) { background: #f8fafc; border-color: #cbd5e1; }
.value-card:nth-child(5) { background: #fff7ed; border-color: #fed7aa; }

.trust-mini span,
.platform-trust-item,
.trust-chip {
  border: 1px solid rgba(191,219,254,.85);
  border-radius: 999px;
  background: rgba(239,246,255,.78);
  box-shadow: 0 18px 34px -28px rgba(15,31,61,.45);
}

.platform-trust-item {
  border-radius: 18px;
}

.contact-card {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.calendly-inline-widget {
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.calendly-inline-widget iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.contact-fallback {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #f8fbff;
}

.contact-fallback h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.contact-fallback p,
.contact-fallback a {
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.contact-fallback a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-pills button {
  cursor: pointer;
}

.filter-pills button.active,
.filter-pills button[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 12px 24px -18px rgba(37,99,235,.7);
}

.mobile-sticky-cta {
  display: none;
}

.site-footer .dropdown {
  display: contents;
}

.site-footer .drop-label {
  display: none;
}

.site-footer .dropdown-menu {
  position: static;
  min-width: 0;
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.site-footer .dropdown-menu a {
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.site-footer .dropdown-menu a::before {
  display: none;
}

.site-footer .footer-grid p:first-of-type {
  color: #dbeafe;
  font-weight: 750;
}

.site-footer .footer-grid p {
  word-break: break-word;
}

.site-footer .footer-grid p:has(+ p),
.site-footer .footer-grid p:last-child {
  border-radius: 8px;
}

.journey-line {
  position: relative;
}

.journey-line::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #bfdbfe, #2563eb, #bfdbfe);
  opacity: .9;
}

.journey-line > div {
  position: relative;
  padding-left: 74px !important;
}

.journey-line > div::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2563eb;
  box-shadow: 0 0 0 8px #eff6ff;
}

.journey-line > div::after {
  content: attr(data-step);
  position: absolute;
  left: 10px;
  top: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.journey-line > div:nth-child(1)::after { content: "01"; }
.journey-line > div:nth-child(2)::after { content: "02"; }
.journey-line > div:nth-child(3)::after { content: "03"; }
.journey-line > div:nth-child(4)::after { content: "04"; }
.journey-line > div:nth-child(5)::after { content: "05"; }

.journey-line > div > .icon {
  margin-left: 0;
}

@media (max-width: 1080px) {
  .dropdown:hover .dropdown-menu,
  .dropdown:not(.open):hover .dropdown-menu {
    transform: none;
  }
}

.mobile-nav-cta {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-nav-cta {
    display: flex !important;
    margin: 12px 8px 4px;
    justify-content: center;
    text-align: center;
    background: var(--blue) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 14px -4px rgba(37,99,235,.5) !important;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav {
    top: 68px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 86px);
  }

  /* Dropdowns closed by default on mobile — only open when .open is set by JS */
  .dropdown .dropdown-menu {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transition: max-height .3s ease, opacity .25s ease, padding .25s ease, margin .25s ease;
  }

  .dropdown.open .dropdown-menu,
  .about-dropdown.open .dropdown-menu {
    max-height: 600px;
    margin: 8px 0 0;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
  }

  /* Chevron only rotated when dropdown is open */
  .dropdown .chev {
    transform: rotate(0deg);
    transition: transform .28s ease;
  }

  .dropdown.open .chev {
    transform: rotate(180deg);
  }

  .grid.three,
  .featured-grid,
  .caps-grid-premium,
  .module-grid {
    grid-template-columns: 1fr !important;
  }

  .platform-compare,
  .platform-compare thead,
  .platform-compare tbody,
  .platform-compare tr,
  .platform-compare th,
  .platform-compare td {
    display: block;
  }

  .platform-compare thead {
    display: none;
  }

  .platform-compare tr {
    border-bottom: 1px solid var(--line);
  }

  .platform-compare tr:last-child {
    border-bottom: 0;
  }

  .platform-compare td {
    padding: 14px 16px;
  }

  .platform-compare td:first-child {
    background: #f8fafc !important;
    border-bottom: 1px dashed #cbd5e1;
  }

  .platform-compare td:last-child {
    background: #eff6ff !important;
  }

  .mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 650;
    display: flex;
    justify-content: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    border-top: 1px solid #dbeafe;
    box-shadow: 0 -20px 44px -34px rgba(15,31,61,.5);
    transform: translateY(110%);
    transition: transform .28s ease;
  }

  body.show-sticky-cta .mobile-sticky-cta {
    transform: translateY(0);
  }

  .mobile-sticky-cta .cta-btn {
    width: min(100%, 420px);
  }

  .premium-hub.logo-hub {
    width: 92px !important;
    height: 92px !important;
  }

  .premium-hub.logo-hub img {
    width: 92px !important;
    height: 92px !important;
    max-width: 92px !important;
    max-height: 92px !important;
  }

  .platform-hero .premium-hub.logo-hub img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
  }

  .platform-hero .premium-hub.logo-hub small {
    font-size: 9px;
  }

  .platform-hero .premium-hub.logo-hub {
    width: 104px !important;
    height: 104px !important;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding-bottom: 96px;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }

  .journey-line::before {
    left: 28px;
  }

  .footer-grid h4 {
    margin-bottom: 10px;
  }

  .contact-card {
    border-radius: 16px;
  }

  .platform-hero .premium-hub.logo-hub img {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }

  .platform-hero .premium-hub.logo-hub small {
    font-size: 8px;
    margin-top: 3px;
  }
}
