/* =========================================
FD Top Mid Section
超強制 幅拡張版
使い方：
- 既存の fd-top.css をこの内容で丸ごと置き換え
- .fd-top-mid を囲んでいるラッパーの幅制限もなるべく突破する
========================================= */

/* ---------- ラッパー側の幅制限を突破 ---------- */
/* よくあるテーマ/ブロックの中央寄せ制限を解除 */
body .fd-top-mid,
body .fd-top-mid.wp-block-group,
body .wp-block-group:has(> .fd-top-mid),
body .wp-block-cover:has(.fd-top-mid),
body .entry-content .fd-top-mid,
body .site-main .fd-top-mid,
body .content-area .fd-top-mid,
body main .fd-top-mid {
  position: relative !important;
  display: block !important;
  width: min(1280px, calc(100vw - 48px)) !important;
  max-width: min(1280px, calc(100vw - 48px)) !important;
  margin-top: 64px !important;
  margin-bottom: 64px !important;
  margin-left: calc(50% - 50vw + 24px) !important;
  margin-right: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  overflow: visible !important;
}

/* ブロックエディタ由来の内側制限を解除 */
body .fd-top-mid .alignwide,
body .fd-top-mid .alignfull,
body .fd-top-mid .wp-block-group__inner-container,
body .fd-top-mid .is-layout-constrained,
body .fd-top-mid .is-layout-flow {
  max-width: none !important;
}

/* ---------- 共通 ---------- */
body .fd-top-mid *,
body .fd-top-mid *::before,
body .fd-top-mid *::after {
  box-sizing: border-box;
}

body .fd-top-mid__section {
  position: relative;
  margin: 0 0 56px !important;
}

body .fd-top-mid__section:last-child {
  margin-bottom: 0 !important;
}

body .fd-top-mid__head {
  max-width: 820px !important;
  margin: 0 auto 32px !important;
  text-align: center !important;
}

body .fd-top-mid__eyebrow {
  margin: 0 0 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.12em !important;
  color: #8a847c !important;
  text-transform: uppercase !important;
}

body .fd-top-mid__title {
  margin: 0 !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.35 !important;
  color: #2d3148 !important;
}

body .fd-top-mid__lead {
  max-width: 720px !important;
  margin: 14px auto 0 !important;
  font-size: 17px !important;
  line-height: 1.95 !important;
  color: #555 !important;
}

/* ---------- 強みカード ---------- */
body .fd-top-strengths {
  position: relative !important;
  padding: 40px 32px !important;
  border: 1px solid #e5e2dc !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(45, 49, 72, 0.035) 0, rgba(45, 49, 72, 0) 36%),
    linear-gradient(180deg, #fffdfa 0%, #ffffff 100%) !important;
  overflow: hidden !important;
}

body .fd-top-strengths::before {
  content: "" !important;
  position: absolute !important;
  left: 3% !important;
  right: 3% !important;
  top: 18px !important;
  height: 56px !important;
  pointer-events: none !important;
  opacity: 0.16 !important;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'><path d='M10 40 C130 6, 250 72, 370 40 S610 8, 730 40 S970 72, 1190 28' fill='none' stroke='%232d3148' stroke-width='3.2' stroke-linecap='round'/></svg>")
    center / 100% 100% no-repeat !important;
}

body .fd-top-strengths__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

body .fd-top-strength-card {
  position: relative !important;
  min-height: 100% !important;
  padding: 28px 22px 24px !important;
  border: 1px solid #e7e1d8 !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.025) !important;
}

body .fd-top-strength-card__icon {
  display: block !important;
  width: 42px !important;
  height: 12px !important;
  margin: 0 0 16px !important;
  border-radius: 999px !important;
  background:
    linear-gradient(90deg, rgba(232, 184, 73, 0.65) 0%, rgba(232, 184, 73, 0.18) 100%) !important;
}

body .fd-top-strength-card h3 {
  margin: 0 0 12px !important;
  font-size: 20px !important;
  line-height: 1.55 !important;
  color: #2d3148 !important;
}

body .fd-top-strength-card p {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.9 !important;
  color: #555 !important;
}

/* ---------- 用途別導線 ---------- */
body .fd-top-usecase {
  position: relative !important;
}

body .fd-top-usecase::before {
  content: "" !important;
  position: absolute !important;
  left: 12% !important;
  right: 12% !important;
  top: -22px !important;
  height: 42px !important;
  pointer-events: none !important;
  opacity: 0.12 !important;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'><path d='M10 30 C130 8, 250 56, 380 28 S640 8, 760 28 S1010 54, 1190 24' fill='none' stroke='%232d3148' stroke-width='2.8' stroke-linecap='round'/></svg>")
    center / 100% 100% no-repeat !important;
}

body .fd-top-usecase__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

body .fd-top-usecase-card {
  position: relative !important;
  display: block !important;
  padding: 24px 22px 22px !important;
  border: 1px solid #e7e1d8 !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(252,250,247,0.98) 100%) !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03) !important;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease !important;
}

body .fd-top-usecase-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 18px !important;
  pointer-events: none !important;
  opacity: 0.08 !important;
  background:
    linear-gradient(rgba(45, 49, 72, 0.12), rgba(45, 49, 72, 0.12)) 22px 18px / 56px 1px no-repeat,
    linear-gradient(rgba(45, 49, 72, 0.12), rgba(45, 49, 72, 0.12)) 22px 30px / 56px 1px no-repeat !important;
}

