/* ======================================================================
 p_news
====================================================================== */

/* カテゴリフィルター */
.news_category_filter {
  margin-bottom: 48px;
}

.category_list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.category_btn {
  background: #fff;
  border: 1px solid #E6E6E6;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: var(--font-medium);
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.category_btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.category_btn.active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

.category_btn.active a:visited,
.category_btn.active a:link {
  border-color: var(--color-red);
  color: #fff;
}


.category_btn.active:hover {
  background: var(--color-deep-red);
  border-color: var(--color-deep-red);
}

@media screen and (max-width: 767px) {
  .news_category_filter {
    margin-bottom: 32px;
  }
  
  .category_list {
    gap: 8px;
  }
  
  .category_btn {
    font-size: 12px;
    padding: 6px 16px;
    min-height: 36px;
  }
}

/* ニュースグリッド */
.news_grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.news_grid .c_card_7_pic .img {
	height: auto;
}


/* 記事ヘッダー */
.news_detail_header {
  margin-bottom: 32px;
}

.news_detail_meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.news_detail_date {
  font-size: 16px;
}

.news_detail_title {
  font-size: 36px;
  font-weight: var(--font-bold);
  line-height: 1.4;
  margin: 0;
}

/* メインビジュアル */
.news_detail_visual {
  margin-bottom: 32px;
  overflow: hidden;
  text-align: center;
}
.news_detail_visual a {
  display: block;
}
.news_detail_img {
  max-width: 100%;
  height: auto;
}

/* 本文 */
.news_detail_content {
  margin-bottom: 48px;
  line-height: 1.8;
  font-size: 16px;
}

.news_detail_content p {
  margin-bottom: 16px;
}

.news_detail_content p:last-child {
  margin-bottom: 0;
}

.news_detail_content strong {
  font-weight: 600;
  color: #222;
}

@media screen and (max-width: 1024px) {
  .news_grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media screen and (max-width: 767px) {
  .news_grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news_detail_content {
    margin-bottom: 0;
  }
}

/* ナビゲーションボタン */
.news_detail_nav {
  /* display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px; */
}

.news_detail_nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "prev list next";
  align-items: center;
  padding-top: 32px;
  gap: 16px;
}

/* grid-areaを明示して固定配置 */
.news_detail_nav .c_btn_1--back {
  grid-area: prev;
  justify-self: start;
}
.news_detail_nav .c_btn_1--center {
  grid-area: list;
  justify-self: center;
}
.news_detail_nav .c_btn_1--next {
  grid-area: next;
  justify-self: end;
}

/* 無いボタンがあっても崩れない */
.news_detail_nav > *:not([href]) {
  visibility: hidden; /* 万一空タグがあってもスペース維持 */
}


/* レスポンシブ対応 */
@media screen and (max-width: 767px) {
  .news_detail {
    padding: 24px;
    margin: 0 16px;
  }
  
  .news_detail_title {
    font-size: 24px;
  }
  
  .news_detail_meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .news_detail_nav {
    flex-direction: column;
    gap: 12px;
  }
  
  .news_detail_nav .c_btn_1 {
    max-width: 100%;
    width: 100%;
  }
  
  .news_detail_nav .c_btn_1.c_btn_1.size_auto_S, 
  .news_detail_nav .c_btn_1.size_auto_S:link {
    min-width: unset;
    padding: 10px;
  }

  .news_detail_nav .c_btn_1:nth-child(2) {
    max-width: 100%;
  }
}