/* 基本的なリセットや共通スタイル */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f1f1f1;
    margin: 0;
    padding: 0;
}

.cc-container {
    max-width: 1200px;
    margin-top: 10px;
    margin-left: 5px;
    margin-right: 0px;
    padding: 0 15px;
}

.cc-main-title {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-size: 2em;
}

/* アイテムリスト（PC: 横1列、左配置） */
.cc-item-list {
    display: flex;
    flex-direction: column; /* PCでは縦並び（＝横1列） */
    gap: 20px; /* アイテム間の隙間 */
    align-items: flex-start; /* アイテムをコンテナの開始位置（左）に揃える */
}

/* 個別アイテムカード（PC: 画像左、コンテンツ右） */
/* カード全体のスタイル */
.cc-item-card {
    display: flex;
    flex-direction: row; /* PCでは画像とコンテンツを横並び */
    max-width: 800px; /* 例: 最大幅を設定しても良い */
    min-width: 675px; /* 例: 最大幅を設定しても良い */
    max-height: 133px; /* 例: 最大幅を設定しても良い */
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: flex-start; /* カード内のアイテム（画像とコンテンツ）の上端を揃える */
    padding: 10px; /* カード全体のパディングで画像と枠の間に隙間 */
}

.cc-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(44, 62, 80, 0.15);
}

/* 画像自体（PC: 幅を制限 & 正方形） */
.cc-item-image {
    width: 20%; /* PC表示で画像の幅を少し小さくする */
    max-width: 150px; /* 画像の最大幅を調整 */
    height: auto; /* 元画像の比率を維持 */
    display: block; /* 画像下の余白をなくす基本的な設定 */
    object-fit: cover; /* 領域に合わせて画像を調整（比率は維持されやすい） */
    aspect-ratio: 1 / 1; /* 正方形に設定 (1:1 ratio) */
    flex-shrink: 0; /* Shrinkしないように設定 */
    border-radius: 5px; /* 画像の角を丸くする */
}

/* カードのテキストコンテンツエリア */
.cc-item-content {
    flex-grow: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* コンテンツを上下に分散 */
}

/* カテゴリーエリア */
.cc-item-categories {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* カテゴリータグ */
.cc-category-tag {
    background-color: #e0e0e0;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* タイトル */
.cc-item-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #191970;
    display: inline-block;
}

.cc-mini-title {
    margin: 0 0 8px 0;
    font-size: 19.2px;
    color: #191970;
    display: inline-block;
}


/* 日付 */
.cc-item-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 5px; /* タイトルとの間に少しマージン */
}

/* もっと見るボタン */
.cc-more-button {
    display: block;
    margin: 30px auto 0;
    padding: 9px 18px;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cc-more-button:hover {
    background-color: #ccc;
}

/* === レスポンシブ対応 === */

/* 中程度の画面 (例: タブレット縦向き〜PC小さめ) - 左右分割を維持しつつ調整 */
@media (max-width: 1024px) {
    .cc-page-layout {
        padding: 15px;
        gap: 20px;
    }
    .cc-left-column {
        flex: 3;
    }
    .cc-right-column {
        flex: 2;
        padding: 15px;
    }
    .cc-item-content {
        padding: 15px;
    }
}

/* スマホなど狭い画面 (例: 868px以下) - 左右分割を解除 */
@media (max-width: 868px) {
    .cc-page-layout {
        flex-direction: column; /* 縦並びにする */
        padding: 0px;
        gap: 20px; /* 縦方向の隙間 */
    }

    .cc-left-column,
    .cc-right-column {
        min-width: unset; /* 不要なmin-widthをリセット */
        padding: 0px; /* スマホ表示用にパディング調整 */
    }

    .cc-right-column {
        margin-top: 20px; /* 左カラムとの間にマージン */
    }

    /* カードリストをグリッド表示（2列） */
    .cc-item-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 横2列にする */
        gap: 15px;
        /* item-cardのpaddingで調整するため、ここではpaddingをリセット */
        padding: 0;
    }

    .cc-item-card {
        flex-direction: column; /* カード内を縦並びに */
        max-width: 200px;
        min-width: 200px;
        min-height: 280px; /* 例: 最大幅を設定しても良い */

        padding: 8px; /* スマホ表示時のカード全体のパディング */
    }


    .cc-item-image {
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: auto; /* 3:2 ratio for 2-column layout */
    }

    .cc-item-content {
        padding: 15px 0 0 0; /* スマホ表示時のコンテンツのパディング */
        justify-content: flex-start; /* 上揃えに戻す */
    }

    .cc-item-title {
        font-size: 1em;
    }

    .cc-item-date {
        font-size: 0.85em;
        margin-top: 8px;
    }
}

/* さらに小さい画面 (例: 480px以下) - カードリストを1列に */
@media (max-width: 480px) {
    .cc-container {
        padding: 0 0px; /* 全体の左右パディングを調整 */
    }

    .cc-item-card {
        max-width: 200px;
        min-width: 130px;
    }

    .cc-item-list {
        grid-template-columns: repeat(2, 1fr); /* Still 2 columns for now */
        gap: 15px;
        padding: 0;
    }

    .cc-main-title {
        font-size: 1.6em;
    }
}

@media (max-width: 400px) {
    .cc-item-card {
        max-width: 200px;
        min-width: 150px;
    }
}

/* クソ小さい画面 - カードリストを1列に */
@media (max-width: 380px) {
    .cc-item-card {
        max-width: 200px;
        min-width: 140px;
    }
    .cc-item-list {
        gap: 10px;
        padding: 0;
    }
}

/* 最も小さい画面 - カードリストを1列に */
@media (max-width: 365px) {
    .cc-item-card {
        max-width: 200px;
        min-width: 130px;
    }
}