/*
 * Site header (resources/views/layouts/header.blade.php, behaviour in js/site-header.js). Design: web.astra-tech.net.
 * The theme sets 1rem = 10px, so sizes here are in px. Only transform, opacity and colours animate on hover; the bar
 * itself eases between its two shapes (full-width at the top, a floating rounded bar once the page scrolls).
 */
.mr-nav,
.mr-sheet {
  --mr-navy: #1F2937;
  --mr-red: #e52b2f;
  --mr-red-dark: #B91C1C;
  --mr-ease: cubic-bezier(.22, 1, .36, 1);
  --mr-nav-h: 72px;
}

.mr-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  pointer-events: none; /* the strip around the floating bar lets clicks through */
}
.mr-nav ul { margin: 0; padding: 0; list-style: none; }
.mr-nav svg, .mr-sheet svg { display: block; flex: none; }
.mr-nav-space { height: var(--mr-nav-h, 72px); }

.mr-nav__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--mr-nav-h);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  border-radius: 0 0 16px 16px;
  background-color: #fff;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .06), 0 8px 24px -18px rgba(17, 24, 39, .35);
  pointer-events: auto;
  transition: margin .55s var(--mr-ease), max-width .55s var(--mr-ease), padding .55s var(--mr-ease),
              height .55s var(--mr-ease), border-radius .55s var(--mr-ease), background-color .35s ease,
              box-shadow .55s var(--mr-ease);
}
.mr-nav.is-scrolled .mr-nav__bar {
  height: 68px;
  max-width: min(1280px, calc(100% - 96px));
  margin-top: 24px;
  padding: 0 28px;
  border-radius: 34px;
  background-color: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 10px 15px -3px rgba(17, 24, 39, .12), 0 4px 6px -4px rgba(17, 24, 39, .1), 0 0 0 1px rgba(17, 24, 39, .04);
}

