/* LP4 - Consultant Profile Landing Page (2025) */

/* 変数（デフォルト） */
:root {
  --page-bg: #ffffff;           /* 画面全体 */
  --content-bg: #ffffff;        /* コンテンツ領域 */
  --main-text: #333333;
  --heading-text: #0A0A0A;
  --link-text: #0A66C2;
  --accent: #0A66C2;
  --banner-bg: #f5f7fb;
  --banner-border: #e6e9ef;
  --bg-name-color: rgba(0,0,0,0.06); /* 薄い背景ネーム色 */
}

/* テーマプリセット */
body.theme-color-intellectual {
  --main-text: #2B2B2B;
  --heading-text: #0A0A0A;
  --link-text: #003366;
  --accent: #003366;
  --banner-bg: #E6ECF3;
  --banner-border: #B0BEC5;
}
body.theme-color-warm {
  --main-text: #565656;
  --heading-text: #3C3C3C;
  --link-text: #6B705C;
  --accent: #6B705C;
  --banner-bg: #F0EDE5;
  --banner-border: #D6D2C4;
}

/* 全体背景 */
html, body {
  background: var(--page-bg);
}

/* コンテンツラッパー */
#lp4-wrapper,
.lp4-wrapper {
  background-color: var(--content-bg);
  color: var(--main-text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.85;
  overflow-x: clip;
}

/* タイポ */
#lp4-wrapper h1,
#lp4-wrapper h2,
#lp4-wrapper h3 {
  color: var(--heading-text);
  line-height: 1.25;
  letter-spacing: .02em;
}

#lp4-wrapper a {
  color: var(--link-text);
  text-decoration: none;
  transition: transform .25s ease, opacity .25s ease;
}
#lp4-wrapper a:hover { opacity: .92; }
#lp4-wrapper .text-link { background: none; color: var(--link-text); padding: 0; }

/* ボタン用リンクは個別クラスで上書き */
#lp4-wrapper a.fumi-btn {
  display: inline-block;
  background: linear-gradient(135deg, #c0555a 0%, #e07878 100%);
  color: #fff;
  padding: 16px 36px 20px;
  border-radius: 50px;
  box-shadow: 0 6px 18px rgba(192,85,90,.30);
}
#lp4-wrapper a.fumi-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(192,85,90,.40);
  opacity: 1;
}

/* ヒーロー（ユーザー本文側の .hero/.lp4-hero にも効く汎用） */
.lp4-hero, .hero {
  position: relative;
  padding: min(8vw, 96px) 24px;
}
.lp4-hero-inner { 
  max-width: 1140px; margin: 0 auto; 
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px;
}
.lp4-hero-text { align-self: center; }
.lp4-title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; }
.lp4-catch { margin-top: 12px; font-size: clamp(16px, 1.4vw, 18px); color: #666; }
.lp4-hero-photo img {
  width: 100%; max-width: 420px; border-radius: 16px;
  box-shadow: 0 10px 32px rgba(0,0,0,.12);
  display: block; margin-inline: auto;
}

/* About / Journey など本文テンプレのセクションに対応 */
section {
  padding: min(7vw, 80px) 24px;
}
section > .inner,
.lp4-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Aboutセクション共通 */
.about-grid {
  display: flex;
  flex-wrap: wrap;         /* 横幅が狭い場合は折り返し */
  justify-content: center; /* デフォルト中央寄せ */
  gap: 0;                  /* marginで間隔を作るので0 */
}

/* 個別カード枠 */
.about-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  min-width: 300px;
  width: calc(100% - 24px); /* 横余白用 */
  margin: 0 12px 24px;      /* 横間隔と縦間隔を確保 */
}

/* PC以上は横並び、縦中央揃え */
@media (min-width: 1024px) {
  .about-grid {
    flex-direction: row;     /* 横並び */
    justify-content: center;
    align-items: center;      /* 縦中央揃え */
  }

  .about-card {
    flex: 0 0 48%;           /* 横に2枚並ぶ */
    max-width: 500px;
    margin-bottom: 0;         /* 横並びなので下マージン不要 */
  }
}

/* タブレット以下で縦並び */
@media (max-width: 1023px) {
  .about-card {
    width: 100%;
    margin: 0 0 16px; /* 下マージンで縦間隔確保 */
  }
}

.about-title {
  margin: 0 0 12px;
  font-size: 1.1em;
  color: #0057b8;
}

/* プロフィールブロック全体 */
.profile-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* 中央基準で左右に配置 */
  gap: 24px; /* PC時のテキストと写真の距離 */
  max-width: 640px;
  margin: 0 auto 48px;
}

.profile-text {
  flex: 1 1 300px;
  min-width: 280px;
}

/* 名前・ふりがな部分 */
.name-wrapper {
  display: block;
  text-align: left; /* 左寄せ */
  margin-right: 16px; /* 写真との距離を微調整 */
}

.profile-name {
  font-size: 2.8em;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  text-align: left;
  margin-bottom: 4px; /* 氏名とふりがなの間を少しだけ確保 */
}

