
* {box-sizing: border-box;}
:focus {
  outline: none;
}

:root {
  --hellgruen: rgb(133,194,38);
  --transhellgruen: rgba(133,194,38,.85);
  --normalgruen: #31572C;
  --dunkelgruen: #132A13;
  --hellgrau: #d5d3d3;
  --dunkelgrau: #5f5c5c;
}
html{
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

.wrapper {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
}
/* header -------------------------------------------------------------------------------------------------------------------------------------------*/

img{
  width: clamp(300px, 42%, 1000px);
  margin: 0 auto;
}

#header_image{
  z-index: 9900;
  position: relative;
  background-image: url("hintergrundheader\ 1920x1280.jpg");
  background-size: 100%;
  background-repeat: no-repeat;
  height: clamp(220px, 45vh, 45vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  overflow: hidden;
}

section{
  z-index: 500;
  width: 80%;
  margin: 0 auto;
  max-width: 1400px;
}

.container{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}  

@media screen and (min-width: 601px){
  .container{
    flex-direction: row;
    align-items: flex-start;
  }
  img{
    height: clamp(100px, 75%, 1000px);
    width: auto;
  }
}
/* Navigationsleiste -------------------------------------------------------------------------------------------------------------------------------------------*/
    
nav#nav-top {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--transhellgruen);
  padding: 0;
  font-family: Arial;
}
    
nav#nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9050;
  background: var(--hellgruen);
  padding: 0;
  font-family: Arial;
}

.nav-item {
  cursor: pointer;
  font-size: 1.5rem;
  padding: 2em 0.5em;
  color: white;  
}

.nav-item-border {
  border-right: 3px solid white;
}

ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 2.7rem;
}

li a:hover,
li a:focus {
  color:var(--hellgrau);
}

.dropdown, .dropdown-fixed{
  display: none;
}

@media screen and (max-width: 680px){
#nav-top, #nav-fixed{
  display: none;
}
li a:hover,
li a:focus {
  color: var(--dunkelgrau);
}
#header_image{
  height: clamp(220px, 35vh, 35vh);
}
#menu-icon{
  width: 1.5em;
  margin-left: 0;
}
.dropbtn {
  display: flex;
  align-content: flex-start;
  width: 100%;
  background-color: var(--hellgruen);
  color: white;
  padding: .7em;
  font-size: 1.5rem;
  border: none;
}

.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}
.dropdown-fixed {
  position: fixed;
  display: inline-block;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9050;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  width: 100%;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 960;
  list-style-type: none;
  text-decoration: none;
}

.dropdown-content a {
  color: var(--dunkelgrau);
  padding: .7em;
  display: block;
}
.dropdown-content a:hover {background-color: #ddd;}

.dropdown:hover .dropdown-content {display: block;}
.dropdown-fixed:hover .dropdown-content {display: block;}
}

/* Headline ------------------------------------------------------------------------------------------------------------------------*/

.headline {
  display: flex;
  align-items: center;
  margin: 10em auto 4em auto;
  width: 60vw;
}

.headline-item {
  font-family: 'Fira Sans', sans-serif;
  width: 50%;
}

.headline-left-text {
  color: var(--hellgruen);
  text-align: right;
  font-size: clamp(1.9rem, 3vw, 3vw);
  line-height: 120%;
  padding-right: 0.5em;
}

.headline-right-text {
  color:rgb(83, 78, 78);
  line-height: 120%;
  border-left: solid 2px rgb(83, 78, 78);
  padding-left: 1em;
  font-size: clamp(1rem, 1vw, 1vw);
  text-align: left;
}

/* arrow ---------------------------------------------------------------------------------------------------------------------------------------------------------------*/

.arrow-container{
   display: flex;
  align-content: center;
  flex-direction: column;
  padding: 0em 7em 7em 7em;
}

.arrow{
  padding: 3em;
  position: relative;
  margin: 0 auto;
}
.arrow span{
  display: block;
  width: 30px;
  height: 30px;
  border-bottom: 5px solid rgb(133,194,38);
  border-right: 5px solid rgb(133,194,38);
  transform: rotate(45deg);
  margin: -10px;
  animation: animate 2s infinite;
}
.arrow span:nth-child(2){
  animation-delay: -0.2s;
}
.arrow span:nth-child(3){
  animation-delay: -0.4s;
}
@keyframes animate {
  0%{
      opacity: 0;
      transform: rotate(45deg) translate(-20px,-20px);
  }
  50%{
      opacity: 1;
  }
  100%{
      opacity: 0;
      transform: rotate(45deg) translate(20px,20px);
  }
}

 /* linkes Kästchen ----------------------------------------------------------------------------------------------------------------------------------------*/

