/* ===================== Base / Tokens ===================== */
:root{
  --brand:#0E6E2B; --ink:#1f2937; --bg:#ffffff; --muted:#6b7280;
  --radius:8px; --shadow:0 10px 25px rgba(0,0,0,.08); --container:1200px;
}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,'Noto Sans JP',sans-serif;
  color:var(--ink); background:var(--bg); line-height:1.7;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  /* 和紙テクスチャ */
  background-image:url('https://www.transparenttextures.com/patterns/rice-paper-2.png');
  background-size:auto; background-repeat:repeat; background-attachment:fixed;
}
[id]{scroll-margin-top:96px}

.container{max-width:var(--container);margin-inline:auto;padding:clamp(16px,3vw,32px)}
.stack{display:flex;flex-direction:column;gap:clamp(12px,2.2vw,24px)}
.cluster{display:flex;flex-wrap:wrap;gap:clamp(8px,1.6vw,16px);align-items:center}
.muted{color:var(--muted)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.9rem 1.2rem;border-radius:999px;
  background:linear-gradient(135deg,#0E6E2B,#0a5220);color:#fff;
  text-decoration:none;font-weight:700;box-shadow:var(--shadow);
}
.btn.alt{background:#fff;color:var(--brand)}

/* 画像の基本セーフティ（横幅オーバー防止） */
img{max-width:100%;height:auto;display:block}

/* ===================== Header ===================== */
header{
  position:fixed;top:0;left:0;right:0;z-index:1000;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
header.scrolled{box-shadow:0 6px 18px rgba(0,0,0,.08)}
header .logo{display:inline-flex;align-items:center;gap:8px;text-decoration:none}
.logo-img{display:block;height:40px;width:auto;filter:none}
@media(min-width:960px){.logo-img{height:44px}}
nav a{color:var(--ink);text-decoration:none;opacity:.85}
nav a:hover{opacity:1}
.spacer{flex:1}
/* ハンバーガーメニュー */
.hamburger-btn{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:8px;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width:44px;
  height:44px;
  position:relative;
  z-index:1001;
}

.hamburger-line{
  display:block;
  width:24px;
  height:2px;
  background:var(--ink);
  margin:3px 0;
  transition:all 0.3s ease;
  transform-origin:center;
}

/* ハンバーガーアイコンのアニメーション（開いた状態） */
.hamburger-btn.active .hamburger-line:nth-child(1){
  transform:rotate(45deg) translate(6px, 6px);
}
.hamburger-btn.active .hamburger-line:nth-child(2){
  opacity:0;
}
.hamburger-btn.active .hamburger-line:nth-child(3){
  transform:rotate(-45deg) translate(6px, -6px);
}

/* モバイルメニューオーバーレイ */
.mobile-menu-overlay{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
  background:rgba(0,0,0,0.5);
  z-index:999;
  opacity:0;
  transition:opacity 0.3s ease;
}

.mobile-menu-overlay.active{
  display:block;
  opacity:1;
}

/* ===================== Hero (section slider) ===================== */
.hero{position:relative;color:#fff}
.hero-wrap{
  display:grid;grid-template-columns:1fr;
  min-height:clamp(400px,70vh,760px);
  position:relative;
}
.hero-visual{
  position:absolute;inset:0;background-size:cover;background-position:center;
  background-repeat:no-repeat;opacity:1;transition:opacity .4s ease;
  animation:heroPan 18s ease-in-out infinite alternate;
}

/* スライダーのレスポンシブ調整 */
@media(max-width: 768px){
  .hero-wrap{
    min-height:clamp(350px,60vh,500px);
  }
  .hero h1{
    font-size:clamp(20px,4vw,32px) !important;
    line-height:1.3;
  }
  .hero p{
    font-size:clamp(14px,3vw,16px);
    line-height:1.5;
  }
}
@keyframes heroPan{from{background-position:50% 40%}to{background-position:50% 60%}}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(0deg,rgba(0,0,0,.55),rgba(0,0,0,.2))}
.hero-inner{position:relative;z-index:1;display:grid;place-items:center;text-align:center;padding-block:clamp(48px,8vw,120px)}
.hero h1{font-size:clamp(28px,5vw,44px);line-height:1.2;margin:.2em 0}
.hero p{max-width:62ch;margin:0 auto 1rem}

/* slider UI */
.hero-slider{max-width:920px;margin-inline:auto}
.hero-slider .slide{display:none}
.hero-slider .slide.active{display:block;animation:fade .6s ease}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hero-slider .dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:10px;
}
.hero-slider .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.5);
  border:0;
  cursor:pointer;
  transition:all .3s ease;
}
.hero-slider .dot.active{
  background:rgba(255,255,255,.9);
}
/* 前後ボタンは非表示 */
.hero-prev,.hero-next,.hero .controls{display:none!important}

