/* ================================
   SAVVY GLOBAL HEADER + FOOTER CSS
   ================================ */

:root{
  --deep-navy:#001d3d;
  --navy:#002855;
  --bright-cyan:#00D4FF;
  --cyan:#00A8E8;
  --white:#ffffff;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:'Sora',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--white);
  background:var(--deep-navy);
}

html{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-text-size-adjust:100%;
}

/* ============================
   NAV
   ============================ */

nav{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9000;
  padding:1.8rem 4rem;
  background:transparent;
  transition:background .3s ease, box-shadow .3s ease, padding .3s ease;
  width:100%;
}

.nav-container{
  max-width:1800px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:2rem;
}

.nav-logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  margin-right:auto;
}

.nav-logo img{
  height:50px;
  width:auto;
  display:block;
}

.nav-links{
  list-style:none;
  display:flex;
  align-items:center;
  gap:2.6rem;
}

.nav-links li{
  position:relative;
}

.nav-links a{
  position:relative;
  text-decoration:none;
  color:var(--white);
  font-size:0.98rem;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  padding-bottom:4px;
  transition:color .2s ease;
}

.nav-links a::before{
  content:'';
  position:absolute;
  left:0;
  bottom:-4px;
  width:0;
  height:2px;
  border-radius:999px;
  background:var(--bright-cyan);
  transition:width .22s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before{
  width:100%;
}

.nav-cta{
  padding:0.4rem 0.9rem;
  border-radius:999px;
  border:1px solid rgba(0,212,255,.6);
  background:rgba(0,212,255,.12);
}

.nav-cta:hover{
  background:var(--bright-cyan);
  color:var(--navy);
}

.nav-search{
  background:none;
  border:none;
  color:var(--white);
  font-size:1.2rem;
  cursor:pointer;
  margin-left:2rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  -webkit-user-select:none;
  user-select:none;
}

.mobile-menu-btn{
  background:none;
  border:none;
  color:var(--white);
  font-size:1.6rem;
  cursor:pointer;
  margin-left:1rem;
  display:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

nav.scrolled{
  background:#ffffff;
  box-shadow:0 4px 30px rgba(0,0,0,.12);
  padding:1.2rem 4rem;
}

nav.scrolled .nav-links a{
  color:var(--navy);
}

nav.scrolled .nav-links a::before{
  background:var(--navy);
}

nav.scrolled .nav-cta{
  border-color:var(--navy);
  background:rgba(0,40,85,.05);
  color:var(--navy);
}

nav.scrolled .nav-cta:hover{
  background:var(--navy);
  color:#ffffff;
}

nav.scrolled .nav-search,
nav.scrolled .mobile-menu-btn{
  color:var(--navy);
}

nav.scrolled .nav-links .dropdown{
  background:rgba(0,11,35,.97);
  border-color:rgba(0,212,255,.18);
}

nav.scrolled .nav-links .dropdown a{
  color:rgba(255,255,255,.86);
}

/* DESKTOP DROPDOWN */

.nav-links > li.has-dropdown{
  position:relative;
}

.nav-links > li.has-dropdown > a{
  padding-right:1.1rem;
}

.nav-links .dropdown{
  display:none;
  position:absolute;
  top:calc(100% + 0.2rem);
  left:0;
  min-width:260px;
  background:rgba(0,11,35,.97);
  border-radius:14px;
  padding:0.6rem 0;
  margin:0;
  list-style:none;
  box-shadow:0 20px 40px rgba(0,0,0,.45);
  border:1px solid rgba(0,212,255,.18);
  z-index:9200;
}

.nav-links .dropdown li{
  list-style:none;
}

.nav-links .dropdown a{
  position:relative;
  display:block;
  padding:0.55rem 1.4rem 0.55rem 1.9rem;
  font-size:0.9rem;
  font-weight:500;
  letter-spacing:0.01em;
  text-transform:none;
  color:rgba(255,255,255,.86);
  text-decoration:none;
}

.nav-links .dropdown a::before{
  content:'';
  position:absolute;
  left:0.9rem;
  top:50%;
  transform:translateY(-50%);
  width:6px;
  height:6px;
  border-radius:50%;
  background:rgba(0,212,255,.75);
}

.nav-links .dropdown a:hover{
  background:rgba(0,212,255,.11);
  color:var(--bright-cyan);
  padding-left:2.1rem;
}

.nav-links > li.has-dropdown:hover > .dropdown,
.nav-links > li.has-dropdown:focus-within > .dropdown{
  display:block;
}

/* ============================
   MOBILE MENU
   ============================ */

.mobile-menu-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  z-index:9049;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  -webkit-user-select:none;
  user-select:none;
}

.mobile-menu-overlay.open{
  opacity:1;
  pointer-events:auto;
}

.mobile-menu{
  position:fixed;
  top:0;
  right:-100%;
  width:80%;
  max-width:320px;
  height:100vh;
  background:var(--deep-navy);
  padding:5rem 2rem 2rem;
  z-index:9050;
  transition:right .3s ease;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  box-shadow:-4px 0 20px rgba(0,0,0,.5);
}

.mobile-menu.open{
  right:0;
}

.mobile-menu ul{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:1.5rem;
}

.mobile-menu a{
  color:var(--white);
  text-decoration:none;
  font-size:1.05rem;
  font-weight:600;
  display:block;
  -webkit-user-select:none;
  user-select:none;
}

/* MOBILE DROPDOWN - Work submenu */
.mobile-menu .dropdown{
  list-style:none;
  display:none;
  flex-direction:column;
  gap:0.8rem;
  margin-top:1rem;
  padding-left:1.5rem;
  border-left:2px solid rgba(0,212,255,.3);
}

.mobile-menu .has-dropdown.open > .dropdown{
  display:flex;
}

.mobile-menu .dropdown a{
  font-size:1rem;
  font-weight:500;
  color:rgba(255,255,255,.8);
  display:block;
  transition:.25s;
  padding:0;
}

.mobile-menu .dropdown a:hover{
  color:var(--bright-cyan);
  padding-left:8px;
}

.mobile-menu .has-dropdown > a::after{
  content:'\f078';
  font-family:'Font Awesome 6 Free';
  font-weight:900;
  font-size:0.7rem;
  margin-left:0.5rem;
  display:inline-block;
  transition:transform .3s ease;
}

.mobile-menu .has-dropdown.open > a::after{
  transform:rotate(180deg);
}

/* ============================
   SEARCH
   ============================ */

.search-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  z-index:9150;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.search-overlay.open{
  opacity:1;
  pointer-events:auto;
}

.search-modal{
  position:fixed;
  top:0;
  left:0;
  right:0;
  max-width:800px;
  margin:0 auto;
  background:var(--deep-navy);
  z-index:9151;
  padding:4rem 2rem 2.5rem;
  transform:translateY(-100%);
  transition:transform .28s ease;
  border-bottom:2px solid var(--bright-cyan);
  width:100%;
}

.search-modal.open{
  transform:translateY(0);
}

.search-close{
  position:absolute;
  top:1.3rem;
  right:1.7rem;
  background:none;
  border:none;
  color:var(--bright-cyan);
  font-size:1.4rem;
  cursor:pointer;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.search-input{
  width:100%;
  max-width:600px;
  padding:1rem 1.4rem;
  font-size:1rem;
  border-radius:999px;
  border:1px solid rgba(0,212,255,.5);
  background:rgba(0,212,255,.06);
  color:var(--white);
  outline:none;
  display:block;
  margin:0 auto;
  -webkit-appearance:none;
}

.search-input::placeholder{
  color:rgba(255,255,255,.6);
}

#searchResults{
  margin-top:1.4rem;
}

.search-result-item{
  display:block;
  padding:1rem 1.3rem;
  border-radius:12px;
  background:rgba(0,212,255,.06);
  border:1px solid rgba(0,212,255,.18);
  text-decoration:none;
  margin-bottom:0.75rem;
  -webkit-user-select:none;
  user-select:none;
}

.search-result-item h3{
  font-size:0.98rem;
  color:var(--bright-cyan);
}

.search-result-item p{
  font-size:0.86rem;
  color:rgba(255,255,255,.8);
}

/* ============================
   FOOTER
   ============================ */

footer{
  background:var(--deep-navy);
  padding:4rem 2rem 2rem;
  border-top:1px solid rgba(0,212,255,.15);
  margin-top:4rem;
}

.footer-grid{
  max-width:1600px;
  margin:0 auto 3rem;
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:3.5rem;
}

.footer-brand h3{
  font-size:2.1rem;
  font-weight:600;
  margin-bottom:0.7rem;
}

.footer-brand p{
  color:rgba(255,255,255,.7);
  font-size:0.98rem;
  line-height:1.8;
  margin-bottom:1.4rem;
}

.social-links{
  display:flex;
  gap:0.8rem;
}

.social-link{
  width:44px;
  height:44px;
  border-radius:50%;
  border:1px solid rgba(0,212,255,.2);
  background:rgba(0,212,255,.08);
  color:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  transition:background .2s ease, transform .2s ease, border-color .2s ease;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.social-link i{
  font-size:0.98rem;
}

.social-link:hover{
  background:var(--bright-cyan);
  border-color:var(--bright-cyan);
  color:var(--deep-navy);
  transform:translateY(-3px);
}

.footer-column h4{
  font-size:1.05rem;
  font-weight:600;
  margin-bottom:0.7rem;
}

.footer-links{
  list-style:none;
}

.footer-links li + li{
  margin-top:0.4rem;
}

.footer-links a{
  color:rgba(255,255,255,.75);
  font-size:0.94rem;
  text-decoration:none;
  transition:color .2s ease, padding-left .2s ease;
}

.footer-links a:hover{
  color:var(--bright-cyan);
  padding-left:6px;
}

.footer-bottom{
  border-top:1px solid rgba(0,212,255,.15);
  padding-top:1.2rem;
  text-align:center;
  color:rgba(255,255,255,.65);
  font-size:0.9rem;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width:1024px){
  nav{
    padding:1.4rem 2rem;
  }
  nav.scrolled{
    padding:1.1rem 2rem;
  }
  .footer-grid{
    grid-template-columns:1.4fr 1fr;
  }
}

@media (max-width:768px){
  .nav-links{
    display:none;
  }
  .mobile-menu-btn{
    display:inline-flex;
  }
  .nav-search{
    margin-left:auto;
  }
  .footer-grid{
    grid-template-columns:1fr;
    gap:2.4rem;
  }
}
/* small mobile sub-toggle styles + sr-only helper */
@media (max-width:768px){
  /* align the top-level work item and small toggle */
  .mobile-menu .has-dropdown {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:0.6rem;
  }

  .mobile-sub-toggle {
    background:transparent;
    color:rgba(255,255,255,.9);
    border:0;
    padding:6px 8px;
    border-radius:6px;
    font-size:1rem;
    line-height:1;
    cursor:pointer;
  }
  .mobile-sub-toggle:focus{ outline:2px solid rgba(0,212,255,.15); }

  /* ensure dropdown children are visually stacked when opened */
  .mobile-menu .has-dropdown > .dropdown{ display:none; }
  .mobile-menu .has-dropdown.open > .dropdown{ display:flex; flex-direction:column; gap:0.6rem; margin-top:0.8rem; padding-left:1rem; border-left:2px solid rgba(0,212,255,.12); }

  /* indicator spacing */
  .mobile-sub-indicator { display:inline-block; width:1ch; text-align:center; font-weight:700; }

}

/* screen-reader only helper */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
/* MOBILE FORMAT: Work sub-items permanently visible */
@media (max-width:768px){

  /* Remove any arrows from mobile top-level items */
  .mobile-menu .has-dropdown > a::after{
    display:none !important;
  }

  /* Style of the visible sublist */
  .mobile-menu .mobile-sub{
    list-style:none;
    margin-top:0.6rem;
    padding-left:1.2rem;
    display:flex;
    flex-direction:column;
    gap:0.7rem;
    border-left:2px solid rgba(0,212,255,.25);
  }

  .mobile-menu .mobile-sub a{
    font-size:1rem;
    font-weight:500;
    color:rgba(255,255,255,.85);
    text-decoration:none;
  }

  .mobile-menu .mobile-sub a:hover{
    color:var(--bright-cyan);
  }
}
