header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* because leaflet top z-index is 1000 */
  z-index: 1001;
  transition: background-color .25s;
}

html[lang="en"] header:not(.dark) a.logo {
  background-image: url(../../assets/images/logo.png);
}

html[lang="en"] header.dark a.logo {
  background-image: url(../../assets/images/logo-dark.png);
}

header.dark {
  background: #fff;
}

header a.menu {
  text-decoration: none;
}

@media (min-width:1111px) {

  header nav {
    max-width: 1580px;
    margin: 0 auto;
    padding: 11px max(20px, 4%);
  }

  header a.logo {
    width: 188px;
    height: 60px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 93px auto;
    /* border: 1px dashed #ccc; */
  }

  header .menu {
    height: 60px;
    margin-left: 10px;
    padding: 0 15px;
    line-height: 60px;
  }

  header.dark .menu {
    color: #333;
  }

  header:not(.dark) .menu {
    color: #fff;
  }

  header .trigger {
    position: relative;
    cursor: pointer;
  }

  header .trigger span {
    border-bottom: 1px solid transparent;
  }

  header .trigger:hover span {
    border-bottom-color: currentColor;
  }

  header .triangle {
    position: absolute;
    top: 53px;
    left: calc(50% - 8px);
    width: 0;
    height: 0;
    z-index: 1;
    transform: translate3d(0px, -30px, 0px);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e6e6e6;
    visibility: hidden;
    opacity: 0;
    transition: .25s;
  }

  header .triangle::after {
    content: '';
    position: absolute;
    top: 1px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff;
  }

  header .dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    min-width: 120px;
    padding: 10px;
    white-space: nowrap;
    border-radius: 5px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    background: #fff;
    visibility: hidden;
    opacity: 0;
    transition: .25s;
    transform: translate3d(0px, -30px, 0px);
  }

  header .sub-menu {
    display: block;
    padding: 10px;
    line-height: 1.5;
    text-decoration: none;
    color: #333;
  }

  header .trigger:hover .triangle,
  header .trigger:hover .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0px, 0px, 0px);
  }

  header nav form {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 220px;
    height: 40px;
    margin-left: auto;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    border: 1px solid transparent;
  }

  header nav form .icon-search {
    font-size: 22px;
    font-weight: 500;
    color: #fff;
  }

  header nav form input {
    width: 0;
    flex: 1;
    height: 36px;
    font-size: 18px;
    line-height: 34px;
    margin-left: 10px;
    padding: 0;
    color: #fff;
    background: transparent;
    outline: none;
    border: 1px solid transparent;
  }

  header nav form input::placeholder {
    color: #fff;
  }

  header.dark nav form {
    border-color: #e6e6e6;
  }

  header.dark nav form .icon-search,
  header.dark nav form input,
  header.dark nav form input::placeholder {
    color: #333;
  }

  header nav .icon-menu,
  header nav .icon-close,
  header .panel {
    display: none;
  }
}

@media (max-width: 1110px) {
  header nav {
    padding: 3px 10px;
  }

  header nav .menu,
  header nav form {
    display: none;
  }

  header a.logo {
    width: 70px;
    height: 40px;
    margin-right: auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70px auto;
    /* border: 1px dashed #ccc; */
  }

  header:not(.dark) nav .icon-menu,
  header:not(.dark) nav .icon-close {
    color: #fff;
  }

  header[data-panel-status="open"] nav .icon-menu {
    display: none;
  }

  header[data-panel-status="close"] nav .icon-close {
    display: none;
  }

  header .panel {
    box-sizing: border-box;
    height: 0px;
    opacity: 0;
    overflow: hidden;
    transition: .25s ease-out;
  }

  header[data-panel-status="open"] .panel {
    height: calc(100vh - 46px);
    padding: 10px 10px 15px;
    opacity: 1;
    overflow: auto;
  }

  header .panel form {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    background: #f2f2f2;
    border-radius: 2px;
  }

  header .panel form .icon-search {
    font-size: 22px;
    font-weight: 500;
    color: #ccc;
  }

  header .panel form input {
    width: 0;
    flex: 1;
    height: 36px;
    font-size: 18px;
    line-height: 34px;
    margin-left: 10px;
    padding: 0;
    color: #ccc;
    background: transparent;
    outline: none;
    border: 1px solid transparent;
  }

  header .panel form input::placeholder {
    color: #ccc;
  }
  header .panel a.menu{
    display: block;
    padding: 5px 0;
    margin-top: 10px;
    color: #333;
  }
  header .panel p{
    margin: 15px 0 0;
    font-size: 24px;
    line-height: 28px;
    color: #666;
  }
  
  header .panel hr{
    margin: 10px 0 0;
    background: #E6E6E6;
  }
}