/* ==================================================
// サイドバーデザイン
// =================================================*/

/* サイドバー全体のレイアウト */
.sidebar {
    width: 320px; /* PCでのサイドバーの幅 */
    flex-shrink: 0;
}

/* サイドバーウィジェットの共通スタイル */
.sidebar-widget {
    margin-bottom: 40px;
    /* background-color: #ffffff; 背景を白に設定 */
    border-radius: var(--border-radius); /* テーマ共通の角丸を適用 */
    /* box-shadow: var(--box-shadow); テーマ共通の影を適用 */
    overflow: hidden;
}

/* ウィジェットタイトルのスタイル */
.sidebar .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--base-color);
    padding: -1px 20px;
    margin: 0;
    border-bottom: 1px solid #d1d1d1;
    position: relative;
}

.sidebar .widget-title::before {
    content: '';
    position: absolute;
    /* left: 20px; */
    bottom: -1px;
    /* width: 50px; */
    width: 100%;
    height: 2px;
    /* background-color: var(--accent-color); */
    background: linear-gradient(135deg, #e6ca8a, #c9a063);
}

/* --------------------------------------------------
// 人気記事ウィジェット
// ------------------------------------------------*/
.popular-posts-list {
    padding: 10px 20px 20px;
}

.popular-post-item {
    border-bottom: 1px solid #f5f5f5;
    /* padding: 15px 0; */
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.popular-post-item:first-child {
    padding-top: 5px;
}

.popular-post-item .post-info {
    display: flex;
    align-items: center;
    position: relative;
}

/* サムネイル */
.popular-post-item .post-thumbnail-link {
    display: block;
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.popular-post-item .post-thumbnail {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.popular-post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-item:hover .post-thumbnail {
    transform: scale(1.1);
}

/* 記事タイトル */
.popular-post-item .popular-post-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 0 5px;
}

.popular-post-item .popular-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-item .popular-post-title a:hover {
    color: var(--accent-color);
}

/* カテゴリー */
.sidebar .post-meta .post-category {
    font-size: 11px;
    /* color: #888; */
    color: #ffffff;
    /* background-color: #f5f5f5; */
    background: linear-gradient(135deg, #e6ca8a, #c9a063);
    padding: 3px 8px;
    border-radius: 4px;
}


/* ランキング番号 */
.popular-post-item .rank-number {
    position: absolute;
    top: -5px;
    left: -10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccc;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 1;
}

/* 1位から3位のデザイン */
.popular-post-item.rank-1 .rank-number {
    background: linear-gradient(135deg, #FFD700, #F0C300); /* ゴールド */
}
.popular-post-item.rank-2 .rank-number {
    background: linear-gradient(135deg, #c0c0c0, #a9a9a9); /* シルバー */
}
.popular-post-item.rank-3 .rank-number {
    background: linear-gradient(135deg, #cd7f32, #b8732e); /* ブロンズ */
}


/* --------------------------------------------------
// バナーウィジェット
// ------------------------------------------------*/
.banner-list {
    padding: 20px;
    display: grid;
    gap: 15px;
}

.sidebar .banner-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar .banner-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sidebar .banner-item img {
    width: 100%;
    display: block;
}