.titlebox {
    width: 100vw;
    text-align: center;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Horizontal centering */
    gap: 20px; /* Space between cards */
    max-width: 100vw; /* Optional container max-width */
    margin: 0 auto; /* Center container */
    padding: 20px 0; /* Vertical spacing */
}

card-link {
    display: block;
    width: 200px; /* Match card width */
    flex: 0 0 200px; /* Same as card's flex-basis */
    text-decoration: none;
}

.card {
    flex: 0 0 200px;
    width: 100%;
    max-width: 200px;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    transition: transform 0.2s ease;
    display: flex;
    align-items: flex-end; /* Position title at bottom */
}

.card:hover {
    transform: scale(1.05);
}

.card-title {
    background: rgba(0,0,0,0.9);
    padding: 10px 15px;
    width: 200px;
    text-align: center;
    font-family: sans-serif;
    font-size: 1.1rem;
    color: white;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Optional mobile adjustment */
@media (max-width: 768px) {
    .card {
        flex-basis: 100%;
        max-width: 300px;
    }
}

