/* ========================================
   News Page Specific Styles
   Scope: body.single-news, body.post-type-archive-news
======================================== */

.news-content-section {
    padding: 120px 0;
}

.news-article .entry-header {
    margin-bottom: 40px;
}

.news-article .entry-title {
    font-size: 36px;
    font-weight: 600; /* Semibold */
    margin-bottom: 20px;
}

.entry-meta-group {
    display: flex;
    justify-content: flex-start; /* タグと日付を左寄せで横並びにする */
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.news-article .entry-meta .posted-on {
    font-size: 16px;
    color: #555;
}

/* Tag Styles */
.entry-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.tag-item {
    display: inline-block;
    width: 120px;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0; /* flexアイテムが縮まないようにする */
}

/* articleタグに誤って適用されないよう、セレクタを限定する */
.tag-item.tag-oshirase { /* お知らせ */
    background-color: #F0FFDA;
}
.tag-item.tag-ibento { /* イベント */
    background-color: #dbebff;
}

/* News Outline (Content Wrapper) */
.news-outline {
  background: #fff;
  border-radius: 24px;
  padding: 80px 120px;
  margin-top: 60px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
}

/* お知らせの中身の要素に下マージンと画像に枠線を追加 */
.news-outline .entry-content > * {
    margin-bottom: 60px;
}

.news-outline .entry-content > *:last-child {
    margin-bottom: 0; /* 最後の要素には下マージンをつけない */
}

.news-outline .entry-content img {
    border: 1px solid #eeeeee;
    display: block;
    margin: 0 auto
}

.news-outline .entry-content {
    margin-bottom: 60px;
}

/* Back Button */
.button-back {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 60px;
  line-height: 58px; /* for border */
  border-radius: 30px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  background-color: #FFFFFF;
  color: #222222;
  border: 1px solid #11312B;
  margin: 0 auto; /* 中央揃え */
}

/* Responsive */
@media (max-width: 768px) {
    .page-template-archive-news .news-outline {
        padding: 60px 40px;
    }
    .news-article .entry-title {
        font-size: 30px;
    }
    .news-outline {
        padding: 60px 40px;
    }
}

@media (max-width: 480px) {
    .page-template-archive-news .news-list-section {
        padding: 0 20px 0;
    }
    .page-template-archive-news .news-outline {
        padding: 60px 20px;
    }
    .news-content-section {
        padding: 60px 0;
    }
    .news-article .entry-title {
        font-size: 24px;
    }
    .news-outline {
        padding: 60px 20px; /* スマホ表示での余白を調整 */
    }

    /* お知らせ一覧のスマホ表示調整 */
    .news-list-item {
        flex-direction: column; /* 縦並びにする */
        align-items: flex-start !important; /* 左揃えを強制 */
        gap: 15px; /* 各要素間の余白 */
    }
    .news-list-item-link {
        flex-direction: column;
        align-items: flex-start !important; /* 左揃えを強制 */
        gap: 10px;
        width: 100%; /* リンクエリアを幅いっぱいに */
    }
    .news-list-item-tags {
        margin-top: 5px; /* タイトルとの間に少し余白を追加 */
    }
}

/* お知らせ一覧 */
.news-list-section {
    margin: 0 auto 120px;
}

.news-list {
    border-top: none;
}

.news-list-item {
    display: flex;
    justify-content: space-between; /* 両端揃え */
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #eee;
    gap: 20px;
    transition: background-color 0.2s;
}

.news-list-item:hover {
    background-color: #f9f9f9; /* ホバーエフェクト */
}

/* 一覧ページ用のnews-outline調整 */
.page-template-archive-news .news-outline {
    margin-top: 80px;
}

.news-list-item-link {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1; /* リンクエリアを可能な限り広げる */
    text-decoration: none;
    color: inherit;
}

.news-list-item-date {
    font-size: 16px;
    color: #555;
}

.news-list-item-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0; /* h3のデフォルトマージンをリセット */
}

.news-list-item h3::before {
    display: none;
}

.news-list-item-tags {
    flex-shrink: 0; /* 縮まないようにする */
}

/* 一覧ページのタグのサイズを調整 */
.news-list-tag {
    width: 100px;
    height: 32px;
    line-height: 32px;
    font-size: 13px;
}

/* Pagination Styles */
.pagination {
    margin: 60px 0 120px;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    text-decoration: none;
    color: #555;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.pagination .page-numbers.current {
    background-color: #11312B;
    color: #fff;
    border-color: #11312B;
    font-weight: bold;
}

.pagination .dots {
    border: none;
}

/* ページ送りの「前へ」「次へ」とページ情報から枠線を削除 */
.pagination .prev.page-numbers,
.pagination .next.page-numbers {
    border: none;
}