.profile-furigana {
  font-size: 0.95em;
  color: #888;
  margin-top: 2px;
  text-align: left; /* 氏名の下に左揃え */
}

/* プロフィール写真 */
.profile-photo {
  flex: 0 0 auto;
  margin-left: 0; /* ネガティブマージンを削除 */
}

.profile-photo img {
  width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  .profile-photo img {
    width: 140px;
  }
}


/* スマホ対応 */
@media (max-width: 600px) {
  .profile-block {
    flex-direction: column;
    align-items: center;
    gap: 8px; /* テキストと写真の距離をぐっと縮める */
  }

  .name-wrapper {
    text-align: center; /* スマホでは中央揃え */
    margin-right: 0;
    margin-bottom: 4px; /* 下余白を最小化 */
  }

  .profile-name {
    text-align: center;
    margin-bottom: 2px; /* 氏名とふりがなの余白を圧縮 */
  }

  .profile-furigana {
    margin-top: 2px;
    text-align: center;
  }

  .profile-photo {
    margin-top: 4px; /* 写真と文字の間を最小限に */
  }
}

/* プロフィール概要ボックス */
.profile-summary {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: left;
}

.summary-title {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.summary-description {
  font-size: 1em;
  color: #444;
  line-height: 1.7;
  margin: 0;
}

/* 実績・声・CTAの基本（既存のあなたのCSSと競合しないよう接頭辞 lp4- を極力付与） */
.lp4-stats { display:grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.lp4-stat-item { text-align:center; background: #fff; border: 1px solid var(--banner-border); border-radius: 12px; padding: 24px; }
.lp4-stat-number { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--accent); }

.lp4-banner {
  background: var(--banner-bg); border: 1px solid var(--banner-border);
  padding: 1.2em; margin: 2em 0; border-radius: 12px;
}

/* ▼▼ 要件：About と Journey 間の"薄い背景ネーム" ▼▼ */

/* ラッパー：aboutの直後に挿入される帯エリア */
#lp4-bg-name {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* journey の margin-top 分を吸収しつつ bg_text を見せる高さ */
  height: clamp(120px, 20vw, 260px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 0;
  margin: 0;
  padding: 0;
  /* フッター等への意図しない表示を防ぐ */
  isolation: isolate;
}

/* bg_text 本体 */
#lp4-bg-name .lp4-bg-name-text {
  position: relative;         /* absoluteをやめてflexで自然配置 */
  right: 5%;
  font-weight: 900;
  letter-spacing: .10em;
  color: var(--bg-name-color);
  font-size: clamp(52px, 13vw, 200px);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  /* 下からフワッと見えるアニメーション */
  animation: bgNameFadeIn 1.2s cubic-bezier(.22,1,.36,1) both;
}

@keyframes bgNameFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

/* 背景ネームの直後セクションは前面へ */
#lp4-bg-name + * { position: relative; z-index: 1; }

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  #lp4-bg-name .lp4-bg-name-text { animation: none; }
}

/* クライアントロゴセクションのスタイル設定 */
/* 横並びのロゴを美しく配置し、余白・揃え・動き・視認性を最適化 */

.client-logos {
  gap: 16px;                     /* 画像同士の間隔を設定 */
  align-items: center;          /* 高さが異なる画像でも中央揃えに */
  justify-content: center;      /* PCでも中央揃えで美しく */
  background-color: #f9f9f9;    /* 明るい背景でロゴが映える */
  padding: 24px 0;              /* 上下に余白を追加し、セクション感を演出 */
}

/* ロゴ画像のスタイル設定 */
/* サイズ統一・比率保持・余白・ホバー演出を含む */

.client-logos img {
  max-height: 100px;             /* 小さい画像に合わせた高さの上限を設定 */
  height: auto;                 /* 自動で比率を保ったまま拡大・縮小 */
  width: auto;                  /* 幅も自動で調整（比率維持） */
  object-fit: contain;
  margin: 0 8px 12px 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ホバー時の演出 */
/* ブランド感と動きを演出し、視覚的な魅力を強化 */

.client-logos img:hover {
  transform: scale(1.05);       /* 少し拡大して注目を集める */
  opacity: 0.9;                 /* わずかに透明度を下げてニュアンスを加える */
}

/* レスポンシブ対応（スマホ・タブレット） */
/* 折り返し・中央揃え・余白調整で視認性を維持 */

@media (max-width: 768px) {
  .client-logos {
    flex-wrap: wrap;            /* 横並びを折り返し可能に */
    justify-content: center;    /* 折り返し時も中央揃えを維持 */
  }

  .client-logos img {
    margin-bottom: 12px;        /* 縦並び時の下余白を強調 */
  }
}

/* CTAセクション全体 */
.lp4-cta,
.cta {
  text-align: center;
  padding: min(8vw, 88px) 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 16px;
  margin: 56px auto;
  max-width: 1100px;
}

/* CTA見出し */
.lp4-cta h3,
.cta h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-bottom: 18px;
}

