* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
}

header {
  padding: 20px 5vw 14px 5vw;
  border-bottom: 1px solid lightgray;
  display: flex;
  align-items: center;
  flex-direction: column;
}

header .page {
  display: flex;
  align-items: center;
  width: 100%;
}

header .search {
  display: flex;
  gap: 15px;
  align-items: center;
  width: 100%;
}

header .links {
  flex: 1;
  display: inline-flex;
  justify-content: end;
}

header .links a {
  color: gray;
  text-decoration: none;
}

header .links a:hover,
header .links a:active {
  text-decoration: underline;
}

header .logo img {
  width: 120px;
}

.filters {
  width: 100%;
  padding: 14px 0 0 136px;
}

.filters .option input {
  display: none;
}

.filters .option {
  text-decoration: none;
  color: inherit;
}

.filters .option,
.filters .option {
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  transition: background 0.2s ease-in-out;
}

.filters .option:has(input:checked),
.filters .option.active,
.filters:has(.option:hover) .option:hover,
.filters:has(.option:active) .option:active {
  background: #e9e8e8;
}
.filters .option:has(input:checked),
.filters .option.active {
  font-weight: bold;
}

.filters:has(.option:hover) .active:not(:hover),
.filters:has(.option:active) .active:not(:active) {
  background: none;
}

.searchbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  border-radius: 12px;
  padding-left: 2px;
  border: 1.5px solid lightgrey;
  box-shadow: 0px 0px 20px -18px;
  transition: all 0.1s ease-in-out;
}

.searchbar input {
  max-width: 80vw;
  width: 350px;
  height: 41px;
  padding: 10px 12px;
  border: none;
  border-radius: 20px;
  outline: none;
}

.searchbar:focus-within {
  border: 1.5px solid #004080;
}

.searchbar button {
  background: none;
  border: none;
  height: 100%;
  min-width: 3em;
  padding: 5px;
  border-radius: 20px;
  outline: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.searchbar button .icon {
  height: 1.5em;
  color: gray;
}

.searchbar button:hover .icon,
.searchbar button:active .icon {
  color: #004080
}

main {
  padding: 0 5vw;
}
main.searchResults {
  display: flex;
  gap: 10px;
}

main .results,
footer {
  padding-left: 139px;
}

main .results {
  padding-top: 20px;
}

.quickResult {
  order: 1;
  border-radius: 5px;
  border: 1px solid lightgray;
  max-width: 430px;
  min-width: 300px;
  min-height: 100px;
  height: fit-content;
  margin-top: 20px;
  padding: 12px 20px 14px;
  margin-bottom: 20px;
}
.quickResult h3 a,
.quickResult .desc a {
  color: inherit;
  text-decoration: none;
}
.quickResult h3 {
  margin: 5px 0;
}
.quickResult .desc {
  border-bottom: 1px solid lightgray;
  padding: 0 0 10px 0;
  margin: 0 0 10px 0;
}
.quickResult .credits {
  border-top: 1px solid lightgray;
  padding: 5px 0 0 0;
  margin: 15px 0 0 0;
  color: gray;
  font-size: 0.9em;
}
.quickResult .credits a {
  text-decoration: underline;
  color: inherit;
}
.quickResultLogo {
  max-width: 180px;
  max-height: 80px;
}
.result {
  margin: 0 0 22px 0;
}

.result h4 {
  font-weight: normal;
  width: 100%;
}

.result p {
  margin: -1px 0 0 0;
  font-size: 0.9em;
}

.result h4,
.result p {
  max-width: 660px;
}

.result a {
  width: 100%;
  display: block;
  padding: 2px 0;
}

.result h4 a {
  text-decoration: none;
}

.result h4 a:hover,
.result h4 a:active,
.result p.url a:hover,
.result p.url a:active {
  text-decoration: underline;
}

.result p a {
  text-decoration: none;
  color: inherit;
}

.result p.url {
  color: gray;
}

footer {
  font-size: small;
  color: gray;
}

.error {
  margin-bottom: 30px;
}

.error .icon {
  height: 4em;
  width: 4em;
  color: gray;
}

main .home {
  width: 100%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

main .home .logo img {
  height: 70px;
  margin-bottom: 12px;
}

main .home .filters {
  padding: 14px;
  text-align: center;
  width: auto;
}

/* hamburger menu */
#menuBox {
  height: 20px;
  width: 20px;
  position: relative;
  margin: 3px 0 0 10px;
}
#menuToggle {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  user-select: none;
}
#menuToggle a {
  text-decoration: none;
  color: #232323;
  transition: color 0.3s ease;
  display: inline-block;
  width: 100%;
}
#menuToggle a:hover,
#menuToggle a:active {
  color: gray;
}
#menuToggle input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  -webkit-touch-callout: none;
}
#menuToggle span {
  display: block;
  width: 20px;
  height: 2.5px;
  margin-bottom: 4px;
  position: relative;
  background: gray;
  border-radius: 3px;
  z-index: 1;
  transform-origin: 4px 0px;
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), width 0.55s ease, opacity 0.55s ease;
}
#menuToggle span:first-child {
  transform-origin: 0% 0%;
}
#menuToggle span:nth-last-child(2) {
  transform-origin: 0% 100%;
}
#menuToggle input:checked~span {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, 0px);
  background: #232323;
  width: 25px;
}
#menuToggle input:checked~span:nth-last-child(3) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
  width: 25px;
}
#menuToggle input:checked~span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}
#menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: -300px;
  max-width: 300px;
  width: 100vw;
  height: 125vh;
  height: calc(100vh + 100px);
  margin: -100px 0 0 -50px;
  padding: 55px 50px 50px 50px;
  box-sizing: border-box;
  overflow-y: auto;
  background: #ededed;
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  font-size: 1.2em;
}
#menu .logo {
  max-width: 100%;
  width: 120px;
}
#menu li {
  padding: 10px 0;
}
#menu li label {
  cursor: pointer;
}
#menu li.bottom {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  justify-content: end;
}
#menu li.bottom ul {
  list-style-type: none;
  font-size: 0.8em;
}
#menuToggle input:checked~ul {
  right: 0px;
}
/* hamburger menu end */

@media(max-width: 30em) {

  /* MOBILE */
  header .search {
    flex-wrap: wrap;
    gap: 15px;
  }
  header .search .logo {
    order: 1;
  }
  header .search .links {
    order: 2;
  }
  header .search #menuBox {
    order: 3;
  }
  header .search form {
    order: 4;
  }

  header .page {
    gap: 5px;
  }

  .filters {
    max-width: 90vw;
    padding-left: 0;
    padding-top: 4px;
  }

  main.searchResults {
    flex-direction: column;
    gap: 0;
  }
  .quickResult {
    order: unset;
    width: 100%;
  }

  main .results,
  footer {
    padding-left: 4px;
  }

}