/*
Theme Name: SWELL CHILD
Template: swell
Description: SWELLの子テーマ — Carbonlink Research
Version: 2.3.0
*/

/* === Global font stack — align with media.css === */
:root {
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", -apple-system, "Segoe UI", "Roboto", sans-serif;
}
body,
.l-content,
.p-articleList,
.l-header,
.l-footer {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6,
.p-postList__title,
.c-pageTitle,
.p-postTitle {
  font-family: var(--serif);
}

/* SWELL header tweaks to match media palette */
.l-header {
  border-bottom: 1px solid #E4E7E4;
}
.l-footer {
  background: #0B1F17 !important;
  color: rgba(255,255,255,0.72);
}
.l-footer a { color: rgba(255,255,255,0.62); }
.l-footer a:hover { color: #20C997; }

/* SP head nav: SWELLのCSSモジュール sp-head-nav.css が enqueue されていない環境向けの補完。
   本来このモジュールは default で collapsed 表示するが、未読込のため全 viewport で
   素のリストが露出する。ハンバーガー (.p-spMenu) は別 drawer で稼働するため
   .l-header__spNav は完全に非表示にして問題ない。 */
.l-header__spNav { display: none !important; }

/* === Front page LPO redesign (v2.2 / 2026-05-25) === */

/* scroll-margin-top: 固定ヘッダー干渉対策。アンカー遷移時にセクション見出しが隠れない */
.cl-hero,
.cl-chip-section,
.cl-picks-section,
.cl-path-section,
.cl-cta-mid,
.cl-cat-section,
.cl-cta-final {
  scroll-margin-top: 90px;
}
@media (max-width: 959px) {
  .cl-hero,
  .cl-chip-section,
  .cl-picks-section,
  .cl-path-section,
  .cl-cta-mid,
  .cl-cat-section,
  .cl-cta-final {
    scroll-margin-top: 64px;
  }
}

/* Hero */
.cl-hero { text-align: center; }
.cl-hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #20C997;
  font-weight: 700;
  margin-bottom: 16px !important;
}
.cl-hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 48px) !important;
  font-weight: 700;
  line-height: 1.35;
  color: #1A1F1D;
  letter-spacing: 0.01em;
  margin: 0 0 20px !important;
}
.cl-hero-lede {
  font-size: clamp(15px, 2.2vw, 17px);
  color: #55615A;
  line-height: 1.85;
  max-width: 640px;
  margin: 0 auto 32px !important;
}
.cl-hero-cta {
  margin-bottom: 12px !important;
  gap: 12px;
}
.cl-hero-cta .wp-block-button__link {
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cl-hero-cta .wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,81,50,0.18);
}
.cl-hero-cta-note {
  font-size: 12.5px;
  color: #55615A;
  margin: 0 0 28px !important;
  letter-spacing: 0.02em;
}
.cl-hero-trust {
  font-size: 12px;
  color: #7A857F;
  margin-top: 8px !important;
}

/* Trust badges row — FV直下の信頼性表現 */
.cl-trust-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  max-width: 760px;
}
.cl-trust-badges .cl-tb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #D7E0DA;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1A1F1D;
  line-height: 1.4;
}
.cl-trust-badges .cl-tb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #20C997;
  flex-shrink: 0;
}
@media (max-width: 599px) {
  .cl-trust-badges {
    gap: 8px;
    margin-bottom: 20px !important;
  }
  .cl-trust-badges .cl-tb {
    font-size: 11.5px;
    padding: 6px 12px;
  }
}

/* Chip nav */
.cl-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cl-cat-chips .cl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #D7E0DA;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  color: #1A1F1D;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.cl-cat-chips .cl-chip:hover {
  border-color: #0F5132;
  color: #0F5132;
  transform: translateY(-1px);
}
.cl-cat-chips .cl-chip-label { font-weight: 600; }
.cl-cat-chips .cl-chip-count {
  font-size: 11px;
  color: #7A857F;
  background: #EEF3EF;
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 22px;
  text-align: center;
}

/* SPではチップを横スクロール風に詰める */
@media (max-width: 599px) {
  .cl-cat-chips {
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .cl-cat-chips .cl-chip {
    flex-shrink: 0;
    font-size: 13px;
    padding: 7px 14px;
  }
}

/* Section title (shared, override existing) */
.cl-section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 30px) !important;
  font-weight: 700;
  color: #1A1F1D;
  margin: 0 0 8px !important;
  letter-spacing: 0.01em;
}
.cl-section-sub {
  color: #55615A;
  font-size: 14px;
  margin: 0 auto 32px !important;
}

/* Editor's picks eyebrow — ゴールドアクセントの公式使用箇所 */
.cl-picks-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #B8923A !important;
  font-weight: 700;
  margin: 0 0 8px !important;
  text-transform: none;
}

