/* =====================================================================
   Modern header + typography refresh
   Loaded after style.css so it overrides the template header styles.
   Brand colours are taken from the Webroutes logo gradient.
   Fonts: Sora (headings, menu, buttons) + Manrope (paragraphs).
   ===================================================================== */
:root {
  --brand-orange: #ff7a3d;
  --brand-pink: #e8318a;
  --brand-purple: #6a3df0;
  --brand-blue: #2f5bea;
  --brand-gradient: linear-gradient(100deg, var(--brand-orange) 0%, var(--brand-pink) 45%, var(--brand-purple) 100%);
  --nav-ink: #1a1d29;
  --nav-muted: #6b7084;
  --nav-tint: #f4f1ff;
  --header-radius: 20px;
  --header-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Typography ---------- */
body {
  text-rendering: optimizeLegibility;
}
/* Sora is a wide geometric face: tighten it so big headlines feel punchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  letter-spacing: -0.025em;
}
h1, h2 {
  letter-spacing: -0.035em;
}
/* Manrope paragraphs: a touch more weight and air for easy reading */
p, .text {
  font-family: var(--text-font);
  font-weight: 500;
  line-height: 1.75;
}

/* ---------- Header shell ----------
   Scroll behaviour is the template's original one (js/script.js):
   the floating header scrolls away with the page, then after 100px the
   .sticky-header slides down from the top (animate.css "slideInDown"). */

/* Floating header at the top of the page */
.header-style-one {
  top: 20px;
}
.header-style-one .outer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  border-radius: var(--header-radius);
  border: 1px solid rgba(26, 29, 41, 0.06);
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(26, 29, 41, 0.04), 0 12px 32px -14px rgba(26, 29, 41, 0.18);
}
@media (max-width: 1480px) {
  .header-style-one .outer-container {
    margin: 0 20px;
  }
}
@media (max-width: 575.98px) {
  .header-style-one {
    top: 12px;
  }
  .header-style-one .outer-container {
    margin: 0 12px;
    border-radius: 16px;
  }
}
.header-style-one .header-lower .inner-container {
  max-width: none;
  padding: 0 28px;
}
@media (max-width: 1023px) {
  .header-style-one .header-lower .inner-container {
    padding: 10px 12px 10px 16px;
  }
}
.header-style-one .main-box {
  min-height: 76px;
}
/* True centring of the menu: logo | menu | button */
@media (min-width: 1024px) {
  .header-style-one .main-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .header-style-one .main-box .left-box { justify-self: start; }
  .header-style-one .main-box .nav-outer { justify-self: center; margin: 0; }
  .header-style-one .main-box .right-box { justify-self: end; }
}
@media (max-width: 1023px) {
  .header-style-one .main-box {
    min-height: 0;
  }
}

/* Logo */
.header-style-one .header-lower .logo-box {
  min-width: 0;
}
.header-style-one .main-box .left-box .logo-box .logo {
  max-width: 170px;
}
.header-style-one .main-box .left-box .logo-box .logo img {
  display: block;
}
@media (max-width: 575.98px) {
  .header-style-one .main-box .left-box {
    width: auto;
  }
  .header-style-one .main-box .left-box .logo-box .logo {
    max-width: 136px;
  }
}

/* ---------- Sticky bar (slides down after scrolling) ----------
   js/script.js toggles .fixed-header at 100px. Instead of the abrupt
   animate.css slideInDown (and an instant disappear on the way back up),
   the bar now slides in AND out with one smooth transition. */
.header-style-one .sticky-header {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -105%, 0);
  /* hide: ease-in so it accelerates away, then becomes invisible */
  transition: transform 380ms cubic-bezier(0.4, 0, 1, 1), opacity 380ms ease, visibility 0s linear 380ms;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.header-style-one .sticky-header.fixed-header {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  /* show: long, soft deceleration */
  transition: transform 650ms var(--header-ease), opacity 400ms ease, visibility 0s linear 0s;
}
.header-style-one .sticky-header.animated {
  animation: none;
}
.header-style-one .sticky-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(26, 29, 41, 0.07);
  box-shadow: 0 10px 30px -18px rgba(26, 29, 41, 0.35);
}
.header-style-one .sticky-header .auto-container {
  max-width: 1440px;
  padding: 0 28px;
}
.header-style-one .sticky-header .inner-container {
  min-height: 68px;
}
@media (min-width: 1024px) {
  .header-style-one .sticky-header .inner-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  /* let the menu and button sit directly in the grid */
  .header-style-one .sticky-header .nav-outer {
    display: contents;
  }
  .header-style-one .sticky-header .main-menu {
    justify-self: center;
  }
  .header-style-one .sticky-header .header-cta {
    justify-self: end;
  }
}
@media (max-width: 1023px) {
  .header-style-one .sticky-header .auto-container {
    padding: 0 16px;
  }
}
.header-style-one .sticky-header .logo {
  padding: 0;
  max-width: 150px;
}
.header-style-one .sticky-header .logo img {
  display: block;
  max-height: none;
}
.header-style-one .sticky-header .nav-outer {
  gap: 10px;
}
.header-style-one .sticky-header .header-cta {
  padding: 12px 20px;
}
@media (max-width: 575.98px) {
  .header-style-one .sticky-header .header-cta {
    display: none;
  }
}
.header-style-one .sticky-header .mobile-nav-toggler {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border-radius: 12px;
  background-color: var(--nav-ink);
  cursor: pointer;
}
@media (max-width: 1023.98px) {
  .header-style-one .sticky-header .mobile-nav-toggler {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
  }
}
.header-style-one .sticky-header .mobile-nav-toggler span {
  width: 20px;
  background-color: #ffffff;
}
.header-style-one .sticky-header .mobile-nav-toggler span:not(:last-child) {
  margin-bottom: 5px;
}
.header-style-one .sticky-header .mobile-nav-toggler span:nth-child(2) {
  width: 13px;
}

