/* || VARIABLES */

/* root selector für globale variablen :D*/
:root {
    /* FONTS */
    --FF: "Arial", sans-serif;
    --FS: 16px;
    /* COLORS */
    --BG-COLOR: #AFE3CB;
    --DARK-COLOR: #111B1A;
    --MEDIUM-COLOR: #2C5A4A;
    --BRIGHT-COLOR: #428970;
}

@property --COLOR-AMOUNT {
    initial-value: 100%;
    inherits: false;
    syntax: '<percentage>';
    /*eine Variable erstellen und diese animieren
    das Animieren/Transitionen von linear-gradients ist nicht möglich
    deswegen wird die Variable erstellt und animiert
    (https://www.youtube.com/watch?v=qrU88BoVFB0)
    */
}

/* || GENERAL STYLES */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    font-family: var(--FF);
    background-color: var(--BG-COLOR);
    
}
body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--BG-COLOR);
    color: var(--BG-COLOR);
    margin: 0 auto;
}
img{
    display: block; /* entfernt minimalen Spalt unter Logo und Bildern*/
}
a {
    text-decoration: none;
    color: var(--BG-COLOR);
}
a:visited {
    color: var(--BG-COLOR);
}

/* || NAVBAR & SIDEBAR */

.navbar {
    top: 0;
    left: 0;
    right: 0;
    position: fixed;
    z-index: 11;

    box-shadow: 0 5px var(--BRIGHT-COLOR);

    display: flex;
    background-color: var(--DARK-COLOR);
}
.navbar ul {
    float: right;
    display: flex;
    gap: 1rem;
    width: 100%;
    list-style: none;
    margin-left: 1rem;
    margin-right: 1rem;
}
.navbar ul li {
    display: flex;
}
#loginkonto {
    margin-left: auto; /* damit geht Login nach ganz rechts*/
}
.navbar ul li a, .navbar ul li button {
    text-decoration: underline;
    display: flex;
    height: 100px;

    padding-left: 20px;
    padding-right: 20px;

    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: width 1s, height 1s, font-size 1s, --COLOR-AMOUNT 0.25s; 
    /*notwendig, damit der linear gradient smooth ist,
    kann vermute ich nur einmal initialisiert werden??? deswegen muss es hier stehen und nicht nochmal weiter unten*/
}
.option a, .option button { /* Damit das Logo davon nicht betroffen ist*/
    background: linear-gradient(180deg, var(--DARK-COLOR) var(--COLOR-AMOUNT), var(--BRIGHT-COLOR));
    /*transition: --COLOR-AMOUNT 0.25s; Zeile weiter oben ist relevant.
    Diese würde nicht funktionieren for some reason*/
}
.navbar ul li button {
    border: none;
    color: var(--BG-COLOR)
}
.option a:hover, .option button:hover {
    cursor: pointer;
    --COLOR-AMOUNT: 60%;
    /*Hier wird, wie weiter oben beschrieben, die Variable auf einen neuen wert gesetzt und somit animiert
    durch den neuen Wert wird der linear-gradient angepasst
    der Wert kann eine Transition entgegennehmen, dadurch ist er schön smooth :D*/
}
.logo a div {
    transition: width 1s, height 1s;
}
.logo_div{
    background-image: url(./resources/images/Logo.png);
    background-size: cover;
    width:300px;
    height:79px;
}
.searchbar_form{
    display: flex;
    align-items: center;
}
.searchbar{
    width: 300px;
    max-width: 300px;
    min-width: 300px;

    padding: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;

    border-radius: 10px;
    border: none;
    box-shadow: 0px 1px 3px black inset, 0 5px var(--BRIGHT-COLOR);
    background-color: var(--BG-COLOR);

    margin-bottom: 5px;

    font-size: 1rem;
}
.sidebar{
    overflow-wrap: anywhere;
    display: flex;
    float: top;

    position: fixed;
    z-index: 10;

    height: 100%;
    width: 200px;
    top: 105px;
    right: -610px;
    background-color: var(--DARK-COLOR);
    overflow: clip;

    box-shadow: -5px 0px var(--BRIGHT-COLOR);

    transition: top 1s, width 1s, right 0.25s;
}
.sidebar_top{
    position: fixed;
    height: calc(100% - 182px);
    overflow: scroll;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--DARK-COLOR) var(--BRIGHT-COLOR);
}
.sidebar a, .sidebar p{
    display: block;
    padding: 10px;
    color: var(--BG-COLOR);
    background: linear-gradient(270deg, var(--DARK-COLOR) var(--COLOR-AMOUNT), var(--BRIGHT-COLOR));
    transition: --COLOR-AMOUNT 0.25s
}
.sidebar a {
    padding-left: 15px;
}
.sidebar p {
    font-weight: bold;
}
.sidebar_visible {
    right: 0;
}
.item{
    width: 200px;
    text-decoration: underline;
    transition: padding-left 1s;
}
.refs{
    width: 200px;
    border-top: 1px solid var(--MEDIUM-COLOR);
    position: fixed;
    bottom: 0;
    
    text-decoration: underline;

    background-color: var(--DARK-COLOR);

    transition: width 1s;
}
.sidebar_plate {
    z-index: -1;
    /*normalerweise im Hintergrund, wenn von JS Skript auf 9 gesetzt, 
    dann überdeckt es die normale Seite, nur navbar und sidebar nicht*/
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;

    transition: background-color 0.25s;
}
.sidebar_plate_clickable {
    z-index: 9;
    background-color: rgba(0, 0, 0, 0.267);
}
.sidebar a:hover{
    cursor: pointer;
    --COLOR-AMOUNT: 60%;
}
/* || RESPONSIVE NAVBAR AND SIDEBAR:*/
@media (max-width: 1000px) and (min-height: 1200px){ /* Smartphone hochkant */
    .navbar {
        box-shadow: 0px 10px var(--BRIGHT-COLOR);
    }
    .logo_div {
        background-image: url(./resources/images/LogoShort.png);
        height: 100px;
        width: 100px;
    }
    .navbar ul li a, .navbar ul li button  {
        height: 200px;
        font-size: 2.5rem;
    }
    .sidebar {
        top: 210px;
        width: 600px;
        box-shadow: -10px 0px var(--BRIGHT-COLOR);
        font-size: 2rem;
    }
    .sidebar_top {
        height: calc(100% - 333px);
    }
    .sidebar_top p {
        padding-left: 15px;
    }
    .searchbar{
        width: 300px;
        max-width: 300px;
        min-width: 300px;

        padding: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;

        border-radius: 20px;
        box-shadow: 0px 2px 6px black inset, 0 10px var(--BRIGHT-COLOR);

        margin-bottom: 10px;

        font-size: 2rem;
    }
    .item {
        width: 600px;
    }
    .item a {
        padding-left: 25px;
    }
    .refs {
        width: 600px;
    }
}
@media (min-width: 300px) and (max-height: 500px){ /* Smartphone seitlich*/
    .logo_div {
        height: 39px;
        width: 150px;
    }
    .navbar ul li a, .navbar ul li button  {
        height: 50px;
        font-size: 2rem;
    }
    .searchbar{
        width: 150px;
        max-width: 150px;
        min-width: 150px;

        padding: 0.4rem;
        padding-left: 0.2rem;
        padding-right: 0.2rem;

        border-radius: 5px;
        box-shadow: 0px 2px 6px black inset, 0 5px var(--BRIGHT-COLOR);

        margin-bottom: 5px;

        font-size: 1rem;
    }
    .sidebar {
        top: 55px;
    }
    .sidebar_top {
        height: calc(100% - 142px);
    }
}
@media (min-width: 2000px){ /* medium und wide screen */
    .navbar ul li a, .navbar ul li button  {
        height: 100px;
        font-size: 2rem;
    }
    .sidebar {
        top: 105px;
    }
}
