* {
  font-family: "Segoe UI", Tahoma;
  margin: 0px;
  padding: 0px;
  color: #333;
  box-sizing: border-box;
}

html {
  background: #ccc;
  min-height: 100%;
  scroll-padding-top: 80px;
  scroll-padding-bottom: 50px;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
}

body {
  max-width: 1420px;
  min-width: 420px;
  background: #fff;
  min-height: 100%;
  margin: auto;
  position: relative;
}

nav {
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  height: 34px;
  z-index: 2000;
  max-width: 1420px;
  margin-bottom: 50px;
  width: 100%;
}

@media only screen and (max-width: 600px) {
  #menu {
    display: none !important;
  }

  #menu-toggle {
    display: flex !important;
    cursor: pointer;
  }

  nav:focus-within > #menu {
    display: flex !important;
  }

  #menu {
    flex-direction: column !important;
    width: 200px !important;
    flex-basis: 40px !important;
    height: unset !important;
    min-width: unset !important;
    top: 34px !important;
    position: absolute !important;
  }

  #menu > li {
    width: 100% !important;
    flex-basis: unset !important;
  }

  #menu > li > a {
    height: 40px !important;
  }

  .submenu {
    display: block !important;
    position: relative !important;
    top: unset !important;
    border-radius: unset !important;
    border: unset !important;
  }
}

#menu-toggle {
  display: none;
  background-image: url(images/menuicon.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px;
  height: 32px;
  width: 32px;
  margin-right: 10px;
  background-color: #999;
  border: 1px solid #666;
  border-radius: 5px;
}

#menu {
  margin-right: 10px;
  background: #999;
  border: 1px solid #666;
  border-radius: 5px;
  display: flex;
  min-width: 600px;
  height: 35px;
}

#menu > li > a {
  font-weight: bold;
}

#menu li a {
  display: flex;
  text-decoration: none;
  height: 33px;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

#menu > li {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-basis: 100px;
  height: 100%;
}

/*
#menu>li:last-child {
  flex-basis: 50px;
}*/

#menu > li > a:hover {
  box-shadow: inset 0px 0px 20px 0px #999;
  background: #ccc;
  border-radius: 5px;
}

.submenu {
  display: none;
  position: relative;

  width: 100%;
  border: 1px solid #666;
  background: #ccc;
  border-radius: 0 0 5px 5px;
  z-index: 999;
}

#menu > li:hover .submenu {
  display: block;
}

.submenu li:hover {
  box-shadow: inset 0px 0px 20px 0px #999;
}

.submenu li {
  display: block;
}

#content-wrapper {
  display: flex;
}

#content {
  display: flex;
  flex-direction: column;
  flex-basis: 900px;
  flex-shrink: 1;
  min-width: 400px;
  z-index: 100;
  font-size: 18px;
  scroll-snap-type: y mandatory;
  gap: 200px;
}

#content > section {
  background: #a8a8a899;
  border: 1px solid #333;
  padding: 50px;
  min-height: calc(100vh - 130px);
  backdrop-filter: blur(5px);
  position: relative;
  display: block;
  overflow: hidden;
}

#content div {
  clear: both;
}

#content h1 {
  margin-bottom: 20px;
}

#content p {
  line-height: 1.5em;
  margin: 5px 0px 15px;
}

#content img {
  display: block;
  max-width: 100%;
  margin: 10px 0;
}

.signature {
  line-height: 1.5em;
  margin-bottom: 20px;
  font-size: 200%;
  font-family: "Caveat", serif;
  transform: rotate(-3deg);
  width: fit-content;
  margin-left: 20px;
  margin-top: -10px;
}

#content > div:last-child {
  margin-bottom: 50px;
}

#content-wrapper:before {
  content: "";
  flex-grow: 2;
  min-width: 5px;
}

#content-wrapper:after {
  content: "";
  flex-grow: 0.25;
  min-width: 5px;
}

footer {
  position: fixed;
  max-width: 1420px;
  bottom: 5px;
  z-index: 1;
  width: 100%;
  padding: 0px 5px;
  text-align: end;
}

table {
  border-collapse: collapse;
  margin-bottom: 10px;
}

table,
th,
td {
  border: 1px solid #333;
}

th,
td {
  padding: 2px;
  min-width: fit-content;
  text-align: left;
  vertical-align: top;
}

input,
select {
  display: block;
  width: 250px;
  float: left;
  line-height: 21px;
}

label {
  width: 100%;
  font-weight: bold;
  text-align: right;
  min-width: max-content;
  line-height: 25px;
  font-size: 16px;
}

form {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-column-gap: 20px;
  grid-row-gap: 10px;
}

textarea {
  width: 100%;
  height: 400px;
}

button {
  padding: 5px;
  width: 250px;
  grid-column-start: 2;
}

.alert {
  font-size: 200%;
  font-weight: bold;
  clear: both;
  -webkit-text-stroke: 1px black;
  grid-column-start: 2;
}

h2 {
  clear: both;
  font-size: 24px;
}

.backend {
  font-size: 16px !important;
  flex-grow: 100;
}

.noborder,
.noborder * {
  border: none !important;
}

.noborder td:first-child {
  min-width: max-content;
  width: 200px;
  text-align: right;
  padding-right: 20px;
}

#content li {
  margin-left: 20px;
}

#bg-image {
  position: fixed;
  bottom: 0;
  background-image: url(images/bg2.png);
  background-repeat: no-repeat;
  background-position-x: center;
  background-position-y: center;
  height: 1024px;
  max-height: 100vh;
  width: 100%;
  max-width: 1024px;
}

/* Scroll-driven animation for sections */
@keyframes fade-in {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-30%);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

#content > section {
  animation: fade-in linear;
  animation-timeline: view();
  animation-range: entry 0% cover min(30%, 400px);
}

/* Fallback for browsers without view() support */
@supports not (animation-timeline: view()) {
  #content > section {
    animation: none;
  }

  .hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-30%);
    transition: all 0.5s ease-in-out;
  }

  .show {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}
#imgZoomerWrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5vh 5vw;
  z-index: 3000;
}

#imgZoomer {
  display: grid;
  grid-template-columns: 2em 1fr 2em;
  grid-template-rows: 2em 1fr;
  justify-content: center;
  align-items: center;
  grid-gap: 5px;
  width: 90vw;
  height: 90vh;
  padding: 5px;
  background-color: #333;
  border-radius: 10px;
}

#closeImg {
  grid-column: 3;
  cursor: pointer;
  font-size: 1.5em;
  background-color: #444;
  border-radius: 1em;
  text-align: center;
  color: #ccc;
  user-select: none;
}

#prevImg,
#nextImg {
  cursor: pointer;
  border: 1px solid #666;
  background-color: #444;
  font-size: 1.5em;
  height: 100%;
  color: #ccc;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
#prevImg:hover,
#nextImg:hover,
#closeImg:hover {
  background-color: #999;
}

#imgZoomer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  grid-column: 2;
  grid-row: 1 / 3;
}
