.widget-area .widget {
    padding: 10px !important;
}

.trending-topics-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    counter-reset: trending-topic;
}

.trending-topics-list li {
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.trending-topics-list li:hover {
    transform: translateY(-3px);
}

.trending-topics-list li::before {
    counter-increment: trending-topic;
    content: counter(trending-topic);
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background-color: #ed1c24;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.trending-topics-list .topic-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.trending-topics-list .topic-content {
    flex-grow: 1;
    padding: 10px 15px 10px 0;
}

.trending-topics-list .topic-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    line-height: 1.4;
}

.trending-topics-list .topic-link:hover {
    color: #ed1c24;
}

/* Sticky widget styles */
.rifnote-trending-topics-sticky {
    position: sticky;
    top: 20px; /* Adjust this value to set the distance from the top of the viewport */
    z-index: 100;
}

@media screen and (max-width: 767px) {
    .trending-topics-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .trending-topics-list li {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0;
        min-height: 80px;
        padding: 5px;
    }

    .trending-topics-list li::before {
        margin-bottom: 10px;
    }

    .trending-topics-list li::before {
        counter-increment: trending-topic;
        content: counter(trending-topic);
        font-size: 9;
        font-weight: bold;
        color: #fff;
        background-color: #ed1c24;
        width: 20px;
        height: 20px;
        display: none;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .trending-topics-list .topic-image {
        width: 100%;
        max-height: 50px;
        height: auto;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .trending-topics-list .topic-content {
        padding: 0 10px 10px;
    }

    .rifnote-trending-topics-sticky {
        position: static; /* Disable sticky positioning on mobile devices */
    }
}