body .fd-top-usecase-card:hover {
  transform: translateY(-2px) !important;
  border-color: #d6cbbb !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.055) !important;
}

body .fd-top-usecase-card__label {
  display: inline-block !important;
  margin: 0 0 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.12em !important;
  color: #8a847c !important;
}

body .fd-top-usecase-card h3 {
  margin: 0 0 10px !important;
  font-size: 21px !important;
  line-height: 1.55 !important;
  color: #2d3148 !important;
}

body .fd-top-usecase-card p {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.9 !important;
  color: #555 !important;
}

body .fd-top-usecase-card__more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  color: #2d3148 !important;
}

body .fd-top-usecase-card__more::after {
  content: "→" !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

/* ---------- tablet / mobile ---------- */
@media (max-width: 980px) {
  body .fd-top-mid,
  body .fd-top-mid.wp-block-group,
  body .wp-block-group:has(> .fd-top-mid),
  body .wp-block-cover:has(.fd-top-mid),
  body .entry-content .fd-top-mid,
  body .site-main .fd-top-mid,
  body .content-area .fd-top-mid,
  body main .fd-top-mid {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin-top: 48px !important;
    margin-bottom: 48px !important;
    margin-left: calc(50% - 50vw + 16px) !important;
  }

  body .fd-top-strengths__grid,
  body .fd-top-usecase__grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  body .fd-top-mid__section {
    margin-bottom: 42px !important;
  }

  body .fd-top-mid__head {
    margin-bottom: 22px !important;
  }

  body .fd-top-mid__title {
    font-size: 28px !important;
  }

  body .fd-top-mid__lead {
    font-size: 17px !important;
    line-height: 1.85 !important;
  }

  body .fd-top-strengths {
    padding: 24px 16px !important;
    border-radius: 18px !important;
  }

  body .fd-top-strengths::before {
    left: 6% !important;
    right: 6% !important;
    top: 14px !important;
    height: 44px !important;
  }

  body .fd-top-strength-card,
  body .fd-top-usecase-card {
    padding: 20px 16px 18px !important;
    border-radius: 14px !important;
  }

  body .fd-top-usecase-card::after {
    border-radius: 14px !important;
  }

  body .fd-top-strength-card h3,
  body .fd-top-usecase-card h3 {
    font-size: 18px !important;
  }
}


/* ===============================
FD TOP MID 強制センター化（最終）
=============================== */

/* 親の制約を突破 */
.wp-site-blocks .fd-top-mid {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* align系の影響を無効化 */
.wp-site-blocks .fd-top-mid.alignfull,
.wp-site-blocks .fd-top-mid.alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1200px !important;
}

/* 内部もズレ防止 */
.fd-top-mid > * {
  margin-left: auto;
  margin-right: auto;
}

/* 念のための保険（ブロックテーマ対策） */
.wp-site-blocks {
  overflow-x: hidden;
}