:root {
  --get-green: #19b991;
  --get-green-light: #f6fbf9;
  --font-size: 1rem;
  --large-font: 1.4em;
  --content-width: 92em;
  --content-padding: 2em;
  --main-content-padding: 6em;
  --boder-radius: 0.2em;
}

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Regular.woff2") format("woff2"),
    url("../fonts/NotoSans-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Noto Sans", sans-serif;
  font-weight: 400;
  font-size: var(--font-size);
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  background-color: var(--get-green-light);
}

::selection {
  background-color: var(--get-green);
  color: white;
}

a {
  color: var(--get-green);

  &:hover,
  &:active {
    text-decoration: none;
  }
}

p,
ul:not(nav ul):not(footer ul) {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 1em;
}

dl.enumerate-enumitem {
  font-size: 1.4rem;
  display: flex;
  flex-wrap: wrap;

  & dt {
    width: 2em;
  }

  & dd {
    margin-left: 0;
    width: calc(100% - 2em);
  }
}

main p {
  hyphens: auto;
  hyphenate-limit-chars: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

ul:not(nav ul) {
  margin-left: 1em;

  & li::marker {
    color: var(--get-green);
  }
}

b {
  font-weight: 700;
}

h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--get-green);
  margin-bottom: 1em;

  &::before {
    content: url("../img/beforeHeadline.svg");
    display: inline-block;
    width: 1em;
    top: 0.05em;
    position: relative;
    margin-right: 0.25em;
  }
}

h2 {
  font-size: 1.75em;
  color: var(--get-green);
  font-weight: 700;
}

h3 {
  font-size: 1.75em;
  color: black;
  font-weight: 700;
}

h4 {
  font-size: 1.75em;
  color: black;
  font-weight: 400;

}

h5,
.button {
  position: absolute;
  z-index: 3;
  top: -1em;
  left: 0.5em;
  font-size: 1.4em;
  font-weight: 500;
  margin: 0;

  &>span {
    color: white;
    background-color: var(--get-green);
    padding: 0 0.5em;
  }

  &::before,
  &::after {
    display: inline-block;
    height: 1.38em;
    top: 0.3em;
    position: relative;
    margin: 0;
    background-color: transparent;
  }

  &::before {
    content: url("../img/box_head_before.svg");
    aspect-ratio: 452 / 241;
    margin-right: -1px;
  }

  &::after {
    content: url("../img/box_head_after.svg");
    aspect-ratio: 109 / 241;
    margin-left: -1px;
  }
}

h5::before, h5::after {
  top: 0.35em !important;
}

.button {
  position: relative;
  display: inline-block;
  width: fit-content;
  left: 0;
  top: 0;
  margin-right: 1em;
  margin-bottom: calc(var(--large-font) * 2);

  &>span {
    transition: padding 0.2s ease-out;
  }

  &:hover,
  &:active {
    &>span {
      padding: 0 1.5em 0 0.5em;
    }
  }
}

h6 {
  font-size: 1.3em;
  color: var(--get-green);
  font-weight: 400;
}

#content-wrapper {
  width: calc(var(--content-width) + 2 * var(--content-padding));
}

.deco_img {
  border: 2px solid var(--get-green);
}

#scrollToTop {
  position: fixed;
  bottom: 0.5em;
  right: 1em;
  font-size: 2.5em;
  color: white;
  background-color: var(--get-green);
  border-radius: var(--boder-radius);
  padding: 0 0.44em;
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
  transition: opacity 0.3s ease;

  &.hidden {
    opacity: 0;
    pointer-events: none;
  }
}

/* ========= header =========== */

header {
  box-sizing: border-box;
  z-index: 20;
  background-color: var(--get-green);
  width: calc(var(--content-width) + 2 * var(--content-padding));
  height: 10em;
  padding: 0 var(--content-padding) 0 var(--content-padding);
  position: fixed;
  display: flex;
  justify-content: space-between;
  margin: 0;
  transition: margin-top 0.3s ease;

  &>a {
    display: flex;

    &>.logo-wrapper {
      display: flex;
      overflow: hidden;

      &>.logo {
        align-self: flex-end;

        &>.GETstripes {
          height: 3em;
          position: relative;
          bottom: -0.4em;
          left: 0;
        }

        &>.GETtypo {
          height: 2.75em;
          position: relative;
          bottom: 2.55em;
          margin-left: -6.05em;
          opacity: 1;
          transition: opacity 0.3s ease;
        }
      }
    }
  }

  &.shrink {
    margin-top: -6.5em;

    & .logo-wrapper>.logo>.GETtypo {
      opacity: 0;
      transition-delay: 0.2s;
    }
  }
}