/* 汎用ボタン（サブ用途） */
.lp4-btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lp4-btn:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

/* CTA送信ボタン（主役） */
.wpcf7 input.entry-button {
  display: block;
  margin: 40px auto 0 auto; /* 上に余白＋中央揃え */
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  font-size: 1.1em;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(to right, #6c6f73, #8a8d91); /* スモーキーグレー系 */
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
}

/* CTA送信ボタン：ホバー演出 */
input.entry-button:hover {
  background: linear-gradient(to right, #8a8d91, #6c6f73);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* フォーム構造 */
.form-group {
  margin-bottom: 24px;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* アニメーション（reduce-motion対応） */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* レスポンシブ */
@media (max-width: 1024px){
  .lp4-hero-inner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 768px){
  .lp4-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px){
  .lp4-stats { grid-template-columns: 1fr; }
}

/* ===== Cocoon レイアウト上書き（フルブリード・中央表示） ===== */
body.page-template-page-lp4 .entry-content,
body.page-template-page-lp4 .singular-entry-content,
body.page-template-page-lp4 .content-wrap,
body.page-template-page-lp4 .entry,
body.page-template-page-lp4 #content,
body.page-template-page-lp4 .wrap,
body.page-template-page-lp4 #container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}

body.page-template-page-lp4 #lp4-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* サイドバーを非表示（LP用） */
body.page-template-page-lp4 #sidebar,
body.page-template-page-lp4 .sidebar {
  display: none !important;
}

/* ===================================================
   LP4 パンギャラリー フェードスライドショー (2025)
   =================================================== */

/* ラッパー */
#lp4-pan-gallery {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 0;
  padding: 64px 24px;
  box-sizing: border-box;
}

/* セクション見出しエリア */
#lp4-pan-gallery .gallery-heading {
  text-align: center;
  margin-bottom: 36px;
}
#lp4-pan-gallery .gallery-heading h2 {
  font-size: clamp(1.5em, 2.4vw, 2em);
  font-weight: 800;
  color: #b84a50;
  margin-bottom: 8px;
}
#lp4-pan-gallery .gallery-heading p {
  font-size: 1em;
  color: #888;
}

/* スライドステージ（16:9固定） */
#lp4-pan-gallery .gallery-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #f5eded;
  box-shadow:
    0 2px 6px rgba(192,85,90,.08),
    0 8px 32px rgba(192,85,90,.13),
    0 24px 64px rgba(0,0,0,.08);
}

/* 各スライド */
#lp4-pan-gallery .gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(.4,0,.2,1);
  will-change: opacity;
}
#lp4-pan-gallery .gallery-slide.is-active {
  opacity: 1;
}

/* スライド内画像 */
#lp4-pan-gallery .gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Ken Burns 効果（静かな奥行き感） */
  animation: lp4GalleryKenBurns 8s ease-in-out infinite alternate;
}
/* Ken Burnsを各スライドでずらす */
#lp4-pan-gallery .gallery-slide:nth-child(odd)  img { animation-direction: alternate; }
#lp4-pan-gallery .gallery-slide:nth-child(even) img { animation-direction: alternate-reverse; }

@keyframes lp4GalleryKenBurns {
  from { transform: scale(1.00) translate(0,    0   ); }
  to   { transform: scale(1.04) translate(.6%, .4%); }
}

/* ドットインジケーター */
#lp4-pan-gallery .gallery-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
#lp4-pan-gallery .gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0c8c8;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .35s ease, transform .35s ease;
  outline: none;
}
#lp4-pan-gallery .gallery-dot:focus-visible {
  box-shadow: 0 0 0 3px rgba(192,85,90,.4);
}
#lp4-pan-gallery .gallery-dot.is-active {
  background: #c0555a;
  transform: scale(1.35);
}

/* キャプション（将来的に画像ごとalt活用） */
#lp4-pan-gallery .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px 18px;
  background: linear-gradient(to top, rgba(80,20,24,.55) 0%, transparent 100%);
  color: #fff;
  font-size: .95em;
  letter-spacing: .04em;
  border-radius: 0 0 18px 18px;
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
#lp4-pan-gallery .gallery-slide.is-active .gallery-caption {
  opacity: 1;
}

/* セクション区切りライン */
#lp4-pan-gallery .gallery-divider {
  width: 80px;
  height: 2px;
  margin: 40px auto 0;
  background: linear-gradient(to right, #f7b8b8, #c0555a);
  border-radius: 1px;
}

/* reduce-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  #lp4-pan-gallery .gallery-slide img {
    animation: none;
  }
  #lp4-pan-gallery .gallery-slide {
    transition: opacity .1s;
  }
}

/* レスポンシブ余白調整 */
@media (max-width: 600px) {
  #lp4-pan-gallery {
    padding: 48px 16px;
  }
  #lp4-pan-gallery .gallery-heading h2 {
    font-size: 1.4em;
  }
}

  /* 人生がふくらむセクション */
