/* ============================================================
   SAGE-NAV.CSS — Sage Titans v2.1
   Fixes: scroll colour, gap, font, active highlight, dropdown
   corners, logo size, mobile logo, footer colours
   ============================================================ */

/* ── CUSTOM PROPERTIES ── */
:root {
  --nav-height:        76px;
  /* Banner min-height set per-page in critical inline CSS — not here */
  --nav-bg:            rgba(2, 12, 27, 0.0);    /* fully transparent at top */
  --nav-bg-scrolled:   rgba(2, 12, 27, 0.97);   /* solid dark on scroll */
  --nav-border:        rgba(255,255,255,0.10);
  --nav-text:          rgba(255,255,255,0.88);
  --nav-text-hover:    #ffffff;
  --nav-text-active:   #ffffff;                  /* white — NOT blue */
  --nav-cta-bg:        #caef45;
  --nav-cta-color:     #121212;
  --nav-cta-hover:     #b8dc2e;

  --mega-bg:           #ffffff;
  --mega-shadow:       0 24px 60px rgba(2,12,27,0.18), 0 4px 16px rgba(2,12,27,0.08);
  --mega-border:       rgba(0,0,0,0.07);
  --mega-pillar-color: #0d1b6e;
  --mega-link-color:   #1a202c;
  --mega-link-hover:   #207de9;
  --mega-desc-color:   #64748b;
  --mega-feat-bg:      #f0f7ff;
  --mega-feat-border:  #dbeafe;

  --mob-bg:            #020c1b;
  --mob-border:        rgba(255,255,255,0.08);
  --mob-link:          rgba(255,255,255,0.88);
  --mob-link-hover:    #ffffff;
  --mob-heading:       #29abe2;
  --mob-divider:       rgba(255,255,255,0.07);

  --transition-fast:   0.18s ease;
  --transition-med:    0.26s ease;
}

/* ── SCOPED RESETS ── */
.st-nav *, .st-mob * { box-sizing: border-box; margin: 0; padding: 0; }
.st-nav ul, .st-nav li, .st-mob ul, .st-mob li { list-style: none; margin: 0; padding: 0; }
.st-nav button { font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; cursor: pointer; background: none; border: none; outline: none; }

/* ── NAVBAR SHELL ── */
.st-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-med),
              border-color var(--transition-med),
              box-shadow var(--transition-med);
  /* FIX #1: backdrop-filter gives frosted effect before scroll solidifies */
  backdrop-filter: blur(0px);
}

/* scrolled — JS adds this class */
.st-nav.is-scrolled {
  background: var(--nav-bg-scrolled) !important;
  border-bottom-color: var(--nav-border) !important;
  box-shadow: 0 2px 24px rgba(2,12,27,0.35);
  backdrop-filter: none;
}

/* non-hero pages — add st-nav--solid to <nav> element */
.st-nav--solid {
  background: var(--nav-bg-scrolled) !important;
  border-bottom-color: var(--nav-border) !important;
}

/* ── INNER LAYOUT ── */
.st-nav-inner {
  max-width: 1382px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ── BRAND / LOGO ── */
.st-nav-brand { flex-shrink: 0; }

/* FIX #6 + #7: logo correct size, not distorted */
.st-logo { display: inline-flex; align-items: center; }
.st-logo img {
  display: block;
  width: 180px;        /* explicit width prevents distortion */
  height: auto;        /* auto height maintains aspect ratio */
  max-width: 180px;
}

/* ── DESKTOP MENU ── */
.st-nav-menu { flex: 1; display: flex; justify-content: center; }

.st-nav-list {
  display: flex;
  align-items: center;
  gap: 24px;           /* breathing room between nav items */
  height: var(--nav-height);
}

.st-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

/* FIX #3: explicitly set Sora font on all nav links */
/* FIX #4: ALL nav links white — active page gets underline not blue */
.st-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;   /* generous horizontal padding = breathing room between links */
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--nav-text) !important;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
  line-height: 1;
}

/* FIX: hover = colour only, no background box */
.st-nav-link:hover {
  color: var(--nav-text-hover) !important;
  background: none;
  text-decoration: none;
}

/* FIX: active = white, no underline indicator */
.st-nav-link.is-active {
  color: #ffffff !important;
}

/* chevron — always white */
.st-nav-link--has-sub::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 5px;
  margin-left: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='rgba(255,255,255,0.65)'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--transition-fast);
  order: 1;
}

.st-nav-item.is-open .st-nav-link--has-sub::before {
  transform: rotate(180deg);
}

