/* ===== 全体共通 ===== */
body {
  font-family: "Hiragino Sans", sans-serif;
  margin: 0;
  padding: 80px 0 0;
  line-height: 1.8;
  background: #fafafa;
  color: #222;
}

h1 {
  margin-bottom: 8px;
}

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  z-index: 1000;
}

.header-inner {
  width: min(1184px, calc(100% - 100px));
  margin: 0 auto;
  padding: 10px 0;
}

.logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== 一覧ページ：ヒーロー ===== */
section {
  width: min(1184px, calc(100% - 100px));
  margin: 16px auto 40px;
}

section h1 {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1.4;
}

section p {
  font-size: 14px;
  color: #666;
}

/* ===== 一覧ページ：記事一覧 ===== */
.articles {
  width: min(1184px, calc(100% - 100px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.card {
  background: transparent;
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-image {
  width: 100%;
  aspect-ratio: 343 / 240;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card h2 {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background: #eee;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #222;
}

/* ===== 記事ページ ===== */
.article-detail {
  margin-top: 16px;
}

.article-inner {
  width: min(660px, calc(100% - 40px));
  margin: 0 auto;
}

.article-title {
  margin: 0;
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-bottom: 24px;
}

.date {
  color: #aaa;
  white-space: nowrap;
}

.intro-profile {
  margin-top: 16px;
  margin-bottom: 32px;
  padding: 24px 24px;
  background: #f0f0f0;
  border-radius: 12px;
}

.intro-profile-title {
  margin-top: 0;
  font-weight: 600;
}

.intro-profile p {
  margin-bottom: 0;
}

.intro-profile p:nth-of-type(3) {
  margin-top: 4px;
}

.intro-profile p:last-child {
  margin-bottom: 0;
}

.article-image {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 32px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content p {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.9;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 4px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
}

.material-symbols-outlined {
  font-size: 20px;
  vertical-align: middle;
}

/* ===== 記事ページ：小見出し ===== */
.subheading-main {
  font-size: 28px;
  line-height: 1.5;
  margin: 32px 0 12px;
  font-weight: 600;
  scroll-margin-top: 100px;
}

.subheading-question {
  font-size: 20px;
  line-height: 1.6;
  margin: 24px 0 8px;
  font-weight: 600;
  color: #222;
}

/* ===== 記事ページ：目次 ===== */
.table-of-contents {
  margin: 0 0 40px;
  padding: 20px 24px;
  background: #f5f5f5;
  border-radius: 12px;
}

.toc-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.table-of-contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px dashed #ccc;
}

.table-of-contents li {
  padding: 16px 0;
  border-bottom: 1px dashed #ccc;
}

.table-of-contents li:last-child {
  margin-bottom: none;
}

.table-of-contents a {
  display: block;
  text-decoration: none;
  color: #444;
  font-size: 16px;
  line-height: 1.8;
}

.table-of-contents a:hover {
  color: #222;
}

/* ===== フッター ===== */
.site-footer {
  margin-top: 80px;
  padding: 40px 0;
  background: #f0f0f0;
}

.footer-inner {
  width: min(1184px, calc(100% - 100px));
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
}

.footer-copy {
  font-size: 12px;
  color: #aaa;
}

/* ===== hover ===== */
.card:hover .card-image {
  opacity: 0.7;
}

.card:hover h2 {
  color: #888;
}

.back-link:hover {
  color: #222;
}

.footer-links a:hover {
  color: #222;
}

/* ===== レスポンシブ：大画面 ===== */
@media (min-width: 1400px) {
  section,
  .articles {
    width: min(1400px, calc(100% - 100px));
  }
}

/* ===== レスポンシブ：タブレット ===== */
@media (max-width: 1200px) {
  section,
  .articles,
  .header-inner {
    width: calc(100% - 96px);
  }

  .articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .card h2 {
    font-size: 19px;
  }
}

/* ===== レスポンシブ：モバイル ===== */
@media (max-width: 767px) {
  section,
  .articles,
  .header-inner {
    width: calc(100% - 40px);
  }

  .header-inner {
    padding: 8px 0;
  }

  .articles {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  section {
    margin: 8px auto 32px;
  }

  section h1 {
    font-size: 32px;
  }

  section p {
    font-size: 13px;
  }

  .card h2 {
    font-size: 17px;
  }

  .article-detail {
    margin-top: 8px;
  }

  .article-title {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .subheading-main {
    font-size: 22px;
    line-height: 1.5;
  }

  .subheading-question {
    font-size: 18px;
    line-height: 1.5;
  }
}
