/* =========================================================
  Single Post
========================================================= */

/* 共通CSSの body.page:not(.home) main section の影響を打ち消す */
main.single-post section.page-header {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  margin: 0 !important;
  padding: 1rem 0 !important;
  background-color: transparent;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: none;
  color: #fff;
}

main.single-post .page-header__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 25, 55, 0.72) 0%,
    rgba(0, 48, 90, 0.45) 45%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

main.single-post .page-header__inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 40px;
}

main.single-post .page-header__breadcrumb {
  margin: 0 0 2.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-align: right;
}

main.single-post .page-header__breadcrumb a {
  color: #fff;
  text-decoration: none;
}

main.single-post .page-header__breadcrumb a:hover {
  opacity: 0.7;
}

main.single-post .page-header__content {
  max-width: 720px;
  padding: 3.5rem 0 4.5rem;
}

main.single-post .page-header__title {
  margin: 0;
  font-size: 3.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

main.single-post .page-header__title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 28px;
  background: #e60012;
}

main.single-post .page-header__description {
  margin: 36px 0 0;
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}


/* =========================================================
  Article
========================================================= */

.single-post__article {
  width: min(100%, 1200px);
  margin: 3rem auto 6rem;
  padding: 2.5rem;
  background: #fff;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15);
}

.single-post__inner {
  max-width: 100%;
  margin: 0 auto;
}

.single-post__header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e8ec;
}

.single-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.single-post__date {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  line-height: 1;
}

.single-post__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-post__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.25rem 0.75rem;
  background: #e60012;
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.single-post__category:hover {
  opacity: 0.8;
}

.single-post__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #111;
}


/* =========================================================
  Content
========================================================= */

.single-post__content {
  font-size: 1rem;
  line-height: 2;
  color: #222;
}

.single-post__content > *:first-child {
  margin-top: 0;
}

.single-post__content > *:last-child {
  margin-bottom: 0;
}

.single-post__content p {
  margin: 0 0 1.75rem;
}

.single-post__content a {
  color: #1e63b8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post__content a:hover {
  text-decoration: none;
}

.single-post__content h2 {
  position: relative;
  margin: 4rem 0 1.75rem;
  padding-left: 1.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5;
  color: #111;
}

.single-post__content h2::before {
  content: "";
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 5px;
  height: 1.2em;
  background: #e60012;
}

.single-post__content h3 {
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ddd;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  color: #111;
}

.single-post__content ul,
.single-post__content ol {
  margin: 0 0 1.75rem;
  padding-left: 1.5em;
}

.single-post__content li {
  margin-bottom: 0.5rem;
}

.single-post__content img {
  max-width: 100%;
  height: auto;
}

.single-post__content figure {
  margin: 2rem 0;
}

.single-post__content figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.single-post__content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: #f5f8fc;
  border-left: 4px solid #e60012;
  color: #333;
}

.single-post__content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
}

.single-post__content th,
.single-post__content td {
  padding: 1rem;
  border: 1px solid #ddd;
  line-height: 1.7;
}

.single-post__content th {
  background: #f5f8fc;
  font-weight: 700;
}


/* =========================================================
  Page Links
========================================================= */

.single-post__page-links {
  margin-top: 2rem;
}


/* =========================================================
  Post Navigation
========================================================= */

.single-post__nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e8ec;
}

.single-post__nav-item a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: 0.3s ease;
}

.single-post__nav-item a:hover {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
}

.single-post__nav-item--prev {
  text-align: left;
}

.single-post__nav-item--archive {
  text-align: center;
}

.single-post__nav-item--next {
  text-align: right;
}


/* =========================================================
  SP
========================================================= */

@media screen and (max-width: 992px) {
  main.single-post section.page-header {
    min-height: 260px;
    padding: 6rem 0 4rem !important;
  }

  main.single-post .page-header__inner {
    width: 100%;
    padding: 0 24px;
  }

  main.single-post .page-header__breadcrumb {
    margin: 0 0 2rem;
    font-size: 0.85rem;
    text-align: left;
  }

  main.single-post .page-header__content {
    padding: 0;
  }

  main.single-post .page-header__title {
    font-size: 2.25rem;
  }

  main.single-post .page-header__title::after {
    width: 56px;
    height: 3px;
    margin-top: 20px;
  }

  main.single-post .page-header__description {
    margin-top: 24px;
    font-size: 1rem;
    line-height: 1.7;
  }

  .single-post__article {
    width: calc(100% - 48px);
    padding: 1.25rem;
  }

  .single-post__title {
    font-size: 1.75rem;
  }
}

@media screen and (max-width: 640px) {
  .single-post__article {
    width: calc(100% - 32px);
    margin-bottom: 4rem;
    padding: 1.25rem;
  }

  .single-post__header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .single-post__meta {
    gap: 0.6rem;
  }

  .single-post__title {
    font-size: 1.5rem;
  }

  .single-post__content {
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .single-post__content h2 {
    margin: 3rem 0 1.5rem;
    font-size: 1.35rem;
  }

  .single-post__content h3 {
    margin: 2.5rem 0 1rem;
    font-size: 1.15rem;
  }

  .single-post__content th,
  .single-post__content td {
    padding: 0.75rem;
  }

  .single-post__nav {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .single-post__nav-item,
  .single-post__nav-item--prev,
  .single-post__nav-item--archive,
  .single-post__nav-item--next {
    text-align: center;
  }

  .single-post__nav-item a {
    width: 100%;
  }
}