.card-grid {
    display: grid;
    grid-column-gap: 1.5rem;
    grid-row-gap: 1.5rem; 
    max-width: 75rem;
    width: 100%;
    margin: 0 auto;
    grid-template-columns: repeat(1, 1fr);
}

@media(min-width: 32rem){ 
    .card-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media(min-width: 48rem){ 
    .card-grid { grid-template-columns: repeat(3, 1fr); } 
}

/* CARD COMPONENT */
.card {
    position: relative;
    display: block; 
    text-decoration: none;
    overflow: hidden; 
    background-color: #0a0a0a; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --mouse-x: -1000px;
    --mouse-y: -1000px;
    --spotlight-size: 200px;
}

.card:hover {
    transform: scale(1.0);
    z-index: 50;
    --spotlight-size: 400px;
}

.card::before, .card::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px; 
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card::before {
    background: rgba(255, 255, 255, 0.058); 
    z-index: 35;
}

.card::after {
    background: radial-gradient(
        var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y), 
        rgba(255, 255, 255, 0.516), 
        transparent 50%
    );
    z-index: 40;
    transition: background 0.1s ease;
}

.aspect-ratio-spacer {
    display: block;
    padding-bottom: 133.33%; 
}

.card-background {
    background-size: cover;
    background-position: center;
    bottom: 0; left: 0; position: absolute; right: 0; top: 0;
}

.card-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-background::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent 60%);
}

.card-content {
    padding: 1.25rem;
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    box-sizing: border-box;
    z-index: 20; 
    pointer-events: none; 
}

.card-category {
    color: rgba(0, 255, 72, 0.7);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin: 0;
}

.card-heading {
    color: rgba(255, 255, 255, 1);
    font-size: 1.8rem; 
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin: 0.2rem 0 0.2rem 0;
}

.card-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.card:hover .card-description {
    max-height: 100px;
    opacity: 1;
    margin-bottom: 0.5rem;
}