.eventsstatussection {
    overflow-x: hidden;
    width: 100%;
}

.eventsstatussection.active {
    overflow-x: scroll;
    scrollbar-width: none;
}

.eventsstatussection .challengesCards {
    padding-inline: 85px;
    padding-top: 20px;
}

.eventsstatussection .challengesCards .subtitleContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eventsstatussection .challengesCards .subtitleContainer.hide {
    display: none;
}

.eventsstatussection .challengesCards .subtitleContainer .subtitle {
    color: #4b4a4a;
    font-family: "Metropolis Semi Bold";
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 0.36px;
}

.eventsstatussection .challengesCards .description {
    color: #4b4a4a;
    font-family: "Metropolis Regular";
    font-size: 20px;
    line-height: 32px;
    letter-spacing: 0.2px;
}

.eventsstatussection .challengesCards .subtitleContainer .arrowContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.eventsstatussection .challengesCards .subtitleContainer .arrowContainer .arrowText {
    color: #4b4a4a;
    font-family: "Metropolis Regular";
    font-size: 20px;
    line-height: 18px;
    letter-spacing: 0.2px;
}

.eventsstatussection .challengesCards .subtitleContainer .arrowContainer .arrowIcon {
    width: 32px;
    height: 32px;
    background-image: url(https://d1gq9jzbezk7fw.cloudfront.net/p/en_US/gv/i/arrow_see-more_blue_icon.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.eventsstatussection .challengesCards .cardsContainer.hide,
.eventsstatussection .challengesCards .emptyMessage.hide,
.eventsstatussection .challengesCards .subtitleContainer .arrowContainer.hide,
.eventsstatussection .challengesCards .loadMoreError.hide {
    display: none;
}

.eventsstatussection .challengesCards .cardsContainer {
    display: flex;
    align-items: center;
    width: 100%;
    margin-block: 14px 36px;
    overflow-x: scroll;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    box-sizing: border-box;
    column-gap: 20px;
}

.eventsstatussection .challengesCards .goBackButton {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 12px;
    cursor: pointer;
}

/* Match GrandChallenge / ChallengeRankings circular return control */
.eventsstatussection .challengesCards .goBackButton .backIcon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background-image: url(https://d1gq9jzbezk7fw.cloudfront.net/p/en_US/gv/i/Return_Icon_LM_v3.png);
    background-size: 46px 46px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.eventsstatussection .challengesCards .goBackButton .goBackButtonText {
    color: #4b4a4a;
    font-family: "Metropolis Regular";
    font-size: 20px;
    line-height: 18px;
    letter-spacing: 0.2px;
}

.eventsstatussection .challengesCards .goBackButton.hide {
    display: none;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.eventsstatussection .challengesCards .cardsContainer::-webkit-scrollbar {
    display: none;
}

.eventsstatussection .challengesCards .cardsContainer.displayGrid {
    flex-wrap: wrap;
}

/* MOBILE: displayGrid should stack vertically like active section */
@media only screen and (max-width: 768px) {
    .eventsstatussection .challengesCards .cardsContainer.displayGrid {
        flex-direction: column;
        align-items: stretch;
        overflow-x: hidden;
        min-width: 0;
        box-sizing: border-box;
    }
}

.eventsstatussection .challengesCards .emptyMessage {
    display: flex;
    align-items: center;
    height: 70px;
    margin-bottom: 2rem;
    background-color: transparent;
    text-align: left;
    font-family: "Metropolis Regular";
    font-size: 22px;
    letter-spacing: 0.24px;
    color: black;
}

/* IPAD */
@media only screen and (max-width: 1024px) {
    .eventsstatussection .challengesCards {
        padding-inline: 40px;
    }
}

/* MOBILE */
@media only screen and (max-width: 768px) {
    .eventsstatussection {
        width: 100%;
        box-sizing: border-box;
    }
    .eventsstatussection .challengesCards {
        padding-inline: 16px;
        box-sizing: border-box;
    }

    .eventsstatussection .challengesCards .subtitleContainer .subtitle {
        font-family: "Metropolis Semi Bold";
        font-size: 18px;
        line-height: 32px;
        letter-spacing: 0.27px;
    }

    .eventsstatussection .challengesCards .description {
        font-family: "Metropolis Regular";
        font-size: 16px;
        line-height: 16px;
        letter-spacing: 0.2px;
    }

    .eventsstatussection .challengesCards .subtitleContainer .arrowContainer .arrowText {
        font-size: 16px;
    }

    .eventsstatussection .challengesCards .subtitleContainer .arrowContainer .arrowIcon {
        width: 24px;
        height: 24px;
    }

    .eventsstatussection .challengesCards .goBackButton .backIcon {
        width: 36px;
        height: 36px;
        background-size: 36px 36px;
    }

    /* Active section with LongCards - stack vertically */
    .eventsstatussection.active .challengesCards .cardsContainer {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Upcoming/Past sections - keep horizontal scroll */
    .eventsstatussection .challengesCards .cardsContainer:not(.displayGrid) {
        gap: 0;
    }

    .eventsstatussection .challengesCards .emptyMessage {
        font-size: 18px;
        height: 80px;
    }
}

/* DARK MODE */
.dark .eventsstatussection .challengesCards .subtitle,
.dark .eventsstatussection .challengesCards .emptyMessage,
.dark .eventsstatussection .challengesCards .description,
.dark .eventsstatussection .challengesCards .subtitleContainer .arrowText,
.dark .eventsstatussection .challengesCards .goBackButton .goBackButtonText {
    color: white;
}

.dark .eventsstatussection .challengesCards .goBackButton .backIcon {
    background-image: url(https://d1gq9jzbezk7fw.cloudfront.net/p/en_US/gv/i/Return_Icon_DM_v3.png);
}

.eventsstatussection .challengesCards .loadMoreError {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 85px 24px;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: rgba(78, 71, 234, 0.08);
}

.eventsstatussection .challengesCards .loadMoreErrorText {
    color: #4b4a4a;
    font-family: "Metropolis Regular";
    font-size: 16px;
}

.eventsstatussection .challengesCards .loadMoreRetryButton {
    color: #4e47ea;
    cursor: pointer;
    font-family: "Metropolis Semi Bold";
    font-size: 16px;
}

.dark .eventsstatussection .challengesCards .loadMoreErrorText {
    color: white;
}