/* ---------- Navigation ---------- */
/* Clean text links with a brand-gradient underline.
   Current page: underline always shown. Hover: underline grows from the centre. */
.header-style-one .main-menu .navigation {
  display: flex;
  align-items: center;
  gap: 38px;
}
@media (max-width: 1199.98px) {
  .header-style-one .main-menu .navigation {
    gap: 26px;
  }
}
.header-style-one .main-menu .navigation::before,
.header-style-one .main-menu .navigation::after {
  display: none;
}
.header-style-one .main-menu .navigation > li,
.header-style-one .sticky-header .main-menu .navigation > li {
  float: none;
  padding: 0;
  margin: 0;
}
.header-style-one .main-menu .navigation > li > a {
  font-family: var(--title-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none;
  color: #12141c;
  padding: 26px 0;
  background: none;
  align-items: center;
  transition: color 250ms ease;
}
.header-style-one .sticky-header .main-menu .navigation > li > a {
  padding: 22px 0;
}
.header-style-one .main-menu .navigation > li:hover > a,
.header-style-one .main-menu .navigation > li.current > a {
  color: #000000;
}
/* the underline */
.header-style-one .main-menu .navigation > li > a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 350ms var(--header-ease);
}
.header-style-one .sticky-header .main-menu .navigation > li > a::before {
  bottom: 14px;
}
/* keep the line under the word "Services", not under its arrow */
.header-style-one .main-menu .navigation > li.dropdown > a::before {
  right: 16px;
}
.header-style-one .main-menu .navigation > li:hover > a::before,
.header-style-one .main-menu .navigation > li > a:focus-visible::before,
.header-style-one .main-menu .navigation > li.current > a::before {
  transform: scaleX(1);
}

/* Dropdown chevron */
.header-style-one .main-menu .navigation > li.dropdown > a {
  padding-right: 0;
}
.header-style-one .main-menu .navigation > li.dropdown > a::after {
  content: "";
  display: inline-block;
  position: static;
  width: 7px;
  height: 7px;
  margin: -4px 0 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 250ms ease, margin 250ms ease;
}
.header-style-one .main-menu .navigation > li.dropdown:hover > a::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* ---------- Services mega menu ---------- */
.main-menu .navigation > li > ul {
  left: 50%;
  width: 780px;
  padding: 12px;
  margin-top: 16px;
  border-radius: 20px;
  background-color: #ffffff;
  border: 1px solid rgba(26, 29, 41, 0.06);
  box-shadow: 0 28px 56px -20px rgba(26, 29, 41, 0.28), 0 2px 6px rgba(26, 29, 41, 0.04);
  transform: translateX(-50%);
  transition: opacity 240ms ease, margin-top 240ms var(--header-ease), visibility 240ms;
}
/* invisible bridge so the menu doesn't close while moving the cursor down */
.main-menu .navigation > li > ul::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}
@media only screen and (min-width: 768px) {
  .main-menu .navigation > li > ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
}
@media (max-width: 1199.98px) {
  .main-menu .navigation > li > ul {
    width: 580px;
    grid-template-columns: repeat(2, 1fr);
  }
}
.main-menu .navigation > li.dropdown:hover > ul {
  margin-top: 4px;
}
.main-menu .navigation > li > ul > li {
  border-bottom: 0;
}
.main-menu .navigation > li > ul > li > a,
.header-style-one .main-menu .navigation > li.dropdown ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-family: var(--title-font);
  font-size: 14.5px !important;
  line-height: 1.3;
  color: var(--nav-ink);
  text-transform: none;
  transition: background-color 180ms ease, color 180ms ease;
}
.main-menu .navigation > li > ul > li:hover > a,
.main-menu .navigation > li > ul > li.current > a,
.header-style-one .main-menu .navigation > li.dropdown ul li a:hover {
  color: var(--nav-ink);
  background-color: var(--nav-tint);
}
.mega-menu .mm-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background-color: var(--nav-tint);
  color: var(--brand-purple);
  font-size: 16px;
  transition: background 220ms ease, color 220ms ease, transform 220ms var(--header-ease);
}
.mega-menu li:hover .mm-icon,
.mega-menu li.current .mm-icon {
  background: var(--brand-gradient);
  color: #ffffff;
  transform: scale(1.06) rotate(-4deg);
}
.mega-menu .mm-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mega-menu .mm-text strong {
  font-weight: 600;
  color: var(--nav-ink);
}
.mega-menu .mm-text small {
  font-family: var(--text-font);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--nav-muted);
}
.main-menu .mega-menu .mm-footer {
  grid-column: 1 / -1;
  margin-top: 6px;
}
.main-menu .mega-menu .mm-footer > a,
.header-style-one .main-menu .navigation > li.dropdown ul li.mm-footer a {
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(100deg, rgba(255, 122, 61, 0.08), rgba(232, 49, 138, 0.08) 45%, rgba(106, 61, 240, 0.1));
}
.mega-menu .mm-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-purple);
  white-space: nowrap;
}
.mega-menu .mm-footer-link i {
  transition: transform 200ms ease;
}
.mega-menu .mm-footer:hover .mm-footer-link i {
  transform: translateX(4px);
}

