/**
 * トップページのセクション用CSS。
 *
 * 出所: パターン（wp_block）id 200「サービス一覧_CTAあり」と id 196「cta_01」の
 * インライン <style>。2026-07-27に本ファイルへ移設し、パターン側からは削除した。
 *
 * 移設の理由:
 * パターン本文はブロック区切りが無いと the_content の wpautop を通り、CSSの空行が
 * 段落区切りと解釈されて `}</p><p>.b04-card {` のように寸断される。実際にトップの
 * サービスとCTAが崩れた。CSSを本文から出せば、この事故は構造的に起きなくなる。
 *
 * 読み込み順の注意:
 * 同じ .b04b-* のCSSが TCDカスタムエディタの登録スニペット（wp_options の
 * `tcdce_quicktag`）にも残っており、`tcdce-editor-inline-css` として head に出力される。
 * そちらは display:flex を持たない旧版である。本ファイルは子テーマの
 * `child-style` に依存させることで tcdce のインラインCSSより後に出力され、後勝ちする。
 * tcdce_quicktag 側の重複を消すまでは、この順序を崩さないこと。
 *
 * 中身はパターンから移した時点のバイト列そのままで、値は変更していない。
 */

/* ===================================================================
 * サービスセクション（.b04-*）
 * =================================================================== */

.b04-section,
.b04-section *,
.b04-section *::before,
.b04-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.b04-section a { text-decoration: none; color: inherit; }
.b04-section img { max-width: 100%; height: auto; display: block; }
.b04-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

@keyframes b04-fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.b04-section {
  padding: 100px 0 80px;
  background: #F7F9FC;
}
.b04-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.b04-header {
  text-align: center;
  margin-bottom: 56px;
  animation: b04-fadeUp 0.7s ease both;
}
.b04-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #0085B2;
  border-bottom: 2px solid #0085B2;
  padding-bottom: 4px;
  margin-bottom: 12px;
}
.b04-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  color: #0A3D6B;
  line-height: 1.35;
}
.b04-lead {
  margin-top: 16px;
  font-size: 15px;
  color: #555;
  line-height: 1.9;
}

.b04-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.b04-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(10,61,107,0.10);
  display: flex;
  flex-direction: column;
  animation: b04-fadeUp 0.7s ease both;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
.b04-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}

.b04-card:nth-child(1) { --card-color: #0A3D6B; animation-delay: 0.05s; }
.b04-card:nth-child(2) { --card-color: #1B5FA8; animation-delay: 0.15s; }
.b04-card:nth-child(3) { --card-color: #0E7490; animation-delay: 0.25s; }
.b04-card:nth-child(4) { --card-color: #1D6A3A; animation-delay: 0.35s; }

.b04-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.b04-card-image {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: #E0E5EB;
  flex-shrink: 0;
}
.b04-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.b04-card:hover .b04-card-image img {
  transform: scale(1.08);
}

.b04-card-image.img-placeholder {
  background: linear-gradient(
    135deg,
    var(--card-color),
    color-mix(in srgb, var(--card-color) 65%, #fff)
  );
}

.b04-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.22) 100%);
  transition: background 0.3s;
}
.b04-card:hover .b04-card-overlay {
  background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.32) 100%);
}

.b04-card-body {
  padding: 22px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--card-color);
}

.b04-card-number {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--card-color);
  opacity: 0.65;
}

h3.b04-card-title {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  color: #0A3D6B;
  margin-top: 14px;
  margin-bottom: 14px;
}
.b04-card-desc {
  font-size: 12.5px;
  color: #555;
  line-height: 1.85;
  flex: 1;
  margin-bottom: 14px;
}

.b04-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
.b04-card-tags li {
    font-size: 14px;
    font-weight: 600;
    color: var(--card-color);
    background: color-mix(in srgb, var(--card-color) 9%, #fff);
    border: 1px solid color-mix(in srgb, var(--card-color) 28%, #fff);
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.b04-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--card-color);
  letter-spacing: 0.05em;
  margin-top: auto;
  transition: gap 0.3s ease;
}
.b04-card:hover .b04-card-more { gap: 10px; }

@media (max-width: 1023px) {
  .b04-cards-grid { gap: 20px; }
}
@media (max-width: 767px) {
  .b04-section { padding: 72px 0 60px; }
  .b04-cards-grid { grid-template-columns: 1fr; gap: 18px; }
  .b04-card-title { min-height: unset; }
}


/* ===================================================================
 * CTAバナー（.b04b-*）
 * パターン200と196に同一の内容が重複していた。ここで1つにまとめている。
 * =================================================================== */
/* ===== スコープリセット ===== */
.b04b-wrap,
.b04b-wrap *,
.b04b-wrap *::before,
.b04b-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.b04b-wrap a { text-decoration: none; color: inherit; }

/* ===== フェードアップアニメーション ===== */
@keyframes b04b-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 外側ラップ（余白・背景合わせ用） ===== */
.b04b-wrap {
  padding: 16px 0px 80px;
}
.b04b-inner {
  max-width: 1160px;
  margin: 0 auto;
}

/* ===== CTAバナー本体 ===== */
.b04b-banner {
  background: linear-gradient(135deg, #0A3D6B 0%, #0085B2 100%);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(10,61,107,0.25);
  animation: b04b-fadeUp 0.7s ease 0.1s both;
}

/* テキスト */
p.b04b-text {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin: 0;
}

/* ボタン */
a.b04b-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0A3D6B;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.b04b-btn:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===== レスポンシブ ===== */
@media (max-width: 1023px) {
  .b04b-banner { padding: 40px 32px; }
}
@media (max-width: 767px) {
  .b04b-wrap { padding: 0 0 60px; }
  .b04b-banner {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
  }
  .b04b-btn { width: 100%; justify-content: center; }
}