/* ===================== Band (green ribbon) ===================== */
.band{background:linear-gradient(180deg,#0E6E2B 0%, #0b581f 100%);color:#fff;text-align:center}
.band .brand-logo{display:block;height:120px;width:auto;margin-inline:auto;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.band .lead{font-size:clamp(23px,3.1vw,31px);font-weight:700;margin:0 0 .25em}

/* セクション共通の上下余白 */
section{
  padding-block: clamp(60px,8vw,120px);
}

/* 特別なセクションは個別設定 */
.hero{
  padding-block: 0;
}
.band{
  padding-block: clamp(48px,6vw,96px);
}
.market{
  padding-block: clamp(60px,8vw,120px);
}

/* セクション見出しの余白を統一 */
section:not(.band):not(.hero) h2{
  font-size:clamp(28px,4.4vw,42px);
  line-height:1.18;
  margin: 0 0 clamp(24px,3vw,48px) 0;
  text-align: center;
}

/* お問い合わせセクションのh2余白を詰める */
section.contact h2{
  margin: 0 0 clamp(8px,1vw,12px) 0 !important;
}

/* 導入・取引の流れとご支援メニューのh2余白も詰める */
section.flow h2,
section#services h2{
  margin: 0 0 clamp(8px,1vw,12px) 0 !important;
}

/* 見出し下のアクセントラインは無し */
section h2::after{content:none!important}

/* ===================== About ===================== */
.about-row{display:grid;grid-template-columns:1fr;gap:clamp(16px,2.6vw,32px);align-items:center}
.about-media{width:100%;display:block}            /* ← 幅100%を明示 */
@media(min-width:1024px){
  .about-row{grid-template-columns:.8fr 1.2fr}
  .about-row.rev .about-media{order:2}
  .about-row.rev .about-text{order:1}
  .about-media{max-width:520px;justify-self:center}
}

/* aboutセクション：Figmaデザイン通りの縦並びレイアウト */
#about.container.twocol{
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(32px,4vw,48px) !important;
}

/* 各articleブロックは横並び */
#about.container.twocol article{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: clamp(24px,3vw,40px) !important;
  align-items: center !important;
}

/* 2番目のブロックは画像を右側に */
#about.container.twocol article:nth-child(2){
  grid-template-columns: 1fr 1fr !important;
}
#about.container.twocol article:nth-child(2) .ratio{
  order: 2;
}
#about.container.twocol article:nth-child(2) .stack{
  order: 1;
}

/* Figmaデザイン通りのabout-row構造 */
.about-block{
  margin-bottom: clamp(40px,5vw,64px);
}

.about-row{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: clamp(24px,4vw,48px) !important;
  align-items: center !important;
}

/* 1番目のブロックは画像を右側に */
.about-row{
  grid-template-columns: 1fr 1fr !important;
}
.about-row .about-media{
  order: 2 !important;
}
.about-row .about-text{
  order: 1 !important;
}

/* 2番目のブロック（rev）は画像を左側に */
.about-row.rev .about-media{
  order: 1 !important;
}
.about-row.rev .about-text{
  order: 2 !important;
}

/* 画像スタイル */
.about-media{
  max-width: 100% !important;
  width: 100% !important;
}

.ratio-wide::before{
  padding-top: 75% !important;
  aspect-ratio: 4/3 !important;
}