/* Over a banner: see-through with white text until the page scrolls, on a soft shade so light photos stay readable. */
.mr-nav--overlay::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 140px;
  background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity .45s ease;
}
.mr-nav--overlay.is-scrolled::before { opacity: 0; }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__bar {
  background-color: rgba(255, 255, 255, 0);
  box-shadow: none;
}
.mr-nav--overlay:not(.is-scrolled) .mr-nav__link,
.mr-nav--overlay:not(.is-scrolled) .mr-nav__icon-btn,
.mr-nav--overlay:not(.is-scrolled) .mr-nav__burger { color: #fff; }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__icon-btn:hover { background-color: rgba(255, 255, 255, .16); color: #fff; }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__logo-dark { opacity: 0; }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__logo-light { opacity: 1; }

/* Logo (both versions in one spot, so they cross-fade). */
.mr-nav__start { display: flex; flex: none; align-items: center; gap: 8px; }
.mr-nav__logo { display: grid; flex: none; transition: transform .35s var(--mr-ease); }
.mr-nav__logo:hover { transform: scale(1.03); }
.mr-nav__logo img {
  grid-area: 1 / 1;
  width: auto;
  height: 40px;
  max-width: 150px;
  object-fit: contain;
  transition: opacity .35s ease;
}
.mr-nav__logo-light { opacity: 0; }

/* Desktop menu */
.mr-nav__menu { display: flex; flex: 1; justify-content: center; min-width: 0; }
.mr-nav__list { display: flex; align-items: center; gap: 2px; }
.mr-nav__item { position: relative; }
.mr-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--mr-navy);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .2px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s ease, background-color .25s ease;
}
.mr-nav__link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--mr-red);
  transform: scaleX(0);
  transition: transform .4s var(--mr-ease);
}
.mr-nav__link:hover,
.mr-nav__link:focus-visible,
.mr-nav__item:focus-within > .mr-nav__link,
.mr-nav__item.is-active > .mr-nav__link,
.mr-nav--overlay:not(.is-scrolled) .mr-nav__link:hover { color: var(--mr-red); }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__item.is-active > .mr-nav__link { color: #fff; }
.mr-nav--overlay:not(.is-scrolled) .mr-nav__link::after { background: #fff; }
.mr-nav__link:hover::after,
.mr-nav__item:focus-within > .mr-nav__link::after,
.mr-nav__item.is-active > .mr-nav__link::after { transform: scaleX(1); }
.mr-nav__link:focus-visible { outline: 2px solid rgba(229, 43, 47, .45); outline-offset: 2px; }
.mr-nav__chevron { width: 14px; height: 14px; opacity: .7; transition: transform .35s var(--mr-ease); }
.mr-nav__item--parent:hover .mr-nav__chevron,
.mr-nav__item--parent:focus-within .mr-nav__chevron { transform: rotate(180deg); }

/* Drop-down panels (sub-pages, languages). The padding on top bridges the gap, so the mouse can travel down. */
.mr-nav__drop {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 2;
  min-width: 250px;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 8px, 0) scale(.97);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .2s ease .05s, transform .3s var(--mr-ease) .05s, visibility 0s .35s;
}
.mr-nav__drop--end { inset-inline-start: auto; inset-inline-end: 0; min-width: 160px; }
.mr-nav__item--parent:hover > .mr-nav__drop,
.mr-nav__item--parent:focus-within > .mr-nav__drop,
.mr-nav__lang:focus-within .mr-nav__drop,
.mr-nav__lang.is-open .mr-nav__drop {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .22s ease, transform .35s var(--mr-ease), visibility 0s;
}
@media (hover: hover) {
  .mr-nav__lang:hover .mr-nav__drop {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: opacity .22s ease, transform .35s var(--mr-ease), visibility 0s;
  }
}
.mr-nav__panel {
  padding: 8px !important;
  border: 1px solid rgba(17, 24, 39, .06);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 44px -14px rgba(17, 24, 39, .3), 0 2px 6px rgba(17, 24, 39, .06);
}
.mr-nav__panel li {
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: opacity .2s ease, transform .3s var(--mr-ease);
}
.mr-nav__item--parent:hover .mr-nav__panel li,
.mr-nav__item--parent:focus-within .mr-nav__panel li,
.mr-nav__lang:focus-within .mr-nav__panel li,
.mr-nav__lang.is-open .mr-nav__panel li {
  opacity: 1;
  transform: none;
  transition-delay: calc(.04s + var(--i, 0) * .035s);
}
@media (hover: hover) {
  .mr-nav__lang:hover .mr-nav__panel li { opacity: 1; transform: none; transition-delay: calc(.04s + var(--i, 0) * .035s); }
}
.mr-nav__drop-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--mr-navy);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--mr-ease);
}
.mr-nav__drop-link:hover,
.mr-nav__drop-link:focus-visible,
.mr-nav__drop-link.is-active {
  background-color: rgba(229, 43, 47, .08);
  color: var(--mr-red);
  outline: none;
}
.mr-nav__drop-link:hover { transform: translate3d(4px, 0, 0); }
[dir="rtl"] .mr-nav__drop-link:hover { transform: translate3d(-4px, 0, 0); }

/* Right side: icons, login, menu button */
.mr-nav__end { display: flex; flex: none; align-items: center; gap: 10px; }
.mr-nav__lang { position: relative; }
.mr-nav__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mr-navy);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, transform .35s var(--mr-ease);
}
.mr-nav__icon-btn svg { width: 20px; height: 20px; }
.mr-nav__icon-btn:hover,
.mr-nav__lang.is-open .mr-nav__icon-btn { background-color: rgba(17, 24, 39, .07); color: var(--mr-navy); }
.mr-nav__icon-btn:active { transform: scale(.92); }
.mr-nav__lang .mr-nav__icon-btn svg { transition: transform .6s var(--mr-ease); }
.mr-nav__lang:hover .mr-nav__icon-btn svg,
.mr-nav__lang.is-open .mr-nav__icon-btn svg { transform: rotate(180deg); }

