body {
    background-color: #000;
    height: 100%;
    font-family: sans-serif;
}

.container {
    width: 50%;
    height: vmax;
    margin: auto;
}
.head {
    text-align: center;
    padding: 2%;
    width: 70%;
    margin: auto;
    margin-top: 50px;
    font-family: serif;
}
.head a {
    background-color: black;
    color: yellow;
}
.outer-headings {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
h1.scrolltitle {
    font-size: 45px;
}
.inner-headings {
    height: 50px;
    line-height: 50px;
    font-size: 44px;
    overflow: hidden;
}
.inner-headings span {
    position: relative;
    color: white;
    animation: animation ease 10s infinite;
}
@keyframes animation {
    0% {
        top: 0;
    }
    33% {
        top: -50px;
    }
    66% {
        top: -100px;
    }
    99% {
        top: -150px;
    }
}

.pflogo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}
.pflogo:hover {
    -webkit-filter: blur(1px);
    filter: blur(1px);
}

.head h1 {
    font-family: sans-serif;
    font-size: 2.3em;
    font-weight: 600;
    color: #FFF;
}

/* Description area */
.archive-description {
    font-family: 'Courier New', courier, monospace;
    font-size: 0.9em;
    color: #FFF;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.9;
    padding: 0 10px;
    overflow: hidden;
}

.archive-description a {
    color: yellow;
    text-decoration: underline;
}


/* Toggle Button */
.desc-toggle {
    color: yellow;
    cursor: pointer;
    background-color:#000000;
    display: block;
    margin: auto;
    text-decoration: underline;
}
.desc-toggle:hover {
    background-color: #505050;
    text-decoration: none;

}

/*.desc-toggle {
    background-color: #575757;
    color: white;
    font-size: 1.1em;
    padding: 16px 20px;
    border: none;
    width: 75%;
    margin: 0 auto 40px auto;
    display: block;
    text-align: center;
    font-family: sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.1s;
}

.desc-toggle:hover {
    background-color: #6f6f6f;
    transform: scale(1.01);
}*/

.desc {
    overflow: hidden;
    transition: max-height 0.5s ease;
    backdrop-filter: brightness(0.7);
}

/* Collapsed state */
.collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    backdrop-filter: none;
}

/* Expanded state */
.expanded {
    max-height: 2000px; /* plenty of space to show content */
    transition: max-height 0.5s ease;
}

.main-content-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}
/*
.sortoptions {
    background-color: rgba(193, 193, 193, 0.69);
    padding: 10px;
    margin: 7px 0 0 1000px;
    position: fixed;
    width: 90px;
}
*/
.sortoptions {
    align-self: flex-start;
    width: 160px;
    background-color: rgba(193, 193, 193, 0.69);
    padding: 10px;
    box-sizing: border-box;
    z-index: 100;
    font-size: 0.9em;
    overflow: visible;
}

.sortoptions.button {
    margin: auto;
    display: block;
}

.sortoptions.collapsed .sort-content {
    display: none;
}
.sortoptions.collapsed {
    min-height: 60px; 
}

.toggle-sort-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #444;
    color: #FFF;
    cursor: pointer;
    text-align: left;
}

#featuredPatchContainer {
    text-align: center;
    color: yellow;
    padding-bottom: 40px;
}
.featured-patch {
    max-width: 100%;
    margin: 0 auto;
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

#featuredPatchContainer {
    text-align: center;
    margin-top: 10px;
}

#featuredPatchContainer .patchInfo {
    display: block;
    font-size: 1rem;
    color: #ffffff;
    margin-top: 5px;
}

.featured-patch:hover {
    transform: scale(1.01);
}
.featuredPatchLabel {
    background-color: #000000;
    max-width: 75%;
    display: block;
    margin: auto;
    color: yellow;
}

#imagegrid {
    flex-grow: 1;
    padding: 10px;
    gap: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    height: vmax;
}

.fullsizepatch {
    height: auto;
}

.griditem {
    outline: outset;
    outline-color: #000000;
    /*aspect-ratio: 1;*/
}

.griditem:hover {
    outline-color: #ff00e1;
}

img.patchimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Styles */
            .modal {
                display: none;
                position: fixed;
                z-index: 1000;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                overflow: auto;
                background-color: rgba(0,0,0,0.7);
                
                align-items: center;
                justify-content: center;
            }

            .modal-content {
                margin: auto;
                display: block;
                max-width: 700px;
            }

            .prev, .next {
                position: absolute;
                top: 50%;
                padding: 16px;
                color: white;
                font-size: 18px;
                font-weight: bold;
                transition: 0.3s;
                cursor: pointer;
                user-select: none;
            }

            .prev {
                left: 0;
                transform: translateY(-50%);
                font-size: 40pt;
            }

            .next {
                right: 0;
                transform: translateY(-50%);
                font-size: 40pt;
            }

            /* Close Button */
            .close {
                color: white;
                position: absolute;
                top: 10px;
                right: 25px;
                font-size: 36px;
                font-weight: bold;
                transition: 0.3s;
                cursor: pointer;
            }

/* Zoom-related styles */
.modal-content {
    max-width: 100%;
    max-height: 90vh;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.modal-content.zoomed {
    transform: scale(2.5); /* You can adjust the zoom level */
    cursor: zoom-out;
}

/* Patch Sorter */
.sort-content {
  display: none;
  transition: all 0.3s ease;
}

.sort-content.show {
  display: block;
}



/* responsive!!! */


@media screen and (max-width: 1000px) { /*Smaller screens do this*/
    .main-content-wrapper {
        flex-direction: column;
    }
    .container {
    width: 100%;
    margin: auto;
    }
    .head h1,h2 {
        font-size: 3em;
    }
    .archive-description {
        font-size: 1.2em;
    }
    .sortoptions {
        position: sticky;
        display: grid;
        grid-template-columns: repeat(n, 1fr);
        gap: 10px;
        top: 20px;
        left: 10px;
        width: 100%;
        margin-bottom: 30px;
        z-index: 10;
        overflow: visible;
    }
    .grid {
        width: 100%;
    }
    button {
        font-size: 2em;
        padding: 0.6em;
    }
}

@media only screen and (min-width: 1001px) { /*Larger Screens do this*/
    .container {
    width: 50%;
    margin: auto;
    }
    
    #imagegrid {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: vmax; 
    }
    
    .sortoptions {
    position: fixed;
    top: auto;
    bottom: 0.1%;
    left: 16%;
    right: 0;
    align-self: auto;
    max-width: 100px;
    margin-bottom: 30px;
    z-index: 10;
    }
}

