/* standard classes */

:root {
    --nav-width: 30vw;
    --nav-min: 230px;
    --nav-max: 300px;
    -webkit-tap-highlight-color: transparent;
}

[id] {
    scroll-margin-top: 100px;
}

.display-flex {
    display: flex;
    justify-content: space-between;
}

section {
    padding-top: 80px;
    background-color: var(--blueprint);
}

h3 {
    font-family: var(--heading-font);
    font-size: 1.8em;
    font-weight: 500;
    margin-bottom: 15px;
}

hr {
    border-top: none;
    border-bottom: 1px solid var(--grey);
    margin: 50px 0;
}

a {
    color: white;
    text-decoration: underline;
}

a:hover {
    color: var(--off-blue);
}

.current-page {
    color: var(--cutting-board-green);
}

.instructions-img {
    width: 100%;
}

/* video container */

.video-dropdown {
    width: 100%;
    margin: 1rem auto;
}

.video-toggle {
    width: 100%;
    padding: 10px;
    color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1.1rem;
    border-radius: 5px;
    border: 1px solid var(--grey);
    background-color: transparent;
}

.video-toggle:hover {
    background-color: var(--dark-grey);
}

.video-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease;
}

.video-content.open {
    max-height: 1000px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* mobile nav */

.arrow-down {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid var(--grey);
    transition: transform 0.3s ease;
    display: inline-block;
}

.instructions-btn {
    width: 100%;
    padding: 10px 5px;
    border-radius: 5px;
    color: white !important;
    font-family: var(--heading-font);
    font-size: var(--btn-font-size);
    font-weight: bold;
    letter-spacing: 1.1px;
    background-color: var(--off-blue);
    width: 100%;
    max-width: 450px;
    display: inline-block;
    text-align: center;
    margin: 0 auto;
    border: 1px solid white;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.instructions-btn:hover {
    background-color: var(--dark-grey);
}

.instructions-btn:active {
    transform: scale(100%);
    transition: 0.1s ease;
}

/* docs nav styling */

#search-box {
    border-radius: 20px;
    border: 2px solid var(--grey);
    height: 40px;
    padding: 10px;
    background-color: transparent;
    color: var(--grey);
}

.instructions-content {
    margin: 0 auto;
    background-color: var(--blueprint);
    max-width: 800px;
    padding: 0px 15px 45px;
    color: white;
}

#docs-hamburger {
    width: 30px !important;
    height: 22px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 5px;
}

#docs-hamburger span {
    display: block;
    height: 4px;
    background: var(--grey);
    transition: 0.3s ease;
}

#open-docs-btn {
    color: var(--grey);
    cursor: pointer;
    position: absolute;
    right: 15px;

    p {
        margin: 8px;
    }
}

/* page information */

.padding-for-top-mobile {
    height: 60px;
}

#mobile-page-instructions-nav {
    width: 100%;
    height: 63px;
    position: fixed;
    padding: 10px 0 10px;
    margin-left: -15px;
    background-color: var(--blueprint);
    border-bottom: 1px solid white;
    transition: top 0.3s ease;
}

.right-column-for-desktop {
    display: none;
}

#page-information-dropdown {
    width: 210px;
    background-color: var(--off-blue);
    border-radius: 5px;
    overflow: hidden;
    height: 40px;
    cursor: pointer;
    transition: height 0.3s ease;
    border: 1px solid var(--grey);
    position: absolute;
}

#page-information-dropdown ul {
    list-style: none;
    padding: 10px 10px 0;
    margin-top: 0;
    border-top: 1px solid white;
}

#page-information-dropdown ul li {
    margin-bottom: 15px;
}

#page-information-dropdown h4 {
    margin: 0;
    font-weight: 500;
    color: var(--grey);
}

ul li a {
    color: white;
    text-decoration: none;
    text-align: left;
}

.arrow-rotate {
    transform: rotate(-180deg);
}

/* instructions side navbar */

.side-nav-open {
    width: 80vw !important;
}

#instructions-side-nav-ghost {
    width: 0;
}

#instructions-side-nav {
    position: fixed;
    height: 100%;
    width: 0;
    background-color: var(--dark-grey);
    border-right: 1px solid var(--grey);
    z-index: 1;
    overflow-x: hidden;
    transition: top 0.3s ease, width 0.3s ease;
    white-space: nowrap;
    margin-left: -2px;
    max-width: 600px;
}

