/* Core Card */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .card:hover {
        transform: scale(1.02);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
    }

    .card .card-body {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

/* Title - 1 line ellipsis */
.text-truncate-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

/* Summary - always takes up 3 lines of height */
.text-fixed-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.2em * 3); /* ensures consistent 3-line space */
    white-space: wrap;
    text-align: left;
}

/* Date/Location single line truncation */
.text-truncate-1 span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Tags area - fixed two lines worth of space */
.tags-container {
    position: relative;
    overflow: hidden;
    height: 2.2rem;
    margin-bottom: 0.3rem;
}

/* Scrollable tags */
.tags-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent; /* Firefox */
    -webkit-overflow-scrolling: touch; /* smoother scroll on touch devices */
}

/* Scrollbar styling (WebKit browsers like Chrome, Edge, Safari) */
.tags-scroll::-webkit-scrollbar {
    height: 0.4rem;
    background-color: transparent;
}

.tags-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    transition: background-color 0.25s ease, height 0.25s ease;
}

/* Hover interaction — darker, thicker scrollbar */
.tags-scroll:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.35);
    height: 0.6rem;
}

/* For Firefox */
.tags-scroll:hover {
    scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
}

/* Tag (badge) styling */
.tags-scroll .badge {
    font-size: 0.7rem;
    font-weight: 400;
    flex-shrink: 0;
    max-width: 15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}