.fukuramu-section {
  background: linear-gradient(160deg, #9e3540 0%, #c0555a 50%, #d4706a 100%);
  color: #fff;
  border-radius: 20px;
  padding: 56px 40px;
  margin: 48px 0;
  box-shadow: 0 10px 40px rgba(160,50,55,.22);
  position: relative;
  overflow: hidden;
}
.fukuramu-section::before {
  content: "🍞";
  position: absolute;
  font-size: 140px;
  opacity: .06;
  right: -12px;
  top: -24px;
  transform: rotate(-15deg);
  pointer-events: none;
}
.fukuramu-section h2 { color: #ffe0a0; font-size: 1.9em; margin-bottom: 6px; }
.fukuramu-section h3 {
  color: #ffc8b0;
  font-size: 1.2em;
  margin: 32px 0 12px;
  border-left: 3px solid #f5a07a;
  padding-left: 12px;
}
.fukuramu-section p { color: #fdeae8; margin-bottom: 12px; }
.fukuramu-checkitem {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 8px 0; color: #fdeae8;
}

.fukuramu-checkitem::before {
  content: "✔";
  color: #ffc8b0;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

  .fukuramu-highlight {
    background: rgba(255,224,160,.12);
    border: 1px solid rgba(255,224,160,.30);
    border-radius: 12px;
    padding: 22px 26px;
    margin: 24px 0;
    color: #fff5ec;
    font-size: 1.05em;
    line-height: 1.85;
  }
  .fukuramu-cta-text {
    text-align: center;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.18);
  }
  .fukuramu-cta-text p { font-size: 1.1em; color: #ffe8d8; font-weight: 600; margin-bottom: 12px; }
  .fukuramu-cta-text .big-quote {
    font-size: 1.5em; font-weight: 800;
    color: #ffe0a0; line-height: 1.65;
    display: block; margin-bottom: 10px;
  }

  @media (max-width:600px){
    .fukuramu-section { padding: 36px 20px; }
    .fukuramu-section h2 { font-size: 1.4em; }
  }

/* evidence-table：PC表示 */
  .evidence-table--pc { display: table; }
  /* evidence-cards：スマホ用カード（デフォルト非表示） */
  .evidence-cards { display: none; }

  @media (max-width: 600px) {
    .evidence-table--pc { display: none; }
    .evidence-cards { display: block; }
  }

  .evidence-card {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #f0dada;
  }
  .evidence-card__cat {
    background: #fdeaea;
    color: #8a3035;
    font-weight: 700;
    font-size: .95em;
    padding: 10px 16px;
    border-bottom: 1px solid #f0c8c8;
  }
  .evidence-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .evidence-card__list li {
    padding: 12px 16px;
    border-bottom: 1px solid #fdf0f0;
    line-height: 1.7;
  }
  .evidence-card__list li:last-child { border-bottom: none; }
  .evidence-card__text {
    display: block;
    color: #444;
    font-size: .93em;
    margin-bottom: 6px;
  }
  .evidence-card__link {
    display: inline-block;
    font-size: .85em;
    color: #b84a50 !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-decoration: underline;
  }

/* ============================================================
   スマホ最適化（max-width: 600px）
   ============================================================ */
@media (max-width: 600px) {

  /* ---- アテンションバー ---- */
  aside[role="banner"] h2 {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  aside[role="banner"] p {
    font-size: 13px !important;
  }

  /* ---- Hero ---- */
  #hero {
    padding: 40px 16px !important;
  }
  #hero h1 {
    font-size: 1.6em !important;
    line-height: 1.5 !important;
  }
  #hero .hero-subtitle {
    font-size: 1em !important;
  }
  #hero .fumi-btn {
    font-size: .95em !important;
    padding: 14px 24px 16px !important;
    width: 100%;
    box-sizing: border-box;
    display: block !important;
    text-align: center;
    margin-bottom: 32px !important;
  }

  /* ---- プロフィールカード ---- */
  #hero > div > div[style*="linear-gradient"] {
    padding: 32px 16px !important;
  }
  .name-block {
    flex: 1 1 100% !important;
    min-width: unset !important;
    margin-bottom: 16px !important;
  }
  .name-wrapper {
    text-align: center !important;
  }
  .profile-name {
    font-size: 2.2em !important;
    text-align: center !important;
  }
  .profile-furigana {
    text-align: center !important;
  }
  .profile-photo {
    flex: 1 1 100% !important;
    min-width: unset !important;
    text-align: center !important;
  }
  .profile-photo img {
    max-width: 220px !important;
    border-radius: 10px !important;
  }

  /* 専門領域リスト */
  #hero div[style*="gap: 24px"] {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
    padding-left: 12px;
  }

  /* ---- About ---- */
  #about {
    padding: 40px 16px 16px !important;
    margin-bottom: 60px !important;
  }
  #about h2 {
    font-size: 1.4em !important;
  }
  .about-card {
    padding: 20px 16px !important;
  }
  .meta-term {
    min-width: 4em !important;
    font-size: .95em;
  }
  #about > div > p {
    font-size: .97em !important;
    padding: 0 4px;
  }

  /* ---- Journey ---- */
  #journey {
    margin-top: 80px !important;
    height: 320px !important;
  }
  #journey h2 {
    font-size: 1.5em !important;
  }
  #journey p {
    font-size: 1em !important;
  }

  /* ---- Story ---- */
  #story {
    padding: 48px 16px !important;
  }
  #story h2 {
    font-size: 1.5em !important;
  }
  .story-card {
    padding: 20px 16px !important;
  }
  .story-card h3 {
    font-size: 1.1em !important;
  }
  .story-card p {
    font-size: .97em !important;
  }

  /* ---- 人生がふくらむ（fukuramu）---- */
  #why-bread {
    padding: 32px 12px !important;
  }
  .fukuramu-section {
    padding: 32px 18px !important;
    border-radius: 14px !important;
  }
  .fukuramu-section h2 {
    font-size: 1.45em !important;
  }
  .fukuramu-section > p[style*="1.1em"] {
    font-size: 1em !important;
  }
  .fukuramu-section h3 {
    font-size: 1.05em !important;
    margin: 24px 0 10px !important;
  }
  .fukuramu-section p {
    font-size: .97em !important;
    line-height: 1.85 !important;
  }
  .fukuramu-highlight {
    padding: 16px 14px !important;
    font-size: .97em !important;
    line-height: 1.8 !important;
  }
  .fukuramu-checkitem {
    font-size: .97em !important;
    gap: 8px !important;
    padding: 2px 0 !important;
  }
  .fukuramu-cta-text {
    padding-top: 24px !important;
    margin-top: 28px !important;
  }
  .fukuramu-cta-text p {
    font-size: 1em !important;
  }
  .big-quote {
    font-size: 1.2em !important;
    line-height: 1.6 !important;
  }

  /* ---- 研究・体験報告エリア ---- */
  #why-bread > div > div[style*="fdf7f7"] {
    padding: 20px 14px !important;
    border-radius: 10px !important;
  }
  #why-bread > div > div[style*="fdf7f7"] h3 {
    font-size: 1em !important;
  }
  #why-bread > div > div[style*="fdf7f7"] > p {
    font-size: .88em !important;
  }
  .evidence-card__cat {
    font-size: .9em !important;
    padding: 8px 14px !important;
  }
  .evidence-card__text {
    font-size: .88em !important;
  }
  .evidence-card__link {
    font-size: .82em !important;
  }

  /* ---- Activities ---- */
  #activities {
    padding: 40px 16px !important;
  }
  #activities h2 {
    font-size: 1.5em !important;
  }
  #activities div[style*="border-radius: 16px"] {
    padding: 18px 14px !important;
  }
  #activities h3 {
    font-size: 1em !important;
  }
  #activities p {
    font-size: .97em !important;
  }

  /* ---- Services ---- */
  #services {
    padding: 40px 16px !important;
  }
  #services h2 {
    font-size: 1.3em !important;
    line-height: 1.5 !important;
  }
  #services > div > p {
    font-size: .97em !important;
  }
  .support-table td {
    padding: 12px 14px !important;
    font-size: .95em !important;
  }

  /* ---- Message ---- */
  #message {
    padding: 48px 16px !important;
  }
  #message h2 {
    font-size: 1.5em !important;
    margin-bottom: 28px !important;
  }
  #message div[style*="background: #fff"] ,
  #message div[style*="background: #fff9f8"] {
    padding: 24px 16px !important;
  }
  #message p {
    font-size: .97em !important;
  }
  #message h3 {
    font-size: 1.1em !important;
  }
  #message h4 {
    font-size: 1em !important;
  }
  /* fumi-listのスマホ余白 */
  .fumi-list li {
    padding: 8px 0 8px 30px !important;
    font-size: .97em !important;
  }
  /* メッセージ下部グラデーションボックス */
  #message div[style*="linear-gradient(135deg,#b84a50"] {
    padding: 32px 18px !important;
  }
  #message div[style*="linear-gradient(135deg,#b84a50"] p {
    font-size: .97em !important;
  }
  #message div[style*="linear-gradient(135deg,#b84a50"] p[style*="1.2em"] {
    font-size: 1.05em !important;
  }
  /* blockquote */
  #message blockquote {
    padding: 14px 14px !important;
    font-size: .95em !important;
  }

  /* ---- Human Touch ---- */
  #human-touch {
    padding: 40px 16px !important;
  }
  #human-touch h2 {
    font-size: 1.4em !important;
  }
  #human-touch div[style*="border-radius: 14px"] {
    padding: 16px 14px !important;
  }
  #human-touch p {
    font-size: .97em !important;
  }

  /* ---- FAQ ---- */
  #faq {
    padding: 40px 16px !important;
  }
  #faq h2 {
    font-size: 1.4em !important;
  }
  #faq div[style*="border-radius: 16px"] {
    padding: 18px 14px !important;
  }
  #faq p[style*="font-weight: bold"] {
    font-size: .97em !important;
  }
  #faq p[style*="margin: 0"] {
    font-size: .95em !important;
  }

  /* ---- CTA ---- */
  #cta {
    padding: 48px 12px !important;
  }
  #cta > div {
    padding: 36px 18px !important;
    border-radius: 14px !important;
  }
  #cta > div > div[id="cta-title"] {
    font-size: 1.45em !important;
  }
  #cta p[style*="1.05em"] {
    font-size: .97em !important;
  }
  #cta p[style*="1em"][style*="ffc8b8"] {
    font-size: .95em !important;
  }
  /* For Youブロック */
  #cta div[style*="backdrop-filter"] {
    padding: 28px 18px !important;
    border-radius: 14px !important;
  }
  #cta div[style*="backdrop-filter"] p[style*="1.55em"] {
    font-size: 1.25em !important;
    line-height: 1.6 !important;
  }
  #cta div[style*="backdrop-filter"] p[style*="1.05em"] {
    font-size: 1em !important;
  }
  /* フォームエリア */
  #cta div[style*="background: #fff"] {
    padding: 20px 14px 24px !important;
    border-radius: 10px !important;
  }
  #cta div[style*="background: #fff"] > p {
    font-size: .95em !important;
  }
  /* 注記テキスト */
  #cta > div > p[style*="margin-top: 32px"] {
    font-size: .85em !important;
    padding: 0 8px;
  }

  /* ---- Footer ---- */
  footer.footer {
    padding: 24px 16px !important;
    font-size: .85em !important;
  }

  /* ---- 共通：コンテナ横幅 ---- */
  .container {
    padding: 0 16px !important;
  }

  /* ---- 共通：section 縦余白の引き締め ---- */
  section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* ---- 共通：画像の角丸縮小 ---- */
  img[style*="border-radius: 16px"],
  img[style*="border-radius: 14px"] {
    border-radius: 10px !important;
  }
}

