

/* =========================================================
   GLOBAL VARIABLES
========================================================= */

:root {
  --as-primary: #2654b1;
  --as-primary-hover: #1f4695;
  --as-search-bg: #f5f8ff;
  --as-white: #ffffff;
  --as-text: #111111;
  --as-border: #e7ebf3;
}


.as-site-header,
.as-site-header * {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


/* =========================================================
   HEADER
========================================================= */

.as-site-header {

  width: 100vw !important;
  max-width: 100vw !important;

  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;

  position: relative;

  background: var(--as-white);

  border-bottom: 1px solid var(--as-border);

  z-index: 99999;

  transition:
    box-shadow .3s ease,
    transform .4s cubic-bezier(.22,1,.36,1);

}


/* =========================================================
   INNER HEADER
========================================================= */

.as-header-inner {

  width: 100%;
  max-width: 1600px;

  min-height: 82px;

  margin: 0 auto;
  padding: 0 40px;

  display: grid;

  grid-template-columns:
    minmax(190px, 1fr)
    auto
    minmax(190px, 1fr);

  align-items: center;

  gap: 25px;

}


/* =========================================================
   LOGO
========================================================= */

.as-logo {

  justify-self: start;

  display: flex;
  align-items: center;

  text-decoration: none !important;

  line-height: 0;

}


.as-logo img {

  display: block;

  width: auto;
  height: auto;

  max-width: 205px;
  max-height: 58px;

  object-fit: contain;

}


/* =========================================================
   NAVIGATION
========================================================= */

.as-nav {

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 5px;

}


.as-nav a {

  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 10px 14px;

  border-radius: 5px;

  color: var(--as-text) !important;
  background: transparent !important;

  text-decoration: none !important;

  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;

  white-space: nowrap;

  transition:
    background-color .25s ease,
    color .25s ease,
    transform .25s ease;

}


/* Desktop menu hover */

.as-nav a:hover,
.as-nav a:focus-visible {

  background: var(--as-primary) !important;

  color: var(--as-white) !important;

  transform: translateY(-1px);

}


/* =========================================================
   ACTIONS
========================================================= */

.as-actions {

  justify-self: end;

  display: flex;
  align-items: center;

  gap: 5px;

  min-width: 0;

}


/* =========================================================
   ICON BUTTONS
========================================================= */

.as-icon-button {

  width: 42px !important;
  height: 42px !important;

  min-width: 42px !important;
  min-height: 42px !important;

  flex: 0 0 42px;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  border: 0 !important;
  outline: none !important;

  border-radius: 50% !important;

  background: transparent !important;

  color: var(--as-primary) !important;

  text-decoration: none !important;

  cursor: pointer;

  line-height: 1 !important;

  box-shadow: none !important;

  transition:
    background-color .25s ease,
    color .25s ease,
    transform .25s ease !important;

}


/* SVG */

.as-icon-button svg {

  display: block !important;

  width: 22px !important;
  height: 22px !important;

  min-width: 22px !important;
  min-height: 22px !important;

  fill: none !important;

  stroke: currentColor !important;

  stroke-width: 1.8 !important;

  stroke-linecap: round !important;
  stroke-linejoin: round !important;

}


/* Hover only on true mouse devices */

@media (hover: hover) and (pointer: fine) {

  .as-icon-button:hover {

    background: var(--as-primary) !important;

    color: var(--as-white) !important;

    transform: translateY(-1px);

  }

}


/* =========================================================
   SEARCH
========================================================= */

.as-search {

  display: flex;
  align-items: center;

  min-width: 0;

}


.as-search-form {

  width: 0;

  display: flex;
  align-items: center;

  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  transition:
    width .4s cubic-bezier(.22,1,.36,1),
    opacity .25s ease;

}


.as-search.as-active .as-search-form {

  width: 285px;

  opacity: 1;
  visibility: visible;

}


.as-search.as-active .as-search-toggle {

  display: none !important;

}


/* Search input */

.as-search-form input {

  width: 100%;
  height: 44px;

  padding: 0 44px 0 17px;

  border: 1px solid transparent !important;

  border-radius: 6px !important;

  outline: none !important;

  background: var(--as-search-bg) !important;

  color: var(--as-text) !important;

  font-family: inherit;
  font-size: 14px;

  box-shadow: none !important;

  transition:
    border-color .25s ease,
    box-shadow .25s ease;

}


.as-search-form input::placeholder {

  color: #7d8798;

}


.as-search-form input:focus {

  border-color: rgba(38,84,177,.35) !important;

  box-shadow:
    0 0 0 3px rgba(38,84,177,.07) !important;

}


/* Search close */

.as-search-close {

  width: 34px !important;
  height: 34px !important;

  min-width: 34px !important;
  min-height: 34px !important;

  margin-left: -39px !important;

  padding: 0 !important;

  position: relative;
  z-index: 2;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  border: 0 !important;
  outline: none !important;

  border-radius: 50% !important;

  background: transparent !important;

  color: var(--as-primary) !important;

  font-size: 26px !important;
  font-weight: 300;

  line-height: 1 !important;

  cursor: pointer;

  box-shadow: none !important;

}


/* Desktop search close hover */

@media (hover: hover) and (pointer: fine) {

  .as-search-close:hover {

    background: var(--as-primary) !important;

    color: var(--as-white) !important;

  }

}


/* =========================================================
   HAMBURGER
========================================================= */

.as-menu-toggle {

  width: 42px !important;
  height: 42px !important;

  min-width: 42px !important;
  min-height: 42px !important;

  flex: 0 0 42px;

  padding: 0 !important;
  margin: 0 !important;

  display: none;

  align-items: center;
  justify-content: center;

  flex-direction: column;

  gap: 5px;

  border: 0 !important;
  outline: none !important;

  border-radius: 50% !important;

  background: transparent !important;
  background-color: transparent !important;

  color: var(--as-primary) !important;

  cursor: pointer;

  box-shadow: none !important;

  -webkit-appearance: none !important;
  appearance: none !important;

}


/* Hamburger lines */

.as-menu-toggle span {

  display: block !important;

  width: 22px !important;
  height: 2px !important;

  min-height: 2px !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;

  border-radius: 50px !important;

  background: var(--as-primary) !important;

  transition:
    transform .3s ease,
    opacity .25s ease,
    background-color .25s ease;

}


/* =========================================================
   HAMBURGER HOVER
   ONLY TRUE DESKTOP/LAPTOP HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {

  .as-site-header .as-menu-toggle:hover {

    background: var(--as-primary) !important;
    background-color: var(--as-primary) !important;

  }


  .as-site-header .as-menu-toggle:hover span {

    background: var(--as-white) !important;

  }

}


/* =========================================================
   HAMBURGER CLICKED / OPEN
   NO BLUE BACKGROUND
========================================================= */

.as-site-header .as-menu-toggle.as-active,
.as-site-header .as-menu-toggle[aria-expanded="true"],
.as-site-header .as-menu-toggle:focus,
.as-site-header .as-menu-toggle:active {

  background: transparent !important;
  background-color: transparent !important;

  color: var(--as-primary) !important;

  outline: none !important;

  box-shadow: none !important;

}


.as-site-header .as-menu-toggle.as-active span,
.as-site-header .as-menu-toggle[aria-expanded="true"] span {

  background: var(--as-primary) !important;

}


/* =========================================================
   HAMBURGER → X
========================================================= */

.as-menu-toggle.as-active span:nth-child(1) {

  transform: translateY(7px) rotate(45deg);

}


.as-menu-toggle.as-active span:nth-child(2) {

  opacity: 0;

}


.as-menu-toggle.as-active span:nth-child(3) {

  transform: translateY(-7px) rotate(-45deg);

}


/* =========================================================
   TOUCH DEVICES
   PREVENT STUCK HOVER
========================================================= */

@media (hover: none), (pointer: coarse) {

  .as-site-header .as-menu-toggle,
  .as-site-header .as-menu-toggle:hover,
  .as-site-header .as-menu-toggle:focus,
  .as-site-header .as-menu-toggle:focus-visible,
  .as-site-header .as-menu-toggle:active,
  .as-site-header .as-menu-toggle.as-active,
  .as-site-header .as-menu-toggle.as-active:hover,
  .as-site-header .as-menu-toggle[aria-expanded="true"],
  .as-site-header .as-menu-toggle[aria-expanded="true"]:hover {

    background: transparent !important;
    background-color: transparent !important;

    color: var(--as-primary) !important;

    outline: none !important;

    box-shadow: none !important;

  }


  .as-site-header .as-menu-toggle span,
  .as-site-header .as-menu-toggle:hover span,
  .as-site-header .as-menu-toggle:focus span,
  .as-site-header .as-menu-toggle:active span,
  .as-site-header .as-menu-toggle.as-active span,
  .as-site-header .as-menu-toggle[aria-expanded="true"] span {

    background: var(--as-primary) !important;

  }

}


/* =========================================================
   REMOVE ELEMENTOR GLOBAL BUTTON EFFECTS
========================================================= */

.as-site-header button,
.as-site-header button:hover,
.as-site-header button:focus,
.as-site-header button:active {

  box-shadow: none !important;

  outline: none !important;

}


/* =========================================================
   STICKY HEADER
========================================================= */

.as-site-header.as-fixed {

  position: fixed !important;

  top: 0;
  left: 0;
  right: 0;

  width: 100% !important;
  max-width: none !important;

  margin: 0 !important;

  background: var(--as-white);

  box-shadow:
    0 6px 28px rgba(22,48,96,.10);

  animation:
    asHeaderDown .45s cubic-bezier(.22,1,.36,1);

}


@keyframes asHeaderDown {

  from {

    opacity: 0;

    transform: translateY(-100%);

  }

  to {

    opacity: 1;

    transform: translateY(0);

  }

}


/* WordPress admin toolbar */

body.admin-bar .as-site-header.as-fixed {

  top: 32px;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {


  .as-header-inner {

    min-height: 74px;

    padding: 0 24px;

    grid-template-columns:
      minmax(0,1fr)
      auto;

    gap: 15px;

  }


  .as-logo img {

    max-width: 185px;
    max-height: 52px;

  }


  .as-menu-toggle {

    display: flex !important;

  }


  /* Dropdown */

  .as-nav {

    position: absolute;

    top: 100%;
    left: 0;

    width: 100%;

    padding: 12px 20px 20px;

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 5px;

    background: var(--as-white);

    border-top: 1px solid var(--as-border);

    box-shadow:
      0 14px 30px rgba(20,48,95,.09);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform: translateY(-12px);

    transition:
      opacity .3s ease,
      visibility .3s ease,
      transform .35s cubic-bezier(.22,1,.36,1);

  }


  .as-nav.as-active {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform: translateY(0);

  }


  .as-nav a {

    width: 100%;

    padding: 13px 16px;

    justify-content: flex-start;

    border-radius: 5px;

  }


}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {


  .as-site-header {

    width: 100vw !important;
    max-width: 100vw !important;

  }


  .as-header-inner {

    width: 100%;

    min-height: 68px;

    padding: 0 14px;

    display: grid;

    grid-template-columns:
      minmax(0,1fr)
      auto;

    align-items: center;

    gap: 6px;

  }


  /* Logo */

  .as-logo {

    min-width: 0;

    overflow: hidden;

  }


  .as-logo img {

    max-width: 155px;

    max-height: 47px;

  }


  /* Actions */

  .as-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 1px;

    flex-shrink: 0;

  }


  /* Icon sizes */

  .as-icon-button,
  .as-search-toggle,
  .as-menu-toggle {

    width: 40px !important;
    height: 40px !important;

    min-width: 40px !important;
    min-height: 40px !important;

    flex-basis: 40px;

  }


  .as-icon-button svg,
  .as-search-toggle svg {

    width: 21px !important;
    height: 21px !important;

    min-width: 21px !important;
    min-height: 21px !important;

  }


  .as-menu-toggle span {

    width: 21px !important;

  }
  
  .as-site-header.as-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;

  margin: 0 !important;

  transform: none;
}


  /* =======================================================
     MOBILE SEARCH FULL WIDTH
  ======================================================= */

  .as-search.as-active {

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;

    height: 100%;

    padding: 0 14px;

    display: flex;

    align-items: center;

    background: var(--as-white);

    z-index: 50;

  }


  .as-search.as-active .as-search-form {

    width: 100%;

  }


  .as-search-form input {

    width: 100%;

    height: 44px;

    padding-left: 16px;

  }


  /* Mobile dropdown */

  .as-nav {

    padding: 10px 14px 18px;

  }


  .as-nav a {

    padding: 13px 14px;

    font-size: 14px;

  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {


  .as-header-inner {

    padding: 0 10px;

    gap: 2px;

  }


  .as-logo img {

    max-width: 130px;

  }


  .as-icon-button,
  .as-search-toggle,
  .as-menu-toggle {

    width: 37px !important;
    height: 37px !important;

    min-width: 37px !important;
    min-height: 37px !important;

    flex-basis: 37px;

  }


  .as-icon-button svg,
  .as-search-toggle svg {

    width: 20px !important;
    height: 20px !important;

  }

}


/* =========================================================
   WORDPRESS MOBILE ADMIN BAR
========================================================= */

@media (max-width: 782px) {

  .as-site-header.as-fixed,
  body.admin-bar .as-site-header.as-fixed {
    top: 0 !important;
  }

}

