/* static/css/pages/news.css */

/* News Detail Page - Final Design */
.news-detail-page .section {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs p {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

/* Main Thumbnail */
.main-header-thumb {
  margin-bottom: 32px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* ← ここを修正しました */
}
.main-header-thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* News Header */
.news-detail-head {
  margin-bottom: 32px;
  text-align: center;
}
.meta-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.category-label-detail {
  background-color: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
}
.publish-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  background: none; border: none; padding: 0;
}
.news-detail-head .h1 {
  font-size: 36px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--text);
}


/* Article Body (.prose) Styles */
.prose {
  line-height: 1.85;
  color: var(--text);
  font-size: 17px;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 40px; /* サムネイル画像との間に余白を設ける */
}
.prose h2 {
  font-size: 28px; font-weight: 800; margin-top: 2.8em; margin-bottom: 1.2em; padding-bottom: 0.8em; border-bottom: 2px solid #f0f0f0; color: var(--text);
}
.prose h3 {
  font-size: 22px; font-weight: 700; margin-top: 2.5em; margin-bottom: 1.2em; padding-left: 1em; border-left: 4px solid var(--accent); color: var(--text);
}
.prose p {
  margin-bottom: 1.8em;
}
.prose a {
  color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(255, 58, 169, 0.3); transition: all 0.2s;
}
.prose a:hover {
  background-color: rgba(255, 58, 169, 0.1); border-bottom-color: var(--accent);
}
.prose img {
  display: block; margin: 3em auto; max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.prose ul, .prose ol {
  margin-bottom: 1.8em; padding-left: 1.8em;
}
.prose li {
  margin-bottom: 0.8em;
}
.prose blockquote {
  margin: 2.5em 0; padding: 1.2em 1.8em; border-left: 4px solid #e0e0e0; background-color: var(--bg); color: #666; border-radius: 0 8px 8px 0;
}

/* Back to List Button */
.back-to-list-container {
  text-align: center;
  margin-top: 80px;
}
.btn-back {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 99px; background-color: var(--surface); border: 1px solid rgba(0,0,0,0.1); font-weight: 600; color: var(--muted); transition: all 0.3s; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.btn-back:hover {
  border-color: rgba(255, 58, 169, 0.3); color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255, 58, 169, 0.1);
}
.btn-back .icon-arrow {
  transition: transform 0.3s var(--ease-out-cubic);
}
.btn-back:hover .icon-arrow {
  transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
  .news-detail-head .h1 {
    font-size: 28px;
  }
  .prose {
    font-size: 16px;
    padding-top: 30px;
  }
}

/* Pagination Styles (変更なし) */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--muted);
  font-weight: 600;
  transition: all 0.3s;
}
.page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-link.is-active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-link.is-disabled {
  color: rgba(0,0,0,0.2);
  pointer-events: none;
}

/* ニュース一覧ページの画像遅延読み込みのスタイルを修正 */
.news-card .thumb .placeholder,
.news-card .thumb .lazyload {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ▼▼▼ 修正箇所 ▼▼▼ */
  object-position: center; /* 画像を中央に配置 */
  /* ▲▲▲ 変更ここまで ▲▲▲ */
}

.news-card .thumb .lazyload {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.news-card .thumb .lazyload.is-loaded {
  opacity: 1;
}
