*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
}

:root{
    /* ===== Colors ===== */
    --body-color: #E4E9F7;
    --sidebar-color: #FFF;
    --primary-color: #5f58b3;
    --primary-color-light: #F6F5FF;
    --toggle-color: #DDD;
    --text-color: #707070;
    --headline-color: rgb(37, 37, 37);

    /* ====== Transition ====== */
    --tran-03: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease;
}

body{
    min-height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-05);
}

::selection{
    background-color: var(--primary-color);
    color: #fff;
}

body.dark, html.dark{
    --body-color: #18191a;
    --sidebar-color: #404041;
    --primary-color: #3a3b3c;
    --primary-color-light: #3a3b3c;
    --toggle-color: #fff;
    --text-color: #ccc;
    --headline-color: #fff;
}

/* ===== Sidebar ===== */
 .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 100;  
}
.sidebar.close{
    width: 88px;
}

/* ===== Reusable code - Here ===== */
.sidebar li{
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.sidebar header .image,
.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
}

.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar .text,
.sidebar .icon{
    color: var(--text-color);
    transition: var(--tran-03);
}

.sidebar .text{
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}
.sidebar.close .text{
    opacity: 0;
}
/* =========================== */

.sidebar header{
    position: relative;
}

.sidebar header .image-text{
    display: flex;
    align-items: center;
}
.sidebar header .logo-text{
    display: flex;
    flex-direction: column;
}
header .image-text .name {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
}

header .image-text .profession{
    font-size: 16px;
    margin-top: -2px;
    display: block;
}

.sidebar header .image{
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar header .image img{
    width: 40px;
    border-radius: 6px;
}

.sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
}

body.dark .sidebar header .toggle,
html.dark .sidebar header .toggle{
    color: var(--text-color);
}

.sidebar.close .toggle{
    transform: translateY(-50%) rotate(0deg);
}

.sidebar .menu{
    margin-top: 40px;
}

.sidebar li a{
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--tran-03);
}

.sidebar li a:hover{
    background-color: var(--primary-color);
}
.sidebar li a:hover .icon,
.sidebar li a:hover .text{
    color: var(--sidebar-color);
}
body.dark .sidebar li a:hover .icon,
html.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text,
html.dark .sidebar li a:hover .text{
    color: var(--text-color);
}

.sidebar .menu-bar{
    height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.menu-bar::-webkit-scrollbar{
    display: none;
}
.sidebar .menu-bar .mode{
    border-radius: 6px;
    background-color: var(--primary-color-light);
    position: relative;
    transition: var(--tran-05);
}

.menu-bar .mode .sun-moon{
    height: 50px;
    width: 60px;
}

.mode .sun-moon i{
    position: absolute;
}
.mode .sun-moon i.sun{
    opacity: 0;
}
body.dark .mode .sun-moon i.sun,
html.dark .mode .sun-moon i.sun{
    opacity: 1;
}
body.dark .mode .sun-moon i.moon,
html.dark .mode .sun-moon i.moon{
    opacity: 0;
}

.menu-bar .bottom-content .toggle-switch{
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}
.toggle-switch .switch{
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-05);
}

.switch::before{
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
    transition: var(--tran-04);
}

body.dark .switch::before,
html.dark .switch::before{
    left: 20px;
}

.home{
    position: absolute;
    top: 0;
    top: 0;
    left: 250px;
    height: 100vh;
    width: calc(100% - 250px);
    background-color: var(--body-color);
    transition: var(--tran-05);
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.home .headline{
    font-size: 40px;
    font-weight: 500;
    color: var(--headline-color);
    padding: 12px 60px;
    padding-top: 30px;
    max-width: 50%;
}

#thumbnail img{
    width: 100%;
    margin-top: 16px;
    margin-bottom: 16px;
}

#search-bar {
    position: relative;
    width: 40%;
    display: flex;
    justify-content: center;
    border: none;
    align-items: center;
    margin-right: 30px;
    margin-top: 15px;
}

#searchInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
}

#searchInput:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

/* Ergebnisse-Container */
#searchResults {
    position: absolute;
    top: 50px;    /* Direkt unter dem Input, kleiner Abstand */
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;               /* oder max-width: 400px; je nach Geschmack */
    background-color: #fff;   /* heller Hintergrund */
    border-radius: 5px;
    display: none;            /* wird erst per JS eingeblendet */
    z-index: 999;             /* damit es über anderem Inhalt liegt */
    padding: 10px 0;          /* etwas Abstand innen */
}

/* Einzelne Ergebnis-Links */
.search-result-item {
    display: block;           /* damit es untereinander erscheint */
    padding: 8px 16px;
    color: #000;
    text-decoration: none;
    width: 80% !important;
}

/* Hover-Effekt */
.search-result-item:hover {
    background-color: #eee;
}

#searchLoading {
    margin-left: 10px; 
}

