/* ==========================================================
   CrestedServe — premium.css
   Loaded LAST on every page. Provides:
   1. Brand colour system (navy + gold from the logo)
   2. Premium header + mobile menu
   3. Mobile-friendliness / no horizontal white space
   ========================================================== */

/* ---------- 1. BRAND TOKENS ---------- */
:root{
  --navy:#0a0a8a;
  --navy-deep:#05055e;
  --navy-ink:#0a0a70;
  --gold:#d09810;
  --gold-2:#eab52e;

  /* text system: no black anywhere, readable navy instead */
  --text:#0a0a70;
  --muted:#3a3a86;
  --muted2:#6a6aa6;

  --primary:#0a0a8a;
  --primary2:#2323b0;
  --border:rgba(10,10,138,0.12);
  --border2:rgba(10,10,138,0.24);
  --accent:#ff6b1a;
  --accent2:#e55a0a;
}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{color:var(--navy-ink);}

/* headings & strong text in brand navy */
h1,h2,h3,h4,h5,h6{color:var(--navy-ink);}
strong,b{color:inherit;}
p,li{color:var(--muted);}
footer h4,footer p,footer li{color:inherit;}

/* inline near-black overrides found in testimonials etc. */
[style*="color:#111"],[style*="color: #111"],[style*="color:#222"],[style*="color: #222"],
[style*="color:#111827"]{color:var(--navy-ink)!important;}

/* gold accent for eyebrow tags / small labels */
.sec-tag,.tag-line,.eyebrow,.section-tag,.who-label{color:var(--gold)!important;}
.sec-tag{border-color:rgba(208,152,16,0.45)!important;background:rgba(208,152,16,0.10)!important;font-weight:700!important;}
.hero .sec-tag{color:var(--gold-2)!important;background:rgba(255,255,255,0.10)!important;border-color:rgba(234,181,46,0.55)!important;}

/* (hero styling lives in section 4 below) */