.main {
  width: 47%;
}

@media screen and (max-width: 600px){
  .main {
    width: 100%;
  }

  .headline{
    width: 100%;
  }
}
/* rechtes Kästchen ----------------------------------------------------------------------------------------------------------------------------------------*/

.right-floating-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2vw;
  width: 47%;
  background-color: var(--normalgruen);
  height: 100%;
  border-radius: 2vw;
  min-height: 30em;
}
/* space-arround für rechte Box bei Wasserbedarf, da sonst der Abstand zwischen den zwei Elementen zu groß wird */

.flex-start{
  justify-content: flex-start;
}

@media screen and (max-width: 600px){
  .right-floating-box {
    width: 100%;
    min-height: 20em;
  }
}

.BMI-Skala {
  color: white;
  line-height: 1.2em;
  font-size: 1.1em;
}

.bmi_skalaueberschriften {
  margin-top: 1em;
  color: white;
}

.bmi-hinweis {
  margin-top: 2em;
  color: white;
  font-size: 0.9rem;
}
 
/* Nährwertetabelle -----------------------------------------------------------------------------------------------------------------------------------------*/

    table,th,td,caption {
            border: 1px solid black;
          }
          
    table {
      width: 35em;
      height: 15em;
      border-collapse: collpase;
      border-spacing: 0;
      border-width: 0px 0 0 1px;
      margin: 0 0 1em;
      table-layout: auto;
      max-width: 100%;
      font-size: 1rem;
      line-height: 1.3;
          }
    
    th,td {
      font-weight: normal;
      text-align: left;
          }
          
    th, caption {
      background-color: #f1f3f400;
      font-weight: 650;
          }
    
    .expl-button{
      display:inline-block ;
    cursor: pointer;
    font-size: 1rem;
    padding: 10px 30px 10px 28px;
    text-decoration: none;
    font-weight: bold;
    color: white ;}
   
/* Footer ------------------------------------------------------------------------------------------------------------------------------------------------------*/
    
footer { 
  width: 100%;
  margin-top: 5em;
  background-color: var(--dunkelgruen) ;
  bottom: 0;
  text-align: right;
}

.footer-container{
  width: 80%;
  margin: 0 auto;
  max-width: 1400px;
  padding: 2em;
  color: var(--hellgrau);
}

.footer-item {
  cursor: pointer;
  font-weight: bold;
  color: var(--hellgrau);
}

/* berechne Taste -----------------------------------------------------------------------------------------------------------------------------------------------*/

.button-centraliser {
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}

.berechne_taste {
  margin: 1em 1em 3em 1em;
  padding: 1em 2em;
  cursor: pointer;
  color: var(--hellgruen);
  font-size: 2rem;
  outline: none;
  background-color: white;
  border: 1px solid var(--hellgruen);
  -webkit-transition: all 1s ease;
  -moz-transition: all 0.5s ease;
  -o-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  transition: all 0.5s ease;
} 
    
.berechne_taste:hover,
.berechne_taste:focus {
  background-color: var(--normalgruen);
  border: none;
  font-size: 2.2rem;
  color: var(--hellgrau);
} 
/* Rechner Eingabe ------------------------------------------------------------------------------------------------------------------------------------------------*/
   
.container-eingabe label {
  display: grid;
  width: 100%;
  color: white;
  font-size: 2rem;
  border: 1px solid rgb(130, 165, 71);
  background-color: var(--hellgruen);
  padding: 0 1vh 0 1vh;
}

.container-eingabe-eingabe{
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1.5em 0;
}

.eingabefeld {
  -webkit-appearance: none;
  border-radius: 5px;
  width: clamp(32px, 15%, 15%);
  border: 2px solid var(--hellgruen);
  font-size: 1.5rem;
}

.eingabefeld:hover,
.eingabefeld:focus {
  border: 2px solid var(--normalgruen);
}

.schieberegler {
  -webkit-appearance: none;
  float: left;
  width: 70%;
  height: 1em;
  border-radius: 5px;  
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
}
 
.schieberegler::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2em;
  height: 2em;
  border-radius: 50%; 
  background: var(--hellgruen);
  cursor: pointer;
}

.schieberegler::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--hellgruen);
  cursor: pointer;
}

.schieberegler:hover,
.schieberegler:focus {
  opacity: 1; 
}

.schieberegler::-moz-range-thumb:hover,
.schieberegler::-moz-range-thumb:focus{
  background: var(--dunkelgruen);
  transition: 0.5s;
}

/* Anzeige des Ergebnises -------------------------------------------------------------------------------------------------*/

.wert{
  font-size: 4rem;
}

