/**
 * コラム用サイドバー CSS
 * Column Sidebar Styles - 最小限のカスタマイズ
 */

/* サイドバー全体のスタイル */
.sidebar .widget {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

/* セクションタイトル */
.sub-section-title {
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    padding: 15px 20px;
    text-align: center;
}

/* 会員募集ボタン */
.contact-button-wrapper {
    padding: 20px;
    text-align: center;
}

.contact-button-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.contact-button-wrapper img:hover {
    transform: scale(1.02);
}

/* 最新記事の横並びレイアウト */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.column-template-default h4 {
    font-size: 16px;
    background-color: #000;
    color: #fff;
    margin: 0;
}

.widget.widget_link_list {
    margin-bottom: 20px;
}

.recent-post-item {
    border-bottom: 1px solid #f0f0f0;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-link {
    display: flex !important;
    flex-direction: column;
    padding: 15px 20px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.recent-post-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.recent-post-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 10px;
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-link:hover .recent-post-thumbnail img {
    transform: scale(1.05);
}

.recent-post-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-post-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.recent-post-date {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* アーカイブリスト */
#archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#archive-list li {
    border-bottom: 1px solid #f0f0f0;
}

#archive-list li:last-child {
    border-bottom: none;
}

#archive-list a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#archive-list a:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

/* アコーディオン機能 */
#archive-hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    display: none;
}

#archive-hidden.show {
    opacity: 1;
    max-height: 500px;
    display: block;
}

#archive-hidden li {
    border-bottom: 1px solid #f0f0f0;
}

#archive-hidden li:last-child {
    border-bottom: none;
}

#archive-hidden a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#archive-hidden a:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.archive-toggle-wrapper {
    padding: 10px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.archive-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.archive-toggle-btn:hover {
    background-color: #555;
    border-color: #555;
}

.archive-toggle-btn .toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.archive-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sidebar .widget {
        margin-bottom: 20px;
    }
    
    .sub-section-title {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .contact-button-wrapper {
        padding: 15px;
    }
    
    .recent-post-link {
        padding: 12px 15px;
    }
    
    .recent-post-title {
        font-size: 13px;
    }
    
    #archive-list a,
    #archive-hidden a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .archive-toggle-wrapper {
        padding: 8px 15px;
    }
}

/* サイドバー固定解除（Lightningテーマ対応） */
.sub-section,
.sub-section .widget,
.sidebar,
.widget-area {
    position: static !important;
    top: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
} 