*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  color: #111827;
  background: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #1a56db;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

main {
  min-height: 60vh;
}

footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  -webkit-transition: opacity 0.15s, -webkit-transform 0.1s;
  transition: opacity 0.15s, -webkit-transform 0.1s;
  transition: opacity 0.15s, transform 0.1s;
  transition: opacity 0.15s, transform 0.1s, -webkit-transform 0.1s;
}
.btn:hover {
  opacity: 0.88;
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
}
.btn--primary {
  background: #1a56db;
  color: #fff;
}
.btn--outline {
  background: transparent;
  border: 2px solid #1a56db;
  color: #1a56db;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.card__body {
  padding: 1.5rem;
}
.card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section {
  padding-block: 5rem;
}
@media (max-width: 768px) {
  .section {
    padding-block: 3rem;
  }
}
.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* =============================================
   投稿一覧（news-list / post-list 共通）
   ============================================= */

.news-list,
.post-list {
  max-width: 860px;
  margin-inline: auto;
  padding: 4rem 1.5rem;
  background: #ffffff;
}

.news-list__title,
.post-list__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #1a56db;
  margin-bottom: 2.5rem;
}

.news-list__empty,
.post-list__empty {
  color: #6b7280;
  text-align: center;
  padding: 3rem 0;
}

.news-list__items,
.post-list__items {
  list-style: none;
}

.news-list__item,
.post-list__item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s;
}

.news-list__item:first-child,
.post-list__item:first-child {
  border-top: 1px solid #e5e7eb;
}

.news-list__date,
.post-list__date {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #6b7280;
  letter-spacing: 0.03em;
}

.news-list__link,
.post-list__link {
  color: #111827;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.15s;
}

.news-list__link:hover,
.post-list__link:hover {
  color: #1a56db;
  text-decoration: none;
}

.news-list__title-text,
.post-list__title-text {
  font-size: 0.9375rem;
  color: #374151;
}

/* ページネーション */
.news-list__pager,
.post-list__pager {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.news-list__pager nav,
.post-list__pager nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.news-list__pager a,
.post-list__pager a,
.news-list__pager span,
.post-list__pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.news-list__pager a:hover,
.post-list__pager a:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.news-list__pager [aria-current="page"],
.post-list__pager [aria-current="page"],
.news-list__pager .active span,
.post-list__pager .active span {
  background: #1a56db;
  border-color: #1a56db;
  color: #fff;
}

.news-list__pager [aria-disabled="true"],
.post-list__pager [aria-disabled="true"],
.news-list__pager .disabled span,
.post-list__pager .disabled span {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* =============================================
   投稿詳細（news-article / post-article 共通）
   ============================================= */

.news-article,
.post-article {
  max-width: 760px;
  margin-inline: auto;
  padding: 4rem 1.5rem;
  background: #ffffff;
}

.news-article__header,
.post-article__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.news-article__date,
.post-article__date {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.news-article__title,
.post-article__title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.45;
  color: #111827;
}

@media (max-width: 640px) {
  .news-article__title,
  .post-article__title {
    font-size: 1.375rem;
  }
}

/* EditorJS 記事本文 */
.news-article__body,
.post-article__body {
  font-size: 1rem;
  line-height: 1.85;
  color: #1f2937;
}

.news-article__body h2,
.post-article__body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid #1a56db;
  line-height: 1.4;
}

.news-article__body h3,
.post-article__body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.news-article__body p,
.post-article__body p {
  margin-bottom: 1.25rem;
}

.news-article__body ul,
.post-article__body ul,
.news-article__body ol,
.post-article__body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.news-article__body li,
.post-article__body li {
  margin-bottom: 0.4rem;
}

.news-article__body img,
.post-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-block: 1.5rem;
}

.news-article__body table,
.post-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.news-article__body th,
.post-article__body th {
  background: #f3f4f6;
  font-weight: 600;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e5e7eb;
}

.news-article__body td,
.post-article__body td {
  padding: 0.625rem 0.875rem;
  border: 1px solid #e5e7eb;
  vertical-align: top;
}

.news-article__body tr:nth-child(even) td,
.post-article__body tr:nth-child(even) td {
  background: #f9fafb;
}

.news-article__body a,
.post-article__body a {
  color: #1a56db;
  text-decoration: underline;
}

.news-article__body a:hover,
.post-article__body a:hover {
  color: #1e40af;
}

/* コードインライン */
.news-article__body code,
.post-article__body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: #be185d;
}

/* 強調 */
.news-article__body strong,
.post-article__body strong {
  font-weight: 700;
  color: #111827;
}

/* 引用ブロック */
.news-article__body blockquote,
.post-article__body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #1a56db;
  background: #eff6ff;
  border-radius: 0 8px 8px 0;
  color: #1e3a8a;
}

.news-article__body blockquote p,
.post-article__body blockquote p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.75;
  font-style: italic;
}

.news-article__body blockquote cite,
.post-article__body blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-style: normal;
  color: #3b82f6;
  font-weight: 500;
}

.news-article__body blockquote cite::before,
.post-article__body blockquote cite::before {
  content: "— ";
}

/* figure / figcaption（画像キャプション） */
.news-article__body figure,
.post-article__body figure {
  margin-block: 1.5rem;
}

.news-article__body figcaption,
.post-article__body figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  text-align: center;
}

/* h3 のアクセント */
.news-article__body h3,
.post-article__body h3 {
  position: relative;
  padding-bottom: 0.5rem;
}

.news-article__body h3::after,
.post-article__body h3::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: #1a56db;
  margin-top: 0.4rem;
  opacity: 0.5;
}

/* 一覧に戻るリンク */
.news-article__back,
.post-article__back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.news-article__back a,
.post-article__back a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}

.news-article__back a:hover,
.post-article__back a:hover {
  color: #1a56db;
  text-decoration: none;
}

@media (max-width: 768px) {
  .news-list,
  .post-list {
    padding: 2.5rem 1rem;
  }

  .news-article,
  .post-article {
    padding: 2.5rem 1rem;
  }

  .news-list__item,
  .post-list__item {
    flex-direction: column;
    gap: 0.25rem;
  }
}