/* テキストスタイル - Figmaデザインに合わせて調整 */
.about-text{
  max-width: 100% !important;
  width: 100% !important;
  padding: clamp(16px,2vw,24px) !important;
  text-align: left !important;
}

.about-text h2{
  font-size: clamp(24px,3.5vw,36px) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 clamp(12px,1.5vw,16px) 0 !important;
  color: var(--ink) !important;
  text-align: left !important;
}

.about-text p{
  font-size: clamp(14px,2vw,16px) !important;
  line-height: 1.6 !important;
  margin: 0 0 clamp(12px,1.5vw,16px) 0 !important;
  color: var(--ink) !important;
}

.about-text p.muted{
  color: var(--brand) !important;
  font-size: clamp(18px,2.5vw,22px) !important;
  font-weight: 600 !important;
  margin-bottom: clamp(8px,1vw,12px) !important;
}

.about-text p:last-child{
  margin-bottom: 0 !important;
}

/* ハラール認証のSTEP表示 */
.cert-steps{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px,1vw,12px);
  margin-top: clamp(16px,2vw,20px) !important;
}

.step-item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.step-num{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 24px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-align: center;
}

.step-text{
  font-size: clamp(13px,1.8vw,14px);
  color: var(--ink);
  font-weight: 500;
}

@media(max-width: 640px){
  .cert-steps{
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* レスポンシブ */
@media(max-width: 1024px){
  .about-row,
  .about-row.rev{
    grid-template-columns: 1fr !important;
    gap: clamp(16px,3vw,24px) !important;
  }
  /* 通常の.about-rowは画像を上、テキストを下に */
  .about-row .about-media{
    order: 1 !important;
  }
  .about-row .about-text{
    order: 2 !important;
  }
  /* .about-row.revも同じ順序に統一 */
  .about-row.rev .about-media{
    order: 1 !important;
  }
  .about-row.rev .about-text{
    order: 2 !important;
  }
}

/* 既存のtwocolレイアウト用の調整も維持 */
#about.container.twocol article{
  display: flex !important;
  flex-direction: column !important;
  max-width: none !important;
  align-items: flex-start !important;
}
#about.container.twocol article p,
#about.container.twocol article ul,
#about.container.twocol article h2{
  max-width: 480px !important;
  width: 480px !important;
}
#about.container.twocol article .ratio{
  max-width: 480px !important;
  width: 480px !important;
}
#about .about-text h2{font-size:clamp(22px,3.1vw,32px);margin:.1em 0 .5em}

/* === 横長トリミングの確実化（0×0対策込み） === */
.ratio{
  position:relative; width:100%;               /* ← ここが重要 */
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
  display:block;
}
.ratio::before{
  content:""; display:block;
  padding-top:56.25%;           /* 16:9 フォールバック（古い環境でも高さが出る） */
  aspect-ratio:16/9;            /* 対応環境はこちらを使用 */
}
.ratio > picture,
.ratio > img{
  position:absolute; inset:0; width:100%; height:100%; display:block;
}
.ratio img{object-fit:cover; object-position:center}

