.c-sidebar-right {
    width: var(--sidebar-right-width);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Section wrapper */
.c-sidebar-right__section {
    display: flex;
    flex-direction: column;
    flex: none;
}

.c-sidebar-right__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.c-sidebar-right__title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.c-sidebar-right__link {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================================================
   POPULAR CATEGORIES
   ========================================================================== */
.c-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.c-category-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
}

.c-category-pill i {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.c-category-pill:hover {
    background-color: var(--color-hover);
    border-color: var(--color-primary);
}

/* ==========================================================================
   POPULAR PAGES
   ========================================================================== */
.c-pages-list-sidebar {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.c-page-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.c-page-pill__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    border: 1px solid var(--color-border);
}

.c-page-pill__info {
    flex: 1;
    min-width: 0;
}

.c-page-pill__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-page-pill__meta {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.c-page-pill__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-text-primary);
    font-weight: 600;
}

.c-page-pill__rating i {
    font-size: 0.85rem;
}

.c-page-pill__follow {
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    flex: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.c-page-pill__follow:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ==========================================================================
   ADVERTISEMENT — Flexible, fills remaining space
   ========================================================================== */
.c-sidebar-right__ad {
    flex: 1;             /* Take all remaining space */
    display: flex;
    flex-direction: column;
    min-height: 0;       /* Crucial for flex shrinking */
    margin-top: 0.5rem;
}

.c-sidebar-right__ad a {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.c-sidebar-right__ad-label {
    display: none;       /* Hide the 'Advertisement' label */
}

.c-sidebar-right__ad-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border-radius: 0.75rem;
    display: block;
    border: none;        /* Remove borders */
    margin: auto 0;
}

@media (max-width: 1024px) {
    .c-sidebar-right {
        display: none;
    }
}
