/* =================================
   お知らせ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）
================================= */

/* ========================================
   お知らせ詳細セクション（event-detail.cssパターン適用）
======================================== */

.news-detail-section {
    padding: 0;
    width: 100%;
    margin: 0;
}

.news-detail-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* ========================================
   お知らせ基本情報セクション
======================================== */

.news-info-section {
    padding: 80px 0;
    background: #ffffff;
    width: 100%;
    margin: 0;
}

.news-info-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

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

.news-info-category {
    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;
}

.news-info-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.news-info-categories .news-info-category {
    width: auto;
    min-width: 80px;
}

.news-info-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: var(--text-primary, #333);
    text-align: left;
    position: relative;
    letter-spacing: -0.5px;
}

.news-info-image {
    margin-top: 40px;
}

.news-info-image img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   カスタムフィールドコンテンツ
======================================== */

.news-custom-content {
    padding: 80px 0;
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #e3f2fd 100%);
    width: 100%;
}

.news-custom-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-custom-h2 {
    margin: 40px 0 16px;
    font-size: 24px;
    padding-left: 12px;
    font-weight: bold;
    border-left: 8px solid #1b4f72;
    line-height: 1.4;
    color: var(--text-primary, #333);
}

.news-custom-h3 {
    margin: 32px 0 16px;
    font-size: 20px;
    text-decoration: underline;
    font-weight: bold;
    line-height: 1.4;
    color: var(--text-primary, #333);
}

.news-custom-text {
    margin: 16px 0;
    line-height: 1.7;
    color: var(--text-primary, #333);
}

.news-url-wrapper {
    margin-top: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-url-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--text-primary, #333);
}

.news-url-link {
    color: var(--edo-ai, #4a90e2);
    text-decoration: none;
    word-break: break-all;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.news-url-link:hover {
    border-bottom-color: var(--edo-ai, #4a90e2);
}

/* ========================================
   お知らせ詳細コンテンツ
======================================== */

.news-detail-content {
    padding-top: 80px;
    margin: 0;
    background: #ffffff;
    width: 100%;
}

.news-detail-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-detail-content-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: var(--text-primary, #333);
    text-align: center;
    letter-spacing: -0.8px;
    position: relative;
}

.news-detail-content-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--edo-ai, #4a90e2);
    border-radius: 2px;
}

.news-detail-main-content {
    line-height: 1.8;
    color: var(--text-primary, #333);
    margin-top: 30px;
}

/* WordPressエディタコンテンツのスタイル */
.news-detail-main-content h1,
.news-detail-main-content h2,
.news-detail-main-content h3,
.news-detail-main-content h4,
.news-detail-main-content h5,
.news-detail-main-content h6 {
    margin: 30px 0 20px 0;
    color: var(--text-primary, #333);
    font-weight: 600;
}

.news-detail-main-content h1 { font-size: 28px; }
.news-detail-main-content h2 { font-size: 24px; }
.news-detail-main-content h3 { font-size: 20px; }
.news-detail-main-content h4 { font-size: 18px; }
.news-detail-main-content h5 { font-size: 16px; }
.news-detail-main-content h6 { font-size: 14px; }

.news-detail-main-content p {
    margin: 0 0 20px 0;
    line-height: 1.8;
}

.news-detail-main-content p:last-child {
    margin-bottom: 0;
}

.news-detail-main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-detail-main-content ul,
.news-detail-main-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-detail-main-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.news-detail-main-content blockquote {
    border-left: 4px solid var(--edo-ai, #4a90e2);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary, #666);
}

.news-detail-main-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.news-detail-main-content th,
.news-detail-main-content td {
    border: 1px solid #e0dede;
    padding: 15px;
    text-align: left;
}

.news-detail-main-content th {
    background: var(--edo-ai, #4a90e2);
    color: #ffffff;
    font-weight: 600;
}

.news-detail-main-content tr:nth-child(even) {
    background: var(--bg-secondary, #f8f9fa);
}

.news-detail-main-content a {
    color: var(--edo-ai, #4a90e2);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.news-detail-main-content a:hover {
    border-bottom-color: var(--edo-ai, #4a90e2);
}

.news-detail-main-content strong {
    font-weight: 600;
    color: var(--text-primary, #333);
}

.news-detail-main-content em {
    font-style: italic;
    color: var(--text-secondary, #666);
}

/* ========================================
   ナビゲーション（event-detail.cssパターン適用）
======================================== */

.news-detail-navigation {
    padding: 40px 0;
    background: #ffffff;
    width: 100%;
    margin: 0;
}

.news-detail-nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-detail-nav-buttons {
    display: flex;
    justify-content: flex-start;
    max-width: 600px;
    margin: 0;
}

.news-detail-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--edo-ai, #4a90e2);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.news-detail-nav-button:hover {
    color: var(--aozora, #5dade2);
}

.news-detail-nav-button:hover i {
    transform: translateX(-3px);
}

.news-detail-nav-button i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    margin-right: 0;
    display: inline-block;
    width: auto;
    text-align: center;
}

/* FontAwesomeが読み込まれていない場合の代替矢印 */
.news-detail-nav-button::before {
    content: "←";
    font-size: 0.9rem;
    margin-right: 0;
    transition: transform 0.3s ease;
    display: inline-block;
    width: auto;
    text-align: center;
}

.news-detail-nav-button:hover::before {
    transform: translateX(-3px);
}

/* お知らせ個別情報 */
.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;
}

/* ========================================
   レスポンシブ対応（event-detail.cssパターン適用）
======================================== */

@media (max-width: 768px) {
    .news-detail-container {
        margin: 0;
        border-radius: 0;
    }

    /* お知らせ基本情報 レスポンシブ */
    .news-info-section {
        padding: 60px 0;
    }

    .news-info-wrapper {
        padding: 0 15px;
    }

    .news-info-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .news-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .news-info-category {
        width: auto;
        padding: 4px 16px;
    }

    .news-info-categories .news-info-category {
        min-width: 60px;
    }

    /* カスタムフィールドコンテンツ レスポンシブ */
    .news-custom-content {
        padding: 60px 0;
    }

    .news-custom-content-wrapper {
        padding: 0 15px;
    }

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

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

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

    /* 投稿内容 レスポンシブ */
    .news-detail-content {
        padding-top: 60px;
    }

    .news-detail-content-wrapper {
        padding: 0 15px;
    }

    .news-detail-content-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .news-detail-main-content h1 { font-size: 24px; }
    .news-detail-main-content h2 { font-size: 20px; }
    .news-detail-main-content h3 { font-size: 18px; }
    .news-detail-main-content h4 { font-size: 16px; }
    .news-detail-main-content h5 { font-size: 15px; }
    .news-detail-main-content h6 { font-size: 14px; }

    .news-detail-main-content h1,
    .news-detail-main-content h2,
    .news-detail-main-content h3,
    .news-detail-main-content h4,
    .news-detail-main-content h5,
    .news-detail-main-content h6 {
        margin: 25px 0 15px 0;
    }

    .news-detail-main-content p {
        margin: 0 0 15px 0;
    }

    .news-detail-main-content img {
        margin: 15px 0;
    }

    .news-detail-main-content ul,
    .news-detail-main-content ol {
        margin: 15px 0;
        padding-left: 25px;
    }

    .news-detail-main-content blockquote {
        padding: 15px 20px;
        margin: 20px 0;
    }

    .news-detail-main-content table {
        margin: 20px 0;
    }

    .news-detail-main-content th,
    .news-detail-main-content td {
        padding: 10px;
        font-size: 14px;
    }

    .news-detail-navigation {
        padding: 30px 0;
    }

    .news-detail-nav-wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .news-info-section {
        padding: 40px 0;
    }

    .news-info-wrapper {
        padding: 0 10px;
    }

    .news-info-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .news-custom-content {
        padding: 40px 0;
    }

    .news-custom-content-wrapper {
        padding: 0 10px;
    }

    .news-detail-content {
        padding-top: 40px;
        padding-bottom: 0;
    }

    .news-detail-content-wrapper {
        padding: 0 10px;
    }

    .news-detail-content-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .news-detail-nav-wrapper {
        padding: 0 10px;
    }
}

/* 既存のレスポンシブ対応 */
@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;
    }
}

/* ========================================
   アニメーション（event-detail.cssパターン適用）
======================================== */

.news-detail-container {
    animation: newsDetailFadeInUp 0.6s ease-out;
}

@keyframes newsDetailFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   アクセシビリティ（event-detail.cssパターン適用）
======================================== */

.news-detail-nav-button:focus {
    outline: 2px solid var(--edo-ai, #4a90e2);
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .news-detail-content {
        background: #000000;
        color: #ffffff;
    }
    
    .news-detail-main-content {
        color: #ffffff;
    }
    
    .news-detail-main-content h1,
    .news-detail-main-content h2,
    .news-detail-main-content h3,
    .news-detail-main-content h4,
    .news-detail-main-content h5,
    .news-detail-main-content h6 {
        color: #ffffff;
    }
    
    .news-detail-main-content th {
        background: #000000;
        color: #ffffff;
    }
    
    .news-detail-main-content tr:nth-child(even) {
        background: #333333;
    }
}

/* モーション軽減設定 */
@media (prefers-reduced-motion: reduce) {
    .news-detail-container {
        animation: none;
    }
    
    .news-detail-nav-button {
        transition: none;
    }
}