/* ---- 375px以下（iPhone SE等の極小端末）追加調整 ---- */
@media (max-width: 375px) {
  #hero h1 {
    font-size: 1.4em !important;
  }
  .profile-name {
    font-size: 1.9em !important;
  }
  .fukuramu-section h2 {
    font-size: 1.25em !important;
  }
  .big-quote {
    font-size: 1.1em !important;
  }
  #cta div[style*="backdrop-filter"] p[style*="1.55em"],
  #cta div[style*="backdrop-filter"] p[style*="1.25em"] {
    font-size: 1.1em !important;
  }
  .support-table td {
    font-size: .88em !important;
    padding: 10px 10px !important;
  }
}

/* ============================================================
   固定ページ html（Hideo.S）専用 スマホ改修
   ============================================================ */

/* ---- 改修１：about-title の「／」後で改行 ---- */
@media (max-width: 600px) {
  #about-title {
    font-size: 1.35em !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    /* 「／」の直後で折り返す */
    /* 全角スラッシュ（U+FF0F）・半角スラッシュ両対応 */
  }
}

/* ---- 改修２：hero-subtitle「新しい」から改行 ---- */
/* About セクション内の「人材とAIの力で、新しい成長を創出する。」に対応 */
@media (max-width: 600px) {
  #about .meta-list > p[style],
  #about p[style*="1.2em"] {
    font-size: 1.05em !important;
    word-break: keep-all !important;
  }
}