.bmi-regenbogen-box {
  border: 1px solid white;
  width: 90%;
  height: 2em;
  background: linear-gradient( to right, blue, green, yellow, orange, red, red);
  margin-left: 5%;
}

#regenbogen_skala{
  border-right: 3px solid white;
  width: 50%;
  height: 2em;
}

#regenbogen_skala_wert{
  width: 90%;
  height: 2em;
  font-size: 1.5rem;
  color: white;
  margin-left: 1.7%;     
}

#bmi_wert2{
  margin-left: 10%;
}

.hinweis{
  font-weight: bold;
  color: red;
  border: 2px solid red;
  padding: 1em;
  border-radius: 1em;
  margin: 2em;
}

#bmi_altershinweis {
  display: none;
}

#hinweisEingabe{
  display: none;
}

.ergebnisWrapper {
  padding: 0 1em 1em 1em;
  color: white;
  font-weight: bold;
  align-self: center;
  font-size: 2rem;
}

/* BMI Skala Erklärungs Style -------------------------------------------------------------------------------------------------------------------------------*/

#bmi_skalaklasseeins {
  display: none;
}
#bmi_skalaklassezwei {
  display: none;
}
#bmi_skalaklassedrei {
  display: none;
}
#bmi_skalaklassevier {
  display: none;
}
#bmi_skalaklassefünf {
  display: none;
}
#bmi_skalaklassesechs {
  display: none;
}
#bmi_skalaklassesieben {
  display: none;
}
#bmi_skalaklasseacht {
  display: none;
}

/* Homepage -----------------------------------------------------------------------------------------------------------------------------------------------*/
.button-container{
  display: flex;
  justify-content: space-between;
  margin: 4em 0;
}

.button-container-item{
  width: 45%;
}

.button-link{
  border: 2px solid var(--hellgruen);
  border-radius: 6.5rem;
  box-shadow:
  0 1.6px 1.4px rgba(0, 0, 0, 0.034),
  0 3.9px 3.5px rgba(0, 0, 0, 0.048),
  0 7.3px 6.5px rgba(0, 0, 0, 0.06),
  0 13px 11.6px rgba(0, 0, 0, 0.072),
  0 24.2px 21.7px rgba(0, 0, 0, 0.086),
  0 58px 52px rgba(0, 0, 0, 0.12)
;
  margin: 1em 0;
  padding: 2.5em;
  text-align: center;
  font-weight: bold;
  color: var(--hellgruen);
  font-size: 2rem;
}

.button-link:hover,
.button-link:focus {
  box-shadow:
  0 1.6px 1.4px rgba(0, 0, 0, 0.084),
  0 3.9px 3.5px rgba(0, 0, 0, 0.121),
  0 7.3px 6.5px rgba(0, 0, 0, 0.15),
  0 13px 11.6px rgba(0, 0, 0, 0.179),
  0 24.2px 21.7px rgba(0, 0, 0, 0.216),
  0 58px 52px rgba(0, 0, 0, 0.3);
}   

a:link{
  text-decoration: none;
}

/* Form ----------------------------------------------------------------- */

form{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2em;
}

.form-input {
  border: none;
  font-size: 1.5rem;
  color: var(--dunkelgrau)
}

form > button{
  grid-column: 2 / 4;
  grid-row: 3;
}

.form-item1{
  grid-column: 1 / 3;
  grid-row: 1;
  -webkit-appearance: none;
  border-bottom: 2px dashed var(--hellgruen);
}

.form-item2{
  grid-column: 3 / 5;
  grid-row: 1;
  -webkit-appearance: none;
  border-bottom: 2px dashed var(--hellgruen);
 }

.form-item3{
  grid-column: 1 / 5;
  grid-row: 2;
  border-radius: 5px;
  border: 2px dashed var(--hellgruen);
  font-family: Arial, Helvetica, sans-serif;
}

.form-item1:hover,
.form-item1:focus{
  border-bottom: 2px solid var(--hellgruen);
}

.form-item2:hover,
.form-item2:focus{
  border-bottom: 2px solid var(--hellgruen);
}

.form-item3:hover,
.form-item3:focus{
  border: 2px solid var(--hellgruen);
}

/* media Query -----------------------------------------------------------*/

@media screen and (max-width: 992px){

  html{
    font-size: 13px;
  }
  #header_image{
    background-image: url("hintergrundheader\ 1280x853.jpg");
  }
}

@media screen and (max-width: 680px){

  .button-container{
    flex-direction: column;
  }
  .button-container-item{
    width: 100%;
  }
  #header_image{
    background-size: 115%;
    }
}

@media screen and (max-width: 600px){

  html{
    font-size: 12px;
  }
  #header_image{
  background-size: 150%;
  }
}