.haikei {
    width: 100%;
    min-height: 800px;
    overflow: hidden;
    background-image: url(../img/news.png); /* 背景画像 */
    background-size: 100% auto; /* 横幅100%、縦は自動調整 */
    background-position: center; /* 画像の中心を親要素の中心に合わせる */
    background-repeat: no-repeat; /* 画像が繰り返し表示されないように */
    position: relative; /* 内容を画像の上に配置するため */
    background-color: #f5f5f5;
    /* padding-bottom: 100px; */
}


.title h2 {
    text-align: center; /* 文字を中央揃え */
}

/* ニュース全体のコンテナ */
.content-container {
    width: 70%; /* 横幅を広げる */
    max-width: 1200px; /* 最大幅を1200pxに */
    padding: 20px;
    margin: 20px auto 0 auto; /* 上に20pxの余白を追加 */
}

/* ニュースアイテムのコンテナ */
.news-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 横3列 */
    gap: 20px; /* アイテム間の余白 */
}

/* 各ニュースアイテムのスタイル */
.news-item {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    min-height: 300px;
}

/* ニュースアイテムの画像スタイル */
.news-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}


/* ニュースアイテムの画像スタイル */
.news-item img {
    width: 100%;
    height: auto; /* 高さは自動調整 */
    object-fit: cover; /* アスペクト比を崩さずにトリミング */
    border-radius: 5px;
}


/* Moreリンクのスタイル */
.more-link {
    text-align: center; /* 中央揃え */
    margin-top: 50px; /* 上の余白 */
}

.more-link a {
    text-decoration: none; /* 下線をなくす */
    font-size: 18px; /* 文字サイズを設定 */
    color: #333; /* 初期文字色 */
    font-weight: bold; /* 文字を太く */
    display: inline-flex; /* アイコンとテキストを横並びに */
    align-items: center; /* アイコンとテキストを垂直に中央揃え */
    position: relative;
    overflow: hidden; /* 文字がはみ出さないように */
    background-image: linear-gradient(to right, #b69917, #050505); /* 左から右へのグラデーション */
    background-clip: text; /* 文字の色にグラデーションを適用 */
    -webkit-background-clip: text; /* Safari対応 */
    transition: color 0.3s ease; /* 色が変わるアニメーション */
}

/* アイコンのスタイル */
.more-link a svg {
    margin-left: 8px; /* アイコンとテキストの間隔 */
    vertical-align: middle; /* アイコンをテキストと垂直方向に整列 */
}

/* ホバー時の文字色変化 */
.more-link a:hover {
    color: transparent; /* 文字自体は透明にする */
    background-image: linear-gradient(to right, #665013, #d8a90d); /* ホバー時の色を反転させる */
}


.pagination {
    text-align: center;
    margin-top: 30px;
}
.page-button {
    padding: 8px 12px;
    margin: 0 5px;
    border: none;
    background-color: #666;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}
.page-button:hover {
    background-color: #333;
}

body{
    background-color: #f5f5f5;
}

@media screen and (max-width: 600px) {
  .content-container {
    width: 100%;
    padding: 5px;
  }
  .news-items {
    grid-template-columns: repeat(2, 1fr); /* スマホでも3列 */
    gap: 8px;
  }
  .news-item {
    min-width: 0;
    padding: 8px;
    font-size: 14px;
  }
  .news-item img {
    height: 200px;       /* ←ここを大きくする */
    object-fit: cover;   /* 画像の比率を維持してトリミング */
    width: 100%;
    border-radius: 5px;
    display: block;
  }
}