/* Shared navbar (all pages). Markup: website/navbar.xml   Behaviour: ../js/navbar.js */
:root {
  --atd-navy: #0A2540;
  --atd-teal: #2bcdd0;
  --atd-nav-h: 57px;
}

.atd-nav,
.atd-nav * {
  box-sizing: border-box;
}

.atd-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  -webkit-text-size-adjust: 100%;
  padding: .6rem 0;
  color: #fff;
  font-family: 'Montserrat', 'Cairo', system-ui, sans-serif;
  line-height: 1.4;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
}

.atd-nav.scrolled,
.atd-nav.solid,
.atd-nav.open {
  background: rgba(10, 37, 64, .96);
  border-bottom-color: rgba(255, 255, 255, .1);
}

.atd-nav.scrolled,
.atd-nav.solid {
  padding: .25rem 0;
}

/* light hero (no dark image behind the bar): soft navy fade so the white text stays readable until scrolled */
body.nav-light .atd-nav:not(.scrolled):not(.solid):not(.open) {
  background: linear-gradient(180deg, rgba(10, 37, 64, .8), rgba(10, 37, 64, 0));
  background-origin: border-box;
}

/* pages with a solid bar reserve its height so content does not sit underneath */
body.nav-solid {
  padding-top: var(--atd-nav-h);
}

.atd-nav-in {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.75rem);
}

.atd-brand {
  flex: none;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.atd-brand img {
  display: block;
  height: 62px;
  width: auto;
  transition: height .3s ease;
}

.atd-nav.scrolled .atd-brand img,
.atd-nav.solid .atd-brand img {
  height: 48px;
}

.atd-menu {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.atd-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
}

.atd-links > li {
  position: relative;
  display: flex;
  align-items: center;
}

.atd-link {
  position: relative;
  display: block;
  padding: .5rem .9rem;
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: color .3s;
}

.atd-link::after {
  content: "";
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--atd-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

html[dir="rtl"] .atd-link::after {
  transform-origin: right;
}

.atd-link:hover {
  color: #fff;
}

.atd-link:hover::after,
.atd-link.on::after {
  transform: scaleX(1);
}

.atd-link.on {
  color: var(--atd-teal);
}

.atd-lang {
  flex: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(0, 194, 255, .55);
  border-radius: 6px;
  padding: .5rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}

.atd-lang:hover {
  background: rgba(0, 194, 255, .18);
  border-color: #00C2FF;
}

/* dropdown (used once the Services item is switched on in navbar.xml) */
.atd-caret {
  width: 22px;
  height: 22px;
  margin-inline-start: -.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.atd-caret::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -5px 0 0 -3px;
  border: solid rgba(255, 255, 255, .85);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.atd-sub {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 19rem;
  margin: .5rem 0 0;
  padding: .4rem;
  list-style: none;
  background: rgba(10, 37, 64, .97);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .75);
  display: none;
}

.atd-sub a {
  display: block;
  padding: .6rem .8rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  font-size: .9rem;
}

.atd-sub a:hover,
.atd-sub a.on {
  background: rgba(0, 194, 255, .18);
  color: #fff;
}

.atd-dd.open > .atd-sub {
  display: block;
}

/* desktop: the list also opens on hover (click still opens it too); the invisible bridge keeps it open while the pointer crosses the gap */
.atd-sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -.6rem;
  height: .6rem;
}

@media (hover: hover) and (min-width: 992px) {
  .atd-dd:hover > .atd-sub {
    display: block;
  }
}

.atd-burger {
  display: none;
  margin-inline-start: auto;
  width: 46px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.atd-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.atd-nav.open .atd-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.atd-nav.open .atd-burger span:nth-child(2) {
  opacity: 0;
}

.atd-nav.open .atd-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991.98px) {
  .atd-burger {
    display: flex;
  }

  .atd-nav-in {
    flex-wrap: wrap;
  }

  .atd-menu {
    display: none;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: .6rem 0 .4rem;
    padding: .4rem 1rem 1rem;
    background: var(--atd-navy);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
  }

  .atd-nav.open .atd-menu {
    display: flex;
  }

  .atd-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }

  .atd-links > li {
    flex-wrap: wrap;
  }

  .atd-link {
    padding: .8rem 0;
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .atd-link::after {
    display: none;
  }

  .atd-sub {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 .8rem;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .atd-lang {
    width: 100%;
    margin-top: 1rem;
  }
}

@media (max-width: 575.98px) {
  .atd-brand img {
    height: 54px;
  }

  .atd-nav.scrolled .atd-brand img,
  .atd-nav.solid .atd-brand img {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atd-loader-in img {
    animation: none;
  }
}

/* ---------- loading screen ---------- */
html.atd-loading {
  overflow: hidden;
}

.atd-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #12406b 0%, #0a2540 60%, #061829 100%);
  transition: opacity .5s ease, visibility .5s ease;
}

.atd-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.atd-loader-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.atd-loader-in img {
  width: clamp(84px, 14vw, 120px);
  height: auto;
  animation: atdPulse 1.6s ease-in-out infinite;
}

.atd-loader-bar {
  position: relative;
  width: clamp(140px, 24vw, 200px);
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, .14);
}

.atd-loader-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: 3px;
  background: linear-gradient(90deg, #00d1b2, #00c2ff);
}

html[dir="rtl"] .atd-loader-bar i {
  background: linear-gradient(270deg, #00d1b2, #00c2ff);
}

@keyframes atdPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: .85;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atd-loader-in img,
  .atd-loader-bar i {
    animation: none;
  }

  .atd-loader-bar i {
    width: 100%;
  }
}

/* the loading screen covers the page, so the page itself no longer needs to be hidden while fonts load */
html.pre.atd-first body {
  opacity: 1 !important;
}

/* the page animations wait behind the loading screen and start when it goes away */
html.atd-loading *,
html.atd-loading *::before,
html.atd-loading *::after {
  animation-play-state: paused !important;
}

html.atd-loading .atd-loader,
html.atd-loading .atd-loader *,
html.atd-loading .atd-loader *::before,
html.atd-loading .atd-loader *::after {
  animation-play-state: running !important;
}

html[data-lang="ar"] .atd-nav {
  font-family: 'Cairo', 'Montserrat', system-ui, sans-serif;
}

/* no underline on links (bootstrap underlines <a> on hover, and the underline spreads to every text inside the link/card) */
html body a,
html body a:hover,
html body a:focus,
html body a:active {
  text-decoration: none;
}

/* Odoo's "Database neutralized for testing" ribbon (shown on staging/test copies of the database) is not part of the site design */
html body .o_neutralize_banner,
html body .o_neutralized_banner {
  display: none !important;
}

/* Odoo website pages: keep the bar fixed, visible and above everything in the page */
html body .atd-nav {
  display: block !important;
  position: fixed !important;
  top: 0;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  z-index: 1030 !important;
}

/* page to page: Chrome / Edge keep the old page on screen and cross-fade to the new one, so there is no blank frame between pages */
@view-transition {
  navigation: auto;
}
