/* ==============================================
   1. NEWSセクション全体とグリッドの調整
   ============================================== */

#news {
  padding-top: 0;
  padding-bottom: 50px;
}

/* ----------------------------------------------------------------- */
#news .section-title {
  text-align: center;
  margin-bottom: 60px;
}

.about-banner {
  margin-bottom: 50px;
  padding: 0;
}

.about-us {
  width: 100%;
  height: 316px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-us__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.about-banner__title {
  font-family: 'Hiragino Sans', sans-serif;
  font-size: 60px;
  line-height: 75px;
  font-weight: normal;
  letter-spacing: -0.6px;
  color: #ffffff;
  text-align: center;
  opacity: 1;
  position: relative;
  z-index: 2;
  margin: 0;
}

/* ==============================================
   1. NEWSセクション全体とグリッドの調整 (セクションタイトル修正)
   ============================================== */

/* 🚨 疑似要素で点線を作成し、中央に配置（より確実な方法） */
.page-title::after {
  width: 100px;
}
#news .the-inner-title {
  font-size: 3rem;
  color: #007bff;
  font-weight: 700;
}

/* ==============================================
   2. 記事カード (.box-news) のスタイルとグリッド強制
   ============================================== */

.news-data-list {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -20px;
}

.box-blog-post {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ----------------------------------------------
   最終修正: HTMLタグを加え、優先度を最大限に高める (3列均等化)
   ---------------------------------------------- */
section#news div.data-news article.box-news {
  width: calc(33.3333% - 13.3333px);
}

/* ==============================================
   3. 画像とテキスト部分のスタイル (アスペクト比強制)
   ============================================== */

.box-image {
  position: relative;
}

.image-cover {
  position: relative;
  width: 100%;
  padding-top: 100%;
  height: 0;
  overflow: hidden;
}

.box-image img.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.box-image img.card-img:hover {
  transform: scale(1.05);
  filter: none;
  opacity: 1;
}

#news .data-news,
#news .news__grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: -20px;
  gap: 20px 20px;
}

.box-blog-post.has-hover:hover img.card-img {
  transform: scale(1.05);
}

.box-text {
  flex-grow: 1;
}

/* 日付 */
.post-meta {
  margin-top: 5px;
  color: #436788;
  font-size: 16px;
  margin-bottom: 10px;
}

.news__card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
}

.news__card-category {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  display: inline-block;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  line-height: 1;
  border: none;
  border-radius: 0;
  background-color: rgba(253, 87, 153, 1);
}

/* タイトル */
.post-title-is-large {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 5px;
  text-decoration: none;
  color: #333;
}

.post-title-is-large a:hover {
  color: #007bff;
}

/* ==========================================================
   NEWS記事本文デザイン調整
   ========================================================== */

.breadcrumbs {
  margin-top: 20px;
}

.post-title-single {
  margin-top: 20px;
}

.content-news {
  margin-top: 20px;
}

.content-news p {
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.content-news p + .wp-block-image {
  margin-top: 1rem;
}

.content-news .wp-block-image {
  margin-bottom: 1.5rem;
}

.content-news .wp-block-image:last-of-type {
  margin-bottom: 0;
}

.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-image:last-of-type {
  margin-bottom: 0;
}

#news-single {
  margin-bottom: 0;
}

.single-news-footer {
  margin-bottom: 120px;
}

.post-title-single {
  border-bottom: 1px solid;
  position: relative;
}

.news .all-news-link,
.all-news-link {
  display: block;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.button {
  display: inline-flex;
  align-items: center;
}
/* ==============================================
   4. ページネーションのスタイル (simplePagination.js用)
   ============================================== */

#pagination-container {
  margin-top: 40px;
  text-align: center;
}

.simple-pagination ul {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  margin-bottom: 100px;
}

.simple-pagination li {
  display: inline-block;
  margin: 0 5px;
  width: 31px;
  height: 35px;
}

.simple-pagination li a,
.simple-pagination li span {
  display: block;
  padding: 3px 4px;
  color: #333;
  text-decoration: none;
  border: none;
  border-radius: 0;
  background-color: transparent;
  transition: background-color 0.3s, color 0.3s;
}

/* -----------------------------------------------------------------
   🚨 ページネーションの色設定 (Prev/Nextのみホバー色を変更)
   ----------------------------------------------------------------- */
.simple-pagination .next.current,
.simple-pagination .prev.current {
  background: #fff;
  border: 1px solid #eee;
  color: #666;
  cursor: not-allowed;
  opacity: 0.3;
}

.simple-pagination .current,
.simple-pagination li a:hover {
  background-color: #246db9;
  border-color: #246db9;
  color: #fff;
}

.simple-pagination .current,
.simple-pagination li a:hover {
  background-color: #246db9;
  border-color: #246db9;
  color: #fff;
}

.simple-pagination li a:hover {
  background-color: #246db9;
  border-color: #246db9;
  color: #fff;
}

#pagination-container .simple-pagination li.active .current:hover {
  background-color: #246db9;
  color: #fff;
}

span.prev:hover {
  background-color: #246db9;
  color: #fff;
}
span.prev {
  font-weight: 900;
}

a .page-link.next {
  font-weight: 900;
}

.page-link.next:hover {
  background-color: #246db9;
  color: #fff;
}

.page-link:hover {
  background-color: #246db9;
  color: #fff;
}

/* ページ番号（数字）のホバー時の色を透明にリセット */
#pagination-container
  .simple-pagination
  li:not(.prev):not(.next):not(.active)
  a:hover {
  background-color: transparent;
  color: #333;
}

.container {
  max-width: 1239px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--container-padding);
}

#news a:hover,
#news .box-image a:hover,
#news .box-blog-post a:hover,
#news .box-news a:hover {
  opacity: 1;
}

@media (max-width: 560px) {
  section#news div.data-news article.box-news {
    width: 100%;
  }
}
