:root {
    --div-width: 50%;
    --insidediv-width: 75%;
    --sectiondiv-width: 85%;
    --downloads-columns: repeat(3, 32%);
    --clinitipsImg123-width: 33.33%;
    --clinitipsImg123-height: 9vw;
    --clinitipsImg4-height: 12vw;
    --video-height: 24vw;
    --padding: 1%;
}

@media screen and (max-width: 1050px) {
    :root {
        --padding: 1.2%;
    }
}

@media screen and (max-width: 850px) {
    :root {
        --div-width: 100%;
        --clinitipsImg123-height: 19vw;
        --clinitipsImg4-height: 26vw;
        --video-height: 50vw;
    }
}

@media screen and (max-width: 550px) {
    :root {
        --insidediv-width: 90%;
        --sectiondiv-width: 98%;
        --downloads-columns: repeat(2, 48%);
    }
}

@media screen and (min-width: 2500px) {
    :root {
        --downloads-columns: repeat(4, 24.25%);
        --video-height: 22vw;
    }
}

@media screen and (min-width: 3750px) {
    :root {
        --downloads-columns: repeat(5, 19%);
        --insidediv-width: 55%;
        --sectiondiv-width: 65%;
        --clinitipsImg123-height: 6vw;
        --clinitipsImg4-height: 9vw;
        --video-height: 18vw;
    }
}


/* general */

html,
body {
    height: 100%;
}

main {
    flex-grow: 1;
    overflow: hidden;
}

p {
    font-size: calc(var(--p-fontsize)*0.9);
}

main-navbar,
main-navopen {
    flex-shrink: 0;
}

main>div:nth-child(2)>ul,
section {
    width: 100%;
    height: fit-content;
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
    overflow-y: auto;
    transition: all 0.7s linear;
}

h2 {
    padding: var(--mp5);
}


.books a {
    float: right;
    margin-right: 1%;
}

.books i,
.books a {
    font-size: calc(var(--p-fontsize) * 0.85);
}

#pagenavigation button,
#pagenavigation p,
main>div:nth-child(2) ul>li>button {
    font-size: var(--h3-fontsize);
    line-height: calc(var(--h3-fontsize) * 1.75);
}

main>div:nth-child(2) li:not(ul > li:last-child),
h2 {
    border-bottom: 1px solid var(--color1);
}

main>div:first-child {
    width: var(--div-width);
    min-height: 100%;
    height: 100%;
    float: left;
    display: flex;
    justify-content: end;
    align-items: center;
    background-image: url("img/toolboxbackgroundimg.webp");
    background-repeat: no-repeat;
    background-size: cover;
}

#pagenavigation {
    padding: var(--mp6);
}

main>div:nth-child(2) {
    width: var(--div-width);
    height: 100%;
    float: right;
    position: relative;
}

main>div:nth-child(2) ul>li {
    width: var(--insidediv-width);
    margin: auto;
}

main>div:nth-child(2) ul>li>button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: var(--mp5);
}

section {
    height: 100%;
    display: flex;
    padding: 10px;
}

section>div {
    width: var(--sectiondiv-width);
    height: fit-content;
    margin: auto;
}

/* downloads */
section.downloads>div>div {
    display: grid;
    grid-template-columns: var(--downloads-columns);
    row-gap: 5px;
    justify-content: space-around;
    padding-left: var(--padding);
    padding-right: var(--padding);
}

section.downloads div a {
    overflow: hidden;
    height: fit-content;
}

section.downloads div a img {
    width: 100%;
    background: white;
    border: 0.5px solid #d5d5d5;
}

/* clinitips */
.threeImgs {
    display: flex;
}

section.clinitips>div>div {
    margin: auto;
    overflow: hidden;
    padding-left: var(--padding);
    padding-right: var(--padding);
}

section.clinitips img {
    object-fit: cover;
}

section.clinitips .threeImgs img:first-child,
section.clinitips .threeImgs img:nth-child(2),
section.clinitips .threeImgs img:nth-child(3) {
    width: var(--clinitipsImg123-width);
    height: var(--clinitipsImg123-height);
}

section.clinitips div>div>img {
    width: 100%;
    height: var(--clinitipsImg4-height);
}

section.clinitips p {
    margin: var(--mp5) 0;
}

/* e-talk and books*/
video {
    width: 98%;
    height: var(--video-height);
    margin-left: 1%;
    background-image: linear-gradient(to right, black, #505050, black);
}

.books a,
.books i {
    text-shadow: 0px 0px 0.7px var(--color3);
}

/* books */
.bookImg {
    width: 100%;
    height: var(--video-height);
    object-fit: contain;
}

@media screen and (max-width: 850px) {

    #pagenavigation>p {
        display: block;
        font-weight: 600;
    }

    main>div:nth-child(2) {
        height: 100dvh;
        position: fixed;
        top: 0;
        z-index: 4;
        background-color: #ffffff99;
        backdrop-filter: blur(25px);
    }

    .subnavigation {
        max-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .subnavigation ul {
        min-height: calc(100dvh - 50px);
        position: relative;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 50px 0;
    }

    .subnavigation li {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    main>div:nth-child(2)>ul li {
        margin: 0;
    }

    section {
        max-height: 100dvh !important;
    }
}

.animatedContent2 {
    transition: all 0.7s linear;
}
