/* SIDEBAR */
#sidebar {
    background-color: white !important;
    width: 14rem;
    position: absolute;
    left: 2rem;
    margin-top: 10rem;
    padding: 0 !important;
    text-align: left;
}

#sidebar-spacer {
    min-width: 16rem;
    height: 100%;
}

#sidebar-content-wrapper {
    display: flex;
    gap: 3rem;
    justify-content: center;
    width: 100vw;

    background-color: white;
    overflow: hidden;

    padding-bottom: 6rem;
}

.topic-subpages-wrapper {
    max-width: 1000px;
    text-align: justify;
    display: flex;
    flex-direction: column;
    padding-right: 3rem;
    overflow-x: scroll;
    overflow-y: hidden;
    -ms-overflow-x: scroll;
    -ms-overflow-y: hidden;
}

.topic-subpages-wrapper.no-sidebary {
    padding: 0 1.5rem;
    min-height: 6rem
}

.no-sidebar {
    margin-bottom: 3rem;
}

.no-sidebary {
    padding-bottom: 0 !important;
}

h5 {
    margin-bottom: 0 !important;
}


#sidebar .nav-link {
    background-color: rgba(0, 0, 0, 0) !important;
    color: black;
    position: relative;
    font-size: 1.4rem;
}

#sidebar .nav-link.sup-link:hover,
.chapter-wrapper.active .sup-link {
    color: #931375 !important;
    font-weight: bold;
}

#sidebar .nav-link.sub-link:hover,
#sidebar .nav-link.sub-link.active {
    color: #931375 !important;
}


#sidebar .nav-link.active {
    font-weight: bold;
}

.nav-link.sub-link {
    font-size: 0.9rem !important;
    padding-top: 0 !important;
    color: gray !important;
}

.chapter-wrapper.active .sub-link {
    display: block;
}

.chapter-wrapper.inactive .sub-link {
    display: none
}

#sidebar-mobile-button {
    display: none;
}



/* mobile */
/* @media all and (max-width: 680px) {
    #sidebar-wrapper-mobile a.sub-link {
        font-size: 1.2rem !important;
    }


    .imp-special {
        width: 98vw;
    }

    #sidebar-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    #sidebar-spacer {
        display: none;
        height: 0;
        width: 0;
    }

    #sidebar {
        position: static;
        display: block;
        width: 84vw;
        margin-top: 2.5rem;
    }

    .topic-subpages-wrapper {
        padding: 0 1.5rem;
    }


    #mobile-sidebar-background {
        width: 100vw;
        height: 100vh;
        display: none;
        position: fixed;
        top: 0;
        left: 0;
    }

    #mobile-sidebar-background.active {
        display: block;
    }


    #sidebar-mobile-wrapper {
        display: flex;
        align-items: center;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        width: 0;
        overflow: visible;
    }

    #sidebar-mobile {
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: right;
        height: 40vh;
        width: 85vw;
        position: absolute;
        left: -81.4vw;
        background-color: rgba(0, 0, 0, 0.25);
        color: #ffffff;
        border-radius: 1rem;
        cursor: pointer;

        opacity: 0;
        /* controlled by headerParallax.js 

-webkit-transition: background-color 0.5s,
opacity 0.5s;
-moz-transition: background-color 0.5s,
opacity 0.5s;
-o-transition: background-color 0.5s,
opacity 0.5s;
transition: background-color 0.5s,
opacity 0.5s;



overflow: hidden;
max-height: 80vh !important;
}

#sidebar-mobile.active {
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-transition: background-color 0.5s, opacity 0.5s;
    -moz-transition: background-color 0.5s, opacity 0.5s;
    -o-transition: background-color 0.5s, opacity 0.5s;
    transition: background-color 0.5s, opacity 0.5s;

    overflow-y: scroll;
}

#sidebar-mobile .sup-link {
    color: #931375 !important;
    font-weight: bold;
}

#sidebar-mobile .sub-link {
    color: #931375 !important;
}


#sidebar-wrapper-mobile {
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: 75vw;
}

#mobile-icon {
    display: flex;
    width: 5vw;
    height: 40vh;
    font-size: 2.5rem;
    position: fixed;
    margin-right: 0.6rem;
    padding-left: 0.2rem;
    align-items: center;
}

#sidebar-wrapper-mobile .chapter-wrapper {
    width: 90%;
}
}

*/
/* underlining animation only on desktop */
/* @media all and (min-width: 551px) {
    #sidebar .nav-link::after {
        position: absolute;
        bottom: 0;
        left: -25%;
        right: 0;
        margin: auto;
        width: 0;
        content: "";
        height: 4px;
        transition: all 0.5s;
    }

    #sidebar .sup-link:after {
        background-color: #931375;
    }

    #sidebar .sub-link:after {
        background-color: #931375;
    }

    #sidebar .nav-link:hover::after {
        width: 60%;
        transition: all 0.5s;
    }
} */


