/* シングル記事用CSS */

.l-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(../images/blog/deco_blog-bg.webp) top center no-repeat;
  background-size: 100vw auto; /* 幅を80vw、高さは比率維持 */
  z-index: -1;
}

@media screen and (max-width: 768px) {
    .l-main::before {
        aspect-ratio: 750/4135;
        background: url(../images/blog/deco_blog-bg-sp.webp) no-repeat right top;
        background-size: 100vw auto; /* 幅を100vw、高さは自動 */
        z-index: -1;
    }
}

/* 記事全体のコンテナ */
time {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .22em;
  font-size: max(12px, 1.4rem);
  white-space: nowrap; 
  display: inline-block; /* または block */
  transform: skew(-8deg);
}

.has-global-padding {
  padding: 0;
}

@media screen and (max-width: 767px) {
  .p-page {
    padding-block-start: 17.8rem;
  }
}

/* 記事コンテナ */
.p-article {
  max-width: 880px;
  margin: 0 auto;
}

@media screen and (max-width: 767px) {
  .p-article {
    padding: 0 1.7rem;
  }
}

/* 記事タイトル */
.p-article__title {
font-size: max(32.25px, 4.3rem);
  font-weight: 700;
line-height: 1.3720930233;
letter-spacing: 0.3em;
  text-align: center;
  margin-bottom: 4.5rem;
  color: #000;
  transform: skewX(-8deg);
  transform-origin: center;
  position: relative;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

@media screen and (max-width: 767px) {
  .p-article__title {
        font-size: 2.3rem;
line-height: 1.6;
letter-spacing: 0.25em;
    margin-bottom: 3rem;
    min-height: 8rem;
  }
}

/* アイキャッチ画像 */
.p-article__thumbnail {
  margin-bottom: 4rem;
  text-align: center;
}

.p-article__image {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

@media screen and (max-width: 767px) {
  .p-article__thumbnail {
    margin-bottom: 3rem;
  }
}

/* 記事コンテンツ */
.p-article__content {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.05em;
  color: #333;
  margin-bottom: 4rem;
}

@media screen and (max-width: 767px) {
  .p-article__content {
    font-size: 1.4rem;
    line-height: 1.8;
  }
}

/* コンテンツ内の要素 */
.p-article__content p {
  margin-bottom: 2.2rem;
  text-align: justify;
}

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

/* 見出し */
.p-article__content h2 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: #000;
  margin: 4rem 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #EBFF00;
  transform: skewX(-4deg);
  transform-origin: left;
}

.p-article__content h3 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: #000;
  margin: 3rem 0 1.5rem;
  position: relative;
  padding-left: 2rem;
}

.p-article__content h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.4rem;
  height: 100%;
  background-color: #EBFF00;
}

.p-article__content h4 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: #000;
  margin: 2.5rem 0 1rem;
}

@media screen and (max-width: 767px) {
  .p-article__content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
  }
  
  .p-article__content h3 {
    font-size: 1.8rem;
  }
  
  .p-article__content h4 {
    font-size: 1.6rem;
  }
}

/* リスト */
.p-article__content ul,
.p-article__content ol {
  margin: 2rem 0;
  padding-left: 2rem;
}

.p-article__content li {
  margin-bottom: 1rem;
  position: relative;
}

.p-article__content ul li::before {
  content: "■";
  color: #EBFF00;
  font-weight: bold;
  position: absolute;
  left: -2rem;
}

.p-article__content ol {
  counter-reset: list-counter;
}

.p-article__content ol li {
  counter-increment: list-counter;
}

.p-article__content ol li::before {
  content: counter(list-counter) ".";
  color: #EBFF00;
  font-weight: bold;
  position: absolute;
  left: -2rem;
}

/* 引用 */
.p-article__content blockquote {
  background-color: #f9f9f9;
  border-left: 4px solid #EBFF00;
  padding: 2rem;
  margin: 2rem 0;
  font-style: italic;
  position: relative;
}

.p-article__content blockquote::before {
  content: "";
  font-size: 4rem;
  color: #EBFF00;
  position: absolute;
  top: -1rem;
  left: 1rem;
}

/* 画像 */
.p-article__content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}

