/* sport sidens stylesheet */

/* sidens wrapper */
.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.2;
}

/* subwrapper */
.wrapper-480 {
  max-width: 480px;
  margin: 60px auto 60px auto;
  text-align: left;
}

/* p elementer afstand */
.wrapper-480 p {
  margin-bottom: 1em;
}

/*  */
h2 {
  margin-bottom: 1em;
}

/* ---------- galleri ---------- */

.galleri_map_grid {
  width: 100%;
  margin: 0 auto;
  display: grid;
  justify-content: center;
  align-content: center;
  gap: 0.5em;
  padding: 1em;
  grid-template-columns: repeat(3, 1fr);
}

#galleri_slider {
  grid-column: 2/3;
  display: grid;
  grid-template-columns: repeat(1, auto);
  align-items: center;
  justify-content: center;
}

.slider {
  grid-area: 1/1/2/-1;
  overflow: hidden;
  width: 640px;
}

.slide {
  width: 100%;
  display: none;
}

.slide.active {
  display: block;
  position: relative;
}

.left {
  animation-name: slideLeft;
}

@keyframes slideLeft {
  0% {
    left: 100%;
  }
  100% {
    left: 0%;
  }
}

.right {
  animation-name: slideRight;
}

@keyframes slideRight {
  0% {
    right: 100%;
  }
  100% {
    right: 0%;
  }
}

.left,
.right {
  animation-duration: 500ms;
  animation-timing-function: ease-out;
}

#next,
#back {
  grid-area: 1/1/2/-1;
  font-size: 2.5em;
  color: #fff;
  margin: 1rem;
  z-index: 10;
  cursor: pointer;
}

#next {
  justify-self: end;
}

#back {
  justify-self: start;
}

p#caption,
p#map_caption {
  font-size: 62.5%;
  line-height: 1.6;
  align-self: end;
  width: 14.3em;
}

p#caption {
  grid-column: 3/4;
}

/* ---------- wrapper top ---------- */

/* wrapper top */
.wrapper-top {
  max-width: 800px;
  background-color: #fff;
  position: relative;
  margin: 0 auto;
  margin-top: -4em;
  padding-left: 20px;
  padding-right: 20px;
}

.wrapper-top h3 {
  padding-top: 1em;
  color: #e30613;
  font-size: 1.125em;
  font-weight: 200;
}

.wrapper-top h1 {
  font-size: 3.5em;
  margin-top: 0.2em;
}

.wrapper-top h2 {
  font-size: 1.625em;
  font-weight: 200;
  max-width: 660px;
  margin: 0 auto;
  margin-top: 1.3em;
}

/* speciel styling */
.wrapper-480:first-of-type p:nth-child(2) {
  color: #66665f;
  padding-bottom: 1em;
}

.wrapper-480:first-of-type p:nth-child(1) {
  margin-bottom: 0;
}

.wrapper-480:first-of-type p:nth-child(-n + 2) {
  font-size: 0.75em;
}

.wrapper-480:nth-child(-n + 2) {
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- wrapper middle ---------- */

/* ryttere grid sektionen */
.wrapper-middle-ryttere {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-content: bottom;
  gap: 10px;
}

.wrapper-middle-ryttere div {
  width: 640px;
}

/* figcaption i højre side */
.wrapper-middle-ryttere figcaption {
  color: #66665f;
  font-size: 0.625em;
  align-self: end;
  text-align: left;
}

/*  */
.wrapper-middle-ryttere div {
  grid-column: 2;
}

.wrapper-middle h2 {
  font-size: 1.25em;
}

/* ---------- wrapper bottom ---------- */

/* google maps intregration */
.wrapper-bottom-map {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
}

/* tekst til venstre for mappet */
.wrapper-bottom-map p {
  color: #66665f;
  font-size: 0.625em;
  align-self: end;
}

/* iframe styling */
.wrapper-bottom-map iframe {
  grid-column: 2;
  width: 640px;
  height: 450px;
}

/* figcaption placering */
.wrapper-bottom-map p {
  grid-column: 1;
  grid-row: 1;
}

/* ---------- media queries ---------- */
@media only screen and (max-width: 860px) {
  .wrapper {
    padding-top: 60px;
  }
  header nav i.fas {
    display: block;
    margin-top: 20px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
  }
}

@media only screen and (max-width: 800px) {
  .wrapper-top {
    position: unset;
    margin-top: 0;
  }
  main {
    font-size: 0.8em;
  }
  .wrapper-480 {
    font-size: 1.2em;
  }
  figcaption {
    font-size: 1.2em;
  }
  .wrapper-middle-ryttere figcaption {
    font-size: 1em;
  }
  .wrapper-bottom-map p {
    font-size: 1em;
  }
}

@media only screen and (max-width: 1000px) {
  .galleri_map_grid {
    grid-template-columns: 1fr;
    grid-template-columns: 1fr auto;
    padding: 0;
  }
  p#caption {
    grid-area: 2/1;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
  }
  #galleri_slider {
    grid-column: 2/1;
  }
  .wrapper-bottom-map {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  /* iframe styling */
  .wrapper-bottom-map iframe {
    grid-column: 1;
  }

  /* figcaption placering */
  .wrapper-bottom-map p {
    margin-top: 1em;
    grid-column: 1;
    grid-row: 2;
    max-width: 640px;
  }
}

@media only screen and (max-width: 640px) {
  /* gør billedet responsive fra 640px altså dens width */
  .slider {
    width: 100%;
  }
  /* gør iframe responsive fra 640px altså dens width */
  .wrapper-bottom-map iframe {
    width: 100%;
  }
  .wrapper-bottom-map p {
    padding: 0 10px;
  }
  .wrapper-middle-ryttere figcaption {
    padding: 0 10px;
  }
}

@media only screen and (max-width: 420px) {
  .wrapper {
    padding-top: 0;
  }
  main {
    font-size: 0.7em;
  }
  .wrapper-480 {
    font-size: 1.2em;
  }
  figcaption {
    font-size: 1.2em;
  }
  header nav i.fas {
    margin-top: 12px;
  }
}
