/*
 * Theme Name: Open Food Network Wordpress Theme
 * Theme URI:
 * Author: Open Food Network Ireland
 * Author URI: https://openfoodnetwork.ie
 * Description: Wordpress Theme
 * Version: 1.1
 *
 * https://threkk.medium.com/how-to-make-a-css-only-hamburger-menu-f7ad41e13399
 *
 * */

/* oswald-regular - latin */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 300;
  src: local(''),
  url('fonts/oswald-v35-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
  url('fonts/oswald-v35-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

body {
  font-family: Arial, sans-serif;
  background-image: url("images/ofn-tile.png");
  background-color: #f27052;
}

header {
  background: #fff;
}

header .menu-main-menu-container {
  margin: 0 auto;
}

header nav {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  height: 64px;
  font-family: "Oswald", sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 64px;
  position: relative;
  text-transform: uppercase;
}

header nav img {
  position: absolute;
  top: 1rem;
  left: 0.6rem;
  max-height: 44px;
  max-width: 250px;
}

header nav ul {
  list-style-type: none;
}

header nav ul ul {
  background: #fff;
  display: none;
}

header nav li {
  display: inline-flex;
  margin: 0 0.5em;
}

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

@media only screen and (min-width: 600px) {
  header nav li:hover ul {
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
    display: block;
    position: absolute;
    top: 49px;
    left: -44px;
    width: 15em;
    z-index: 99999;
  }

  header nav li:hover ul li {
    display: block;
    margin: 0.5em 1em;
    line-height: 32px;
  }
}

header nav li a {
  color: #000;
  text-decoration: none;
}

header nav li a:hover {
  color: #f27052;
}

header nav input[type="checkbox"],
header nav label {
  display: none;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.2rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.7rem; }
h6 { font-size: 1.6rem; }

h2, h3, h4, h5, h6 {
  font-weight: 400;
}

blockquote {
  border-left: 1rem solid #eee;
  color: #69a95d;
  color: #aaa;
  font-style: italic;
  margin-bottom: 2rem;
  margin-left: 0;
  margin-right: 0;
  margin-top: 2rem;
  padding-left: 2rem;
}

.container {
  padding: 4rem;
  background: #fff;
}

.container header {
  padding-bottom: 1rem;
}

.entry-content,
.entry-summary {
  border-top: 1px dotted #ccc;
  padding-bottom: 0rem;
  padding-top: 3rem;
}

.post .entry-content {
  border-bottom: 1px dotted #ccc;
}

.entry-summary {
  margin-bottom: 3rem;
}

.entry-meta,
footer.entry-footer {
  color: #b3b3b3;
}

footer.entry-footer {
  padding-bottom: 1rem;
  padding-top: 1rem;
}

footer.main-footer {
  color: #b3b3b3;
  background: #3b3b3b;
  box-shadow: 0 50vh 0 50vh #3b3b3b;
  padding-bottom: 3rem;
  padding-top: 3rem;
  text-align: center;
}

footer.main-footer a {
  color: #fff;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* mobile */

@media only screen and (max-width: 599px) {
  body {
    background-image: none;
  }

  input[type="checkbox"]:not(:checked) + .menu-main-menu-container {
    display: none;
  }

  header .menu-main-menu-container {
    display: block;
    width: 100%;
  }

  header nav {
    flex-direction: row;
    flex-wrap: wrap;
    height: unset;
    line-height: 24px;
    margin-left: 0;
    margin-right: 0;
    min-height: 64px;
  }

  header nav label {
    align-self: center;
    display: block;
    line-height: 1.6em;
    text-align: right;
    margin-bottom: 0.8rem;
    margin-right: 1.5rem;
    margin-top: 0.8rem;
  }

  header nav label div {
    background-color: #666;
    border-radius: 10px;
    height: 5px;
    margin: 6px 0;
    width: 35px;
  }

  header nav ul {
    display: block;
  }

  header nav ul:last-child {
    width: 100%;
    flex-basis: 100%;
  }

  header nav li {
    border-top: 1px dotted #ccc;
    margin: 0 5% 0 5%;
    width: 80%;
    text-align: right;
    padding: 0.5em 5%;
  }

  header nav li.current-menu-item {
    background: #eee;
  }

  header nav ul ul.sub-menu {
    display: block;
    margin: 0;
    margin-top: 30px;
    margin-left: -60px;
  }

  header nav ul ul.sub-menu a {
    color: #444;
  }

  .container {
    width: 100%;
    padding-left: 3rem;
    padding-right: 3rem;
  }

  .wp-block-image img {
    height: unset;
  }
}