#instructions-side-nav ul {
    list-style: none;
}

#instructions-side-nav ul li {
    margin: 5px 0;
}

#instructions-side-nav ul li a {
    color: white;
}

#instructions-side-nav ul li a:hover {
    text-decoration: underline;
}

#instructions-side-nav h1 {
    color: white;
    margin: 25px 15px;
    font-size: 2rem;
}

.side-nav-sub-title {
    font-family: var(--heading-font);
    font-weight: bold;
    color: white;
    margin-left: -10px !important;
    padding: 10px 0 5px;
}

/* turn hamburger into an < */

#docs-hamburger.side-nav-open span:nth-child(1) {
    transform: rotate(-40deg);
}

#docs-hamburger.side-nav-open span:nth-child(2) {
    transform: rotate(40deg);
}

/* content styling */

h1 {
    font-size: 4rem;
    margin: 0;
}

h2 {
    margin-bottom: 0;
}

/* table styling */

table {
    border-collapse: collapse;
    width: 100%;
    border-radius: 5px;
    border: 1px solid var(--grey);

}

td,
th {
    padding: 8px;
}

tr:nth-child(even) {
    background-color: var(--off-blue);
}

tr:hover {
    background-color: var(--dark-grey);
    transition: 0.3s ease-in-out;
}

th {
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: left;
    border-right: 1px solid var(--grey);
}

th a {
    color: white;
}

th a:hover {
    text-decoration: underline;
}

/* button container */

.instruction-btn-container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 10px;
}

.instruction-btn-container .instructions-btn {
    font-size: 1.5rem;
}

/* 3d printing seciton */

.print-part-img-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    justify-items: flex-start;


    img {
        width: 100%;
        max-width: 250px;
    }

    p {
        border-top: 1px solid var(--grey);
        padding: 10px;
        margin: 0;
    }

    div {
        border: 1px solid var(--grey);
        border-radius: 5px;
    }
}

.img-caption {
    margin: 8px 0 30px;
    padding: 0;
}

.instruction-img-container img {
    width: 100%;
    max-width: 800px;
}

.instruction-img-container p {
    margin: 10px 0 35px;
}

.grid-4x4 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 15px;

    img {
        width: 100%;
    }
}

.current-page {
    color: var(--off-blue) !important;
}

@media (min-width: 801px) {

    #instructions-side-nav {
        transition: none;
        width: var(--nav-width);
        min-width: var(--nav-min);
        max-width: var(--nav-max);
    }

    #instructions-side-nav-ghost {
        flex: 0 0 var(--nav-width);
        min-width: var(--nav-min);
        max-width: var(--nav-max);
        display: inline-block;
        background-color: var(--blueprint);
    }

    #instructions-container {
        display: flex;
        width: 100%;
    }

    .instructions-content {
        margin: 0;
        width: 100%;
        padding: 0 5vw 45px;
        max-width: 100vw;
    }

    .right-column-for-desktop {
        width: 30%;
        background-color: var(--blueprint);
        display: block;
        min-width: var(--nav-min);
        max-width: var(--nav-max);
    }

    .right-column-for-desktop h2 {
        color: var(--grey);
        margin-left: 10px;
    }

    .right-column-for-desktop ul {
        list-style: none;
    }

    #page-contents-desktop {
        position: fixed;
        z-index: 1;
        background-color: var(--blueprint);
        width: 100%;
        height: 100vh;
        border-left: 1px solid var(--grey);
        min-width: var(--nav-min);
        max-width: var(--nav-max);
    }

    .right-column-for-desktop ul li {
        margin: 5px 0;

        a {
            color: var(--grey);
        }
    }

    .right-column-for-desktop ul li a:hover {
        text-decoration: underline;
        color: white;
    }

    #open-docs-btn {
        display: none;
    }

    #mobile-page-instructions-nav {
        display: none;
    }

    .instruction-btn-container {
        flex-direction: row;
    }

    .print-part-img-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 200px));
    }

    .grid-4x4 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        margin-top: 15px;
    }

    .padding-for-top-mobile {
        display: none;
    }

    .showcase-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 15px;
        padding-top: 10px;
    }
}