/**
 * News Pages CSS
 * ニュース一覧・詳細ページ専用スタイル
 */

/* 共通スタイル */
html, body {
  height: 100%;
  min-height: 100vh;
}
body{
background-image: url("/img/header_back@2x.webp");
background-repeat: no-repeat;
background-position: center top -100px,;
background-size: 100% auto;
padding: 0;
}
@media screen and (max-width: 768px) {
body{
  font-size: 1.4rem;
  background-image: url("/img/header_back.webp");
}
}

/*header*/
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* viewportの高さを確保 */
  background-image: url("/img/footer_back@2x.webp");
  background-repeat:  no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
}
main {
  flex: 1; /* mainが余白を埋める */
  position: relative;
  padding-top: 150px;
}
.main-img{
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 10;
  width: 200px;
  padding: 0;
}
.main-img img{
  width: 100%;
}
@media screen and (max-width: 768px) {
.wrapper {
  font-size: 1.4rem;
  background-image: url("/img/footer_back.webp");
  background-repeat: no-repeat;
  background-position: center bottom 100px;
  background-size: 100% auto;
}
main {
  padding-top: 80px;
}
.main-img{
  top: 15px;
  left: 15px;
  width: 200px;
}
.main-img img{
  width: 100%;
}
}
/*パンくず*/
.breadcrumb {
  margin-bottom: 2rem;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.2rem;
  color: #666;
}
.breadcrumb a {
  color: #004278;
  display: inline-block;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
  opacity: 1;
}
.breadcrumb > span {
  color: #333;
  font-weight: 500;
}


/* ニュース一覧ページ */
#news-list {
  padding-top: 2rem;
  padding-bottom: 4rem;
}
#news-list h2 {
  font-size: 3rem;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 500;
  letter-spacing: 0.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #004278;
}

/* ニュース一覧コンテナ */
.news-list-container {
  margin-bottom: 4rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ニュース一覧アイテム */
.news-list-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.news-date {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.1rem;
  color: #666;
  font-weight: 400;
}
.news-category {
  background: #004278;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 500;
}

.news-item-content {
  margin-bottom: 1.5rem;
}

.news-title {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.news-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-title a:hover {
  color: #004278;
  opacity: 1;
}

.news-excerpt {
  color: #666;
  line-height: 1.6;
  font-size: 1.5rem;
}

.news-item-footer {
  text-align: right;
}

.read-more {
  color: #004278;
  font-weight: 500;
  text-decoration: none;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  opacity: 1;
  text-decoration: underline;
}

.read-more i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.read-more:hover i {
  transform: translateX(3px);
}

/* ページネーション */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination-prev,
.pagination-next {
  background: #004278;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
  background: #025a94;
  opacity: 1;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid #ddd;
  border-radius: 50%;
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-number:hover {
  background: #004278;
  color: #fff;
  border-color: #004278;
  opacity: 1;
}

.pagination-number.current {
  background: #004278;
  color: #fff;
  border-color: #004278;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  color: #666;
  padding: 0 0.5rem;
}

/* ニュース詳細ページ */
#news-detail {
  padding-top: 2rem;
  padding-bottom: 4rem;
}
.news-article {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}
.news-article-header {
  background: #fff;
  padding: 3rem 3rem 1.5rem;
}
@media screen and (max-width: 1100px) {
header div{
  margin: 0 auto 0;
  width: 100%;
  }
}
.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.news-article .news-date {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.1rem;
  color: #666;
}

.news-article .news-category {
  background: #004278;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 15px;
  font-size: 1.0rem;
  font-weight: 400;
  white-space: nowrap;
}

.news-article .news-title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: #333;
  margin: 0;
}

.news-article-content {
  padding: 1.5rem 3rem 3rem;
  font-size: 1.6rem;
  line-height: 1.8;
  color: #333;
}

.news-article-content h2,
.news-article-content h3,
.news-article-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

.news-article-content h2 {
  font-size: 2rem;
  font-weight: 600;
}

.news-article-content h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

.news-article-content h4 {
  font-size: 1.6rem;
  font-weight: 600;
}

.news-article-content p {
  margin-bottom: 1.5rem;
}

.news-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.news-article-content ul,
.news-article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.news-article-content li {
  margin-bottom: 0.5rem;
}

.news-article-footer {
  background: #f8f9fa;
  padding: 2rem 3rem;
  border-top: 1px solid #e9ecef;
}

.news-share p {
  font-weight: 500;
  margin-bottom: 1rem;
  color: #666;
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.share-buttons a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.share-twitter {
  background: #1da1f2;
  color: #fff;
}

.share-facebook {
  background: #1877f2;
  color: #fff;
}

.share-line {
  background: #00c300;
  color: #fff;
}

.share-buttons a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ナビゲーション */
.news-navigation {
  margin-bottom: 3rem;
}

.news-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.news-nav-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.news-nav-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.news-nav-item.prev {
  text-align: left;
}

.news-nav-item.next {
  text-align: right;
}

.nav-label {
  display: block;
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #004278;
  opacity: 1;
}

/* 戻るボタン */
.back-to-list {
  text-align: center;
}

.button-back {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: #004278;
  color: #fff;
  padding: 1.2rem 2.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.button-back:hover {
  background: #025a94;
  opacity: 1;
  transform: translateY(-1px);
}

/* ローディング・エラー状態 */
.loading-news,
.error-news,
.no-news {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.loading-news i {
  margin-right: 0.8rem;
  color: #004278;
}

.error-news i {
  margin-right: 0.8rem;
  color: #d32f2f;
}

.error-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.retry-button {
  background: #004278;
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.retry-button:hover {
  background: #025a94;
  opacity: 1;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  #news-list,
  #news-detail {
    padding-top: 0rem;
    padding-bottom: 3rem;
  }

  #news-list h2 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
  }

  .news-list-item {
    padding: 1.5rem;
  }

  .news-item-header {
  }

  .news-title {
    font-size: 1.6rem;
  }

  .news-excerpt {
    font-size: 1.4rem;
  }

  .pagination {
    flex-direction: column;
    gap: 1.5rem;
  }

  .pagination-numbers {
    justify-content: center;
  }

  .pagination-prev,
  .pagination-next {
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
  }

  .news-article-header,
  .news-article-content,
  .news-article-footer {
    padding: 2rem;
  }

  .news-article .news-title {
    font-size: 2rem;
  }

  .news-article-content {
    font-size: 1.5rem;
  }

  .news-nav-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .news-nav-item.next {
    text-align: left;
  }

  .share-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }
}