header nav {
  margin-right: calc(40% - 23em);

  &>ul {
    display: flex;
    position: relative;
    top: 6.2em;

    &>.nav-item {
      list-style-type: none;
      width: 11.9em;
      position: relative;
      height: auto;
      cursor: pointer;

      &>.nav-background {
        height: 3em;
        position: relative;
        clip-path: inset(0 0 0.2em 0);
      }

      &>p {
        position: relative;
        font-size: var(--large-font);
        margin: 0;
        bottom: 2.2em;
        text-align: center;
        color: var(--get-green);
        transition: color 0.3s ease;

        &::before {
          position: relative;
          width: 1.2em;
          height: auto;
          margin-right: 0.2em;
          top: 0.2em;
          display: inline-block;
        }
      }

      &:nth-child(3) p {
        color: white;
      }

      &:nth-child(1) p::before {
        content: url("../img/icon_lernende.svg");
      }

      &:nth-child(2) p::before {
        content: url("../img/icon_lehrende.svg");
        margin-top: -0.2em;
        top: 0.3em;
      }

      &:nth-child(3) p::before {
        content: url("../img/icon_projekt.svg");
        margin-top: 0.2em;
        width: 1.1em;
      }
    }
  }
}

nav ul .nav-item {
  &>ul {
    position: absolute;
    margin-top: -2.8em;
    margin-left: -2px;
    padding: 2em;
    background-color: white;
    border: 2px solid var(--get-green);
    border-top: none;
    border-bottom-left-radius: var(--boder-radius);
    border-bottom-right-radius: var(--boder-radius);
    flex-direction: column;
    display: none;
    width: auto;
    min-width: 12em;
  }

  &:nth-child(3) ul {
    background-color: var(--get-green);
    border: 2px solid white;
    border-top: none;
    margin-left: 0;

    &>li>a {
      color: white;
    }
  }

  &>ul>li {
    list-style-type: none;
    font-size: var(--large-font);
    margin-bottom: 0.6em;

    &>a {
      color: var(--get-green);
    }
  }

  &:hover ul {
    display: flex;
  }
}

.videoOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 3em;
  box-sizing: border-box;
  z-index: 25;

  & .close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2;
  }

  & .videoOverlayContent {
    position: relative;
    max-width: 100%;
    max-height: calc(100vh - 6em);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);

    & #videoPlayer {
      position: relative;
      max-width: 100%;
      max-height: calc(100vh - 8em);
      border-radius: calc(var(--boder-radius) * 2);

    }
  }

  & #videoTitle {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 0 3em;
    text-align: center;
    color: white;
  }
}

#viewFullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 100;

  &.show {
    pointer-events: all;
    opacity: 1;
  }

  &>img {
    max-width: 90%;
    max-height: 80%;
    display: block;
    margin: auto;
  }

  &>#caption {
    color: black;
    text-align: center;
    margin-top: 1em;
    max-width: 90%;
  }
}

/* ========= main =========== */

main {
  box-sizing: border-box;
  width: 100%;
  background-color: var(--get-green-light);
  border-left: 2px solid var(--get-green);
  border-right: 2px solid var(--get-green);
  margin: 0;
  padding: 12em var(--main-content-padding) 8em var(--main-content-padding);
  min-height: 100vh;
  position: relative;
}

main section {
  padding: 0 3.4em;

  & ul {
    padding: 0;
  }
}

.aufbau {
  width: 100%;
  max-width: 22em;
  display: block;
  margin: 6em auto;
}

/* ========= main module =========== */

main section.module {
  margin-bottom: 15em;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--content-padding);

  &>article {
    min-width: 2em;
    min-height: 2em;
    background-size: cover;
    background-position: 0 0;
    position: relative;
    cursor: pointer;

    &>.modul-head {
      overflow: hidden;

      &>img {
        max-width: 100%;
        outline: 2px solid var(--get-green);
        outline-offset: -2px;
        box-sizing: border-box;
      }

      &>.modul-head-text {
        position: absolute;
        display: flex;
        flex-direction: column;
        top: 2em;
        width: 100%;
        padding: 1em;
        box-sizing: border-box;

        &>p {
          color: white;
          font-weight: 700;
          font-size: 1.6em;
          text-align: center;
          margin: 0;
          line-height: 1;
        }
      }
    }

    &>ol {
      position: absolute;
      box-sizing: border-box;
      margin-top: -6%;
      width: 100%;
      z-index: 2;
      padding: 1em;
      background-color: white;
      border: 2px solid var(--get-green);
      border-top: none;
      max-height: 0;
      /*transition: max-height 0.3s ease;*/
      opacity: 0;
      pointer-events: none;
      display: block;

      &>li {
        margin-bottom: 0.5em;
        color: var(--get-green);
        margin-left: 1em;
        font-size: 1.4em;
      }
    }

    &:hover,
    &.mobile_hover {
      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--get-green-light);
        opacity: 0.1;
        z-index: 1;
      }

      &>ol {
        max-height: 100vh;
        opacity: 1;
        pointer-events: all;
      }
    }
  }
}