.mr-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background-color: var(--mr-red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(229, 43, 47, .7);
  transition: background-color .25s ease, transform .35s var(--mr-ease), box-shadow .35s var(--mr-ease);
}
.mr-nav__cta:hover,
.mr-nav__cta:focus-visible {
  background-color: var(--mr-red-dark);
  color: #fff;
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 12px 22px -8px rgba(229, 43, 47, .75);
}
.mr-nav__cta:active { transform: scale(.97); }
.mr-nav__arrow { width: 16px; height: 16px; transition: transform .35s var(--mr-ease); }
.mr-nav__cta:hover .mr-nav__arrow { transform: translate3d(3px, 0, 0); }
[dir="rtl"] .mr-nav__arrow { transform: scaleX(-1); }
[dir="rtl"] .mr-nav__cta:hover .mr-nav__arrow { transform: translate3d(-3px, 0, 0) scaleX(-1); }

.mr-nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mr-navy);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.mr-nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .4s var(--mr-ease), opacity .25s ease, width .4s var(--mr-ease);
}
.mr-nav__burger span:nth-child(2) { width: 16px; margin-inline-start: 6px; }
.mr-nav__burger:hover { background-color: rgba(17, 24, 39, .07); }
.mr-nav__burger:hover span:nth-child(2) { width: 22px; margin-inline-start: 0; }
.mr-nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translate3d(0, 7px, 0) rotate(45deg); }
.mr-nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mr-nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translate3d(0, -7px, 0) rotate(-45deg); }

/* Arabic: no capitals, so a little larger and bolder. */
[dir="rtl"] .mr-nav__link { font-size: 15px; font-weight: 600; letter-spacing: 0; }
[dir="rtl"] .mr-nav__drop-link,
[dir="rtl"] .mr-nav__cta { letter-spacing: 0; }

/* Below 1200px the menu lives in the side panel. */
@media (max-width: 1199.98px) {
  .mr-nav__menu,
  .mr-nav__end > .mr-nav__cta { display: none; }
  .mr-nav__burger { display: inline-flex; }
  .mr-nav__end { gap: 4px; }
}
@media (max-width: 767.98px) {
  .mr-nav,
  .mr-sheet { --mr-nav-h: 64px; }
  .mr-nav-space { height: 64px; }
  .mr-nav__bar { padding: 0 16px; }
  .mr-nav.is-scrolled .mr-nav__bar {
    height: 60px;
    max-width: calc(100% - 24px);
    margin-top: 12px;
    padding: 0 14px;
    border-radius: 30px;
  }
  .mr-nav__logo img { height: 34px; max-width: 130px; }
}

/* Side panel (below 1200px) */
.mr-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000000; /* over the chatbot's frame (999999), like the site's dialogs */
  visibility: hidden;
  transition: visibility 0s .55s;
}
.mr-sheet.is-open { visibility: visible; transition: none; }
.mr-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  opacity: 0;
  transition: opacity .45s ease;
}
.mr-sheet.is-open .mr-sheet__overlay { opacity: 1; }
.mr-sheet__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  width: min(86%, 380px);
  padding: 18px 22px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  box-shadow: -24px 0 60px -20px rgba(17, 24, 39, .45);
  transform: translate3d(100%, 0, 0);
  transition: transform .55s var(--mr-ease);
}
[dir="rtl"] .mr-sheet__panel {
  box-shadow: 24px 0 60px -20px rgba(17, 24, 39, .45);
  transform: translate3d(-100%, 0, 0);
}
.mr-sheet.is-open .mr-sheet__panel { transform: none; }
.mr-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mr-sheet__logo img { display: block; width: auto; height: 36px; max-width: 140px; object-fit: contain; }
.mr-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .06);
  color: var(--mr-navy);
  cursor: pointer;
  transform: rotate(-90deg) scale(.6);
  opacity: 0;
  transition: transform .5s var(--mr-ease) .15s, opacity .3s ease .15s, background-color .25s ease;
}
.mr-sheet.is-open .mr-sheet__close { transform: none; opacity: 1; }
.mr-sheet__close:hover { background: rgba(229, 43, 47, .1); color: var(--mr-red); }
.mr-sheet__close svg { width: 20px; height: 20px; }
.mr-sheet ul { margin: 0; padding: 0; list-style: none; }