/* get rid of headbutting when pressing on links, courtesy: https://css-tricks.com/hash-tag-links-padding/ */
#sidebar-content-wrapper h4::before,
#sidebar-content-wrapper h5::before {
    display: block;
    content: " ";
    margin-top: -80px;
    height: 80px;
    visibility: hidden;
    pointer-events: none;
}

#sidebar-content-wrapper h4,
.event-text h4 {
    text-align: center;
    font-size: 3rem;
    color: #931375;
    padding-top: 4rem;
    font-weight: bolder;
}

#sidebar-content-wrapper h5,
.event-text h5 {
    text-align: left;
    font-size: 1.8rem;
    color: #931375;
    font-weight: normal;
    padding-top: 2rem;
}

h5::after {
    content: "";
    display: block;
    margin-top: 0.5em;

    border-top: 2px solid #931375;
    opacity: 1;
}

.event-text h5 {
    margin-top: 0;
}

.text-wrapper {
    margin-top: 1rem;
}

.image-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
}

.pdf-wrapper {
    margin-top: 1rem;
    display: flex;
    width: 100%;
    height: 70vh;
    justify-content: center;
}

.topic-subpages-wrapper img,
.image-wrapper img {
    max-width: 80%;
    align-self: center;
}

.caption {
    font-size: 0.9rem;
    line-height: 1rem;
    margin-bottom: 1.5rem;
}

.under-title-info {
    font-size: 1rem;
    color: #AAA;
    align-self: center;
}

/*.attribution {

}*/

.name-link,
.outside-link,
.outgoing-link,
.ingoing-link {
    text-decoration: none;
    color: #999;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: inset 0 -0.5em 0 -1px rgba(153, 153, 153, 0.47);
    cursor: pointer;
}

.ingoing-link {
    color: black;
    box-shadow: inset 0 -0.5em 0 -1px #F2CC8F;
}

.document {
    font-weight: bold;
    width: fit-content !important;
}


.name-link:hover,
.ingoing-link:hover {
    color: #666;
    box-shadow: inset 0 -0.5em 0 -1px #F2CC8F;
}

.outside-link,
.outgoing-link {
    color: #000;
    box-shadow: inset 0 -0.5em 0 -1px rgba(51, 102, 204, 0.63);
}

.outside-link:hover,
.outgoing-link:hover {
    color: #3366CC;
    box-shadow: inset 0 -0.5em 0 -1px rgba(51, 102, 204, 0.5);
}




/* ausklappbar */

.content-hider {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    width: 100%;
    height: 3rem;
    overflow: hidden;
    margin-top: 1rem;
    border-radius: 0.5rem;
}

.content-hider.open {
    height: auto;
    overflow: visible;
}

.content-opener {
    width: 100%;
    align-self: center;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #931375;
    cursor: pointer;
}

.content-hider.open .content-opener {
    color: #931375;
}

/* Layout of the opener */
.content-opener {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #FFE1F8;
    color: #931375;
    ;
}

/* Arrow icon */
.arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.hidden-content {
    display: block;
}

.content-hider.open .hidden-content {
    display: block;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.content-hider[open] .arrow {
    transform: rotate(180deg);
    /* becomes a down arrow when closed */
}