/**
 * お役立ち記事ページ用CSS
 */

/* ==========================================================================
   レイアウト
   ========================================================================== */

/* 記事ページ用：ページ全体の背景色 */
body.page-template-page-article,
body.single-article {
  background-color: #F0EEEE;
}

body.page-template-page-article #wrap,
body.single-article #wrap {
  background-color: #F0EEEE;
}

.p-article {
  background-color: #F0EEEE;
  padding-bottom: 80px;
}

/* パンくず */
.p-article__breadcrumb {
  padding: 20px 48px;
  margin-top: 15px;
  font-size: 13px;
  color: #666;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.p-article__breadcrumb a {
  color: #c41e3a;
  text-decoration: none;
}

.p-article__breadcrumb a:hover {
  text-decoration: underline;
}

.p-article__breadcrumb .separator {
  margin: 0 8px;
  color: #999;
}

.p-article__breadcrumb .current {
  color: #333;
}

/* コンテナ（2カラムレイアウト） */
.p-article__container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
}

/* メインコンテンツ */
.p-article__main {
  flex: 1;
  min-width: 0;
  padding: 0 133px;
  margin-top: -30px;
}

/* サイドバー */
.p-article__sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  padding-right: 16px;
}

/* ==========================================================================
   記事メインコンテンツ
   ========================================================================== */

/* タイトル */
.p-article__title {
  font-size: 40px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  margin-bottom: 24px;
  padding-top: 100px;
}

/* ヒーロー画像 */
.p-article__hero {
  margin-bottom: 24px;
}

.p-article__hero img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* リード文 */
.p-article__lead {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #eee;
}

.p-article__lead p {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

/* ==========================================================================
   記事セクション
   ========================================================================== */

.p-article__section {
  margin-bottom: 48px;
}

/* セクション見出し */
.p-article__section-heading {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  margin-bottom: 45px;
  padding-bottom: 35px;
  border-bottom: 1px solid #D9D9D9;
  position: relative;
}

.p-article__section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2px;
  background: #C02E1D;
}

/* セクション画像 */
.p-article__section-image {
  margin-bottom: 20px;
}

.p-article__section-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* セクションテキスト */
.p-article__section-text {
  margin-bottom: 24px;
}

.p-article__section-text p {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 16px;
}

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

/* CTAボタン */
.p-article__cta {
  text-align: center;
  margin-top: 32px;
}

