/* ==============================================
   レイアウト用CSS - 2カラムレイアウト実装
   ============================================== */

/* CSS変数定義 */
:root {
    --main-content-width: 65%;
    --sidebar-width: 35%;
    --container-max-width: 1200px;
    --grid-gap: 30px;
    --primary-color: #333;
    --background-color: #f5f9ff;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ===============================
   メインレイアウト構造
   =============================== */
   
/* コンテンツラッパー - 2カラムグリッド */
.content-wrapper {
    display: grid;
    grid-template-columns: var(--main-content-width) var(--sidebar-width);
    gap: var(--grid-gap);
    margin-top: 30px;
    align-items: start;
}

/* メインコンテンツエリア */
.main-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

/* サイドバーエリア */
.sidebar {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    
    /* スクロールボックスを削除し、縦長表示に */
    /* position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto; */
}

/* サイドバーウィジェット共通スタイル */
.widget {
    margin-bottom: 35px;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.widget h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget h3 i {
    font-size: 1rem;
}

/* ===============================
   検索セクション
   =============================== */
.search-section {
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 20px;
    transition: box-shadow 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.search-bar i {
    color: #6c757d;
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 1rem;
    color: var(--primary-color);
}

/* ===============================
   フィルタータグセクション
   =============================== */
.filter-tags {
    margin-bottom: 25px;
}

.filter-tags .tag {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    background-color: #e9ecef;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.filter-tags .tag:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.filter-tags .tag.active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* ===============================
   記事リストセクション
   =============================== */
.article-list {
    /* 記事カードのスタイルは既存のものを流用 */
}

/* ===============================
   レスポンシブデザイン
   =============================== */
   
/* タブレット (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .content-wrapper {
        grid-template-columns: 60% 40%;
        gap: 20px;
    }
    
    .widget {
        padding: 15px;
    }
}

/* モバイル (767px以下) */
@media (max-width: 767px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* モバイルではサイドバーのスティッキーを解除 */
    .sidebar {
        position: static;
        max-height: none;
        margin-top: 30px;
    }
    
    .main-content,
    .sidebar {
        padding: 15px;
    }
    
    .widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .widget h3 {
        font-size: 1.1rem;
    }
}

/* ===============================
   アニメーション
   =============================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget {
    animation: fadeIn 0.6s ease-out;
}

/* ===============================
   スクロールバーカスタマイズ
   =============================== */
/* サイドバーのスクロールを削除したため、このセクションは不要 */
/*
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}
*/