.home .sectionline{
    font-size: 20px;
    font-weight: 600;
    color: var(--headline-color);
    padding: 12px 60px;
    padding-top: 40px;
}

.home .text{
    font-size: 20px;
    font-weight: 400;
    color: var(--text-color);
    padding: 12px 60px;
}

.home .text li{
    /* Text soll immer rechts neben dem Punkt ausgerichtet sein */
    padding-left: 1.4em;
    text-indent: -1.4em;
}

.sidebar.close ~ .home{
    left: 78px;
    height: 100vh;
    width: calc(100% - 78px);
}
body.dark .home .text,
html.dark .home .text{
    color: var(--text-color);
}

button {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.home .block form, .home .block form .formPart{
    display: flex;
    flex-direction: column;
    align-items: center;
}    

.home .block form .formPart{
    margin: 10px;
    width: 100%;
}

.home .block form .formPart input, .home .block form .formPart textarea, .home .block form .formPart select{
    margin-top: 3px;
    width: 100%;
    resize: vertical;   
    padding: 8px;        
    border: 1px solid #ccc; 
    border-radius: 4px;
    font-size: 16px;
}

.textareaWrapper, .keywordWrapper{
    width: 100%;
}

.plus-button, .minus-button{
    background-color: gray;
    width: 100%;
    padding: 10px;
    margin: 5px 0px;
    border-radius: 3px;
    font-size: 15px;
}
  
.picode{
    text-decoration: none;
    background-color: var(--primary-color-light);
    display: flex;
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 60%;
    min-width: 250px;
    border-radius: 10px;
  }

  .picode:hover{
    background-color: var(--toggle-color);
    transition: var(--tran-03);
  }

#footer {
    text-align: center;
    padding: 30px;
    color: var(--text-color);
}

#footer a {
    display: inline-table;
    width: 0px;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-left: 0px;
    margin-right: 0px;
    color: var(--text-color);
    background: none;
}

#footer a:hover {
    background-color: var(--text-color);
    color: white;
}


.home a{
    text-decoration: none;
    background-color: var(--primary-color-light);
    display: flex;
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    width: 30%;
    border-radius: 10px;
}

.main a{
    text-decoration: none;
    background-color: var(--primary-color-light);
    display: flex;
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 90%;
    border-radius: 10px;
}

.home a:hover{
    background-color: var(--toggle-color);
    transition: var(--tran-03);
}

.main a:hover{
    background-color: rgb(37, 37, 37);
    transition: var(--tran-03);
}

#left-block {
    background-color: var(--primary-color-light);
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 40%;
    border-radius: 10px;
}

#right-block {
    background-color: var(--primary-color-light);
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 40%;
    border-radius: 10px;
}

#center-block {
    background-color: var(--primary-color-light);
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 80%;
    border-radius: 10px;
}

.center-block {
    background-color: var(--primary-color-light);
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 20px;
    padding-left: 20px;
    width: 80%;
    border-radius: 10px;
}

#center-block-home {
    background-color: var(--primary-color-light);
    align-items: left;
    justify-content: left;
    margin: 10px;
    margin-left: 30px;
    padding-right: 30px;
    width: 40%;
    border-radius: 10px;
}

#blocks{
    display: flex;
    justify-content: center;
    margin: 20px;
}

.block {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.blocklink {
    background-color: var(--toggle-color);
    width: 100%;
    border-radius: 10px;
}

.home .text2{
    font-size: 20px;
    font-weight: 400;
    color: var(--text-color);
    padding: 12px;
}


body.dark .home .text2,
html.dark .home .text2{
    color: var(--text-color);
}

  #wapppic img{
    width: 250px;
    max-width: 30%;
    display: flex;
    float: right;
    background-color: #fff;
    padding: 8px;
    border-radius: 10px;
}

@media (max-width: 800px) {
    #left-block {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }
    
    #right-block {
        background-color: var(--primary-color-light);
        align-items: center;
        justify-content: center;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }

    #center-block-home {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }

    #blocks {
        display: block;
        justify-content: center;
    }
    
    .block {
        display: block;
        justify-content: center;
    }

    .home .text2{
        font-size: 18px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px;
    }
    
    
    body.dark .home .text2,
    html.dark .home .text2{
        color: var(--text-color);
    }

    .home .text{
        font-size: 18px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px 20px;
    }

    .home a{
        text-decoration: none;
        background-color: var(--primary-color-light);
        display: flex;
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 30px;
        padding-right: 30px;
        width: 60%;
        border-radius: 10px;
    }

    .home .sectionline{
        font-size: 18px;
        font-weight: 600;
        color: var(--headline-color);
        padding: 12px 20px;
        padding-top: 40px;
    }
    
    .home .headline{
        font-size: 30px;
        font-weight: 500;
        color: var(--headline-color);
        padding: 12px 40px;
        padding-top: 30px;
    }

    

    
}