/* ---------- Right side: CTA + toggler ---------- */
.header-style-one .main-box .right-box {
  gap: 10px;
  margin-right: 0;
}
.header-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--brand-gradient);
  background-size: 160% 100%;
  background-position: 0% 50%;
  color: #ffffff;
  font-family: var(--title-font);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 8px 20px -8px rgba(232, 49, 138, 0.55);
  transition: background-position 400ms ease, transform 200ms ease, box-shadow 200ms ease, padding 450ms var(--header-ease);
}
/* light sweep on hover */
.header-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 600ms ease;
}
.header-cta:hover::after {
  left: 120%;
}
.header-cta i {
  font-size: 13px;
  transition: transform 200ms ease;
}
.header-cta:hover,
.header-cta:focus-visible {
  color: #ffffff;
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -8px rgba(106, 61, 240, 0.55);
}
.header-cta:hover i {
  transform: translateX(3px);
}
@media (max-width: 575.98px) {
  .header-style-one .main-box .header-cta {
    display: none;
  }
}

/* Hamburger: only below desktop, where the inline nav is hidden */
.header-style-one .mobile-nav-toggler {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background-color: var(--nav-ink);
  transition: background-color 200ms ease;
}
.header-style-one .mobile-nav-toggler:hover {
  background-color: var(--brand-purple);
}
.header-style-one .mobile-nav-toggler span {
  width: 20px;
  background-color: #ffffff;
}
.header-style-one .mobile-nav-toggler span:not(:last-child) {
  margin-bottom: 5px;
}
.header-style-one .mobile-nav-toggler span:nth-child(2) {
  width: 13px;
}
.header-style-one .mobile-nav-toggler:hover span {
  width: 13px;
}
.header-style-one .mobile-nav-toggler:hover span:nth-child(2) {
  width: 20px;
}
@media (max-width: 1023px) {
  .header-style-one .main-box .mobile-nav-toggler {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
}

/* ---------- Mobile slide-in menu ---------- */
.mobile-menu {
  width: 360px;
}
.mobile-menu .menu-backdrop {
  background: rgba(15, 16, 32, 0.55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.mobile-menu .menu-box {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(106, 61, 240, 0.28), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(232, 49, 138, 0.18), transparent 60%),
    #0f1020;
  transition: transform 450ms var(--header-ease), opacity 300ms ease, visibility 300ms;
}
.mobile-menu .upper-box {
  padding: 22px 24px;
}
.mobile-menu .close-btn {
  top: 0;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 16px;
}
.mobile-menu .close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
}
.mobile-menu .navigation {
  border-top: 0;
  padding: 8px 12px;
}
.mobile-menu .navigation li {
  border-bottom: 0;
}
.mobile-menu .navigation li > ul > li:first-child {
  border-top: 0;
}
.mobile-menu .navigation li > a {
  font-family: var(--title-font);
  font-size: 17px;
  font-weight: 600;
  padding: 13px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  transition: background-color 200ms ease, color 200ms ease;
}
.mobile-menu .navigation li:hover > a,
.mobile-menu .navigation li.current > a {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}
.mobile-menu .navigation > li.current > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-gradient);
}
.mobile-menu .navigation li.dropdown .dropdown-btn {
  top: 2px;
  right: 4px;
  color: rgba(255, 255, 255, 0.7);
}
.mobile-menu .navigation li.dropdown .dropdown-btn::after {
  display: none;
}
.mobile-menu .navigation li > ul > li {
  padding-left: 12px;
}
.mobile-menu .navigation li > ul > li > a {
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.7);
}
/* desktop-only mega menu details */
.mobile-menu .mm-icon,
.mobile-menu .mm-text small,
.mobile-menu .mm-footer {
  display: none !important;
}
.mobile-menu .mm-text strong {
  font-weight: inherit;
}
.mobile-menu .mobile-cta {
  padding: 16px 24px 4px;
}
.mobile-menu .mobile-cta .header-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 16px 22px;
}
.mobile-menu .social-links {
  padding: 20px 24px;
}

