/* ============================================
   사이드바 공통 스킨 1
   ============================================ */

/* 많이 본 기사 박스 */
.popular_news_box {
    background: #fff;
}

/* 제목과 탭을 같은 줄에 배치 */
.popular_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000000;
    margin-bottom: 18px;
}

.sidebar_title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #000000;
}

.popular_tabs {
    display: flex;
    gap: 0;
    align-items: center;
}

.tab_btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab_btn:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}

.tab_btn:hover {
    color: #5AB2FF;
}

.tab_btn.active {
    color: #5AB2FF;
    font-weight: 700;
}


/* 리스트 */
.popular_list {
    display: none;
    padding: 0;
}

.popular_list.active {
    display: block;
}

.popular_list ol {
    list-style: none;
    counter-reset: popular-counter;
    margin: 0;
    padding: 0;
}

.popular_list ol li {
    counter-increment: popular-counter;
    margin-bottom: 18px;
    position: relative;
    padding-left: 35px;
}

.popular_list ol li:last-child {
    margin-bottom: 0;
}

/* 순위 숫자 (크게) */
.popular_list ol li::before {
    content: counter(popular-counter);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

/* 썸네일 있는 항목 (1번만) */
.popular_item_with_thumb {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.popular_item_with_thumb .item_title {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.popular_item_with_thumb .item_title:hover {
    color: #5AB2FF;
}

.popular_item_with_thumb .item_thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0;
}

.popular_item_with_thumb .item_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 일반 링크 */
.popular_list a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.popular_list a:hover {
    color: #5AB2FF;
}

.ad_block {
    margin-top: 50px;
}