@media (max-width: 700px) {
    #wapppic img{
        width: 150px;
        max-width: 90%;
        display: block;
        float: none;
        background-color: #fff;
        padding: 8px;
        border-radius: 10px;
        margin-top: 10px;
    }
}

@media (max-width: 500px) {
    .header {
        flex-direction: column;
    }

    #search-bar {
        width: 90%;
        margin-left: 6%;
    }

    #searchResults {
        top: calc(100% - 4px);
    }
}

@media (max-width: 400px) {
    #left-block {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }
    
    #right-block {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }

    #blocks {
        display: block;
        justify-content: center;
    }

    .home .text2{
        font-size: 16px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px;
    }
    
    
    body.dark .home .text2,
    html.dark .home .text2{
        color: var(--text-color);
    }

    .home .text{
        font-size: 16px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px 20px;
    }

    .home a{
        text-decoration: none;
        background-color: var(--primary-color-light);
        display: flex;
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 30px;
        padding-right: 30px;
        width: 60%;
        border-radius: 10px;
    }

    .home .sectionline{
        font-size: 16px;
        font-weight: 600;
        color: var(--headline-color);
        padding: 12px 20px;
        padding-top: 40px;
    }
    
    .home .headline{
        font-size: 30px;
        font-weight: 500;
        color: var(--headline-color);
        padding: 12px 40px;
        padding-top: 30px;
    }

    .sidebar{
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 250px;
        padding: 0;
        background: var(--sidebar-color);
        transition: var(--tran-05);
        z-index: 100;  
    }
    .sidebar.close{
        width: 60px;
    }
    
    .sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
}

.sidebar.close ~ .home{
    left: 60px;
    height: 100vh;
    width: calc(100% - 60px);

    
}
    
}

iframe {
    width: 800px;
    height: 500px;
    padding: 12px 60px;
}

.embed-container {
    position: relative; 
    padding-bottom: 30%; /* ratio 16x9 */
    height: 0; 
    overflow: hidden; 
    width: 100%;
    height: auto;
    max-height: 500px;
  }
  .embed-container iframe {
  
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    max-width: 800px;
    max-height: 800px;
  }
  /* ratio 4x3 */
  .embed-container.ratio4x3 {
    padding-bottom: 75%;
  }

  @media (max-width: 1000px) {
    iframe {
        width: 800px;
        height: 500px;
        padding: 12px 60px;
    }
    
    .embed-container {
        position: relative; 
        padding-bottom: 50%; /* ratio 16x9 */
        height: 0; 
        overflow: hidden; 
        width: 100%;
        height: auto;
        max-height: 500px;
      }
      .embed-container iframe {
      
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        max-width: 800px;
        max-height: 800px;
      }
      /* ratio 4x3 */
      .embed-container.ratio4x3 {
        padding-bottom: 75%;
      }
  }

  @media (max-width: 600px) {
    iframe {
        width: 800px;
        height: 500px;
        padding: 0px 0px;
    }
    
    .embed-container {
        position: relative; 
        padding-bottom: 50%; /* ratio 16x9 */
        height: 0; 
        overflow: hidden; 
        width: 100%;
        height: auto;
        max-height: 500px;
      }
      .embed-container iframe {
      
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        max-width: 800px;
        max-height: 800px;
      }
      /* ratio 4x3 */
      .embed-container.ratio4x3 {
        padding-bottom: 75%;
      }
  }

  @media (max-width: 400px) {
    .center-block {
        margin-left: 10px;
        width: 90%;
    }

    #left-block {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }
    
    #right-block {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }

    #center-block-home {
        background-color: var(--primary-color-light);
        align-items: left;
        justify-content: left;
        margin: 10px;
        margin-left: 10px;
        padding-right: 10px;
        width: 90%;
        border-radius: 10px;
    }

    #blocks {
        display: block;
        justify-content: center;
    }

    .block {
        display: block;
        justify-content: center;
    }

    .home .text2{
        font-size: 16px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px;
    }
    
    
    body.dark .home .text2,
    html.dark .home .text2{
        color: var(--text-color);
    }

    .home .text{
        font-size: 16px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px 20px;
    }



    .home .sectionline{
        font-size: 16px;
        font-weight: 600;
        color: var(--headline-color);
        padding: 12px 20px;
        padding-top: 40px;
    }
    
    .home .headline{
        font-size: 30px;
        font-weight: 500;
        color: var(--headline-color);
        padding: 12px 40px;
        padding-top: 30px;
    }

    .sidebar{
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 250px;
        padding: 0;
        background: var(--sidebar-color);
        transition: var(--tran-05);
        z-index: 100;  
    }
    .sidebar.close{
        width: 60px;
    }
    
    .sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
}

.sidebar.close ~ .home{
    left: 60px;
    height: 100vh;
    width: calc(100% - 60px);
}

.home a{
    width: 80%;
}
    
}