:root {
    --banner-height: 625px;
    --side-nav-width: 15vw;
    --breadcrumb-height: 3rem;
    --gold: goldenrod;
    --silver: #71706E;
    --bronze: darkgoldenrod;

    --logo-purple: #844876;
    --logo-green: #4E7E75;
    --logo-red: #B63E54;
    --logo-yellow: #CC922E;

    --NRPieceS-turquoise: #99C1B9;
    --NRPieceS-light-turquoise: #C5D2C6;
    --NRPieceS-beige: #F0EBD5;
    --NRPieceS-orange: #F2D0A9;
    --NRPieceS-pink: #D88C9A;
    --NRPieceS-purple: #A96299;

    --nav-hover-1: var(--NRPieceS-turquoise);
    --nav-hover-2: var(--NRPieceS-orange);
    --nav-hover-3: var(--NRPieceS-pink);
    --nav-hover-4: var(--NRPieceS-light-turquoise);
    --nav-hover-5: var(--NRPieceS-purple);
}


/*Loading different fonts*/
@font-face {
    font-family: "Poppins";
    src: url("https://static.igem.wiki/teams/5667/assets/fonts/poppins/poppins-regular.ttf") format("truetype");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("https://static.igem.wiki/teams/5667/assets/fonts/poppins/poppins-medium.ttf") format("truetype");
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("https://static.igem.wiki/teams/5667/assets/fonts/poppins/poppins-semibold.ttf") format("truetype");
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("https://static.igem.wiki/teams/5667/assets/fonts/poppins/poppins-bold.ttf") format("truetype");
    font-weight: 700; font-style: normal; font-display: swap;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    /*display: grid;*/
    /*grid-template-rows: auto 1fr auto;*/
    min-height: 100vh;
    overflow: auto;
    max-width: 100%;
}

main {
    background-color: #F0EBD5;
    padding-bottom: var(--footer-gap);
}

/* Font sizes */
h1 {
    font-size: clamp(2rem, 1.8vw + 1rem, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 .5em;
    text-align: left;
}
h2 {
    font-size: clamp(1.5rem, 1.2vw + .9rem, 2rem);
    font-weight: 600;
    line-height: 1.25;
    margin: 1.5em 0 .5em;
    text-align: left;
}
h3{
    font-size: clamp( 1.4rem,.6vw , 1rem);
    font-weight: 625;
    margin: 1.5em 0 .25em;
    text-align: left;
}
p {
    font-size: clamp(1rem, .25vw + .95rem, 1.125rem);
    line-height: 1.7;
    margin: 0 0 1em;

}

/* Banner Picture */
.page-banner {
    width: 100%;
    object-fit: cover;
    height: auto;
    max-height: var(--banner-height);
    padding-top: var(--header-height);
    z-index: 1;
    display: block;
    margin: 0 0 clamp(20px, 2vw, 40px);
    position: relative;
}

/* Page content */
.page-content {
    display: flex;
    gap: 0;
    align-items: start;
    text-align: justify;
    overflow: visible;           /* wichtig: nichts abschneiden */
    padding-inline: var(--container-pad);
    padding-right:5px;
}

.side-content{
    max-width: 67.5%;          /* Textbreite begrenzen */
    margin-inline: auto;                    /* zentriert in der rechten Spalte */
    margin-left: 6vw;
    margin-right: 6vw;
}

/* for side-navbar */
html { scroll-behavior: smooth; }

/* verhindert, dass Überschriften unter dem fixen Header verschwinden */
main section[id] {
    scroll-margin-top: var(--header-height);
}

/* The left table of contents */
.side-navigation {
    position: sticky;
    top: calc(var(--header-height, 80px) + 10px);   /* Abstand Header */
    align-self: start;
    text-align: left;
    padding-right: 1%;
    margin-left: 1.5vw;
    border: none;
    background:none;
    box-shadow: none;
    width: 15%;
    border-radius: 0;
    border-right: 2px solid #aaa; /* rechte Abgrenzung*/
    margin-top: var(--breadcrumb-height);
    max-height: calc(100svh - var(--header-height) - 10px);
    overflow-y: auto;

    display: flow-root;

}


.side-nav-title {
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: .75em;
    font-weight: 700;
}
.side-nav-chapter{
    margin-bottom: 0.75rem;
}

.side-nav-chapter h2{
        font-size: clamp(1rem, 0.55vw + 0.45rem, 1.05rem);
        line-height: 1.75;
        margin: .25rem 0;
        font-weight: 500;

}

.side-nav-subchapter h2{
    line-height: 1;
    padding-left: 1rem;
    font-weight: 400;
    /*margin: 0.2rem 0 0.25rem;*/
}

.side-nav-chapter h2 a{
    display: inline-block;
    padding: 0 .5rem;                 /* unten nichts mehr */
    text-decoration: none;
    color: inherit;
    transition: text-decoration-style .2s ease;

}

.side-nav-subchapter h2 a {
    padding: 0.1rem -1rem;
}

/* global für alle chapter */

.side-nav-chapter h2 a:hover,
.side-nav-chapter h2 a.active{
    text-decoration: underline;
    text-decoration-thickness: 0.2rem;
    text-underline-offset: 0.15em;
    text-decoration-skip-ink: none;
    text-decoration-color: var(--current-color, black);
}
.side-nav-subchapter h2 a:hover,
.side-nav-subchapter h2 a.active {
    text-decoration: underline;
    text-decoration-thickness: 0.15rem;
    text-decoration-skip-ink: none;
    text-decoration-color: var(--current-color, black);
}



/* for marking target in side-navbar*/
:target { outline: 0; }

.side-toggle{
    visibility: collapse;
}

@media (max-width: 1200px){
    .side-content{
        max-width: 75%;
    }
    .side-toggle{
        visibility: visible;
        position: sticky;
        top: calc(var(--header-height, 80px) + 8px);
        left: .5rem;/*var(--container-pad, 12px);*/
        z-index: 999;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 35px;
        width: 45px;
        border: 0; border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,.15);
        cursor: pointer;
    }
    .side-toggle svg rect { fill: #222; }
    /* slide-in panel for the side nav */
    .side-navigation{
        position: fixed;
        inset: calc(var(--header-height,80px) + 8px) auto 0 0;  /* top, left 0; bottom 0 */
        width: min(85vw, 340px);
        max-height: calc(100svh - var(--header-height,80px) - 8px);
        overflow: auto;
        background: #fff;
        border-right: 1px solid #ddd;
        border-top-right-radius: 16px;
        border-bottom-right-radius: 16px;
        border-bottom-left-radius: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,.25);

        transform: translateX(-120%);
        z-index: 1000; /* under the button, over content */
        padding: 1rem 1rem 1.5rem;
    }
    .side-nav-open .side-navigation{ transform: translateX(0); }
    .page-scrim{ display: none;}
    .side-nav-open .page-scrim{ display: block; }
    .side-nav-open .page-scrim[hidden]{ display:block; } /* in case 'hidden' attr remains */

    .no-scroll { overflow: hidden; }
}



