header {
  display: -ms-grid;
  display:     grid;

  -ms-grid-columns: auto 1fr auto auto;
  -ms-grid-rows: 1fr auto;
  grid-template: 1fr auto / auto 1fr auto auto;
  grid-template-areas: "banner banner banner banner"
                       "logo countdown countdown countdown"
                       "logo menu menu menu";

  position: relative;

  width: 100%;
  max-width: 1040px;

  padding: 0 15px 0;
  margin: 15px auto 25px auto;
}

header .fb-share-button {
  grid-column: 3/4;
  grid-row: 1/3;
  align-self: center;
  margin-right: 25px;
}

header .logo {
  -ms-grid-column: 1;
  -ms-grid-row: 1;
  -ms-grid-row-span: 2;
  grid-area: logo;

  margin-top: 15px;
  margin-bottom: 15px;
}

header .logo img {
  height: 90px;
}

header .banner {
  -ms-grid-column: 1;
  -ms-grid-column-span: 2;
  -ms-grid-row: 1;
  -ms-grid-row-span: 2;
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 5px;
}

header .menu-container {
  grid-area: menu;
  -ms-grid-column: 2;
  -ms-grid-row: 2;

  position: relative;
}

#header-menu-toggle {
  width: 100%;
  height: 43px;
  border-radius: 7px;
  border: 0;
  margin-top: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  color: #073776;
  font-size: 18px;
}

#header-menu-toggle:hover,
#header-menu-toggle.in {
  font-weight: 700;
}

@media (max-width: 930px) {
  header .menu-container {
    margin-bottom: 15px;
  }

  #header-menu-toggle {
    height: 35px;
  }
}

#header-menu {
  border-radius: 7px;
  padding-left: 15px;
  padding-right: 0;
  padding-bottom: 8px;
}

#header-menu.collapsed {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 12;
  border-radius: 0 0 7px 7px;
  background: rgba(255,255,255,0.8);
  background: linear-gradient(rgba(255,255,255,0.8) 0px, rgba(255,255,255,1) 200px);
  text-align: center;
  z-index: 120;
}

#header-menu ul {
  list-style-type: none;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  height: 43px;
  line-height: 43px;
  margin: 0 auto;
}

#header-menu.collapsed ul {
  flex-direction: column;
  height: auto;
  width: 250px;
}

#header-menu li {
  display: inline-block;
  margin: 0;
  padding: 0;
  text-align: center;
}

#header-menu.collapsed li {
  text-align: left;
}

#header-menu li.home {
  width: 43px;
}

#header-menu li.home a {
  display: block;
  width: 43px;
  height: 43px;
  background-image: url('/wp-content/images/home.svg');
  background-size: 18px;
  background-position: 12.5px 15px;
  background-repeat: no-repeat;
}

#header-menu a {
  display: inline-block;
  color: #073776;
  font-size: 18px;
}

@media (max-width: 520px) {
  #header-menu a {
    font-size: 16px;
  }
}

#header-menu .no-action > a {
  cursor: default;
}

nav a:before {
  display: block;
  height: 1px;
  margin-bottom: -1px;
  overflow: hidden;
  color: transparent;
  content: attr(data-text);
  font-weight: 700;
}

nav .menu-item-has-children > a:before {
  padding-right: 16px;
}

#header-menu li.current-menu-item > a,
#header-menu li:hover > a {
  font-weight: 700;
  text-decoration: none;
}

#header-menu .menu-item-has-children {
  position: relative;
}

#header-menu .menu-item-has-children > a {
  cursor: default;
}

#header-menu .menu-item-has-children > a:after {
  display: inline-block;
  content: '';
  background-image: url('/wp-content/images/arrow-nc.svg');
  width: 16px;
  float: right;
  height: 43px;
  margin-left: 3px;
  background-size: 16px;
  background-position: 0 16px;
  background-repeat: no-repeat;
}

#header-menu.collapsed .menu-item-has-children:after {
  display: none;
  background: transparent;
}

#header-menu .sub-menu {
  position: absolute;
  display: none;
  z-index: 10;
  height: auto;
  overflow: hidden;
  padding: 0;
  border-radius: 14px 14px 7px 7px;
  background: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,1) 20px);
  left: -50px;
  right: -50px;
  top: 43px;
}

#header-menu.collapsed .sub-menu {
  position: initial;
  background: none;
  padding-left: 15px;
}

#header-menu .menu-item-has-children:hover .sub-menu {
  display: block;
}

#header-menu .sub-menu li {
  display: block;
}

#header-menu .sub-menu a {
  line-height: 1.2;
}

#login-menu {
  padding: 15px;
  width: 215px;
}

#login-form button, #login-menu a {
  width: 100%;
  font-size: 16px;
  margin-top: 15px;
}

.menu-item-home a {
  width: 43px;
  text-align: center;
}

.menu-item-home a i {
  font-size: 20px;
  margin-bottom: -3px;
}

.menu-item-home a:after {
  display: none;
}


header .chci-darovat {
  /*width: 215px;*/

  -ms-grid-column: 4/5;
  -ms-grid-row: 1/3;
      grid-column: 4/5;
      grid-row: 1/3;

  margin: auto 0 10px auto;

  padding-left: 43px !important;
  padding-right: 43px !important;

  font-weight: 600;
}

header .chci-darovat i {
  margin-left: 10px;
  font-size: 1.15em;
}

@media (min-width: 769px) and (max-width: 930px) {
  header {
    grid-template: 1fr auto / auto 1fr auto;
    grid-template-areas: "logo countdown countdown"
                         "menu menu menu";
  }

  header .logo {
    margin-bottom: 5px;
  }

  header .chci-darovat {
    -ms-grid-column: 2/2;
    -ms-grid-row: 1/1;
        grid-column: 3/3;
        grid-row: 1/1;
  }

  header .fb-share-button {
    grid-column: 2/2;
    align-self: center;
    text-align: right;
    display: block;
  }
}

@media (max-width: 620px) and (min-width: 495px) {
  header {
    grid-template: 1fr auto auto / auto 1fr auto;
    grid-template-areas: "logo countdown countdown"
                         "logo countdown countdown"
                         "menu menu menu";
  }
  
  header .chci-darovat {
    grid-column: 2/3;
    grid-row: 2/3;
  }
    
  header .fb-share-button {
    grid-row: 1/2;
    grid-column: 2/3;
    align-self: center;
    text-align: right;
    display: block;
    margin-right: 0;
  }
}

@media (max-width: 768px) and (min-width: 495px) {
  header .logo {
    text-align: left;
  }

  header .menu-container {
    margin-left: 15px;
  }
}

@media (max-width: 494px) {
  header {
    grid-template: auto auto auto auto / 1fr;
    grid-template-areas: "logo"
                         "countdown"
                         "menu"
                         "chci-darovat"
                         "share"
                         "login";
  }

  header .logo {
    text-align: center;
  }
  
  header .chci-darovat {
    display: none;
    grid-area: chci-darovat;
    align-self: center;
    margin: 0 auto;
  }

  header .fb-share-button {
    grid-area: share;
    margin-right: 0;
    align-self: center;
    justify-self: end;
    margin: 0 auto;
  }

  header .login {
    position: unset;
    grid-column: 1/2;
    grid-row: 1/2;
  }
}