main .modul_wrapper {
  display: grid;
  gap: 1em;
  grid-template-columns: 8fr 3fr;
  position: relative;

  &>.modul_content {

    &>h3,
    &>h4 {
      font-size: 1.75em;
      font-weight: 700;
      color: var(--get-green);
      margin-bottom: 1em;
      /* Negative Einrückung für die erste Zeile */
      text-indent: -1em;
      /* Einrückung für alle Zeilen */
      padding-left: 0em;

      &::before {
        content: url("../img/beforeHeadline.svg");
        display: inline-block;
        width: 1.43em;
        top: 0.05em;
        position: relative;
        margin-right: -0.5em;
      }
    }
  }

  & .modul_content {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    max-width: 100%;

    & .minipage {
      width: auto;
      display: inline-block;
      margin-right: 3em;

      &>figure>p>img {
        height: 8em;
        width: auto;
      }
    }

    & .cmbx-10 {
      font-weight: 700;
      font-size: 1em;
      margin-top: 0;
      margin-bottom: 1em;
    }

    & figure {
      margin: 3em auto;
      text-align: center;
      max-width: 100%;

      & figcaption {
        font-size: 1em;
      }

      & img {
        max-width: 100%;
        cursor: pointer;
      }
    }

    & p .MathJax {
      font-size: 100% !important;
    }

    & .Lernziele, & .bsp, & .Merksatz {
      border: 2px solid var(--get-green);
      border-radius: var(--boder-radius);
      padding: 0 1em 1em 1em;
      margin: 3em 0;
      width: 100%;


      & .tcolorbox-title {
        position: relative;
        z-index: 3;
        top: -1em;
        left: 0;
        font-size: 1em;
        font-weight: 500;
        display: flex;

        &>p {
          color: white;
          background-color: var(--get-green);
          padding: 0 0.5em;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        &::before,
        &::after {
          display: inline-block;
          height: 1.92em;
          top: 0em;
          position: relative;
          margin: 0;
          background-color: transparent;
        }

        &::before {
          content: url("../img/box_head_before.svg");
          aspect-ratio: 452 / 241;
          margin-right: -1px;
        }

        &::after {
          content: url("../img/box_head_after.svg");
          aspect-ratio: 109 / 241;
          margin-left: -1px;
        }
      }
    }

    & .bsp, & .Merksatz {
      background-color: white;
    }

    & .tabular {
      display: flex;
      justify-content: center;
      margin-bottom: 1em;

      & tbody {
        border-collapse: collapse;

        &>.hline {
          display: none;
        }

        & tr>td {
          border-bottom: 2px solid black;
          margin: 0;
          padding: 0.25em;
        }

      }
    }
  }

  &>.sidebar {
    transition: all 0.3s ease;
    width: 21em;
    padding: 0;
    height: 100vh;
    position: sticky;
    top: 5em;

    &>.expand_icon {
      display: none;
    }

    & .sidebar_nav, & .additional_content {
      position: relative;
      background-color: white;
      border: 2px solid var(--get-green);
      border-radius: var(--boder-radius);
      padding: 3em 1em 1em 1em;
      margin-top: 2em;

      & p,
      & a {
        font-size: 1em;
      }

      &>.posnav {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        color: var(--get-green);
        padding-bottom: 2em;

        & p {
          font-weight: 700;
          margin: 0;
        }

        & .dreieckH,
        & .dreieckR {
          width: 0;
          height: 0;
          opacity: 0.5;
          border-left: 0.6em solid transparent;
          /* Linke Seite */
          border-right: 0.6em solid transparent;
          /* Rechte Seite */
          border-bottom: 1em solid var(--get-green);
          /* Untere Seite (Farbe des Dreiecks) */
        }

        & .dreieckR {
          border-bottom: none;
          border-top: 1em solid var(--get-green);
          /* Untere Seite (Farbe des Dreiecks) */
        }
      }

      & .additional_content {
        height: 100%;
      }

      &>.top_white, &>.bottom_white {
        position: absolute;
        top: 3em;
        left: 0;
        right: 0;
        bottom: auto;
        height: 3em;
        /* Höhe des Verlaufs */
        background: linear-gradient(to bottom, white, transparent);
        pointer-events: none;
        /* Damit der Verlauf keine Interaktion blockiert */
        z-index: 6;
        opacity: 1;
        transition: opacity 0.3s ease;

        &.hidden {
          opacity: 0;
        }
      }

      &>.bottom_white {
        top: auto;
        bottom: 1em;
        /* Höhe des Verlaufs */
        background: linear-gradient(to top, white, transparent);
      }

      &>#additional_content_wrapper {
        position: relative;
        overflow-y: scroll;
        max-height: calc(100vh - 27em);
        display: flex;
        flex-direction: column;
        gap: 1em;

        &::-webkit-scrollbar {
          display: none;
          width: 0;
          background: transparent;
        }

        &>h6 {
          margin: 0;
        }



        & .pdfs {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 1em;

          &>a {
            background-color: var(--get-green-light);
            color: var(--get-green);
            border: 2px solid var(--get-green);
            border-radius: var(--boder-radius);
            padding: 1em;
            display: flex;
            justify-content: center;
            align-content: center;

            &>p {
              margin: 0;
              font-weight: 700;

            }


          }

        }
      }

    }
  }
}