/* リンク */
.p-article__content a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .p-article__content a:hover {
    color: #666;
  }
}

/* テーブル */
.p-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 1.4rem;
}

.p-article__content th,
.p-article__content td {
  padding: 1rem;
  border: 1px solid #ddd;
  text-align: left;
}

.p-article__content th {
  background-color: #f5f5f5;
  font-weight: 700;
}

/* メタ情報（日付とカテゴリー） */
.p-article__meta {
    display: flex
;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: .1em;
    font-size: max(12px, 1.4rem);
}

@media screen and (max-width: 767px) {
  .p-article__meta {
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
  }
}

/* 日付 */
.p-article__date {
  display: inline-block;
}

/* セパレーター */
.p-article__separator {
}

/* カテゴリー */
.p-article__categories {
  display: flex;
  gap: 1rem;
}

.p-article__category {
  display: inline-block;
  font-weight: 600;
  transform: skew(-8deg);
}

/* ページネーション */
.p-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 7.5rem auto 0;
  max-width: 880px;
}

.p-pagination__prev,
.p-pagination__next {
  flex: 1;
  max-width: 45%;
}

.p-pagination__next {
  text-align: right;
}

.p-pagination a {
  display: inline-block;
  place-content: center;
  min-height: max(38.57px, 4.5rem);
  transform-origin: top left;
  transform: skewX(-8deg);
  color: #fff;
  border: 1px solid #000;
  overflow: hidden;
  background-color: #fff;
  background-color: #000;
  font-weight: 400;
  letter-spacing: .2em;
  font-size: max(12px, 1.4rem);
  line-height: normal;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  z-index: 2;
  padding-left: 5.5rem;
  padding-right: 5.5rem;
}

.p-pagination a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .p-pagination a:hover {
    color: #000;
  }
  
  .p-pagination a:hover::before {
    transform: translateX(0);
  }
}

@media screen and (max-width: 767px) {
  .p-pagination {
    gap: 8rem;
    text-align: center;
    margin-bottom: 7.5rem;
  }
  
  .p-pagination__prev,
  .p-pagination__next {
    max-width: 100%;
    text-align: center;
  }
  
  .p-pagination a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
}

/* 404・記事なし */
.p-noContent {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 60rem;
  margin: 0 auto;
}

.p-noContent h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #000;
}

.p-noContent p {
  font-size: 1.6rem;
  line-height: 1.8;
  color: #666;
  margin-bottom: 3rem;
}

.p-noContent__link {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #EBFF00;
  color: #000;
  text-decoration: none;
  border-radius: 0.4rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  transform: skewX(-6deg);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .p-noContent__link:hover {
    background-color: #d6e600;
    transform: skewX(-6deg) translateY(-2px);
  }
}

@media screen and (max-width: 767px) {
  .p-noContent h2 {
    font-size: 2rem;
  }
  
  .p-noContent p {
    font-size: 1.4rem;
  }
  
  .p-noContent__link {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
}

/* Gutenbergブロック対応 */
.p-article__content .wp-block-quote {
  background-color: #f9f9f9;
  border-left: 4px solid #EBFF00;
  padding: 2rem;
  margin: 2rem 0;
  font-style: italic;
}

.p-article__content .wp-block-image {
  margin: 2rem 0;
  text-align: center;
}

.p-article__content .wp-block-button__link {
  background-color: #EBFF00;
  color: #000;
  padding: 1rem 2rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.1em;
  transform: skewX(-6deg);
  transition: background-color 0.3s ease;
}

@media (hover: hover) {
  .p-article__content .wp-block-button__link:hover {
    background-color: #d6e600;
  }
}

.p-article__content .wp-block-columns {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.p-article__content .wp-block-column {
  flex: 1;
}

@media screen and (max-width: 767px) {
  .p-article__content .wp-block-columns {
    flex-direction: column;
    gap: 1rem;
  }
}

/* コードブロック */
.p-article__content pre,
.p-article__content code {
  background-color: #f5f5f5;
  font-family: "Courier New", monospace;
  border-radius: 0.4rem;
}

.p-article__content pre {
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #ddd;
}

.p-article__content code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
}