.hobby-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* responsive equal width */
    gap: 30px;
    margin-top: 20px;
    justify-items: stretch;  /* make all items take full column width */
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #1f242d;       /* card background */
    border-radius: 15px;
    padding: 20px;             /* equal space inside */
    box-shadow: 0 0 15px rgba(124, 240, 61, 0.3);
    min-height: 350px;         /* make all cards tall enough */
    text-align: center;
    box-sizing: border-box;
}

.hobby-img {
    width: 100%;
    max-width: 180px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: transform 0.5s;
}

.hobby-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hobby-img:hover img {
    transform: scale(1.1);
}

.hobby-item p {
    margin-top: 10px;
    flex-grow: 1;  /* allows paragraph to expand but card keeps same width */
    text-align: center;
} 




@media screen and (max-width: 900px) {
    .hobby-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .hobby-list {
        grid-template-columns: 1fr;
    }
}