/* ── SIMPLE DROPDOWN ── */
.st-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 180px;
  background: #fff;
  /* FIX #5: correct border-radius — all four corners rounded */
  border-radius: 10px;
  border: 1px solid var(--mega-border);
  box-shadow: 0 12px 36px rgba(2,12,27,0.14);
  padding: 6px;       /* FIX #5: padding so links don't touch edges */
  overflow: hidden;   /* FIX #5: clips any overflow at corners */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 200;
}

.st-nav-item:hover .st-dropdown,
.st-nav-item.is-open .st-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* FIX #5: links inside dropdown — rounded corners per link */
.st-dropdown a {
  display: block;
  padding: 9px 14px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #1a202c;
  text-decoration: none;
  border-radius: 7px;   /* rounded within the padded container */
  transition: color var(--transition-fast), background var(--transition-fast);
}

.st-dropdown a:hover {
  color: var(--mega-link-hover);
  background: #f0f7ff;
}

/* ── MEGA MENU ── */
.st-mega-wrap {
  position: static;
  display: flex;
  align-items: center;
  height: 100%;
}

.st-mega {
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--mega-bg);
  border-top: 1px solid var(--mega-border);
  box-shadow: var(--mega-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition-med), transform var(--transition-med);
  z-index: 999;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.st-nav-item.has-mega:hover .st-mega,
.st-nav-item.has-mega.is-open .st-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.st-mega-inner {
  max-width: 1382px;
  margin: 0 auto;
  padding: 36px 28px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0;
}

/* ── MEGA COLUMN ── */
.st-mega-col {
  padding: 0 28px;
  border-right: 1px solid rgba(0,0,0,0.06);
}
.st-mega-col:first-child { padding-left: 0; }
.st-mega-col:last-child { border-right: none; }

.st-mega-pillar {
  display: block;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mega-pillar-color);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8eaf6;
}

.st-mega-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 10px 0;
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition-fast), padding-left var(--transition-fast);
  margin-bottom: 2px;
}

.st-mega-link:hover {
  background: #f0f7ff;
  padding-left: 10px;
}

.st-mega-link-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #eef4ff;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
  transition: background var(--transition-fast);
}
.st-mega-link:hover .st-mega-link-icon { background: #dbeafe; }

.st-mega-link-icon svg {
  width: 15px; height: 15px;
  color: #207de9;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-mega-link-text { display: flex; flex-direction: column; gap: 2px; }

.st-mega-link-name {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--mega-link-color);
  line-height: 1.3;
  transition: color var(--transition-fast);
}
.st-mega-link:hover .st-mega-link-name { color: var(--mega-link-hover); }

.st-mega-link-desc {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11.5px;
  color: var(--mega-desc-color);
  line-height: 1.4;
  font-weight: 400;
}

/* ── FEATURED CTA PANEL ── */
.st-mega-feat {
  padding: 0 0 0 28px;
  min-width: 210px;
  max-width: 230px;
}

.st-mega-feat-card {
  background: var(--mega-feat-bg);
  border: 1px solid var(--mega-feat-border);
  border-radius: 14px;
  padding: 22px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.st-mega-feat-label {
  display: inline-block;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #207de9;
  margin-bottom: 10px;
}

.st-mega-feat-card h4 {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0a1628;
  line-height: 1.4;
  margin-bottom: 10px;
}

.st-mega-feat-card p {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #516070;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.st-mega-feat-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #121212;
  background: #caef45;
  padding: 9px 16px;
  border-radius: 50px;
  text-decoration: none;
  transition: background var(--transition-fast);
  white-space: nowrap;
}
.st-mega-feat-cta:hover { background: #b8dc2e; color: #121212; text-decoration: none; }
.st-mega-feat-cta svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── OVERLAY ── */
.st-nav-overlay {
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(2,12,27,0.28);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}
.st-nav-overlay.is-visible { opacity: 1; pointer-events: auto; }

/* ── ACTIONS ── */
.st-nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.st-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--nav-cta-color);
  background: var(--nav-cta-bg);
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), transform 0.1s;
}
.st-nav-cta:hover { background: var(--nav-cta-hover); color: var(--nav-cta-color); text-decoration: none; transform: translateY(-1px); }

/* hamburger */
.st-nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: #fff;
}
.st-nav-toggle:hover { background: rgba(255,255,255,0.18); }

/* ── MOBILE DRAWER ── */
.st-mob {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 100vw);
  background: var(--mob-bg);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.st-mob.is-open { transform: translateX(0); }

.st-mob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: var(--nav-height);
  border-bottom: 1px solid var(--mob-border);
  flex-shrink: 0;
}

/* FIX #7: mobile logo — correct size */
.st-mob-logo { display: inline-flex; align-items: center; }
.st-mob-logo img {
  display: block;
  width: 160px;
  height: auto;
  max-width: 160px;
}

