/* お知らせページのスタイル */

/* ページタイトル（共通デザインに合わせる） */
.page-title-wrapper {
  padding: 15rem 0 40px;
  text-align: center;
}

.news-page .section-title-decorated {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  color: #333;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-page .slash-left,
.news-page .slash-right {
  font-size: 2rem;
  color: #ccc;
  margin: 0 1rem;
}

.news-page .section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.page-title__text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-title__ja {
  font-size: 2.4rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.page-title__en {
  font-size: 1rem;
  color: #888;
  letter-spacing: 1px;
}

/* カテゴリフィルター */
.category-filter {
  margin-bottom: 40px;
  text-align: center;
}

.category-filter__container {
  max-width: 600px;
}

.category-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-item {
  display: inline-block;
}

.category-link {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  background-color: #f5f5f5;
  color: #666;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-item.active .category-link,
.category-link:hover {
  background-color: #333;
  color: #fff;
}

/* ニュース一覧 */
.news-list-section {
  margin-bottom: 60px;
}

.news-card {
  background-color: #fff;
  border-radius: 20px;
  margin-bottom: 30px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card[data-animating="true"] {
  pointer-events: none;
}

.news-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.news-card.collapsible:not(.expanded) {
  cursor: pointer;
}

.news-card.collapsible:not(.expanded) .news-title,
.news-card.collapsible:not(.expanded) .news-body {
  cursor: pointer;
}

.news-card.collapsible:not(.expanded):hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.news-card.expanded {
  border-color: rgba(0, 150, 50, 0.3);
}

.news-card.expanded:hover,
.news-card.latest:hover {
  transform: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.news-content {
  padding: 30px;
}

.news-collapsed-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.news-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.news-meta {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.news-date {
  color: #888;
  font-size: 0.9rem;
}

.news-category {
  background-color: #f0f0f0;
  color: #666;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.news-body {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 20px;
}

.news-image {
  flex: 0 0 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.news-image--side {
  flex: 0 0 48%;
  max-width: 48%;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-image--full {
  flex: 0 0 100%;
  max-width: 100%;
  margin-bottom: 25px;
  display: block;
}

.news-image--map {
  flex: 0 0 48%;
  max-width: 48%;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

/* 全文表示時は画像を非表示にする */
.news-card.expanded .news-image--side {
  display: none;
}

.news-card.expanded .news-image--full {
  display: block;
}

.news-text {
  flex: 1;
  color: #333;
  line-height: 1.7;
}

.news-text--full {
  flex: 0 0 100%;
  max-width: 100%;
}

.news-card.expanded .news-text--full {
  flex: 0 0 100%;
  max-width: 100%;
}

.news-text--half {
  flex: 0 0 48%;
  max-width: 48%;
}

.news-text p {
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.news-text br {
  display: block;
  margin-bottom: 0.5em; /* 改行の間隔を調整 */
  content: " "; /* 必須 */
}

.news-text p:last-child {
  margin-bottom: 0;
}

.news-signature {
  text-align: right;
  font-weight: 500;
  margin-top: 20px;
}

.news-excerpt {
  margin-bottom: 15px;
}

.news-full-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.news-full-content.hidden {
  display: none;
}

.news-full-content.visible {
  max-height: 2000px;
  /* 十分な高さを設定 */
  display: block;
  flex-wrap: wrap;
  width: 100%;
  opacity: 1;
}

.news-card.expanded .news-collapsed-content {
  display: none;
}

.news-card.collapsed .news-full-content {
  opacity: 0;
  max-height: 0;
}

.news-footer {
  text-align: right;
  margin-top: 5px;
}

.news-toggle {
  background: none;
  border: none;
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.news-toggle:hover {
  color: #333;
  text-decoration: underline;
}

.news-toggle::after {
  content: "→";
  margin-left: 5px;
}

.news-toggle.active::after {
  content: "↑";
}

/* 最新記事は常に全文表示 */
.news-card.latest .news-full-content {
  display: block;
  max-height: none;
}

.news-card.latest .news-footer {
  display: block;
}

.news-card.latest .news-collapsed-content {
  display: none; /* 最初は閉じた状態のコンテンツは非表示 */
}

.news-card.latest.collapsed .news-collapsed-content {
  display: flex; /* 閉じた状態になったら表示 */
}

.news-card.latest.collapsed .news-full-content {
  display: none; /* 閉じた状態になったら非表示 */
}

/* 最新記事が閉じた状態のときのホバーエフェクト */
.news-card.latest.collapsed:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

/* ページネーション */
.pagination {
  margin-bottom: 80px;
}

.pagination__container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-item {
  display: inline-block;
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-item.active .pagination-link,
.pagination-link:hover {
  background-color: #333;
  color: #fff;
}

.pagination-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #666;
}

.pagination-prev,
.pagination-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
  background-color: #e0e0e0;
}

.arrow {
  font-size: 1.2rem;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
  .news-content {
    padding: 25px;
  }

  .news-collapsed-content {
    gap: 20px;
  }

  .news-title {
    font-size: 1.4rem;
  }

  .news-image--map,
  .news-text--half {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .news-image--map {
    order: -1;
  }

  .news-image--side,
  .news-text--half {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .news-image--side {
    order: -1;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .page-title-wrapper {
    padding: 110px 0 30px;
  }

  .page-title__ja {
    font-size: 2rem;
  }

  .page-title__decoration {
    width: 30px;
    margin: 0 20px;
  }

  .news-content {
    padding: 20px;
  }

  .news-title {
    font-size: 1.3rem;
  }

  .news-body {
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .page-title__decoration {
    width: 25px;
    margin: 0 15px;
  }

  .page-title__ja {
    font-size: 1.8rem;
  }

  .category-link {
    padding: 4px 12px;
    font-size: 0.85rem;
  }

  .news-title {
    font-size: 1.2rem;
  }

  .pagination-link,
  .pagination-prev,
  .pagination-next,
  .pagination-dots {
    width: 35px;
    height: 35px;
  }
}