/* footer: brand navy, bright readable text */
footer{background:linear-gradient(180deg,var(--navy) 0%,var(--navy-deep) 100%)!important;}
footer .footer-desc,footer .footer-col a,footer .footer-bottom,footer .footer-bottom a,footer .footer-social{color:rgba(255,255,255,0.80)!important;}
footer .footer-col h4,footer .footer-brand{color:#fff!important;}
footer .footer-col a:hover,footer .footer-bottom a:hover,footer .footer-social:hover{color:var(--gold-2)!important;}

/* ---------- 2. PREMIUM HEADER ---------- */
.nav-wrap{
  background:rgba(255,255,255,0.97)!important;
  backdrop-filter:saturate(180%) blur(18px);
  -webkit-backdrop-filter:saturate(180%) blur(18px);
  border-bottom:none!important;
  box-shadow:0 6px 28px rgba(10,10,138,0.10),0 1px 0 rgba(10,10,138,0.08);
  padding-top:env(safe-area-inset-top,0px);
}
/* signature brand strip on top */
.nav-wrap::before{
  content:"";display:block;height:4px;
  background:linear-gradient(90deg,var(--navy-deep) 0%,var(--navy) 38%,var(--gold) 72%,var(--gold-2) 100%);
}
.nav-wrap.scrolled{box-shadow:0 10px 34px rgba(10,10,138,0.16),0 1px 0 rgba(10,10,138,0.10);}
.nav-inner,.nav-inner.container{
  height:80px!important;max-width:1440px;margin:0 auto!important;
  padding:0 clamp(16px,3vw,40px)!important;gap:8px;
}
.nav-wrap.scrolled .nav-inner{height:68px!important;}
.nav-inner{transition:height .25s ease;}
.brand{margin-right:12px;}
.brand img{height:54px!important;margin-left:0!important;transition:height .25s ease,transform .25s ease;}
.nav-wrap.scrolled .brand img{height:46px!important;}
.brand:hover img{transform:scale(1.03);}

nav ul.nav-links{gap:8px;align-items:center;}
nav ul.nav-links>li>a{
  font-size:0.9rem!important;font-weight:600!important;letter-spacing:.01em;
  color:var(--navy-ink)!important;background:#fff;
  padding:10px 16px!important;min-height:42px!important;
  border:1.5px solid rgba(10,10,138,0.24)!important;border-radius:8px!important;
  box-shadow:0 2px 6px rgba(10,10,138,0.07);
  transition:color .2s,background .2s,border-color .2s,box-shadow .2s,transform .2s;
}
nav ul.nav-links>li>a .underline{display:none!important;}
nav ul.nav-links>li>a:hover{
  color:#fff!important;background:var(--navy)!important;border-color:var(--navy)!important;
  box-shadow:0 8px 18px rgba(10,10,138,0.28),inset 0 -3px 0 var(--gold);transform:translateY(-2px);
}
nav ul.nav-links>li>a.active{
  color:#fff!important;font-weight:700!important;background:linear-gradient(180deg,var(--navy) 0%,var(--navy-deep) 100%)!important;
  border-color:var(--navy-deep)!important;box-shadow:0 6px 16px rgba(10,10,138,0.30),inset 0 -3px 0 var(--gold);
}
nav ul.nav-links>li>a:hover .chev,nav ul.nav-links>li>a.active .chev{border-top-color:var(--gold-2)!important;}
.chev{opacity:1!important;border-top-color:var(--gold)!important;}
@media(max-width:1560px){nav ul.nav-links{gap:5px;}nav ul.nav-links>li>a{padding:9px 11px!important;font-size:.85rem!important;}.nav-cta{margin-left:8px!important;}.nav-cta .btn{padding:11px 18px!important;font-size:.85rem!important;}.brand img{height:48px!important;}.brand{margin-right:4px;}}
@media(max-width:1400px){nav ul.nav-links{gap:4px;}nav ul.nav-links>li>a{padding:8px 9px!important;font-size:.82rem!important;}.nav-cta .btn{padding:10px 14px!important;}}

/* CTA button */
.nav-cta{margin-left:14px!important;}
.nav-cta .btn{
  background:linear-gradient(135deg,#ff7a1f 0%,#ff5a14 100%)!important;
  color:#fff!important;padding:12px 26px!important;font-weight:700;letter-spacing:.01em;
  box-shadow:0 8px 20px rgba(255,90,20,0.34);
  border:1px solid rgba(255,255,255,0.25);
}
.nav-cta .btn::after{content:"\2192";font-weight:700;transition:transform .2s;}
.nav-cta .btn:hover{transform:translateY(-1px);box-shadow:0 12px 26px rgba(255,90,20,0.42);}
.nav-cta .btn:hover::after{transform:translateX(3px);}

/* NEW badge */
nav ul.nav-links a span[style*="background:var(--accent)"]{
  background:linear-gradient(135deg,var(--gold),var(--gold-2))!important;color:var(--navy-deep)!important;
}

/* mega menu */
.mega-panel{
  border:1px solid rgba(10,10,138,0.12)!important;border-radius:18px!important;width:min(720px,94vw)!important;
  box-shadow:0 24px 60px rgba(10,10,138,0.22)!important;top:calc(100% + 6px)!important;
}
.mega-header{background:linear-gradient(135deg,var(--navy-deep),var(--navy))!important;border-bottom:3px solid var(--gold)!important;}
.mega-col-header{color:var(--gold-2)!important;font-size:.72rem!important;padding:14px 16px 12px!important;border-right:1px solid rgba(255,255,255,0.12)!important;}
.mega-item{color:var(--navy-ink)!important;font-size:.85rem!important;font-weight:500;padding:8px 10px!important;}
.mega-item:hover{color:var(--navy)!important;background:rgba(208,152,16,0.14)!important;}
.mega-item .dot{background:var(--gold)!important;}
.mega-footer{background:#fffaf0!important;}
.mega-footer-note{color:var(--muted2)!important;}
.mega-footer-link{color:var(--navy)!important;}

/* hamburger */
.hamburger{
  border:1.5px solid var(--navy)!important;background:#fff!important;border-radius:12px!important;
  width:46px!important;height:46px!important;box-shadow:0 4px 12px rgba(10,10,138,0.14);
}
.hamburger span{background:var(--navy)!important;height:2px!important;width:21px!important;}
.hamburger.open{background:var(--navy)!important;}
.hamburger.open span{background:#fff!important;}

/* ---------- mobile menu ---------- */
.mobile-panel{
  top:calc(84px + env(safe-area-inset-top,0px))!important;
  background:linear-gradient(180deg,#fff 0%,#f2f2ff 100%)!important;
  border-top:3px solid var(--gold)!important;
  padding:12px 0 calc(40px + env(safe-area-inset-bottom,0px))!important;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  max-width:100vw;
}
.mobile-links a,.m-link{
  color:var(--navy-ink)!important;font-weight:600!important;font-size:1.02rem!important;
  padding:14px 14px!important;border-radius:12px;
  display:flex!important;align-items:center;justify-content:space-between;gap:10px;
}
.mobile-links a:hover,.mobile-links a.active{color:var(--navy)!important;background:rgba(10,10,138,0.07)!important;}
.mobile-links a.active{box-shadow:inset 3px 0 0 var(--gold);}
.m-acc{padding:0 16px;}
.m-acc-btn{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  padding:14px 14px;font-size:1.02rem;font-weight:600;color:var(--navy-ink);
  border-radius:12px;background:transparent;text-align:left;font-family:inherit;
}
.m-acc-btn:hover{background:rgba(10,10,138,0.06);}
.m-acc-btn .m-chev{width:9px;height:9px;border-right:2px solid var(--gold);border-bottom:2px solid var(--gold);transform:rotate(45deg);transition:transform .25s;margin-right:4px;}
.m-acc.open>.m-acc-btn .m-chev{transform:rotate(-135deg);}
.m-acc-body{display:none;padding:2px 0 8px 6px;}
.m-acc.open>.m-acc-body{display:block;}
.m-group{margin:4px 0 8px;border-left:2px solid rgba(208,152,16,0.55);padding-left:10px;}
.m-group-title{font-size:.72rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);padding:10px 8px 4px;}
.m-group a{display:block;padding:9px 8px;font-size:.92rem;font-weight:500;color:var(--navy-ink);border-radius:8px;line-height:1.35;}
.m-group a:hover{background:rgba(208,152,16,0.14);}
.mobile-cta{padding:18px 16px 0!important;}
.mobile-cta .btn{
  width:100%;justify-content:center;padding:15px 22px!important;font-size:1rem!important;
  background:linear-gradient(135deg,#ff7a1f,#ff5a14)!important;color:#fff!important;box-shadow:0 10px 22px rgba(255,90,20,0.32);
}

@media(max-width:1340px){
  nav{display:none!important;}.nav-cta{display:none!important;}.hamburger{display:flex!important;}
  .nav-inner,.nav-inner.container{height:68px!important;}
  .brand img{height:44px!important;}
  .nav-wrap.scrolled .nav-inner{height:62px!important;}
  .nav-wrap.scrolled .brand img{height:40px!important;}
  .mobile-panel{top:calc(72px + env(safe-area-inset-top,0px))!important;}
}
@media(max-width:380px){
  .brand img{height:38px!important;}
  .nav-inner,.nav-inner.container{padding:0 12px!important;}
}

/* ---------- 3. MOBILE FRIENDLINESS / NO RIGHT-SIDE WHITE SPACE ---------- */
html,body{max-width:100%;overflow-x:hidden;}
@supports(overflow:clip){html,body{overflow-x:clip;}}
body{position:relative;width:100%;min-width:0;}

/* anything that decorates beyond the edge must not widen the page */
section,.services,.cases,.blog,.cta-section,footer,.hero,header,main,
[class*="-section"],[class*="section-"],[class$="-wrap"],[class$="-band"]{max-width:100%;}
section,.services,.cases,.blog,.cta-section,[class*="-section"]{overflow-x:clip;}

img,video,iframe,svg,canvas,table{max-width:100%;}
img{height:auto;}
.slide-image-wrap img,.intro-img-box img{height:auto;}

/* grid / flex children may shrink (fixes content blowing the grid wider than the screen) */
[class*="grid"]>*,[class*="-row"]>*,[class*="-cols"]>*,[class*="wrap"]>*,
.container>*,.hero-content,.slide-inner>*{min-width:0;}
h1,h2,h3,h4,p,li,a,span{overflow-wrap:break-word;word-wrap:break-word;}

@media(max-width:768px){
  .container{width:min(100% - 32px,1160px)!important;}
  [class*="grid"]{grid-template-columns:minmax(0,1fr)!important;}
  .intro-grid,.lead-grid,.contact-grid{grid-template-columns:minmax(0,1fr)!important;}

  /* hero: readable + fits the screen */
  .hero{min-height:auto!important;height:auto!important;}
  .hero-content{padding:22px 18px 28px!important;}
  .hero-content h1{font-size:clamp(1.55rem,6.4vw,2.1rem)!important;line-height:1.18;}
  .hero-content .slide-sub{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:.9rem!important;line-height:1.45;}
  .hero-content>p:not(.slide-sub){-webkit-line-clamp:unset!important;display:block!important;overflow:visible!important;font-size:1rem!important;}
  .hero-actions{gap:10px!important;}
  .hero-actions .btn{padding:13px 22px!important;flex:1 1 140px;justify-content:center;}
  .slide-image-wrap{height:auto!important;max-height:none!important;padding:0!important;border-radius:0 0 22px 22px!important;}
  .slide-image-wrap img{width:100%;height:auto!important;object-fit:cover;}
  .hero{padding-top:72px;}
  .slider-dots{bottom:14px!important;}
  .nav-btn{top:auto!important;bottom:4px!important;transform:none!important;font-size:18px!important;padding:6px 11px!important;background:rgba(10,10,138,0.85)!important;}
  .prev{left:14px!important;}.next{right:14px!important;}
  .hero-content{padding-bottom:52px!important;}

  /* floating badges that sat outside the viewport */
  [class*="badge"],[class*="float"]{max-width:calc(100% - 16px);}
  [style*="right:-"],[style*="left:-"]{right:0!important;left:auto!important;}

  /* wide things scroll inside themselves, never the page */
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  pre,code{white-space:pre-wrap;word-break:break-word;}

  .btn{white-space:normal;text-align:center;}
  footer .footer-top{grid-template-columns:minmax(0,1fr)!important;gap:28px!important;}
  footer .footer-bottom{flex-direction:column;text-align:center;}
}
@media(max-width:480px){
  .testi-tile{min-width:min(280px,82vw)!important;}
  body{font-size:15.5px;}
}
@media(hover:none){.brand:hover img{transform:none;}}


/* ---------- 4. LIGHT HEROES (no blue backgrounds) ---------- */
/* Inner pages */
.page-hero,.page-banner,.p-hero,
body:not(.is-home) .hero{
  background:
    radial-gradient(ellipse at 88% 18%,rgba(234,181,46,0.22) 0%,transparent 52%),
    radial-gradient(ellipse at 8% 100%,rgba(10,10,138,0.07) 0%,transparent 50%),
    linear-gradient(135deg,#ffffff 0%,#f3f4ff 58%,#fff7df 100%)!important;
  border-bottom:4px solid var(--gold);
}
.page-hero::before,.page-banner::before,body:not(.is-home) .hero::before{
  background:radial-gradient(ellipse at 85% 30%,rgba(234,181,46,0.18) 0%,transparent 55%)!important;
}
.page-hero::after,.page-banner::after,.p-hero::after,body:not(.is-home) .hero::after{
  border-color:rgba(10,10,138,0.10)!important;
}
.hero-grid-overlay{background-image:linear-gradient(rgba(10,10,138,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(10,10,138,0.05) 1px,transparent 1px)!important;}

/* text inside inner heroes */
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(h1,h2,h3,h4,h5){color:var(--navy-ink)!important;text-shadow:none!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(p,li,small,label){color:var(--muted)!important;font-weight:400!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(h1 span,h1 em,h1 .accent,h2 span,h2 em){color:var(--gold)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.hero-badge,.hero-tag,.sec-tag,.fp-eyebrow){
  color:var(--navy)!important;background:#fff!important;border:1.5px solid rgba(10,10,138,0.25)!important;
  box-shadow:0 2px 8px rgba(10,10,138,0.08);
}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.hero-badge,.hero-tag)::before{background:var(--gold)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.hs-n,.metric-val,.hero-stat strong,.stat-n,.stat-num,.hs-num){color:var(--accent)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.hs-l,.metric-lbl,.stat-l,.stat-lbl){color:var(--muted)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.hero-stat,.metric-box){border-color:rgba(10,10,138,0.14)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .hero-metrics{background:rgba(10,10,138,0.08)!important;border-color:rgba(10,10,138,0.12)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .metric-box{background:#fff!important;}
.p-hero-card{background:#fff!important;border:1.5px solid rgba(10,10,138,0.16)!important;box-shadow:0 14px 34px rgba(10,10,138,0.10);}
.p-hero-card *{color:var(--navy-ink)!important;}
.breadcrumb,.breadcrumb a,.breadcrumb span{color:var(--muted)!important;opacity:1!important;}
.breadcrumb a:hover{color:var(--navy)!important;}
.breadcrumb span:last-child{color:var(--gold)!important;font-weight:600;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-outline,
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-ghost{
  color:var(--navy)!important;border:1.5px solid var(--navy)!important;background:#fff!important;
}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) :is(.btn-outline,.btn-ghost):hover{background:var(--navy)!important;color:#fff!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-orange,
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-primary{color:#fff!important;}

/* Home hero slider: background photo stays fully visible */
.is-home .hero{background-color:#05055e;}
.is-home .hero-overlay{
  background:linear-gradient(180deg,rgba(255,255,255,0.06) 0%,rgba(255,255,255,0) 40%,rgba(5,5,94,0.10) 100%)!important;
}
.is-home .hero-content{
  background:rgba(255,255,255,0.90);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,0.7);
  border-top:4px solid var(--gold);
  border-radius:22px;
  padding:34px 38px!important;
  box-shadow:0 22px 60px rgba(5,5,94,0.35);
}
.is-home .hero-content h1{color:var(--navy-ink)!important;text-shadow:none!important;}
.is-home .hero-content .slide-sub{color:#a87400!important;}
.is-home .hero-content p{color:var(--muted)!important;}
@media(min-width:769px){
  .is-home .hero-content h1{font-size:clamp(1.9rem,3.3vw,3.1rem)!important;}
}
@media(max-width:768px){
  .is-home .hero-content{margin:16px 14px 0!important;padding:22px 18px 56px!important;border-radius:18px;}
}
.is-home .hero-actions .btn-outline{color:var(--navy)!important;border-color:var(--navy)!important;background:#fff!important;}
.is-home .hero-actions .btn-outline:hover{background:var(--navy)!important;color:#fff!important;}
.is-home .slide-image-wrap{box-shadow:0 18px 50px rgba(10,10,138,0.20)!important;border:1px solid rgba(10,10,138,0.10);}
.is-home .dot{background:rgba(255,255,255,0.75)!important;box-shadow:0 0 0 1px rgba(10,10,138,0.35);}
.is-home .dot.active{background:var(--gold)!important;}
.nav-btn{background:var(--navy)!important;color:#fff!important;box-shadow:0 6px 16px rgba(10,10,138,0.30);}
.nav-btn:hover{background:var(--navy-deep)!important;}
.dot.active{background:var(--gold)!important;}

/* hero buttons that were designed for dark backgrounds */
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-white{
  background:linear-gradient(135deg,#ff7a1f,#ff5a14)!important;color:#fff!important;border:none!important;
  box-shadow:0 8px 20px rgba(255,90,20,0.30);
}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-ghost-w{
  color:var(--navy)!important;background:#fff!important;border:1.5px solid var(--navy)!important;
}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .btn-ghost-w:hover{background:var(--navy)!important;color:#fff!important;}

/* Learning Solutions hero stats + any other white-on-dark leftovers inside heroes */
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .hs-num{color:var(--navy)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .hs-num em{color:var(--accent)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .hs-lbl{color:var(--muted)!important;font-weight:500;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .sec-title{color:var(--navy-ink)!important;}
:is(.page-hero,.page-banner,.p-hero,body:not(.is-home) .hero) .sec-sub{color:var(--muted)!important;}
.p-stats{border-top-color:rgba(10,10,138,0.16)!important;}
.p-stats div{border-right-color:rgba(10,10,138,0.16)!important;}
.p-stats strong{color:var(--navy)!important;}
.p-stats span{color:var(--muted)!important;font-weight:500;}