/* content (on the right) */
/* kinda unnecessary with tier content */
.side-content {
    overflow-y: visible;
    overflow-x: clip;
}

/* For breadcrumb navigation */
.breadcrumb{
    font-size: clamp(1rem, .25vw + .95rem, 1.125rem);
    height: var(--breadcrumb-height);
    color:#444;font-style:italic;
    text-align: left;
}

.breadcrumb a{
    color:inherit;
    text-decoration:none;
    cursor: pointer;
}
.breadcrumb a:hover{
    text-decoration:underline
}
.breadcrumb .separator{margin:0 .5rem;
    color:#999
}
.breadcrumb .current{
    font-weight:700;
    font-style:italic
}



.breadcrumb-container{
    display: flex;
    grid-template-columns: clamp(220px, 18vw, 280px) minmax(0,1fr);
    column-gap: 2rem;
    padding-inline: var(--container-pad);
    margin: .5rem 0 1rem;
}
.breadcrumb{ grid-column: 2; }
@media (max-width: 650px){
    .breadcrumb-container{ grid-template-columns: 1fr; }
    .breadcrumb{ grid-column: 1; }
}

@media(max-width: 450px){
    .side-content{
        max-width: 77%;
        margin: 0 .5rem ;
    }
}

/* Figures to always look the same */
figcaption {
    text-align: left;
}

figure img{
    width: 100%;
    border-radius: 2vw;
}