/* ===================== Market ===================== */
.market{background:#0c5a23;color:#fff;padding-block:clamp(40px,6vw,80px)}

/* marketセクションの見出し余白調整 */
.market h2{
  margin-top:0 !important;
  margin-bottom:clamp(6px,1vw,8px) !important;
}
/* 模様オーバーレイなし */
.sep{line-height:0}
.sep-top svg{display:block;width:100%;height:64px}
.market .sep-top path{fill:#0c5a23}

.statgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2vw,20px)}
@media(max-width:640px){.statgrid{grid-template-columns:1fr}}
.stat{background:#ffffff10;border:1px solid #ffffff26;border-radius:8px;padding:16px;text-align:center}

.chartgrid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(12px,2vw,20px)}
@media(max-width:1024px){.chartgrid{grid-template-columns:1fr}}
.chart{background:#fff;border-radius:8px;padding:12px;box-shadow:var(--shadow);color:#111}
.chart-title{margin:4px 0 8px 4px;font-size:18px;font-weight:800;line-height:1.25}
.chart-title .fn{font-size:.8em;font-weight:700;margin-left:.25em}
sup.fn{font-size:.7em;font-weight:700;margin-left:.25em}
.chart-notes{font-size:12px;color:#d1dde7;margin-top:8px}
.chart-notes p{margin:.25rem 0}

/* ===================== Features / Cards / Grid ===================== */
.grid2{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:clamp(16px,2vw,24px);
  margin-top: 8px;
}
@media(max-width:640px){.grid2{grid-template-columns:1fr}}

.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(16px,2vw,24px)}
@media(max-width:960px){.grid3{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.grid3{grid-template-columns:1fr}}

/* 4列グリッド（レスポンシブ対応） */
.grid4-responsive{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:clamp(16px,2vw,24px);
  margin-top: 24px;
}

/* タブレット対応（2列表示） */
@media(max-width:960px){
  .grid4-responsive{
    grid-template-columns:1fr 1fr;
    gap:clamp(12px,1.8vw,20px);
  }
}

/* スマートフォン対応（1列表示） */
@media(max-width:640px){
  .grid4-responsive{
    grid-template-columns:1fr;
    gap:clamp(16px,2.5vw,20px);
    margin-top: 20px;
  }
}
.card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:var(--radius);
  padding:clamp(16px,2.2vw,22px);
  box-shadow:var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 商品カードのレスポンシブ対応 */
@media(max-width:640px){
  .card{
    padding:clamp(14px,4vw,18px);
  }
  .card h3{
    font-size:clamp(1.1rem,4vw,1.3rem);
    margin-bottom:8px;
  }
  .card p{
    font-size:clamp(0.9rem,3.5vw,1rem);
    line-height:1.5;
  }
}

/* リンクカードのみホバーアニメーションを適用 */
.card a:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 30px rgba(0,0,0,.12);
  transition:transform .25s ease, box-shadow .25s ease;
}

/* featuresセクションのカード見出しと説明文の余白を詰める */
#features .card h3{
  margin: 0 0 0 0 !important;
}
#features .card p.muted{
  margin-top: 0 !important;
}

/* productsセクションのカード見出しの余白を詰める */
#products .card.stack{
  gap: clamp(6px,1vw,10px) !important;
}
#products .card h3{
  margin: clamp(8px,1.2vw,12px) 0 0 0 !important;
}
#products .card p{
  margin: 0 !important;
}
img.ph{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;border-radius:8px}

