/* Innholdsfortegnelse
Globals
Header
Footer
Index
Paamelding
Courses
About
*/

/* ----------------------------------- SKILLE ----------------------------------- */
/* GLOBALS */

* {
  box-sizing: border-box;
}

body {
  font-family: Georgia, Times, serif;
  padding: 0;
  margin: 0;
  background-color: white;
}

h1,
h2,
h3,
h4 {
  text-align: center;
}

h1 {
  font-size: 3.5em;
}

/* ----------------------------------- SKILLE ----------------------------------- */
/* HEADER */

header {
  height: 120px;
  width: 100%;
  background-color: #985452;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  position: relative;
}

nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

nav .navElement {
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.2em;
  padding: 8px;
  margin-right: 1em;
}

/* Nav:hover */
/* Hover stilsetting inspirert av: https://codepen.io/Taylor132465/pen/ONOzeJ */
.navElement,
.navElement:after,
.navElement:before,
#courserefer,
#courserefer:after,
#courserefer:before {
  transition: all .5s;
}

.navElement,
#courserefer {
  position: relative;
  transition: all 1s;
}

.navElement:after,
#courserefer:after {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 0%;
  content: '.';
  color: transparent;
  background: white;
  height: 1px;
  content: '.';
  margin: 0;
  opacity: 0;
}

.navElement:hover:after,
#courserefer:hover:after {
  width: 100%;
  animation: fill 1s forwards;
  opacity: 1;
}

.navElement:hover,
#courserefer:hover {
  opacity: 0.5;
}

/* Nav:hover slutt */

/* Translate-knapp START. En vises kun i hamburgermeny, en er plassert oppe til høyre. */

.translate {
  cursor: pointer;
  width: 3.5em;
  margin: 5px;
}

#translate_desk {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px;
}

#translate_phone {
  display: none;
  position: relative;
  margin: auto;
  padding: 2px 0 8px 0;
  width: 3em;
}

/* Translate-knapp SLUTT */

#logo,
#home {
  height: 100%;
}

#logo {
  width: auto;
}

/* Skjule hamburgermeny, hamburgermeny inspirert av https://www.w3schools.com/howto/howto_js_mobile_navbar.asp */
.hamburgermenu {
  display: none;
}

@media only screen and (max-width: 700px) {
  .hamburgermenu {
    display: block;
    color: white;
    font-size: 3em;
  }

  nav {
    display: none;
    z-index: 99999; /* Slik at nav-baren alltid er øverst */
    background-color: #a7605c; /* Lysere versjon av hovedstilen */
    position: absolute;
    top: 190px; /* Avhenger av antall elementer i nav */
    width: 100%;
  }

  nav a {
    display: block;
    width: 100%;
    text-align: center;
  }

  #translate_desk {
    display: none;
  }

  #translate_phone {
    display: block;
  }
}

/* ----------------------------------- SKILLE ----------------------------------- */
/* FOOTER */

.wrapper {
  position: absolute;
  min-height: calc(100vh - 180px);
  width: 100%;
}

footer {
  position: absolute;
  width: 100%;
  text-align: center;
  padding: 2em 0;
  background-color: #985452;
  height: 180px;
  top: 100%;
}

footer img {
  width: 2em;
  margin: 3px;
}

footer p {
  color: white;
  text-align: center;
  font-family: Georgia, Times, serif;
}

footer a {
  color: white;
}
/* ----------------------------------- SKILLE ----------------------------------- */
/* INDEX */

#hovedtekst h1 {
  margin: 0;
  color: white;
}

#undertekst h3 {
  margin: 5px;
  font-size: 1.5em;
  color: white;
}

.bildetekst {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#courserefer {
  color: white;
  text-decoration: none;
}

/* Slideshow til hovedsiden */

.forsidebilder {
  height: 100vh;
}

.fbilde1,
.fbilde2,
.fbilde3,
.fbilde4 {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
}

/* Select slideshow images and animation time (all the animations need to have the same time) */
.fbilde1 {
  background-image: url(../img/forsidebilde1.jpg);
  animation: fade 30s infinite;
}

.fbilde2 {
  background-image: url(../img/forsidebilde2.jpg);
  animation: fade2 30s infinite;
}
.fbilde3 {
  background-image: url(../img/forsidebilde3.jpg);
  animation: fade3 30s infinite;
}

.fbilde4 {
  background-image: url(../img/forsidebilde4.jpg);
  animation: fade4 30s infinite;
}


/* Fade timing is determined by the '%' value, and the fade occurs between the values where the opacity changes from 0 to 1 and back */
@keyframes fade {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  30% {
    opacity: 0;
  }
  90% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fade2 {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  45% {
    opacity: 1;
  }
  55% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fade3 {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fade4 {
  0% {
    opacity: 0;
  }
  65% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media only screen and (max-width: 450px) {
  #hovedtekst {
    font-size: 0.8em;
  }
}

/* ----------------------------------- SKILLE ----------------------------------- */
/* Påmelding */

fieldset {
  border: none;
}

legend {
  margin: auto;
  font-size: x-large; 
}

form {
  width: 70%;
  margin: 2em auto;
}

abbr {
  text-decoration: none; /* Fjerne stiplet linje fra abbreviations */
}

[type="text"],
[type="number"],
[type="email"],
[type="tel"],
select {
  -webkit-box-sizing: border-box; /* Brukes for å gjøre <select> til lik størrelse som <input> */
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cccccc;
  text-indent: 4px;
  padding: 10px;
}

.skjemaBoks {
  white-space: nowrap; /* Får asteriksen '*' til å være på linje med skjemaet */
}

.inputlinje {
  display: block;
}

/* Knappen benyttes både i courses.html og paamelding.html */

.skjemaKnapp {
  font-family: Georgia, Times, serif;
  background-color: #985452;
  border: none;
  border-radius: 12px;
  color: white;
  padding: 0.5em 2em;
  text-align: center;
  font-size: 2em;
  cursor: pointer;
  margin: 1em auto;
  display: block;
}

.skjemaKnapp:hover {
  background-color: #b24e4b;
}

#aksept {
  margin-bottom: 25px;
}

label[for='aksept'],
label[for='medlemskap'] {
  white-space: normal;
}

/* ----------------------------------- SKILLE ----------------------------------- */
/* Courses */

.container {
  display: flex;
  flex-direction: column;
  height: 60%;
  margin: 1em auto;
}

.rowcontainer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  padding: 0.5em 2em;
}

#reverseRow {
  flex-wrap: wrap-reverse; /* For struktur: tekst-bilde tekst-bilde */
}

.rowElements {
  width: 20%;
  min-width: 300px;
  margin: 0 4em;
}

.bildeboks {
  display: flex;
  justify-content: center;
}

.coursetext {
  text-align: justify;
}

.metaInfo {
  font-style: italic;
}

/* ----------------------------------- SKILLE ----------------------------------- */
/* About */

.videoContainer {
  width: 420px;
  height: 260px;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.textContainer {
  display: flex;
  flex-direction: column;
  width: 40%;
  margin: 2em;
}

.piccontainer {
  position: relative;
  text-align: center;
  color: white;
}

.piccontainer img {
  width: 100%;
}

.piccontainer h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#omossContent {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3%;
}

@media only screen and (max-width: 700px) {
  /* About */

  .videoContainer {
    width: 300px;
    height: 200px;
  }

  .textContainer {
    width: 70%;
  }

  #omossContent {
    flex-direction: column;
  }

  .piccontainer h1 {
    white-space: nowrap;
    top: 25%;
    font-size: 3em;
  }
}