.left-inline-figure {
    float: left;
    width: 50%;
    margin-left: 0;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.right-inline-figure {
    float: right;
    width: 50%;
    margin-right: 0;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.center-full-line-figure {
    width: 85%;
    display: block;
    margin: auto;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.zoomable-figure {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zoomable-figure:hover {
    transform: scale(.99);
}

.zoomable-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Zoom Icon */
.zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.zoomable-figure:hover .zoom-icon {
    opacity: 1;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: zoomIn 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
    pointer-events: none;
}

.modal-content img,
.modal-content .modal-caption {
    pointer-events: auto;
}

.modal-content img {
    max-width: calc(95vw - 2rem);
    max-height: calc(95vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background:  #F0EBD5;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-caption {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    max-width: min(800px, 100vw);
    max-height: 120px;
    overflow-y: auto;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 0;
}

.modal-close:hover {
    background: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .center-full-line-figure {
        width: 100%;

        .modal-content {
            width: 100vw;
            height: 100vh;
            padding: 0.5rem;
        }

        .modal-content img {
            max-width: calc(100vw - 1rem);
            max-height: calc(100vh - 180px);
            padding: 0.5rem;
        }

        .modal-caption {
            padding: 0.5rem 1rem;
            font-size: 0.85rem;
            max-height: 100px;
        }

        .modal-close {
            width: 35px;
            height: 35px;
            font-size: 24px;
            top: 10px;
            right: 10px;
        }
    }
}

    @media (max-width: 480px) {
        .modal-close {
            width: 32px;
            height: 32px;
            font-size: 20px;
            top: 8px;
            right: 8px;
        }
    }
    /* Tables to always look the same */
    /* Details like aligning text and spacing columns can differ on a table to table basis */
    .table-wrapper {
        overflow: auto;

    .table-caption {
        text-align: left;
        color: black;
        width: 100%;
        margin: 1rem 0 0;
    }

    table {
        margin: 0 auto 2rem;
        background-color: transparent;
        border-collapse: collapse;
        border-spacing: 0;
        overflow: hidden;
        width: 75%;
        color: black;

   tr:not(.table-head) > * { border-top: 2px solid #000; }

        .table-head {
            color: black;
            font-weight: bold;
        }

            tr th {
                padding-top: 0.3rem;
                padding-bottom: 0.3rem;
            }

            tr td {
                padding-top: 0.5vw;
                padding-bottom: 0.5vw;
            }

            tr th, tr td {
                padding-left: 1vw;
                padding-right: 1vw;
            }
        }
    }

    h1.pagetitle {
        margin-bottom: 0.2rem;
        text-align: left;
    }

    h2.pagesubtitle {
        margin-top: 0;
        font-weight: unset;
        margin-bottom: 3rem;
        text-align: left;
    }

    .u-link {
        color: #4E7E75;
        text-decoration: none;

        background-image: linear-gradient(currentColor, currentColor);
        background-size: 0 2px;
        background-position: 0 calc(100% - 2px);
        background-repeat: no-repeat;
        transition: background-size .25s ease, color .25s ease;
    }

    .u-link:hover,
    .u-link:focus-visible {
        color: #4e0894;
        background-size: 100% 2px;
    }

    .toggle-section {
        .toggle-title {
            width: 100%;
            background-color: #E2BB78;
            color: white;
            display: inline-flex;
            align-items: center;
            padding: 0.2em 0;
            border-radius: 10px;
            box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);


            span {
                margin-left: 3%;
            }


            img {
                float: right;
                height: 0.7em;
                width: auto;
                display: block;
                margin-left: auto;
                margin-right: 5%;
                transform: rotate(180deg);
                transition: transform 0.3s ease;
            }

            img.flipped {
                transform: rotate(0deg);
            }
        }

    .toggle-content {
        border-left: solid #E2BB78;
        border-width: 5px;
        margin-left: 3%;
        padding-left: 3%;
        display: none;
        background-color: white;
        padding-right: 20px;
        border-radius: 0 20px 20px 0;
        overflow-x: auto;
    }

    .toggle-content.visible {
        display: block;
    }

}

.ref-toggle {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    color: black;

    img {
        float: right;
        height: 0.7em;
        width: auto;
        display: block;
        margin-left: 0.5rem;
    }
}

.references-less img {
    transform: rotate(180deg);
}

.reference-link {
    font-size: clamp(0.7rem, .175vw + .665rem, 0.7875rem);
}

.references-content {
    text-align: left;
    a {
        color: #4E7E75;
    }
}

.references-content.blurred {
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    max-height: 250px;
    overflow-y: hidden;
}

.ref-toggle.invisible {
    visibility: collapse;
    height: 0;
    width: 0;
}

.interview-box {
    clear: both;
    background-color: var(--NRPieceS-light-turquoise);
    border-radius: 3vw;
    padding: 2rem 3vw 1rem;
    width: fit-content;
    height: fit-content;
    margin: 3vw auto;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    position: relative;

     a {
        text-decoration: none !important;
        color: black;
    }

    .interview-quote {
        text-align: center;
        font-style: italic;
        margin-bottom: .5em;
        font-weight: 500;
        font-size: 1.5em;
    }

    .interviewee-name {
        font-weight: 600;
        margin: 0 150px 0;
        text-align: center;
        display: block;
    }

    .interviewee-description {
        text-align: center;
        font-size: smaller;
        display: block;
        margin: 0 150px 0;
    }

    .more-wrapper {
        position: absolute;

        width: 150px;
        right: 3%;
        bottom: 15px;

        transition: scale 0.3s ease;

        .more-svg {
            width: 100%
        }

        a {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
    }

    .more-wrapper:hover {
        transform: scale(1.05);
    }
}

@media (max-width: 750px) {
    .interviewee-name, .interviewee-description {
        margin: 0 !important;
    }
    .more-wrapper {
        position: relative !important;
        right: unset !important;
        bottom: unset !important;
        margin: 1em auto 0;
    }
}

section {
    content: "";
    display: block;
    clear: both;
}

@media (max-width: 1000px) {
    .left-inline-figure, .right-inline-figure {
        display: block !important;
        width: 100% !important;
    }
}

.code {
    white-space: pre-line;
}


    ::-webkit-scrollbar {
        width: 6px;
    }


    ::-webkit-scrollbar-thumb {
        background-color: #b0b0b0;
        border-radius: 6px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background-color: #8c8c8c;
    }

    .no-round {
        border-radius: 0 !important;
    }

    @media (max-width: 1200px) {
        .drylab-nav-hover, .wetlab-nav-hover, .engagement-nav-hover, .project-nav-hover, .team-nav-hover {
            text-decoration: none !important;
        }
    }