/* =====================================================================
   Dark glass theme
   The header sits on dark heroes / photo banners, so it uses a translucent
   dark bar, white text, the white logo (images/logo2.png) and a thin
   brand-gradient hairline. Overrides the light colours above.
   ===================================================================== */
.header-style-one {
  --glass-bg: rgba(18, 16, 34, 0.55);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-text: rgba(255, 255, 255, 0.78);
}

/* Floating bar */
.header-style-one .outer-container {
  position: relative;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
          backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* gradient hairline along the bottom edge */
.header-style-one .outer-container::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-orange) 20%, var(--brand-pink) 50%, var(--brand-purple) 80%, transparent);
  opacity: 0.8;
  pointer-events: none;
}

/* Sticky bar */
/* solid (no backdrop blur): a blurred fixed bar has to be re-rendered on every
   scroll frame, which is the main cause of stutter while scrolling */
.header-style-one .sticky-header {
  background: #0e0f1c;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
}
.header-style-one .sticky-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-orange) 20%, var(--brand-pink) 50%, var(--brand-purple) 80%, transparent);
  opacity: 0.7;
  pointer-events: none;
}

/* Menu links */
.header-style-one .main-menu .navigation > li > a {
  color: var(--glass-text);
}
.header-style-one .main-menu .navigation > li:hover > a,
.header-style-one .main-menu .navigation > li.current > a {
  color: #ffffff;
}

/* Hamburger */
.header-style-one .mobile-nav-toggler,
.header-style-one .sticky-header .mobile-nav-toggler {
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.header-style-one .mobile-nav-toggler:hover,
.header-style-one .sticky-header .mobile-nav-toggler:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

/* Services mega menu: dark card */
.main-menu .navigation > li > ul {
  background-color: #15132a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.main-menu .navigation > li > ul > li > a,
.header-style-one .main-menu .navigation > li.dropdown ul li a {
  color: #ffffff;
}
.main-menu .navigation > li > ul > li:hover > a,
.main-menu .navigation > li > ul > li.current > a,
.header-style-one .main-menu .navigation > li.dropdown ul li a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}
.mega-menu .mm-text strong {
  color: #ffffff;
}
.mega-menu .mm-text small {
  color: rgba(255, 255, 255, 0.55);
}
.mega-menu .mm-icon {
  background-color: rgba(255, 255, 255, 0.07);
  color: #c4b5fd;
}
.main-menu .mega-menu .mm-footer > a,
.header-style-one .main-menu .navigation > li.dropdown ul li.mm-footer a {
  background: linear-gradient(100deg, rgba(255, 122, 61, 0.14), rgba(232, 49, 138, 0.14) 45%, rgba(106, 61, 240, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.mega-menu .mm-footer-link {
  color: #ffffff;
}

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .header-style-one,
  .header-style-one *,
  .header-style-one *::before,
  .header-style-one *::after,
  .mobile-menu .menu-box {
    animation: none !important;
    transition: none !important;
  }
}

/* =====================================================================
   Mobile menu: tidy active item + no "stuck" hover on touch screens
   ===================================================================== */
/* only real mouse hover highlights a row (a tap used to leave it highlighted) */
.mobile-menu .navigation li:hover > a {
  background-color: transparent;
}
@media (hover: hover) {
  .mobile-menu .navigation li:hover > a {
    background-color: rgba(255, 255, 255, 0.06);
  }
}
/* active page: soft brand tint, gradient bar sitting inside the row */
.mobile-menu .navigation > li.current > a {
  padding-left: 26px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(232, 49, 138, 0.16), rgba(106, 61, 240, 0.08) 60%, transparent);
}
.mobile-menu .navigation > li.current > a::before {
  left: 12px;
  top: 50%;
  bottom: auto;
  height: 18px;
  transform: translateY(-50%);
}