/* ===================== Products ===================== */
.prod{display:grid;grid-template-columns:1.1fr 1fr;gap:clamp(16px,2.6vw,32px);align-items:center}
@media(max-width:1024px){.prod{grid-template-columns:1fr}}
.bg-soft{background:linear-gradient(180deg,#f7fff9 0%, #f0fbf4 100%)}

/* ===================== Services ===================== */
.card.service{
  background:linear-gradient(#ffffff,#ffffff) padding-box,
             linear-gradient(135deg,rgba(14,110,43,.35),rgba(34,197,94,.28)) border-box;
  border:1px solid transparent;border-radius:var(--radius);box-shadow:0 12px 28px rgba(0,0,0,.10);
  position:relative;overflow:hidden;
}

/* ご支援メニューのカードをセンター揃え */
.card.service{
  text-align:center;
}

/* ご支援メニューのpタグのみ左揃え */
.card.service p{
  text-align:left;
}

/* ご支援メニュー用の大きなシンプル緑色アイコン */
.card.service .icon-circle{
  width:80px;height:80px;display:inline-grid;place-items:center;margin:0 auto 0 auto;
  background:transparent;color:var(--brand);box-shadow:none;border-radius:0;
}

.card.service .icon-circle svg{
  width:60px;height:60px;display:block;margin:0 auto;
}

/* ご支援メニューのテキスト間隔調整 */
.card.service.stack{
  gap: clamp(6px,1vw,8px) !important;
}

.card.service h3{
  margin: 0 0 clamp(8px,1.2vw,12px) 0;
}

.card.service p{
  margin: 0 0 clamp(12px,1.5vw,16px) 0;
}
/* ホバー効果を無効化 */
.card.service::after{
  display: none;
}
.icon-circle{
  width:44px;height:44px;border-radius:999px;display:inline-grid;place-items:center;margin-bottom:8px;
  background:linear-gradient(135deg,var(--brand),#16a34a);color:#fff;box-shadow:0 6px 16px rgba(14,110,43,.25)
}
.icon-circle svg{width:22px;height:22px;display:block}

/* ===================== Flow（リセット：背景透明） ===================== */
.flow{
  background: transparent;
}
.flow .lead{margin-top:-.6rem;color:#376a50}
.flow-rail{margin-top:8px;display:grid;gap:clamp(16px,2vw,24px)}
@media(min-width:960px){.flow-rail{grid-template-columns:repeat(5,1fr);align-items:stretch}}
.flow-step{
  background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:14px;padding:18px;
  box-shadow:0 10px 22px rgba(0,0,0,.06); position:relative;
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
}
.flow-step .icon-circle{margin-bottom:4px}
.flow-step h3{margin:.2rem 0 .1rem;font-size:1.05rem}
.flow-step p{margin:0;color:var(--muted);font-size:.95rem}
@media(min-width:960px){
  .flow-step::after{
    content:'';position:absolute;top:50%;right:-12px;transform:translateY(-50%);
    width:24px;height:2px;background:linear-gradient(90deg,#98e0b5,#0E6E2B);
  }
  .flow-step:last-child::after{display:none}
  .flow-step::before{
    content:'';position:absolute;top:calc(50% - 6px);right:-18px;border:6px solid transparent;border-left-color:#0E6E2B;
  }
  .flow-step:last-child::before{display:none}
}
@media(max-width:959.98px){
  .flow-rail{position:relative}
  .flow-rail::before{
    content:'';position:absolute;left:22px;top:0;bottom:0;width:2px;background:linear-gradient(#c7efd8,#0E6E2B);
  }
  .flow-step{padding-left:56px}
  .flow-step .icon-circle{position:absolute;left:10px;top:18px}
}

/* ===================== Halal Categories ===================== */
.halal-categories{
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 24px;
}

@media (max-width: 768px) {
  .halal-categories{
    grid-template-columns: 1fr !important;
    gap: 20px;
    max-width: 100% !important;
  }
}

@media (min-width: 769px) and (max-width: 960px) {
  .halal-categories{
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 600px !important;
  }
}

@media (min-width: 961px) and (max-width: 1200px) {
  .halal-categories{
    max-width: 750px !important;
    gap: 20px;
  }
}

/* ===================== Forms ===================== */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:.9rem;color:var(--ink);font-weight:500}
.field label.required::after{
  content:'必須';
  background:#dc3545;
  color:#fff;
  font-size:0.7rem;
  font-weight:600;
  margin-left:6px;
  padding:2px 6px;
  border-radius:4px;
}
.field input,.field textarea,.field select{appearance:none;border:1px solid #d1d5db;border-radius:10px;padding:12px 14px;font:inherit;background:#fff}
.field textarea{min-height:140px;resize:vertical}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.formgrid .colspan-2{grid-column:1/-1}

/* ===================== Footer ===================== */
footer{background:var(--brand);color:#fff}

/* ===================== Responsive bits ===================== */
@media(max-width:1024px){
  .prod{grid-template-columns:1fr}
}
@media(max-width:960px){
  .grid3{grid-template-columns:1fr 1fr}
  .hamburger-btn{display:flex}
  
  /* モバイルメニューのスタイル */
  nav .cluster{
    display:none;
    position:fixed;
    top:0;
    right:-100%;
    width:280px;
    height:100vh;
    background:#fff;
    flex-direction:column;
    justify-content:flex-start;
    align-items:stretch;
    padding:80px 0 20px;
    box-shadow:-2px 0 10px rgba(0,0,0,0.1);
    z-index:1000;
    transition:right 0.3s ease;
  }
  
  nav .cluster.active{
    display:flex;
    right:0;
  }
  
  nav .cluster a{
    padding:16px 24px;
    border-bottom:1px solid rgba(0,0,0,0.1);
    font-size:1.1rem;
    opacity:1;
  }
  
  nav .cluster a:hover{
    background:rgba(0,0,0,0.05);
  }
  
  nav .cluster .btn{
    margin:16px 24px;
    text-align:center;
    border-bottom:none;
  }
}
@media(max-width:640px){
  .grid3,.statgrid{grid-template-columns:1fr}
}

/* ==== 強制ワイドトリミング（最後に追記） ==== */
.ratio{
  position: relative;
  width: 100%;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ratio::before{
  content: "";
  display: block;
  /* 16:9 の高さを必ず確保（古い環境でも 0x0 にならない） */
  padding-top: 56.25%;
  aspect-ratio: 16 / 9;
}
/* 中の <img>/<picture> を全面フィルさせる（他ルールに勝つ用に !important） */
.ratio > img,
.ratio > picture,
.ratio > picture > img{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.ratio img{
  object-fit: cover;
  object-position: center;
}

/* LP specific ratio definitions - 4:3 for LP images */
.ratio::before{
  padding-top: 75% !important; /* 4:3 for LP */
  aspect-ratio: 4 / 3 !important;
}

.ratio{
  aspect-ratio: 4 / 3 !important;
}

/* プレースホルダー画像を4:3に */
img.ph{
  width: 100%;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.ph{
  width: 100%;
  aspect-ratio: 4 / 3 !important;
  background: #f3f4f6;
  border-radius: 12px;
  display: block;
}


/* === CF7 compatibility for LP formgrid === */
.formgrid .wpcf7-form-control-wrap { display:block; width:100%; }
.formgrid .wpcf7-form-control { width:100%; box-sizing:border-box; }

/* 既存のinput/textarea想定CSSが「直下子 >」指定なら緩める */
.formgrid .field input[type="text"],
.formgrid .field input[type="email"],
.formgrid .field input[type="tel"],
.formgrid .field select,
.formgrid .field textarea {
  width:100%;
  height:44px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}
.formgrid .field textarea { min-height:140px; height:auto; resize:vertical; }

/* エラーメッセージや必須マークの整形（任意） */
.wpcf7-not-valid-tip { color:#ef4444; font-size:12px; margin-top:4px; }
.wpcf7 form .btn[type="submit"] { cursor:pointer; }

/* === お問い合わせの送信ボタンを大きくしてセンター寄せ === */
.wpcf7-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.8rem !important;
  border-radius: 999px;
  background: linear-gradient(135deg, #0E6E2B, #0a5220) !important;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem !important;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  min-width: 240px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 110, 43, 0.3);
}

/* 送信ボタンのコンテナをセンター寄せ（複数パターンで対応） */
.wpcf7-form p:has(.wpcf7-submit),
.wpcf7-form p:last-child,
.wpcf7-form input[type="submit"]:parent,
.contact .wpcf7-form > p:last-of-type {
  text-align: center !important;
  margin-top: 2rem;
}

/* より確実なセンター寄せ（フォールバック） */
.wpcf7-form .wpcf7-submit,
.wpcf7-form input[type="submit"],
.contact input[type="submit"] {
  display: block !important;
  margin: 2rem auto 0 auto !important;
}

/* ボタン以外の段落は左寄せ */
section.contact .wpcf7-form > p:not(:last-child) {
  text-align: left !important;
}

/* ===================== Goals Matrix (Entry Form) ===================== */
.goals-matrix {
    margin: 30px 0;
}

.goals-matrix > p {
    margin-bottom: 20px;
    font-size: 16px;
}

.matrix-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    gap: 20px;
}

.matrix-row:first-of-type {
    border-top: 1px solid #e5e7eb;
}

.matrix-label {
    font-weight: 500;
    color: var(--ink);
}

.matrix-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.matrix-options .wpcf7-list-item {
    margin: 0;
}

.matrix-options .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin: 0;
}

.matrix-options input[type="radio"] {
    margin: 0;
}

@media (max-width: 768px) {
    .matrix-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .matrix-label {
        font-weight: 600;
    }

    .matrix-options {
        flex-direction: column;
        gap: 8px;
    }
}
