/*
Theme Name: OnePress Child
Template: onepress
Version: 1.0
Text Domain: onepress-child
*/

/* ================================
   About / Member 共通ヒーロー
   ================================ */

/* コンテナ本体（About/Member 両方に適用） */
.about-hero,
.member-hero {
  padding: clamp(48px, 8vw, 96px) 0;
  background: linear-gradient(180deg, #0f1216 0%, #12161c 100%);
  color: #fff;
  border-radius: 16px;
  overflow: hidden;
}

/* 余計な背景（グループ/見出し/段落）が被らないように最低限だけ無効化 */
.about-hero .wp-block-group,
.about-hero .wp-block-group__inner-container,
.about-hero > .container,
.about-hero h1, .about-hero h2, .about-hero h3,
.about-hero p,
.member-hero .wp-block-group,
.member-hero .wp-block-group__inner-container,
.member-hero > .container,
.member-hero h1, .member-hero h2, .member-hero h3,
.member-hero p {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* マージン折り畳み対策（h1 margin-top が外へ抜けるのを防ぐ） */
.about-hero .container,
.member-hero .container { display: flow-root; }

/* 眉（小見出し） */
.about-hero .eyebrow,
.member-hero .eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
  font-size: .9rem;
  margin-bottom: .75rem;
}

/* タイトル（クラス名の揺れを吸収） */
.about-hero .about-title,
.about-hero .member-title,
.about-hero .hero-title,
.member-hero .about-title,
.member-hero .member-title,
.member-hero .hero-title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 .75rem;
  font-weight: 800;
  color: #fff !important; /* ← 白を強制 */
}

/* リード文（クラス名の揺れを吸収） */
.about-hero .about-lead,
.about-hero .member-lead,
.about-hero .hero-lead,
.about-hero p.lead,
.member-hero .about-lead,
.member-hero .member-lead,
.member-hero .hero-lead,
.member-hero p.lead {
  font-size: clamp(16px, 2.2vw, 18px);
  opacity: .9;
  margin-bottom: 1.5rem;
  color: #fff !important;
}

/* CTA 行 */
.about-hero .about-cta,
.member-hero .about-cta,
.member-hero .hero-cta,
.member-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 640px){
  .about-cta a{ width:100%; }  /* スマホでは縦積み */
}

/* ボタン（共通） */
.btn-ngm, .btn-ghost {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: .2s ease;
}
.btn-ngm {
  background:#00D1B2; color:#0b0f14;
  box-shadow: 0 6px 20px rgba(0,209,178,.25);
}
.btn-ngm:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,209,178,.35); }
.btn-ghost { border:1px solid rgba(255,255,255,.35); color:#fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ================================
   Stats
   ================================ */
.ngm-stats { padding: 24px 0 12px; }
.stat-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 920px){ .stat-cards{ grid-template-columns: repeat(2,1fr);} }
.stat-cards li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-cards li:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.stat-cards .num { font-size: clamp(20px, 4vw, 28px); font-weight: 800; line-height: 1.1; }
.stat-cards .cap { opacity: .8; font-size: .9rem; margin-top: 4px; }

/* ================================
   Values
   ================================ */
.ngm-values { padding: 42px 0 18px; }
.sec-title { font-weight: 800; font-size: clamp(22px, 3.2vw, 28px); margin-bottom: 18px; }

/* 見出しのアクセントバー */
.sec-title { position: relative; display: inline-block; padding-left: 14px; }
.sec-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.4em; background: #00d1b2; border-radius: 2px;
}

.value-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px){ .value-grid{ grid-template-columns: 1fr; } }
.value-grid .card {
  background: #fff; border:1px solid #eaeef3; border-radius: 16px; padding: 18px;
  box-shadow: 0 10px 30px rgba(10,22,50,.06);
}
.value-grid .card h3 { margin: 0 0 8px; font-weight: 800; }
.value-grid .card p { margin: 0; color: #4a5568; }

/* ================================
   横スクロールギャラリー
   ================================ */
.ngm-gallerystrip { padding: 8px 0 28px; }

/* 横スクロールの器 */
.ngm-gallerystrip .strip {
  display: flex; flex-wrap: nowrap; gap: 16px; padding: 10px 0;
  overflow-x: auto !important; overflow-y: hidden;
  scroll-snap-type: x proximity;
  -ms-overflow-style: auto !important; scrollbar-width: auto !important;
}

/* スクロールバー（WebKit系） */
.ngm-gallerystrip .strip::-webkit-scrollbar { height: 8px; }
.ngm-gallerystrip .strip::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 4px; }

