.photography-collections-container {
    width: 90%;
    display: grid;
    /* The Magic Line: Creates as many columns as will fit, 
        but never makes them smaller than 300px */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem; /* Consistent white space is key for 'modern' looks */    margin-top: 20px;
    margin-bottom: 30px;
}

.collection-container {
    aspect-ratio: 1;
    min-height: 0;

    padding: 0;
    border-radius: 6px;
    overflow: hidden;

    position: relative;

    display: flex;
    align-items: stretch;
    justify-content: stretch;


        /* This tells the browser to track the size of this element */
    container-type: inline-size;
    
    /* Optional: naming the container if you have nested queries */
    container-name: card;

}



.collection-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.collection-container h4 {
    position: absolute;
    bottom: 4cqw;
    left: 6cqw;
    padding: 0;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.626);
    font-size: 8cqw;
    width: 80%;
}

.collection-container a {
    position: relative;
    top: 0;
    left: 0;
}

.collection-container a::before {
    content: '';
    background-color: black;
    mask-image: linear-gradient(25deg, rgba(0, 0, 0, 0.379) 20%, rgba(0,0,0,0) 50%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
