#galleriesOverview{
    align-items: center;
    --max-size: 1200px;
    padding-bottom: 6rem;
}

.galleries-heading{
    width: 100%;
    max-width: var(--max-size);
}

.galleries-heading h1{
    font-size: var(--font-xxxxl);
    color: var(--on-primary);
    text-align: center;
    margin-top: 0;
}

.galleries-grid{
    box-sizing: border-box;
    padding: 1rem;
    width: 100%;
    max-width: var(--max-size);
    display: grid;
    grid-template-columns: repeat(auto-fit, calc((var(--max-size) - 82px - 2rem)/ 3));
    grid-gap: 40px;
    align-items: center;
    justify-content: center;
    justify-items: center;
    background-color: var(--surface);
    border-radius: calc(12px + 1rem);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.gallery-item{
    width: 100%;
    height: auto;
    box-sizing: border-box;
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.gallery-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-sizing: border-box;
    aspect-ratio: 4/3;
    border-radius: 12px;
    display: block;
    position: relative;
    scale: 1;
    transition: 250ms;
}

.gallery-item:hover .gallery-image{
    scale: 1.1;
}

.gallery-item:hover .gal-title,.gallery-item:hover .gal-date{
    opacity: 1;
}

.gallery-item::after{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
    border-radius: 12px;
}

.gal-title, .gal-date{
    position: absolute;
    color: var(--on-primary);
    font-weight: bolder;
    font-size: var(--font-s);
    z-index: 100;
    opacity: 0;
    transition: 250ms;
}

.gal-title{
    top: .25rem;
    left: .75rem;
}

.gal-date{
    top: .25rem;
    right: .75rem;
}

.pagination{
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: center;
    width: 100%;
    max-width: var(--max-size);
    box-sizing: border-box;
    padding: 1rem;
    background-color: var(--surface-elevated);
    border-radius: calc(1rem);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.pagination p{
    margin: 0 auto 0 0;
    font-size: var(--font-l);
    color: var(--text-muted);
    font-weight: 600;
}

.btn{
    cursor: pointer;
    border: 2px solid var(--border);
    outline: none;
    background-color: var(--surface);
    box-sizing: border-box;
    padding: .5rem;
    font-weight: 700;
    min-width: 32px;
    width: fit-content;
    height: 32px;
    /*aspect-ratio: 1;*/
    transition: 250ms;
    margin: 0 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.btn:hover{
    background-color: var(--surface-elevated);
}

.active{
    background-color: var(--primary);
    color: var(--on-primary);
    border: 2px solid var(--primary);
}

.active:hover{
    background-color: var(--primary-hover);
}

.inactive{
    cursor: unset;
    background-color: transparent;
    border: none;
}

.inactive:hover{
    cursor: unset;
    background-color: transparent;
    border: none;
}

.pager{
    aspect-ratio: unset;
    width: auto;
    padding: .5rem 1rem;
}


@media (max-width: 600px) {

    #galleriesOverview {
        align-items: center;
        --max-size: 600px;
        padding: 2rem 1rem 4rem 1rem;
        box-sizing: border-box;
    }

    .galleries-heading {
        width: 100%;
        max-width: var(--max-size);
    }

    .galleries-heading h1 {
        font-size: var(--font-xxl);
    }

    .galleries-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }

    .gallery-item:hover .gallery-image {
        scale: 1.0;
    }

    .gallery-item .gal-title, .gallery-item .gal-date {
        opacity: 1;
    }

    .pagination {
        flex-wrap: wrap-reverse;
        justify-content: center;
    }

    .pagination p {
        margin: 0 auto 0 0;
        font-size: var(--font-l);
        color: var(--text-muted);
        font-weight: 600;
    }

}