/* =============================================
   news-detail.css — お知らせ詳細ページ固有スタイル
   デザイントークンは css/variables.css から継承
   ============================================= */


/* ===== ベース ===== */

body {
  background-color: var(--color-bg-warm);
  color: var(--color-text);
}


/* ===== セクション共通：左右padding ===== */

.page-header,
.article-layout,
.article-nav {
  padding-left: max(60px, calc((100vw - 1400px) / 2));
  padding-right: max(60px, calc((100vw - 1400px) / 2));
  box-sizing: border-box;
}

@media (max-width: 1400px) {
  .page-header,
  .article-layout,
  .article-nav {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (max-width: 1024px) {
  .page-header,
  .article-layout,
  .article-nav {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 600px) {
  .page-header,
  .article-layout,
  .article-nav {
    padding-left: 24px;
    padding-right: 24px;
  }
}


/* ===== ページヘッダー ===== */

.page-header {
  padding-top: 36px;
  padding-bottom: 36px;
  background-color: var(--color-bg-warm);
  border-bottom: 1px solid var(--color-border);
}

.page-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.page-header__title {
  font-family: var(--font-family-base);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

.page-header__en {
  font-family: var(--font-family-en);
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-regular);
  color: var(--color-accent);
  letter-spacing: 0.08em;
  margin: 0;
  text-align: center;
}


/* ===== コンテンツレイアウト ===== */

.article-layout {
  padding-top: 32px;
  padding-bottom: 32px;
  background: transparent;
}

.article-layout__inner {
  display: block;
}

/* タブレット以上：2カラム */
@media (min-width: 601px) {
  .article-layout {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .article-layout__inner {
    display: flex;
    align-items: flex-start;
    gap: 40px;
  }

  .article {
    flex: 0 0 65%;
    min-width: 0;
  }

  .article-sidebar {
    flex: 0 0 calc(35% - 40px);
    position: sticky;
    top: 40px;
  }
}

@media (min-width: 1025px) {
  .article-layout {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .article-layout__inner {
    gap: 80px;
  }

  .article-sidebar {
    flex: 0 0 calc(35% - 80px);
  }
}

/* モバイル：サイドバーを横並びウィジェット */
@media (max-width: 600px) {
  .article-sidebar {
    margin-top: 48px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }
}


/* ===== サイドバーウィジェット ===== */

.sidebar-widget {
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .sidebar-widget {
    flex: 1;
    margin-bottom: 0;
  }
}

.sidebar-widget__title {
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(196, 106, 60, 1);
}

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

.sidebar-widget__link {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid #e8e4de;
  text-decoration: none;
  color: #333;
  font-family: var(--font-family-base);
  font-size: 14px;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-widget__link:hover {
  color: rgba(196, 106, 60, 1);
  padding-left: 6px;
}


/* ===== 記事ヘッダー ===== */

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

.article__date {
  font-family: var(--font-family-en);
  font-size: 14px;
  color: #888;
}

.article__tag {
  font-family: var(--font-family-base);
  font-size: 12px;
  padding: 3px 10px;
  background: rgba(196, 106, 60, 0.12);
  color: rgba(196, 106, 60, 1);
  border-radius: 2px;
}

.article__title {
  font-family: var(--font-family-base);
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8e4de;
}

@media (min-width: 601px) {
  .article__title {
    font-size: 24px;
  }
}

@media (min-width: 1025px) {
  .article__title {
    font-size: 28px;
  }
}


/* ===== アイキャッチ ===== */

.article__eyecatch {
  margin-bottom: 40px;
  background-color: #e8e4de; /* 画像未存在時のフォールバック */
  min-height: 200px;
}

.article__eyecatch img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  /* 画像読み込み失敗時：altテキストを非表示にして背景色を見せる */
  color: transparent;
  background-color: #e8e4de;
}

@media (min-width: 601px) {
  .article__eyecatch {
    min-height: 280px;
  }

  .article__eyecatch img {
    height: 280px;
  }
}

@media (min-width: 1025px) {
  .article__eyecatch {
    min-height: 400px;
  }

  .article__eyecatch img {
    height: 400px;
  }
}


/* ===== 本文 ===== */

.article__body {
  font-family: var(--font-family-base);
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.article__body p {
  margin-bottom: 24px;
}

.article__body h3 {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid rgba(196, 106, 60, 1);
  line-height: 1.5;
}

.article__body ul,
.article__body ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.article__body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

@media (min-width: 1025px) {
  .article__body {
    font-size: 16px;
  }

  .article__body h3 {
    font-size: 20px;
  }
}


/* ===== 前後記事ナビゲーション ===== */

.article-nav {
  border-top: 1px solid #e8e4de;
  border-bottom: 1px solid #e8e4de;
  background: transparent;
}

.article-nav__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.article-nav__prev,
.article-nav__next {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  max-width: 45%;
}

.article-nav__next {
  align-items: flex-end;
  text-align: right;
}

.article-nav__prev:hover .article-nav__title,
.article-nav__next:hover .article-nav__title {
  text-decoration: underline;
}

.article-nav__label {
  font-family: var(--font-family-base);
  font-size: 13px;
  color: rgba(196, 106, 60, 1);
}

.article-nav__title {
  font-family: var(--font-family-base);
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.article-nav__prev.is-disabled,
.article-nav__next.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

@media (max-width: 600px) {
  .article-nav__inner {
    flex-direction: column;
    gap: 16px;
  }

  .article-nav__prev,
  .article-nav__next {
    max-width: 100%;
  }

  .article-nav__next {
    align-items: flex-start;
    text-align: left;
  }
}


/* ===== 一覧へ戻る ===== */

.article-back {
  text-align: center;
  margin: 48px auto;
}

.article-back__link {
  display: inline-block;
  padding: 12px 40px;
  border: 1px solid #c4c0b8;
  text-decoration: none;
  color: #333;
  font-family: var(--font-family-base);
  font-size: 14px;
  transition: background 0.2s;
}

.article-back__link:hover {
  background: rgba(196, 106, 60, 0.08);
}


/* アイキャッチ画像が空の場合は非表示 */
.article__eyecatch:empty {
  display: none;
}

.article__eyecatch img[src=""] {
  display: none;
}
