﻿.gallery-list {
    display: flex;
    flex-direction: column;
    row-gap: 5rem;
    margin-top: 4rem;
}

.gallery-card-grid {
    display: grid;
    row-gap:1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-grid-container {
    margin: 0 var(--mob-side-margin);
}

.gallery-card {
    background: white;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    aspect-ratio: 1.5/1;
}

.gallery-img-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 2;
}

.gallery-card-content {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gallery-card-content > * {
    max-width: 80%;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .25s ease;
}

.gallery-card-overlay {
    background: rgba(0,0,0,0.5);
    position: absolute;
    inset: 0;
    z-index: 3;
}

.gallery-card-text {
    border: 1px solid white;
    padding: 2rem 1rem;
    word-break: break-word;
}

.gallery-card-text h3{
    font-size: 1.25rem;
    letter-spacing: 3px;
    font-weight: 300;
    margin: 0;
}

.gallery-section-header {
    display: flex;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--clr-inkwell);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-section-header h2 {
    margin: 0 auto;
    color: white;
}

@media only screen and (min-width: 40em) {
    .card-grid-container {
        margin: 0;
    }

    .gallery-section-header {
        margin-bottom: 2.5rem;
    }

    .gallery-list {
        display: flex;
        flex-direction: column;
        row-gap: 8rem;
        margin-top: var(--desk-top-margin);
    }

    .gallery-card-grid {
        display: grid;
        column-gap: 1rem;
        row-gap: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .gallery-section-header {
        justify-self: center;
        padding: 1em;
        width: 100%;
    }

    .gallery-section-header h2 {
        margin: 0 auto;
    }

}