/* Editor's picks */
.cl-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 900px) {
  .cl-picks { grid-template-columns: 1fr; }
}
.cl-pick {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #E4E7E4;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: #1A1F1D;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.cl-pick::before {
  content: "編集部おすすめ";
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #FFFFFF;
  background: #B8923A;
  padding: 3px 10px;
  border-radius: 4px;
}
.cl-pick:hover {
  border-color: #0F5132;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,81,50,0.10);
}
.cl-pick-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0F5132;
  background: #EEF3EF;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  align-self: flex-start;
  margin-top: 6px;
}
.cl-pick-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 12px;
  color: #1A1F1D;
}
.cl-pick-lede {
  font-size: 13.5px;
  color: #55615A;
  line-height: 1.75;
  margin: 0 0 18px;
  flex-grow: 1;
}
.cl-pick-cta {
  font-size: 13px;
  font-weight: 700;
  color: #0F5132;
  margin-top: auto;
}

/* Learning path */
.cl-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 900px) {
  .cl-path { grid-template-columns: 1fr; }
}
.cl-step {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #E4E7E4;
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  color: #1A1F1D;
  position: relative;
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cl-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0F5132, #20C997);
}
.cl-step:hover {
  border-color: #0F5132;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,81,50,0.10);
}
.cl-step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #B8923A;
  margin-bottom: 12px;
}
.cl-step-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1A1F1D;
}
.cl-step-desc {
  font-size: 14px;
  color: #55615A;
  line-height: 1.8;
  margin: 0 0 16px;
  flex-grow: 1;
}
.cl-step-meta {
  font-size: 12px;
  color: #7A857F;
  margin-bottom: 12px;
}
.cl-step-cta {
  font-size: 13px;
  font-weight: 700;
  color: #0F5132;
}
/* STEP 3 をCTAカードに昇格 */
.cl-step--cta {
  background: linear-gradient(135deg, #F6FBF8 0%, #E4F5F0 100%);
  border-color: #0F5132;
}
.cl-step--cta::before {
  height: 4px;
}
.cl-step-cta--accent {
  display: inline-block;
  background: #0F5132;
  color: #FFFFFF !important;
  padding: 10px 16px;
  border-radius: 6px;
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
  align-self: flex-start;
}
.cl-step--cta:hover .cl-step-cta--accent {
  background: #145A3A;
}

/* Mid CTA */
.cl-cta-mid { text-align: center; border-radius: 0; }
.cl-cta-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #20C997 !important;
  font-weight: 700;
  margin: 0 0 12px !important;
}
.cl-cta-mid h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 32px) !important;
  font-weight: 700;
  margin: 0 0 16px !important;
}
.cl-cta-mid p { font-size: 15px; line-height: 1.85; }
.cl-cta-note {
  font-size: 12.5px !important;
  color: #A8D8C4 !important;
  margin: 14px 0 0 !important;
  letter-spacing: 0.04em;
}

/* Category section heading underline (subtle accent) */
.cl-cat-section .cl-section-title {
  border-left: 4px solid #0F5132;
  padding-left: 14px;
  text-align: left;
}

/* Latest-posts WP block tweaks inside cat-section */
.cl-cat-section .wp-block-latest-posts {
  margin-top: 20px;
}
.cl-cat-section .wp-block-latest-posts.is-grid li {
  margin-bottom: 24px;
}
.cl-cat-section .wp-block-latest-posts__post-title {
  font-family: var(--serif);
  font-weight: 700;
  color: #1A1F1D;
  line-height: 1.6;
  font-size: 15px;
}
.cl-cat-section .wp-block-latest-posts__post-date {
  font-size: 11.5px;
  color: #9AA39E;
  letter-spacing: 0.02em;
}