main .modul_wrapper .sidebar .additional_content #additional_content_wrapper>.video_prev,
main .videos article .modul_content>.video_prev {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  border-radius: var(--boder-radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 1em;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;

  &>p {
    opacity: 1;
    z-index: 3;
    transition: opacity 0.3s ease;
  }

  & > .play-icon {
    opacity: 0; /* Bild standardmäßig ausblenden */
    position: absolute; /* Bild über dem <div> positionieren */
    top: 50%; /* Vertikal zentrieren */
    left: 50%; /* Horizontal zentrieren */
    transform: translate(-50%, -50%); /* Zentrierung anpassen */
    z-index: 4; /* Höherer z-index als der Text */
    transition: opacity 0.3s ease; /* Übergangseffekt */
    width: 20%;
    height: auto;
  }

  &::before {
    content: '';
    position: absolute;
    border-radius: var(--boder-radius);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--get-green);
    opacity: 0.85;
    z-index: 2;
    transition: opacity 0.3s ease;
  }

  &:hover {
    &::before {
      opacity: 0;
    }

    &>p {
      opacity: 0;
    }
    & > .play-icon {
      opacity: 1; /* Bild einblenden beim Hover */
    }
  }
}


/* ========= main div content ========== */

main .div_content {

  &>h3 {
    font-size: 1.75em;
    font-weight: 700;
    color: var(--get-green);
    margin-bottom: 1em;
    /* Negative Einrückung für die erste Zeile */
    text-indent: -1em;
    /* Einrückung für alle Zeilen */
    padding-left: 0em;

    &::before {
      content: url("../img/beforeHeadline.svg");
      display: inline-block;
      width: 1.43em;
      top: 0.05em;
      position: relative;
      margin-right: -0.5em;
    }
  }

  &>h4 {
    font-size: 1.75em;
    font-weight: 700;
    color: var(--get-green);
  }
}

/* ========= main index =========== */

main section.content_index {
  & .search {
    padding: 1em;
    border: 2px solid var(--get-green);
    border-radius: var(--boder-radius);
    background-color: white;

    & label {
      font-size: 1.4em;
      color: var(--get-green);
      margin-right: 1em;

      &::before {
        position: relative;
        width: 0.9em;
        height: auto;
        margin-right: 0.4em;
        top: 0.25em;
        content: url("../img/icon_suche.svg");
        display: inline-block;
      }
    }

    & input {
      font-size: 1.4em;
      border: 2px solid var(--get-green);
      border-radius: var(--boder-radius);
      background-color: var(--get-green-light);
      max-width: 12em;
    }

    & #results {
      margin-top: 2em;

      & li {
        list-style-type: none;
      }
    }
  }

  & .index_results ul {
    list-style-type: none;
    margin: 0;

    & li {
      display: flex;
      column-gap: 1em;
      margin-bottom: 0.5em;

      & .files {
        display: flex;
        column-gap: 0.5em;
        flex-wrap: wrap;
      }
    }
  }
}

