/* ============================================
   記事詳細ページ（ニュース・コラム共通）
   ============================================ */

.p-article {
  padding: 80px 0;
  background-color: #ffffff;
}

.p-article__content {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px;
}

.p-article__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.p-article__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.p-article__meta-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.p-article__reading-time {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: #6b7280;
}

.p-article__views {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: #6b7280;
}

.p-article__date {
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: #6b7280;
}

.p-article__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  color: #111827;
  margin: 0;
}

.p-article__divider {
  height: 1px;
  background-color: #e5e7eb;
  width: 100%;
}

.p-article__thumbnail {
  width: 100%;
  margin-bottom: 48px;
  overflow: hidden;
}

.p-article__thumbnail-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.p-article__body {
  margin-bottom: 48px;
}

.p-article__body h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: #222e47;
  margin: 40px 0 16px;
  padding-left: 16px;
  border-left: 8px solid #e60012;
}

.p-article__body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #222e47;
  margin: 40px 0 16px;
}

.p-article__body h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #222e47;
  margin: 40px 0 16px;
}

.p-article__body p {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #222e47;
  margin: 0 0 16px;
}

.p-article__body ul,
.p-article__body ol {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #222e47;
  margin: 0 0 16px;
  padding-left: 24px;
}

.p-article__body ul {
  list-style-type: disc;
}

.p-article__body ol {
  list-style-type: decimal;
}

.p-article__body li {
  padding-bottom: 4px;
}

.p-article__body a {
  color: #e60012;
  text-decoration: underline;
}

.p-article__body a:hover {
  text-decoration: none;
}

/* 画像キャプション */
.p-article__body figure {
  margin: 24px 0;
}

.p-article__body figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.1);
}

.p-article__body figcaption,
.p-article__body .wp-caption-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: #6b7280;
  margin-top: 16px;
  text-align: left;
}

@media (max-width: 768px) {
  .p-article__body figure {
    margin: 16px 0;
  }
}

/* 目次ブロック */
.p-article__toc {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
}

.p-article__toc-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
}

.p-article__toc-header svg {
  width: 16px;
  height: 16px;
  fill: #6b7280;
  flex-shrink: 0;
}

.p-article__toc-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 28px !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-left: none !important;
}

.p-article__toc-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-article__toc-item {
  display: block;
  text-decoration: none !important;
  transition: color 0.3s ease;
  width: 100%;
}

.p-article__toc-item--h2 {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #e60012;
  padding-left: 0;
}

.p-article__toc-item--h3 {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  color: #6b7280 !important;
  padding-left: 16px;
}

.p-article__toc-number {
  display: inline-block;
  margin-right: 4px;
}

.p-article__toc-item--h2 .p-article__toc-number {
  color: #e60012;
}

.p-article__toc-item--h3 .p-article__toc-number {
  color: #6b7280;
}

.p-article__toc-item:hover {
  text-decoration: underline !important;
}

/* テーブルスタイル */
.p-article__body table {
  width: 100%;
  min-width: 600px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-collapse: collapse;
}

.p-article__body .wp-block-table,
.p-article__body figure.wp-block-table {
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}

.p-article__body .wp-block-table table,
.p-article__body figure.wp-block-table table {
  margin: 0;
}

/* テーブルを直接含む場合のラッパー */
.p-article__body > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

@media (max-width: 768px) {
  .p-article__body table {
    font-size: 14px;
    min-width: 600px;
  }

  .p-article__body th,
  .p-article__body td {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 20px;
  }

  .p-article__body th {
    height: auto;
  }
}

.p-article__body thead {
  background-color: #f9fafb;
  border-bottom: none;
}

.p-article__body th {
  border: 1px solid #e5e7eb;
  border-bottom: none;
  padding: 13px 17px;
  height: 54px;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #222e47;
  text-align: left;
  vertical-align: middle;
}

.p-article__body tbody {
  border-top: 1px solid #e5e7eb;
}

.p-article__body tbody tr {
  border: 1px solid #e5e7eb;
}

.p-article__body tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.p-article__body td {
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #222e47;
  vertical-align: middle;
}

.p-article__body td:last-child {
  color: #e60012;
}

.p-article__share {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 24px 0;
  margin-bottom: 48px;
}

.p-article__share-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: #222e47;
  margin: 0 0 24px;
}

.p-article__share-buttons {
  display: flex;
  gap: 16px;
}

.p-article__share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.p-article__share-button:hover {
  opacity: 0.8;
}

.p-article__share-button--x {
  background-color: #000000;
}

.p-article__share-button--fb {
  background-color: #1877f2;
}

.p-article__share-button--line {
  background-color: #06c755;
}

.p-article__share-button svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.p-article__back-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 16px;
  margin: 0 auto;
  background-color: #e60012;
  color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.p-article__back-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3);
}

.p-article__back-button svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.p-article__back-button:hover svg {
  transform: rotate(180deg) translateX(4px);
}

/* 監修者セクション */
.p-article__supervisor {
  background-color: #f9fafb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 48px;
  margin-bottom: 48px;
}

.p-article__supervisor-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #222e47;
  margin: 0 0 16px;
}

.p-article__supervisor-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0 0 16px;
}

.p-article__supervisor-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.p-article__supervisor-photo {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.p-article__supervisor-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
}

.p-article__supervisor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-article__supervisor-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #222e47;
  margin: 0;
}

.p-article__supervisor-profile {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #222e47;
  margin: 0;
}

/* カテゴリータグ（ライトバージョン） */
.c-category-tag--light {
  background-color: #ffe6e1;
  color: #e60012;
}

/* 関連記事セクション */
.p-article__recommend {
  margin-top: 48px;
  margin-bottom: 48px;
}

.p-article__recommend-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: #222e47;
  margin: 0 0 24px;
}

.p-article__recommend-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.p-article__recommend-card {
  display: flex;
  gap: 24px;
  align-items: center;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: all 0.3s ease;
}

.p-article__recommend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 12px 32px rgba(0, 0, 0, 0.15);
}

.p-article__recommend-card-img {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  overflow: hidden;
}

.p-article__recommend-card-img-src {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-article__recommend-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-article__recommend-card-content .c-category-tag {
  align-self: flex-start;
  width: auto;
}

.p-article__recommend-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #222e47;
  margin: 0;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 768px) {

  .p-article__content {
    padding: 32px 0;
  }

  .p-article__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .p-article__meta-left {
    flex-wrap: wrap;
    gap: 12px;
  }

  .p-article__title {
    font-size: 24px;
    line-height: 32px;
  }

  .p-article__thumbnail {
    margin-bottom: 32px;
  }

  .p-article__body {
    margin-bottom: 32px;
  }

  .p-article__body h2 {
    font-size: 20px;
    line-height: 28px;
    padding-left: 12px;
    border-left-width: 4px;
    margin: 40px 0 16px;
  }

  .p-article__body h3 {
    font-size: 18px;
    line-height: 24px;
    margin: 40px 0 16px;
  }

  .p-article__body h4 {
    font-size: 18px;
    line-height: 24px;
    margin: 40px 0 16px;
  }

  .p-article__body p,
  .p-article__body ul,
  .p-article__body ol {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 16px;
  }

  .p-article__share-title {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 24px;
  }

  .p-article__supervisor-content {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .p-article__supervisor-photo {
    width: 80px;
    height: 80px;
  }

  .p-article__supervisor-name {
    text-align: center;
  }

  .p-article__recommend-title {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 20px;
  }

  .p-article__recommend-card {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