/* ---- 改修３：journeyセクション 上部の重なり・接続感を解消 ---- */
@media screen {
  /* #lp4-bg-name が margin-top を吸収するため journey は 0 に */
  section#journey.journey {
    margin-top: 0 !important;
  }
  section#journey .subgrid {
    gap: 48px !important;
  }
}

@media (max-width: 600px) {
  section#journey.journey {
    margin-top: 0 !important;
    padding-top: 48px !important;
    padding-bottom: 64px !important;
  }
  section#journey .subgrid {
    gap: 32px !important;
  }
  section#journey .subgrid > div {
    padding: 24px 16px !important;
    border-radius: 10px !important;
  }
  section#journey h3 {
    font-size: 1.2em !important;
    margin-bottom: 12px !important;
  }
  section#journey h4 {
    font-size: 1em !important;
    margin-top: 18px !important;
  }
  section#journey ul {
    font-size: 0.93em !important;
    line-height: 1.75 !important;
  }
}

/* ---- insightsバッジカード スマホで中央揃え ---- */
@media (max-width: 600px) {
  /* バッジ一覧コンテナを縦1列・中央揃えに強制 */
  section#insights > .container > div[style*="flex"] {
    flex-direction: column !important;
    align-items: center !important;
  }

  /* 各バッジカードを幅100%・中央揃えに */
  section#insights > .container > div[style*="flex"] > div {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
  }
}

/* ============================================================
   JOURNEY & STORY
   ============================================================ */

/* ----------------------------------------------------------
   1. JOURNEY（固定ページ html 1）— キャリアストーリー
      白地に上品なカード構成
   ---------------------------------------------------------- */

section#journey.journey {
  background: #fafafa;
  border-top: none !important;
  padding: 80px 24px 96px !important;
}