/* ========= main nomenklatur =========== */

main section.content_nomenclature {
  overflow: auto;

  & .search {
    padding-bottom: 2em;

    & label {
      font-size: 1.4em;
      color: var(--get-green);
      margin-right: 1em;

      &::before {
        position: relative;
        width: 0.9em;
        height: auto;
        margin-right: 0.4em;
        top: 0.25em;
        content: url("../img/icon_suche.svg");
        display: inline-block;
      }
    }

    & input {
      font-size: 1.4em;
      border: 2px solid var(--get-green);
      border-radius: var(--boder-radius);
      background-color: white;
      max-width: 12em;
    }
  }

  & dl {
    font-size: 1.4em;
    display: grid;
    grid-template-columns: auto auto;
    row-gap: 1.5em;
    column-gap: 0.5em;

    &>dt {
      grid-column: 1;
    }

    &>dd {
      margin: 0;
      grid-column: 2;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
    }

    & .hidden {
      display: none;
    }

    &>dt:has(span) {
      grid-column: 1 / span 2;
      display: block !important;
      font-weight: 700;
      color: var(--get-green);
    }

    & dt:has(span)+dd {
      display: none;
    }
  }
}

/* ========= main videos =========== */

main section.videos {
  display: flex;
  flex-direction: column;
  gap: var(--content-padding);

  &>article {
    border: 2px solid var(--get-green);
    border-radius: var(--boder-radius);
    width: 100%;
    overflow: hidden;

    &>.modul_head {
      display: flex;
      background-color: var(--get-green);
      background-size: auto 220%;
      background-repeat: no-repeat;
      background-position: 0 86%;
      min-height: 7em;
      justify-content: center;
      align-items: center;

      &>h2 {
        color: white;
      }
    }

    &>.modul_content {
      padding: var(--content-padding);
      padding-bottom: calc(var(--content-padding) * 2);
      display: grid;
      gap: var(--content-padding);
      grid-template-columns: repeat(3, 1fr);

      & .modul_link {
        position: absolute;
        z-index: 3;
        bottom: -0.5em;
        right: 0.5em;
        font-size: var(--large-font);

        &>a {
          color: white;
          background-color: var(--get-green);
          padding: 0 1em;
        }

        &::before,
        &::after {
          display: inline-block;
          height: 1.38em;
          top: 0.3em;
          position: relative;
          margin: 0;
        }

        &::before {
          content: url("../img/box_head_before.svg");
          aspect-ratio: 452 / 241;
          margin-right: -1px;
        }

        &::after {
          content: url("../img/box_head_after.svg");
          aspect-ratio: 109 / 241;
        }
      }
    }
  }
}


.footnotes {
  margin-top: 2em;

  & p {
    font-size: 1em;
  }
}

/* ========= main handreichung ========= */

main .div_content {
  & .list-alpha {
    list-style-type: lower-alpha;

    & h4 {
      color: var(--get-green);
    }

    &>li::marker {
      color: var(--get-green);
      font-size: 1.75em;
    }
  }

  & .rom-list {
    list-style-type: upper-roman;
    font-size: var(--large-font);

    &>li::marker {
      color: var(--get-green);
    }
  }

}


/* ========= main projekt ========== */

section.two_col {
  display: grid;
  grid-template-columns: 3fr 1fr;
  column-gap: calc(var(--content-padding) * 2);

  &>p,
  &>.button {
    grid-column: 1;
  }

  &>img {
    max-width: 100%;
    height: auto;
    grid-column: 2;
    margin-top: calc(var(--font-size) * 0.35);
  }
}

/* ========= main beteiligt =========== */

section .hs_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: calc(var(--content-padding) * 4);
  row-gap: calc(var(--content-padding) * 3);

  & .hs_logo {
    max-width: 75%;
    margin-bottom: 1em;
  }
}

/* ========= footer =========== */

footer {
  display: flex;
  justify-content: space-between;
  width: calc(100% - 2 * var(--content-padding));
  background-color: var(--get-green);
  padding: 2em var(--content-padding) 2em var(--content-padding);

  &>div {

    &>p,
    a {
      color: white;
      font-size: 1em;
    }

    &>p:first-child {
      margin-bottom: 0;
      font-weight: 700;
    }

    &>p:last-child {
      margin-top: 0;
    }

    &>ul {
      margin-top: 0;
      font-size: 1em;

      &>li {
        list-style-type: none;
      }
    }
  }
}