/* Gallery */
#gallery {
    touch-action: manipulation;
    padding: 2rem;
}

#gallery h2 {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.gallery-container img {
    width: 100%;
    height: auto;
    cursor: pointer;
    box-shadow: 0 0 6px #000000;
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.gallery-container img:hover {
    box-shadow: -5px -5px 6px #000000;
    transform: translate(2px, 2px);
}

.folded {
    display: none;
    /* Initially hide the folded images */
}

.folded.show {
    display: block;
    /* Show images when the show class is added */
}

.show-more {
    display: block;
    margin: 10px auto;
    padding: 5px 10px;
    cursor: pointer;
}

.hide {
    display: none;
}

.gallery-container.show-all .hide {
    display: block;
}

#gallery h2+p {
    margin-bottom: 2rem;
}

#gallery button {
    border: none;
    color: black;
    transform: scale(1);
    transition: transform 100ms ease;
}

#gallery button:hover {
    transform: scale(2);
}



.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Allow scrolling within the modal if needed */
    background-color: rgba(0, 0, 0, 0.9);
    touch-action: manipulation;
}

.modal-content {
    max-height: 100%;
    max-width: 100%;
    margin: auto;
    display: block;
    /* Centering the modal content within the screen */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Modal Button styling */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}
