/* Card layout */
body{
    font-family: 'Poppins';
}

.scrolling-wrapper .card:hover,
.scrolling-wrapper .card:focus-within {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  z-index: 5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scrolling-wrapper .card {
    width: 181px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    scroll-snap-align: start;
    height: auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scrolling-wrapper .card-img-top {
    width: 180px;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}

.scrolling-wrapper .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.8rem;
}

.scrolling-wrapper .card-title {
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    max-width: 100%;
    margin: 0 auto 8px;
    line-height: 1.4em;

    /* Ellipsis for long text */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.4em * 2);
}

/* Scrolling container */
.scrolling-container {
    position: relative;
}

.scrolling-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 1rem;
}

.scrolling-wrapper::-webkit-scrollbar {
    height: 10px;
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

/* Scroll arrows */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    padding: 0.5rem 0.75rem;
    z-index: 999;
    cursor: pointer;
    border-radius: 5px;
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}