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

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

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

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

/* 個別アイテムカード（PC: 画像左、コンテンツ右） */
/* カード全体のスタイル */
.item-card {
    display: flex;
    flex-direction: row; /* PCでは画像とコンテンツを横並び */
    width: 80%; /* 例: 親要素の80%の幅にする */
    max-width: 800px; /* 例: 最大幅を設定しても良い */
    min-width: 700px; /* 例: 最大幅を設定しても良い */

    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; /* カード内のアイテム（画像とコンテンツ）の上端を揃える */
}

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

/* 画像自体（PC: 幅を制限） */
.item-image {
    width: 33%; /* PC表示では画像の幅を調整（例: 30%） */
    max-width: 260px; /* 画像の最大幅を設定しても良い */
    height: auto; /* 元画像の比率を維持 */
    display: block; /* 画像下の余白をなくす基本的な設定 */
    object-fit: cover; /* 領域に合わせて画像を調整（比率は維持されやすい） */
}

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

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

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

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

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


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


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

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

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

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


    /* カードリストをグリッド表示（2列） */
    .item-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 横2列にする */
        gap: 15px;
        padding: 0 0px; /* 左右のパディングを追加してコンテンツが端に寄りすぎないようにする */
    }

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

    }

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

    .item-content {
        padding: 15px;
        justify-content: flex-start; /* 上揃えに戻す */
    }

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

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

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

.item-card {
    max-width: 200px; /* 例: 最大幅を設定しても良い */
    min-width: 170px; /* 例: 最大幅を設定しても良い */

}

    .item-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 横2列にする */
        gap: 15px;
        padding: 0 0px; /* 左右のパディングを追加してコンテンツが端に寄りすぎないようにする */
    }

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


@media (max-width: 400px) { 
.item-card {
    max-width: 200px; /* 例: 最大幅を設定しても良い */
    min-width: 160px; /* 例: 最大幅を設定しても良い */

}


/* クソ小さい画面 - カードリストを1列に */
@media (max-width: 380px) { 


.item-card {
    max-width: 200px; /* 例: 最大幅を設定しても良い */
    min-width: 150px; /* 例: 最大幅を設定しても良い */
}
    .item-list {
        gap: 10px;
        padding: 0 0px; /* 左右のパディングを追加してコンテンツが端に寄りすぎないようにする */
    }



/* 最も小さい画面 - カードリストを1列に */
@media (max-width: 365px) { 


.item-card {
    max-width: 200px; /* 例: 最大幅を設定しても良い */
    min-width: 140px; /* 例: 最大幅を設定しても良い */

}