.st-mob-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: background var(--transition-fast);
  font-family: inherit;
}
.st-mob-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.st-mob-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 24px;
}
.st-mob-body::-webkit-scrollbar { width: 3px; }
.st-mob-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* accordion item */
.st-acc-item { border-bottom: 1px solid var(--mob-divider); }

.st-acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--mob-link);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition-fast);
}
.st-acc-toggle:hover { color: var(--mob-link-hover); }

.st-acc-toggle::after {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--transition-fast);
}
.st-acc-item.is-open .st-acc-toggle::after { transform: rotate(180deg); }
.st-acc-item.is-open .st-acc-toggle { color: #fff; }

.st-acc-panel { display: none; padding: 0 0 10px; }
.st-acc-item.is-open .st-acc-panel { display: block; }

.st-acc-group { padding: 10px 18px 4px; }

.st-acc-group-heading {
  display: block;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mob-heading);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(41,171,226,0.2);
}

.st-acc-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mob-link);
  text-decoration: none;
  border-bottom: 1px solid var(--mob-divider);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}
.st-acc-panel a:last-child { border-bottom: none; }
.st-acc-panel a:hover { color: var(--mob-link-hover); padding-left: 5px; }

.st-acc-panel a::before {
  content: "";
  flex-shrink: 0;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #29abe2;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}
.st-acc-panel a:hover::before { opacity: 1; }

.st-acc-link { border-bottom: 1px solid var(--mob-divider); }
.st-acc-link a {
  display: block;
  padding: 15px 18px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--mob-link);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.st-acc-link a:hover { color: var(--mob-link-hover); background: rgba(255,255,255,0.04); }

.st-mob-cta {
  flex-shrink: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--mob-border);
  background: rgba(0,0,0,0.25);
}
.st-mob-cta a {
  display: block;
  text-align: center;
  padding: 13px 20px;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--nav-cta-color);
  background: var(--nav-cta-bg);
  border-radius: 50px;
  text-decoration: none;
  transition: background var(--transition-fast);
}
.st-mob-cta a:hover { background: var(--nav-cta-hover); color: var(--nav-cta-color); text-decoration: none; }

/* mobile backdrop */
.st-mob-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,12,27,0.55);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
  backdrop-filter: blur(2px);
}
.st-mob-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ── RESPONSIVE ── */
@media (min-width: 1024px) {
  .st-nav-toggle { display: none !important; }
  .st-nav-menu   { display: flex !important; }
}

@media (max-width: 1023px) {
  .st-nav-menu   { display: none !important; }
  .st-nav-toggle { display: flex !important; }
  .st-nav-cta    { display: none !important; }
  .st-nav-inner  { padding: 0 16px; }
  .st-logo img   { width: 200px; }
}

@media (max-width: 480px) {
  .st-logo img     { width: 170px; }
  .st-mob-logo img { width: 150px; }
}

/* ── FOCUS VISIBLE ── */
.st-nav-link:focus-visible,
.st-nav-cta:focus-visible,
.st-nav-toggle:focus-visible,
.st-mega-link:focus-visible,
.st-mega-feat-cta:focus-visible,
.st-acc-toggle:focus-visible,
.st-acc-panel a:focus-visible,
.st-mob-close:focus-visible {
  outline: 2px solid #29abe2;
  outline-offset: 2px;
}

/* ── PAGE BODY OFFSET ── */
body { padding-top: var(--nav-height); }

.inner-p-banner,
.hero-banner,
.seo-hero,
.cr-hero {
  margin-top: calc(-1 * var(--nav-height));
}

/* .seo-hero and .cr-hero manage their own padding-top in critical inline CSS
   so only margin-top is applied here — no padding-top override */
.inner-p-banner,
.hero-banner {
  padding-top: calc(var(--nav-height) + 60px);
}

/* Banner min-height is set per-page in critical inline CSS.
   sage-nav.css does NOT set min-height — external CSS loads after inline
   and would override the critical CSS value, causing CLS. */


/* ── FOOTER CTA CARD (5th column) ── */
.f-cta-box {
  max-width: 220px;
}

.footer-cta-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.footer-cta-label {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #29abe2;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer-cta-card h3 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.35;
  margin: 0 !important;
  min-height: auto !important;
  margin-bottom: 0 !important;
}

.footer-cta-card p {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer-cta-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 16px;
  background: #caef45;
  color: #121212 !important;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none !important;
  text-align: center;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: background 0.18s ease;
  line-height: 1;
}

.footer-cta-btn:hover {
  background: #b8dc2e;
  color: #121212 !important;
  text-decoration: none !important;
}

@media (max-width: 767px) {
  .f-cta-box { max-width: 100%; }
  .footer-cta-card { padding: 20px 16px; }
}