/* Items arrive one after another while the panel slides in. */
.mr-sheet__item,
.mr-sheet__foot {
  opacity: 0;
  transform: translate3d(28px, 0, 0);
  transition: opacity .35s ease, transform .5s var(--mr-ease);
}
[dir="rtl"] .mr-sheet__item,
[dir="rtl"] .mr-sheet__foot { transform: translate3d(-28px, 0, 0); }
.mr-sheet.is-open .mr-sheet__item,
.mr-sheet.is-open .mr-sheet__foot {
  opacity: 1;
  transform: none;
  transition-delay: calc(.12s + var(--i, 0) * .055s);
}
.mr-sheet__item { border-bottom: 1px solid rgba(17, 24, 39, .08); }
.mr-sheet__row { display: flex; align-items: center; }
.mr-sheet__link {
  flex: 1;
  padding: 15px 2px;
  color: var(--mr-navy);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  transition: color .2s ease, transform .3s var(--mr-ease);
}
.mr-sheet__link:hover,
.mr-sheet__item.is-active > .mr-sheet__row .mr-sheet__link { color: var(--mr-red); }
.mr-sheet__link:hover { transform: translate3d(4px, 0, 0); }
[dir="rtl"] .mr-sheet__link { font-size: 16px; letter-spacing: 0; }
[dir="rtl"] .mr-sheet__link:hover { transform: translate3d(-4px, 0, 0); }
.mr-sheet__expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mr-navy);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.mr-sheet__expand:hover { background: rgba(17, 24, 39, .06); }
.mr-sheet__expand svg { width: 18px; height: 18px; transition: transform .4s var(--mr-ease); }
.mr-sheet__expand[aria-expanded="true"] { color: var(--mr-red); }
.mr-sheet__expand[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Sub-pages open and close smoothly (the row grows from 0 to its content's height). */
.mr-sheet__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--mr-ease);
}
.mr-sheet__sub > ul {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s .4s;
}
.mr-sheet__item.is-expanded > .mr-sheet__sub { grid-template-rows: 1fr; }
.mr-sheet__item.is-expanded > .mr-sheet__sub > ul { visibility: visible; transition: none; }
.mr-sheet__sub li:last-child { padding-bottom: 10px; }
.mr-sheet__sub a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 15px;
  font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.mr-sheet__sub a:hover,
.mr-sheet__sub a.is-active { background: rgba(229, 43, 47, .07); color: var(--mr-red); }

.mr-sheet__foot { display: grid; gap: 16px; margin-top: auto; padding-top: 24px; }
.mr-sheet__langs { display: flex; flex-wrap: wrap; gap: 8px; }
.mr-sheet__langs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(17, 24, 39, .14);
  border-radius: 999px;
  color: var(--mr-navy);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.mr-sheet__langs a:hover { border-color: var(--mr-red); background: rgba(229, 43, 47, .06); color: var(--mr-red); }
.mr-sheet__langs svg { width: 16px; height: 16px; }
.mr-sheet__cta { width: 100%; height: 50px; font-size: 15px; }

/* While the panel is open the page behind it stays still. */
html.mr-nav-locked,
html.mr-nav-locked body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mr-nav,
  .mr-nav *,
  .mr-sheet,
  .mr-sheet * {
    transition-duration: .01s !important;
    transition-delay: 0s !important;
  }
}