/* セクション見出し */
section#journey #journey-title {
  font-size: clamp(1.7em, 3.2vw, 2.2em);
  font-weight: 800;
  letter-spacing: .06em;
  color: #111;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

/* グラデーションライン（見出し直下） */
section#journey > .container > div[style*="gradient"] {
  width: 64px !important;
  height: 3px !important;
  background: linear-gradient(to right, #bbb, #888, #555) !important;
  border-radius: 2px !important;
  margin: 0 auto 56px !important;
}

/* 実績カード */
section#journey .subgrid > div:first-child {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 40px 44px !important;
  box-shadow:
    0 2px 4px rgba(0,0,0,.04),
    0 8px 24px rgba(0,0,0,.07),
    0 24px 56px rgba(0,0,0,.05) !important;
  border-top: 4px solid #222 !important;
  position: relative;
  overflow: hidden;
}
section#journey .subgrid > div:first-child::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #111 0%, #555 50%, #999 100%);
}

section#journey .subgrid > div:first-child h3 {
  font-size: 1.35em !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  color: #111 !important;
  margin-bottom: 28px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid #eee !important;
}

section#journey .subgrid > div:first-child h4 {
  font-size: .88em !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  color: #888 !important;
  margin-top: 28px !important;
  margin-bottom: 10px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px dashed #e0e0e0 !important;
}

section#journey .subgrid > div:first-child ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}
section#journey .subgrid > div:first-child ul li {
  padding: 7px 0 7px 22px !important;
  position: relative !important;
  font-size: .95em !important;
  color: #444 !important;
  line-height: 1.7 !important;
  border-bottom: 1px solid #f4f4f4 !important;
}
section#journey .subgrid > div:first-child ul li:last-child {
  border-bottom: none !important;
}
section#journey .subgrid > div:first-child ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #aaa;
  font-weight: 700;
}

/* ストーリーカード */
section#journey .subgrid > div:last-child {
  background: linear-gradient(145deg, #111 0%, #2a2a2a 100%) !important;
  border-radius: 20px !important;
  padding: 48px 44px !important;
  box-shadow:
    0 8px 32px rgba(0,0,0,.18),
    0 24px 64px rgba(0,0,0,.12) !important;
  color: #fff !important;
  position: relative;
  overflow: hidden;
}
section#journey .subgrid > div:last-child::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
}

section#journey .subgrid > div:last-child h3 {
  font-size: clamp(1.3em, 2.4vw, 1.7em) !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin-bottom: 28px !important;
  letter-spacing: .03em !important;
  line-height: 1.3 !important;
  position: relative;
  padding-bottom: 20px;
}
section#journey .subgrid > div:last-child h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: linear-gradient(to right, #fff, rgba(255,255,255,.3));
  border-radius: 2px;
}

section#journey .subgrid > div:last-child p {
  color: rgba(255,255,255,.82) !important;
  font-size: 1em !important;
  line-height: 1.9 !important;
  margin-bottom: 20px !important;
}
section#journey .subgrid > div:last-child p strong {
  color: #fff !important;
  font-weight: 700 !important;
}
section#journey .subgrid > div:last-child p:last-child {
  margin-bottom: 0 !important;
}

/* スマホ対応 */
@media (max-width: 768px) {
  section#journey .subgrid > div:first-child,
  section#journey .subgrid > div:last-child {
    padding: 28px 20px !important;
    border-radius: 16px !important;
  }
  section#journey .subgrid > div:first-child h3 {
    font-size: 1.2em !important;
    margin-bottom: 20px !important;
  }
  section#journey .subgrid > div:last-child h3 {
    font-size: 1.25em !important;
    margin-bottom: 20px !important;
  }
}

/* ----------------------------------------------------------
   2. JOURNEY（固定ページ html 2）— 背景写真フルブリードヒーロー
      margin-top は #lp4-bg-name が吸収するため 0 へ
   ---------------------------------------------------------- */

section#journey.journey[style*="height: 480px"],
section#journey.journey[style*="height:480px"] {
  /* margin-top を JS/CSS で 0 に統一済み */
  margin-top: 0 !important;
  height: clamp(300px, 44vw, 520px) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

/* 内部テキスト */
section#journey.journey[style*="height"] .container h2 {
  font-size: clamp(1.5em, 4vw, 2.6em) !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-shadow: 0 4px 20px rgba(0,0,0,.6) !important;
  line-height: 1.3 !important;
}
section#journey.journey[style*="height"] .container p {
  font-size: clamp(.95em, 1.8vw, 1.25em) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.5) !important;
}

@media (max-width: 600px) {
  section#journey.journey[style*="height"] {
    height: clamp(240px, 60vw, 340px) !important;
  }
}

/* ============================================================
   journey → services 重なり完全解消
   ============================================================ */

/* journey セクション自体を重なりの文脈から切り離す */
section#journey.journey {
  isolation: isolate;
  z-index: 0;
  position: relative;
}

