/*
Kuvasanomat ylä navigaatio
*/

.nav-container-kuvasanomat {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  height: 130px;
  background-color: #fff;
  border-bottom: 1px solid #707070;
}

.nav-container-kuvasanomat .nav-kuvasanomat {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: fit-content;
  margin: 0;
  list-style-type: none;
}

.nav-container-kuvasanomat .nav-kuvasanomat li a {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 110px;
  height: 100%;
  margin: auto;
  padding: 8px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80px;
  background-position-y: 7.5px;
  font-size: 18px;
  text-align: center;
  font-weight: 600;
}

.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(1) a {
  background-image: url('../images/kuvauutiset-lattabladet.png');
  margin-right: calc((100vw - 1090px) / 2);
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(2) a {
  background-image: url('../images/kuvauutiset-etusivu.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(3) a {
  background-image: url('../images/kuvauutiset-suomi.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(4) a {
  background-image: url('../images/kuvauutiset-maailma.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(5) a {
  background-image: url('../images/kuvauutiset-urheilu.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(6) a {
  background-image: url('../images/kuvauutiset-kulttuuri.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(7) a {
  background-image: url('../images/kuvauutiset-arki.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(8) a {
  background-image: url('../images/kuvauutiset-uutisarkisto.png');
}
.nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(9) a {
  background-image: url('../images/kuvauutiset-tietoa-sivustosta.png');
  margin-left: calc((100vw - 1090px) / 2);
}

.nav-container-kuvasanomat .nav-kuvasanomat li a:hover,
.nav-container-kuvasanomat .nav-kuvasanomat li a:focus,
.nav-container-kuvasanomat .nav-kuvasanomat li a:active,
.nav-container-kuvasanomat .nav-kuvasanomat li[class*='current-'] a {
  background-color: #ffbc10;
  color: black;
}

.nav-kuvasanomat .current-menu-item > a {
  text-decoration: underline;
}

.nav-container-kuvasanomat .nav-kuvasanomat li #mobile-tietoa-sivustosta {
  display: none;
}

.kuvasanomat #secondary-navigation {
  display: none !important; /* vaatii toimiakseen !important */
}

/* Kuvasanomat mobiili - 3 Raja-arvoa: 1074, 782, 660 */
@media only screen and (max-width: 1090px) {
  .nav-container-kuvasanomat .nav-kuvasanomat li a {
    font-size: 16px;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li a {
    min-width: 90px;
    padding: 8px;
    background-size: 70px;
    background-position-y: 15px;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(1) a {
    margin-right: calc((100vw - 902px) / 2);
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li:nth-child(9) a {
    margin-left: calc((100vw - 902px) / 2);
  }
}

@media only screen and (max-width: 992px) {
  .nav-container-kuvasanomat {
    justify-content: flex-start;
    width: 100%;
    height: fit-content;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat {
    flex-direction: column;
    height: fit-content;
    width: 100%;
    margin: 0;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li {
    height: 38px;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li:first-of-type {
    border-top: none;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li:last-of-type {
    border-bottom: none;
  }

  .nav-container-kuvasanomat .nav-kuvasanomat li a {
    display: flex;
    align-items: flex-start;
    font-size: 16px;
    margin: 0 !important;
    padding: 5px 5px 7px 70px;
    background-size: 30px;
    background-position-y: 4px;
    background-position-x: 20px;
  }
}