.p-article__cta .c-btn--primary {
  display: inline-block;
  background: linear-gradient(96.64deg, #CC2018 60%, #F65F1E 100%);
  color: #fff;
  padding: 19px 57.5px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.p-article__cta .c-btn--primary:hover {
  opacity: 0.8;
}

/* ==========================================================================
   サイドバー
   ========================================================================== */

/* CTAボックス */
.p-article__sidebar-cta {
  background: linear-gradient(96.64deg, #CC2018 60%, #F65F1E 100%);
  color: #fff;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 24px;
}

.p-article__sidebar-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 0;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid #D9D9D9;
  width: 100%;
  justify-content: center;
}

.p-article__sidebar-cta-badge .icon {
  width: 24px;
  height: 24px;
}

.p-article__sidebar-cta-badge .icon img {
  width: 100%;
  height: 100%;
}

.p-article__sidebar-cta-text {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.p-article__sidebar-cta-btn {
  display: block;
  background-color: #333;
  color: #fff;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.p-article__sidebar-cta-btn:hover {
  background-color: #555;
}

/* おすすめ記事 */
.p-article__sidebar-recommend {
  background-color: #F0EEEE;
  padding: 20px 0;
  border-radius: 8px;
}

.p-article__sidebar-recommend-title {
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(96.64deg, #CC2018 60%, #F65F1E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(96.64deg, #CC2018 60%, #F65F1E 100%) 1;
}

.p-article__sidebar-recommend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.p-article__sidebar-recommend-item {
  margin-bottom: 16px;
}

.p-article__sidebar-recommend-item:last-child {
  margin-bottom: 0;
}

.p-article__sidebar-recommend-item a {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: opacity 0.3s ease;
}

.p-article__sidebar-recommend-item a:hover {
  opacity: 0.7;
}

.p-article__sidebar-recommend-item .thumb {
  width: 110px;
  height: 73px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
}

.p-article__sidebar-recommend-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-article__sidebar-recommend-item .title {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

@media screen and (max-width: 1024px) {
  .p-article__breadcrumb {
    padding: 20px 48px;
  }

  .p-article__container {
    flex-direction: column;
  }

  .p-article__main {
    padding: 0 60px;
  }

  .p-article__title {
    padding-top: 100px;
    font-size: 32px;
  }

  .p-article__sidebar {
    width: 100%;
    position: static;
    order: -1;
    margin-bottom: 32px;
    padding-right: 0;
  }

  .p-article__sidebar-cta {
    margin-bottom: 0;
  }

  .p-article__sidebar-recommend {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .p-article {
    padding-bottom: 60px;
  }

  .p-article__main {
    padding: 0 20px;
    margin-top: -70px;
  }

  .p-article__sidebar-cta {
    display: none;
  }

  .p-article__breadcrumb {
    font-size: 12px;
    padding: 16px 20px;
  }

  .p-article__title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-top: 60px;
  }

  .p-article__lead p {
    font-size: 14px;
  }

  .p-article__section-heading {
    font-size: 20px;
  }

  .p-article__section-text p {
    font-size: 14px;
  }

  .p-article__cta .c-btn--primary {
    padding: 14px 40px;
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .p-article__title {
    font-size: 22px;
    padding-top: 40px;
  }

  .p-article__section-heading {
    font-size: 18px;
  }

  .p-article__sidebar-cta {
    padding: 20px 16px;
  }
}

/* ==========================================================================
   新形式: コンテンツブロック
   ========================================================================== */

/* コンテンツ wrapper */
.p-article__content {
  margin-top: 32px;
}

/* h2見出し */
.p-article__heading2 {
  font-size: 28px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  margin: 72px 0 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #D9D9D9;
  position: relative;
}

.p-article__heading2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2px;
  background: #C02E1D;
}

.p-article__content > .p-article__heading2:first-child {
  margin-top: 0;
}

/* h3見出し */
.p-article__heading3 {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  margin: 40px 0 20px;
  padding-left: 16px;
  position: relative;
}

.p-article__heading3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, #CC2018 0%, #F65F1E 100%);
  border-radius: 2px;
}

/* 段落 */
.p-article__paragraph {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 24px;
}

.p-article__paragraph strong {
  font-weight: bold;
  color: #222;
}

/* 箇条書きリスト */
.p-article__list {
  margin: 28px 0;
  padding-left: 24px;
  list-style: disc;
}

.p-article__list li {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 12px;
  color: #333;
}

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

.p-article__list li strong {
  font-weight: bold;
  color: #222;
}

/* 番号付きリスト */
.p-article__ordered-list {
  margin: 28px 0;
  padding-left: 24px;
  list-style: decimal;
}

.p-article__ordered-list li {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 12px;
  color: #333;
}

.p-article__ordered-list li:last-child {
  margin-bottom: 0;
}

.p-article__ordered-list li strong {
  font-weight: bold;
  color: #222;
}

/* 引用ブロック */
.p-article__blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background-color: #f8f8f8;
  border-left: 4px solid #CC2018;
  border-radius: 0 8px 8px 0;
}

.p-article__blockquote p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 8px;
}

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

.p-article__blockquote strong {
  font-weight: bold;
  color: #CC2018;
}

/* テーブル */
.p-article__table-wrapper {
  margin: 32px 0;
  overflow-x: auto;
}

.p-article__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.p-article__table th,
.p-article__table td {
  padding: 12px 16px;
  border: 1px solid #ddd;
  text-align: left;
  line-height: 1.6;
  color: #333;
}

.p-article__table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.p-article__table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.p-article__table strong {
  font-weight: bold;
  color: #222;
}

/* 良例/悪例比較 */
.p-article__comparison {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}

.p-article__comparison-item {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.p-article__comparison-item--bad {
  background-color: #fff5f5;
  border-left: 4px solid #e53935;
}

.p-article__comparison-item--good {
  background-color: #f0fff4;
  border-left: 4px solid #43a047;
}

.p-article__comparison-icon {
  font-weight: bold;
  font-size: 18px;
  flex-shrink: 0;
}

.p-article__comparison-item--bad .p-article__comparison-icon {
  color: #e53935;
}

.p-article__comparison-item--good .p-article__comparison-icon {
  color: #43a047;
}

.p-article__comparison-label {
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
  color: #333;
}

.p-article__comparison-text {
  flex: 1;
  line-height: 1.6;
  color: #333;
}

/* 水平線 */
.p-article__hr {
  margin: 48px 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

/* 画像 */
.p-article__figure {
  margin: 32px 0;
}

.p-article__figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.p-article__figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

/* ==========================================================================
   新形式: レスポンシブ
   ========================================================================== */

@media screen and (max-width: 768px) {
  .p-article__heading2 {
    font-size: 22px;
    margin: 56px 0 24px;
  }

  .p-article__heading3 {
    font-size: 17px;
    margin: 32px 0 16px;
  }

  .p-article__paragraph {
    font-size: 14px;
  }

  .p-article__list li,
  .p-article__ordered-list li {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .p-article__blockquote {
    padding: 16px 20px;
  }

  .p-article__blockquote p {
    font-size: 14px;
  }

  .p-article__table {
    font-size: 13px;
  }

  .p-article__table th,
  .p-article__table td {
    padding: 10px 12px;
  }

  .p-article__comparison-item {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .p-article__comparison-text {
    width: 100%;
    margin-top: 4px;
  }

  .p-article__hr {
    margin: 40px 0;
  }
}

@media screen and (max-width: 480px) {
  .p-article__heading2 {
    font-size: 20px;
  }

  .p-article__heading3 {
    font-size: 16px;
  }

  .p-article__table-wrapper {
    margin: 16px -20px;
    padding: 0 20px;
  }
}

/* ==========================================================================
   記事ページ用：フッターを横幅いっぱいに
   ========================================================================== */

/* 記事ページでは .l-inner の幅制限を解除 */
body.page-template-page-article .e-footer-lp02 .l-inner,
body.single-article .e-footer-lp02 .l-inner {
  max-width: 100%;
}

/* 記事ページではサイドフォームがないため、フッターコンテナを中央配置 */
body.page-template-page-article .e-footer-lp02__container,
body.single-article .e-footer-lp02__container {
  max-width: 1408px;
  margin-left: auto;
  margin-right: auto;
}