/* subgrid 内カードが後続セクションに飛び出さないよう封じ込め */
section#journey .subgrid {
  isolation: isolate;
  position: relative;
  z-index: 0;
}

/* ストーリーカード（黒グラデ）のz-indexを明示的に0へ */
section#journey .subgrid > div:first-child,
section#journey .subgrid > div:last-child {
  z-index: 0;
  position: relative;
}

/* services が必ず journey の上に来るよう保証 */
section#services.services {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* スマホ専用：journey の下マージンをリセットして隙間なく接続 */
@media (max-width: 768px) {
  section#journey.journey {
    margin-bottom: 0 !important;
    overflow: visible;
  }

  section#journey .subgrid > div:last-child {
    /* box-shadow がはみ出して重なる原因を封じる */
    overflow: hidden;
    box-shadow:
      0 4px 16px rgba(0,0,0,.14),
      0 12px 32px rgba(0,0,0,.10) !important;
  }

  section#services.services {
    margin-top: 0 !important;
    padding-top: 56px !important;
  }
}

/* ============================================================
   スマホ：journey → services 縦順表示の完全保証
   ============================================================ */
@media (max-width: 768px) {

  /* journey の高さを内容に合わせて自動化（固定値・height指定を全解除） */
  section#journey.journey {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 48px !important;
    display: block !important;
  }

  /* subgrid を縦1列・通常フローに強制 */
  section#journey .subgrid {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    position: relative !important;
    z-index: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  /* 各カードを通常ブロックに戻す */
  section#journey .subgrid > div {
    position: relative !important;
    z-index: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    margin: 0 !important;
    /* 飛び出すshadowをカード内に封じる */
    overflow: hidden !important;
  }

  /* services を journey の真下に配置 */
  section#services.services {
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
    clear: both !important;
    display: block !important;
  }
}

/* ----------------------------------------------------------
   3. STORY（固定ページ html 2）— ふみのストーリー 刷新
   ---------------------------------------------------------- */

section#story {
  background: #fff !important;
  padding: 80px 24px 96px !important;
  position: relative;
}

/* 上部アクセントライン */
section#story::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #f7b8b8 15%,
    #c0555a 50%,
    #b84a50 75%,
    transparent 100%
  );
}

/* 見出し */
section#story #story-title {
  font-size: clamp(1.7em, 3.2vw, 2.2em) !important;
  font-weight: 900 !important;
  color: #b84a50 !important;
  letter-spacing: .05em !important;
  margin-bottom: 12px !important;
}

/* グラデーションライン */
section#story > .container > div[style*="gradient"] {
  width: 64px !important;
  height: 3px !important;
  margin: 0 auto 56px !important;
}

/* story-card 刷新 */
.story-card {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 36px 40px !important;
  box-shadow:
    0 2px 6px rgba(192,85,90,.06),
    0 10px 32px rgba(192,85,90,.10),
    0 32px 64px rgba(0,0,0,.04) !important;
  margin-bottom: 28px !important;
  border-left: none !important;   /* 既存の border-left を除去 */
  border-top: none !important;
  position: relative;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1);
}

/* カード左端のアクセントバー */
.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: linear-gradient(to bottom, #e87a7a, #b84a50, #8a2830);
  border-radius: 20px 0 0 20px;
}

/* ホバー演出 */
@media (hover: hover) {
  .story-card:hover {
    transform: translateY(-4px) !important;
    box-shadow:
      0 6px 16px rgba(192,85,90,.12),
      0 20px 48px rgba(192,85,90,.14),
      0 40px 80px rgba(0,0,0,.07) !important;
  }
}

/* カード内 h3 */
.story-card h3 {
  font-size: 1.25em !important;
  font-weight: 800 !important;
  color: #b84a50 !important;
  margin-bottom: 20px !important;
  letter-spacing: .03em !important;
  line-height: 1.35 !important;
  padding-left: 16px; /* ::before バーとの余白 */
}

/* カード内テキスト */
.story-card p,
.story-card {
  font-size: 1em !important;
  line-height: 1.95 !important;
  color: #444 !important;
  padding-left: 16px; /* ::before バーとの余白 */
}

/* 末尾カードのマージン */
.story-card:last-child {
  margin-bottom: 0 !important;
}

/* スマホ対応 */
@media (max-width: 768px) {
  section#story {
    padding: 56px 16px 72px !important;
  }
  .story-card {
    padding: 26px 20px 26px 24px !important;
    border-radius: 16px !important;
    margin-bottom: 20px !important;
  }
  .story-card h3 {
    font-size: 1.1em !important;
    margin-bottom: 14px !important;
    padding-left: 12px !important;
  }
  .story-card p,
  .story-card {
    font-size: .97em !important;
    line-height: 1.85 !important;
    padding-left: 12px !important;
  }
}

@media (max-width: 375px) {
  .story-card {
    padding: 22px 14px 22px 20px !important;
  }
}

/* JS が付与するクラス：journey の inline margin-top を打ち消す */
.lp4-journey-reset {
  margin-top: 0 !important;
}