/* 画像カード（共通） */
.ngm-gallerystrip img {
  display: block; flex: 0 0 auto;
  border-radius: 12px; object-fit: cover; scroll-snap-align: center;
  aspect-ratio: 16/9; filter: saturate(1.05) contrast(1.02);
}

/* 幅（SPは画面の約70%、PCは固定幅） */
@media (max-width: 1023px) { .ngm-gallerystrip img { width: 70vw; max-width: 420px; } }
@media (min-width: 1024px) { .ngm-gallerystrip img { width: 420px; max-width: none; } }

/* strip内やCTA内に紛れた<br>の無効化 */
.ngm-gallerystrip .strip br,
.about-cta br { display: none !important; }

/* ================================
   FAQ（カード風）
   ================================ */
.ngm-faq { padding: 10px 0 28px; }
.faq {
  border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 12px; padding: 14px 16px;
  background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.faq summary { font-weight: 700; cursor: pointer; outline: none; }
.faq[open] { border-color: #00d1b2; box-shadow: 0 6px 16px rgba(0,209,178,0.15); }

/* ================================
   CTA Bar
   ================================ */
.ngm-cta-bar { margin: 26px 0 0; }
.ngm-cta-bar .container {
  background: linear-gradient(90deg, #0bd1b2 0%, #67e1d1 100%);
  color:#0b0f14; border-radius: 16px; padding: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  box-shadow: 0 14px 30px rgba(0,209,178,.25);
}
.ngm-cta-bar p{ margin: 0; font-weight: 800; }
.ngm-cta-bar .btn-ngm{ background:#0b0f14; color:#fff; box-shadow:none; }
.ngm-cta-bar .btn-ngm:hover{ opacity:.9; transform:none; }

/* ================================
   細かな共通調整
   ================================ */
.about-hero p, .ngm-values p { line-height: 1.7; }
.section-about section { padding: 40px 0; }



/* =========================================
   Hero を固定ページ/トップのセクションで同一表示にする
   ========================================= */

/* 1) トップの services セクション内で付く“白い枠”を無効化（ヒーローが入っている時だけ） */
.section-services .service-item .service-content:has(.about-hero),
.section-services .service-item .service-content:has(.member-hero) {
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* ヒーローブロック自体の見た目を優先表示 */
.section-services .service-item .service-content .about-hero,
.section-services .service-item .service-content .member-hero {
  margin: 0 !important;
  border-radius: 16px !important;
}

/* 2) トップ側だけ小さくされる文字サイズを固定（固定ページと同じ値に） */
.section-services .service-item .service-content .about-hero h1,
.section-services .service-item .service-content .member-hero h1 {
  font-size: clamp(32px, 5vw, 48px) !important;
  line-height: 1.1 !important;
}
.section-services .service-item .service-content .about-hero .about-lead,
.section-services .service-item .service-content .member-hero .member-lead,
.section-services .service-item .service-content .about-hero .hero-lead,
.section-services .service-item .service-content .member-hero .hero-lead,
.section-services .service-item .service-content .about-hero p.lead,
.section-services .service-item .service-content .member-hero p.lead {
  font-size: clamp(16px, 2.2vw, 18px) !important;
  opacity: .9 !important;
}

/* 念のため、色も固定（どちらでも同じ発色に） */
.section-services .service-item .service-content .about-hero h1,
.section-services .service-item .service-content .about-hero p,
.section-services .service-item .service-content .member-hero h1,
.section-services .service-item .service-content .member-hero p {
  color: #fff !important;
}

/* ===== 互換性用フォールバック（:has が効かない環境向け） ===== */
/* それでも白枠が残る場合、下のコメントを外してください（ホームだけ全体無効化） */
/*
.home .section-services .service-item .service-content {
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
*/
/* ヒーロー/ギャラリーを含む service-item だけ、白カード化を無効化 */
.home .section-services .service-item:has(.about-hero, .member-hero, .hero-card, .ngm-members),
.home .section-services .service-item:has(.about-hero, .member-hero, .hero-card, .ngm-members) .service-content {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;      /* 内側の白い余白を消す */
  margin: 0 !important;       /* 外側の余白で枠に見える分も消す */
}

/* ホバー時の影も消す */
.home .section-services .service-item:has(.about-hero, .member-hero, .hero-card, .ngm-members):hover {
  box-shadow: none !important;
  transform: none !important;
}
/* ===== Hero の上下余白を完全に統一（About / Member 両方） ===== */

/* 余白は padding と gap だけで決める */
.about-hero,
.member-hero {
  --hero-pad: clamp(48px, 8vw, 96px);
  --hero-gap: 12px; /* タイトル↔リード↔CTA の間隔 */
  padding-block: var(--hero-pad) !important;
}

/* 子要素のマージンを打ち消し、gapで管理 */
.about-hero > .container,
.member-hero > .container {
  display: grid;
  gap: var(--hero-gap);
  /* margin 折り畳み対策：BFCを作る */
  display: flow-root; /* gridでもOKだが保険でBFCを維持 */
}

/* ヒーロー直下の主要要素の上下marginをゼロに統一 */
.about-hero > .container > :is(h1, h2, h3, p, .about-cta, .hero-cta),
.member-hero > .container > :is(h1, h2, h3, p, .about-cta, .hero-cta) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* リード文のサイズは共通値に固定（環境で縮むのを防ぐ） */
.about-hero :is(.about-lead, .member-lead, .hero-lead, p.lead),
.member-hero :is(.about-lead, .member-lead, .hero-lead, p.lead) {
  font-size: clamp(16px, 2.2vw, 18px) !important;
  line-height: 1.7;
}

/* タイトルのサイズも共通で固定（親の見出しルールに負けないように） */
.about-hero :is(.about-title, .member-title, .hero-title),
.member-hero :is(.about-title, .member-title, .hero-title) {
  font-size: clamp(32px, 5vw, 48px) !important;
  line-height: 1.1 !important;
  font-weight: 800;
}

/* トップの service-item など“外側カード”が内側余白を足さないように */
.section-services .service-item:has(.about-hero),
.section-services .service-item:has(.member-hero) .service-content {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}



/* ===== ★★★CTAバーを全ページでSP下部に固定 ===== */
@media (max-width: 1023.98px){
  .ngm-cta-global{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    width: 100vw;
    margin: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(90deg,#0db1b2 0%, #67e1d1 100%);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0,0,0,.15);
  }

  .ngm-cta-global .container{
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:space-between;
    max-width:1200px;
    margin:0 auto;
  }

  .ngm-cta-global .btn,
  .ngm-cta-global .wp-block-button__link{
    background:#0b0f14;
    color:#fff;
    padding:10px 16px;
    border-radius:999px;
    font-weight:700;
    text-decoration:none;
  }

  /* バーに隠れないよう本文下に余白を確保 */
  body{ padding-bottom: 90px; }

  /* 管理画面ログイン時（上に管理バーが出るとき）の調整 */
  body.admin-bar .ngm-cta-global{ bottom: 46px; }
}

/* PCは通常の流れで表示 */
@media (min-width: 1024px){
  .ngm-cta-global{
    position: static;
    box-shadow: none;
    border-radius: 16px;
    width:auto;
    padding: initial;
  }
}

:root{
  --nagomi-red:#c30000;
  --nagomi-dark:#0b0f14; /* 深めの黒紺 */
}

/* SPの固定バー：ダーク基調＋赤CTA、少しガラス感 */
@media (max-width:1023.98px){
  .ngm-cta-global{
    position:fixed; left:0; right:0; bottom:0; z-index:99999;
    background: rgba(11,15,20,.88);          /* ←濁りにくいダーク */
    color:#fff;
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px);               /* 可能なら */
    -webkit-backdrop-filter: blur(8px);
    box-shadow:0 -6px 18px rgba(0,0,0,.25);   /* 浮かせる */
    border-top:1px solid rgba(255,255,255,.08);
  }
  .ngm-cta-global .container{
    display:flex; gap:12px; align-items:center; justify-content:space-between;
    max-width:1200px; margin:0 auto;
  }
  .ngm-cta-global .btn,
  .ngm-cta-global .wp-block-button__link{
    background:var(--nagomi-red);
    color:#fff;
    padding:12px 16px;
    border-radius:999px;
    font-weight:700;
    text-decoration:none;
  }
  /* コンテンツが隠れない調整（高さに合わせて微調整） */
  body{ padding-bottom: 92px; }
  body.admin-bar .ngm-cta-global{ bottom:46px; }
}

/* PCは従来表示のまま */
@media (min-width:1024px){
  .ngm-cta-global{ display:none; }
}

/* SPは about 内の水色バーを隠して二重表示を避ける */
@media (max-width:1023.98px){
  .home .ngm-cta-bar{ display:none !important; }
  .page-id-XXX .ngm-cta-bar{ display:none !important; } /* /about 単体ページも隠したい場合 */
}

