/* Ensure the container uses a grid layout */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Automatic column arrangement */
    gap: 16px; /* Adjust the space between grid items */
    padding: 20px;
}

/* Style for each hobby item */
.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Prevent image overflow */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* Style for images to make them responsive, and fit inside their container */
.hobby-item img {
    width: 100%;
    height: 200px; /* Fixed height for all images */
    object-fit: cover; /* Ensures images retain their aspect ratio and cover the area */
    border-bottom: 1px solid #ddd;
}

/* Style for the caption */
.caption {
    padding: 10px;
}

.caption p {
    font-size: 16px;
    color: #333;
    margin: 0;
}
