/* Upcoming Bits & Beats */
.latest-bitsandbeats {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-bitsandbeats h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
    text-align: left;
    font-weight: bold;
}

/* Bits & Beats Carousel */
.bitsandbeats-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 10px 0;
    scroll-behavior: smooth;
    align-items: stretch; /* Align all cards properly */
    flex-wrap: nowrap; /* Ensure all cards are in one row */
    min-height: 220px;
}

/* Bits & Beats Cards */
.bitsandbeats-card {
    width: 200px;
    min-height: 240px; /* Ensure consistent card height */
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded corners for the entire card */
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px; /* Reduced padding for tighter layout */
}

/* Full-Size Images with Rounded Corners */
.bitsandbeats-image {
    width: 100%;
    height: 130px; /* Adjust height to fit proportionately */
    object-fit: cover; /* Ensures image covers the entire area */
    border-top-left-radius: 8px; /* Rounded corners for top of the card */
    border-top-right-radius: 8px;
    margin: 0;
}

/* Info Section */
.bitsandbeats-info {
    flex-grow: 1; /* Ensures content fills the available space dynamically */
    padding: 5px; /* Reduced padding for a tighter layout */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 5px; /* Small gap between image and text */
}

/* Adjust Text Sizing */
.bitsandbeats-info h5 {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 4px; /* Reduced spacing */
    text-align: center; /* Align heading to the left */
}

.bitsandbeats-info p {
    font-size: 0.65rem;
    color: #555;
    margin: 0;
    text-align: left; /* Justify the paragraph */
}

.bitsandbeats-info strong {
    font-weight: bold;
    color: #333;
}

/* Responsive Design for Larger Screens */
@media (min-width: 768px) {
    .latest-bitsandbeats h2 {
        font-size: 1.2rem;
    }

    .bitsandbeats-card {
        width: 220px;
        min-height: 260px;
        padding: 8px; /* Adjusted padding for larger screens */
    }

    .bitsandbeats-image {
        height: 150px;
    }
}

.lazy {
    display: block;
    background-color: #f3f3f3;
    width: 100%;
    height: auto;
    min-height: 130px; /* Adjust to match your image height */
}
.lazy.loading {
    filter: blur(10px);
}


/* Responsive Design for Smaller Screens */
@media (max-width: 767px) {
    .latest-bitsandbeats h2 {
        font-size: 1rem;
    }

    .bitsandbeats-card {
        width: 160px;
        min-height: 190px;
        padding: 6px; /* Reduced padding for smaller screens */
    }

    .bitsandbeats-image {
        height: 100px;
    }
}
