.uspace-event-carousel-container {
    position: relative;
    width: 100%;
    margin: 2rem auto;
    padding: 0 40px; 
    box-sizing: border-box;
    overflow: hidden;
}

.uspace-event-list-container {
    display: grid;
    grid-template-columns: repeat(var(--uspace-event-list-columns, 3), minmax(0, 1fr));
    gap: 30px;
}

.uspace-event-list-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.uspace-event-carousel-container button,
.uspace-event-carousel-container button:hover,
.uspace-event-carousel-container button:focus,
.uspace-event-carousel-container button:focus-visible,
.uspace-event-carousel-container button:active {
    appearance: none;
    background-image: none !important;
    text-shadow: none !important;
    border-image: none !important;
}

.uspace-event-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.uspace-event-carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    gap: 20px;
}

.uspace-event-carousel-slide {
    flex: 0 0 calc((100% - 40px) / 3); 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.uspace-evt-slide-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
}

.uspace-evt-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.uspace-evt-slide-image:hover img {
    transform: scale(1.05);
}

.uspace-evt-slide-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 8px;
}

.uspace-evt-slide-date {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.uspace-evt-slide-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 500;
}

.uspace-evt-slide-title a {
    color: #0a4f66;
    text-decoration: none;
    transition: color 0.2s ease;
}

.uspace-evt-slide-title a:hover {
    color: #0d3b4a;
}

.uspace-evt-slide-time {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* Navigation Buttons */
.uspace-event-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #0a4f66;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
}

.uspace-event-carousel-container .uspace-event-carousel-btn:hover,
.uspace-event-carousel-container .uspace-event-carousel-btn:focus,
.uspace-event-carousel-container .uspace-event-carousel-btn:focus-visible {
    transform: translateY(-50%) scale(1.1);
    border-image: none !important;
    background-image: none !important;
    text-shadow: none !important;
}

.uspace-event-carousel-btn:focus,
.uspace-event-carousel-btn:focus-visible {
    outline: none;
}

.uspace-event-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.uspace-event-carousel-prev {
    left: 0;
}

.uspace-event-carousel-next {
    right: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .uspace-event-carousel-slide {
        flex: 0 0 calc((100% - 20px) / 2); 
    }
}

@media (max-width: 600px) {
    .uspace-event-carousel-slide {
        flex: 0 0 100%; 
    }
    .uspace-event-carousel-container {
        padding: 40px 10px;
    }
    .uspace-event-carousel-btn {
        display: none; 
    }
    .uspace-event-carousel-viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; 
    }
    .uspace-event-carousel-viewport::-webkit-scrollbar {
        display: none;
    }
    .uspace-event-carousel-slide {
        scroll-snap-align: start;
    }
}