/* Latest-posts: 1記事目を強調（カード型）+ 残りはテキストリスト風 */
.cl-cat-section .wp-block-latest-posts.is-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
}
@media (max-width: 900px) {
  .cl-cat-section .wp-block-latest-posts.is-grid {
    grid-template-columns: 1fr;
  }
}
.cl-cat-section .wp-block-latest-posts.is-grid > li {
  background: #FFFFFF;
  border: 1px solid #E4E7E4;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  margin: 0 !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cl-cat-section .wp-block-latest-posts.is-grid > li:hover {
  border-color: #0F5132;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,81,50,0.08);
}
.cl-cat-section .wp-block-latest-posts__featured-image {
  width: 100%;
  margin: 0;
}
.cl-cat-section .wp-block-latest-posts__featured-image a,
.cl-cat-section .wp-block-latest-posts__featured-image {
  display: block;
}
.cl-cat-section .wp-block-latest-posts__featured-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  max-width: 100% !important;
}
/* Card without featured image: keep a placeholder spacer for visual rhythm */
.cl-cat-section .wp-block-latest-posts.is-grid > li:not(:has(.wp-block-latest-posts__featured-image)) {
  background: linear-gradient(180deg, #F6F7F5 0%, #FFFFFF 80px) #FFFFFF;
}
.cl-cat-section .wp-block-latest-posts.is-grid > li .wp-block-latest-posts__post-title {
  display: block;
  padding: 14px 16px 6px;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  color: #1A1F1D !important;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--serif);
}
.cl-cat-section .wp-block-latest-posts.is-grid > li:hover .wp-block-latest-posts__post-title {
  color: #0F5132 !important;
}
.cl-cat-section .wp-block-latest-posts.is-grid > li .wp-block-latest-posts__post-date {
  padding: 0 16px 16px;
  display: block;
  font-size: 11.5px !important;
  color: #9AA39E !important;
  margin-top: auto;
}
/* Card without thumbnail: add top padding so title isn't flush to top */
.cl-cat-section .wp-block-latest-posts.is-grid > li:not(:has(.wp-block-latest-posts__featured-image)) .wp-block-latest-posts__post-title {
  padding-top: 22px;
}

/* Final CTA — multi-choice */
.cl-cta-final { text-align: center; }
.cl-cta-final h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 32px) !important;
  font-weight: 700;
  margin: 0 0 16px !important;
}
.cl-cta-final p { font-size: 15px; line-height: 1.85; }

.cl-final-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 900px) {
  .cl-final-choices { grid-template-columns: 1fr; }
}
.cl-final-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 20px 18px;
  text-decoration: none;
  color: #FFFFFF;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.cl-final-choice:hover {
  background: rgba(32,201,151,0.18);
  border-color: #20C997;
  transform: translateY(-2px);
}
.cl-final-choice-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #20C997;
  margin-bottom: 4px;
}
.cl-final-choice-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.5;
}
.cl-final-choice-meta {
  font-size: 12px;
  color: #A8D8C4;
  margin-top: 2px;
}

/* Hide SWELL main visual on front page */
body.home .p-mainVisual,
body.page-id-143 .p-mainVisual { display: none !important; }

/* === Neutralize SWELL post_content heading hijack for cl-* sections === */
.post_content .cl-section-title,
.post_content .cl-hero-title,
.post_content .cl-pick-title,
.post_content .cl-step-title,
.post_content .cl-final-choice-title,
.post_content .cl-cta-mid h2,
.post_content .cl-cta-final h2 {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
}
.post_content .cl-section-title::before,
.post_content .cl-hero-title::before,
.post_content .cl-pick-title::before,
.post_content .cl-step-title::before,
.post_content .cl-final-choice-title::before,
.post_content .cl-cta-mid h2::before,
.post_content .cl-cta-final h2::before {
  content: none !important;
  background: none !important;
  border: none !important;
  height: 0 !important;
}
.post_content .cl-section-title { color: #1A1F1D !important; }
.post_content .cl-hero-title { color: #1A1F1D !important; }
.post_content .cl-pick-title { color: #1A1F1D !important; }
.post_content .cl-step-title { color: #1A1F1D !important; }
.post_content .cl-cta-mid h2,
.post_content .cl-cta-final h2 { color: #FFFFFF !important; }
.post_content .cl-cat-section .cl-section-title {
  border-left: 4px solid #0F5132 !important;
  padding-left: 14px !important;
}
.post_content .cl-pick h3,
.post_content .cl-step h3 { padding: 0 !important; }

/* Pick の ::before "編集部おすすめ" バッジは neutralize 対象外（::before content 個別override） */
.post_content .cl-pick::before {
  content: "編集部おすすめ" !important;
  position: absolute !important;
  top: -10px !important;
  left: 16px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  color: #FFFFFF !important;
  background: #B8923A !important;
  padding: 3px 10px !important;
  border-radius: 4px !important;
  height: auto !important;
  border: none !important;
}
.post_content .cl-step::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #0F5132, #20C997) !important;
}
.post_content .cl-step--cta::before {
  height: 4px !important;
}

/* Full-width: hide sidebar on front page */
#body_wrap.home #sidebar,
#body_wrap.home .l-sidebar { display: none !important; }
#body_wrap.home .l-mainContent { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; }
#body_wrap.home .post_content { max-width: 100% !important; }

/* SP back-to-top button: 56px tap target に抑える + 下余白追加（記事/CTA重なり対策） */
@media (max-width: 599px) {
  .p-pageTopBtn,
  .c-pageTopBtn {
    width: 48px !important;
    height: 48px !important;
    right: 12px !important;
    bottom: 16px !important;
  }
}
