/* --- Gallery Page Styles --- */

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

.modal img {
    max-width: 70%;
    max-height: 90%;
    transition: transform 0.15s ease;
}

.modal-content {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Gallery Grid */
.gallery-container-main {
    padding: 400px;
    display: grid;
    background-color: #fff;
    overflow-x: scroll;
}

.gallery-image {
    background-color: rgba(255, 255, 255, 0.788);
    border: 0px solid  rgb(236, 236, 236);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    border-radius: 1px;
    cursor: pointer;
    transition: transform 0.4s;
    color:#444444;
    text-align: center;
    padding:20px;
    margin:20px;
}

#gallery-image-1 {
    grid-row: 1;
    grid-column: 1;
}
#gallery-image-2 {
    grid-row: 1;
    grid-column: 2;
}
#gallery-image-3 {
    grid-row: 2;
    grid-column: 1;
}
#gallery-image-4 {
    grid-row: 2;
    grid-column: 2;
}

.gallery-image img {
    height: auto;
    width: 300px;
    object-fit:cover;
}

.gallery-image-info {
    padding: 5px;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.page-title {
    padding-bottom: 50px;
    font-size: 48px;
    backdrop-filter: blur(5px);
}

@media (min-width: 768px) {
    .gallery-container-main {
        margin:auto;
        padding:100px;
    }
    .gallery-image {
        margin:auto;
        width:80%;
        height:70%;
    }
}

@media (max-width: 768px) {
    .gallery {
        padding-top: 300px;
    }
    .gallery-image h2 {
        font-size: 24px;
    }
    .modal img {
        max-width: 100%;
        max-height: 100vh;
    }
    .gallery {
        padding:30px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    .gallery-image {
        max-width: 80%;
        max-height: 20rem;
    }
    .gallery-image img {
        max-width: 200px;
    }
    .gallery-container-main {
        -webkit-overflow-scrolling: touch;
        padding: 10px;
        display:flex;
    }
}

body {
    background-size:contain;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    margin-bottom: auto;
    background-color:#fff;
}