/* =================================
   お知らせCSS - news.css
================================= */

/* お知らせセクション */
.news {
  background: var(--Linear, linear-gradient(180deg, #e3f2fd 0%, #f8fbff 100%));
  padding: 104px 0;
}

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

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* お知らせアイテム */
.news-item {
  border-bottom: 1px solid #e0dede;
}

.news-item-link {
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  transition: 0.4s opacity;
  text-decoration: none;
  color: inherit;
}

.news-item-link:hover {
  opacity: 0.7;
}

/* 日付 */
.news-item-time {
  flex-shrink: 0;
  color: var(--text-primary, #333);
  font-size: 16px;
  font-weight: normal;
}

/* カテゴリ */
.news-item-cat {
  display: block;
  width: 160px;
  text-align: center;
  color: var(--text-inverse, #fff);
  border-radius: 16px;
  background: var(--edo-ai, #4a90e2);
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
}

/* カテゴリが複数ある場合の調整 */
.news-item-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.news-item-categories .news-item-cat {
  width: auto;
  min-width: 80px;
}

/* タイトル */
.news-item-title {
  font-size: 16px;
  font-weight: normal;
  color: var(--text-primary, #333);
  line-height: 1.6;
  margin: 0;
}

/* ページネーション */
.news-page-list {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  list-style: none;
  padding: 0;
}

.news-page-item {
  width: 40px;
  height: 56px;
  background: #fff;
  border: 1px solid #e0dede;
  line-height: 56px;
  margin: 0;
}

.news-page-item:not(:first-child) {
  border-left: none;
}

.news-page-item-current {
  color: var(--bg-primary, #fff);
  background: var(--edo-ai, #4a90e2);
}

.news-page-link {
  display: block;
  width: 100%;
  height: 100%;
  transition: 0.4s;
  text-decoration: none;
  color: inherit;
}

.news-page-link:hover {
  color: var(--bg-primary, #fff);
  background: var(--edo-ai, #4a90e2);
}

/* レスポンシブ対応 */
@media screen and (max-width: 480px) {
  .news-item-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* 日付を最上段に */
  .news-item-time {
    order: 1;
    width: 100%;
  }

  /* カテゴリーを2段目に */
  .news-item-cat,
  .news-item-categories {
    order: 2;
    width: 100%;
  }

  .news-item-cat {
    width: auto;
    padding: 4px 16px;
  }

  .news-item-categories .news-item-cat {
    min-width: 60px;
  }

  /* タイトルを最下段に */
  .news-item-title {
    order: 3;
    width: 100%;
  }

  .news-page-list {
    margin-top: 64px;
  }

  .news-page-item {
    width: 35px;
    height: 48px;
    line-height: 48px;
    font-size: 14px;
  }
}

/* =================================
   お知らせ個別ページ（single-news）
================================= */

/* お知らせ個別情報 */
.s-news-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.s-news-item-time {
  flex-shrink: 0;
  color: var(--text-primary, #333);
  font-size: 16px;
  font-weight: normal;
}

.s-news-item-cat {
  display: block;
  padding: 8px 24px;
  text-align: center;
  color: var(--text-inverse, #fff);
  border-radius: 16px;
  background: var(--edo-ai, #4a90e2);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: bold;
}

/* カテゴリが複数ある場合の調整 */
.s-news-item-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.s-news-item-categories .s-news-item-cat {
  width: auto;
  min-width: 80px;
}

/* セクションタイトル */
.s-news .section-title {
  margin-top: 40px;
  text-align: left;
}

/* 画像 */
.s-news-img-wrapper {
  margin-top: 64px;
}

.s-news-img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* 見出し */
.s-news-h2 {
  margin: 40px 0 16px;
  font-size: 24px;
  padding-left: 12px;
  font-weight: bold;
  border-left: 8px solid #1b4f72;
  line-height: 1.4;
}

.s-news-h3 {
  margin: 32px 0 16px;
  font-size: 20px;
  text-decoration: underline;
  font-weight: bold;
  line-height: 1.4;
}

/* 本文テキスト */
.s-news-text {
  margin: 16px 0;
  line-height: 1.7;
  color: var(--text-primary, #333);
}

/* 戻るリンク */
.s-news-link-wrapper {
  margin: 80px auto;
  text-align: center;
}

.s-news-link {
  display: inline-block;
  padding: 16px 32px;
  font-weight: bold;
  color: #fff;
  background: var(--Linear4, linear-gradient(90deg, var(--edo-ai, #4a90e2) 0%, var(--hanada, #5dade2) 100%));
  border-radius: 32px;
  text-decoration: none;
  transition: 0.4s opacity;
}

.s-news-link:hover {
  opacity: 0.7;
}

/* レスポンシブ対応 */
@media screen and (max-width: 480px) {
  .s-news-item-cat {
    width: auto;
    padding: 4px 16px;
  }

  .s-news-item-categories .s-news-item-cat {
    min-width: 60px;
  }

  .s-news .section-title {
    text-align: left;
  }

  .s-news-img-wrapper {
    margin-top: 40px;
  }

  .s-news-h2 {
    font-size: 20px;
  }

  .s-news-h3 {
    font-size: 18px;
  }

  .s-news-text {
    line-height: 1.8;
  }

  .s-news-link-wrapper {
    margin-bottom: 0;
  }

  .s-news-link {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto;
  }
}

/* =================================
   カテゴリフィルター
================================= */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.filter-btn:hover {
  background-color: #f8fafc;
  border-color: #64748b;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background-color: #60a5fa !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(96, 165, 250, 0.3);
  transform: translateY(-1px);
}

.filter-btn.active:hover {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

button.filter-btn.active {
  color: #ffffff !important;
}

button.filter-btn.active:hover {
  color: #ffffff !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .category-filters {
    padding: 0 20px;
    gap: 14px;
  }

  .filter-btn {
    padding: 16px 32px;
    font-size: 18px;
    min-height: 52px;
  }
}

@media (max-width: 480px) {
  .category-filters {
    padding: 20px;
    gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .filter-btn {
    font-size: 14px;
    padding: 12px 20px;
    min-height: 50px;
    flex: 1 1 calc(25% - 12px);
    max-width: calc(25% - 12px);
    justify-content: center;
  }
}

/* ページネーション */
.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
    padding: 16px 0;
}

.pagination-info {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    padding: 0 16px;
    display: flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
}

/* ページングボタンにフィルターボタンと同じスタイルを適用 */
.pagination-btn {
    padding: 10px 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    outline: none;
    user-select: none;
}

.pagination-btn:hover {
    background-color: #f8fafc;
    border-color: #64748b;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-btn:disabled:hover {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ページネーション レスポンシブ対応 */
@media (max-width: 768px) {
    .news-pagination {
        gap: 12px;
        margin: 24px 0;
        padding: 12px 0;
    }
    
    .pagination-info {
        font-size: 14px;
        padding: 0 12px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .news-pagination {
        gap: 8px;
        margin: 20px 0;
    }
    
    .pagination-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    .pagination-info {
        font-size: 12px;
        padding: 0 8px;
        min-width: 50px;
    }
}