/* 基本レイアウト */
.business-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  gap: 60px;
}

/* 左カラム：ナビゲーション */
.business-nav {
  width: 25%;
  flex-shrink: 0;
}

.business-nav-inner {
  position: sticky;
  top: 120px; /* ヘッダーの高さに応じて調整 */
}

.business-nav h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.business-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid #e0e0e0;
}

.business-nav li a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #888;
  font-weight: 500;
  transition: color 0.3s, border-left-color 0.3s;
  position: relative;
  left: -2px;
}

.business-nav li a.active {
  color: #111; /* アクティブ時の文字色 */
  font-weight: 700;
  border-left: 2px solid #111; /* アクティブ時のライン */
}

/* 右カラム：コンテンツ */
.business-content {
  width: 75%;
  flex-grow: 1;
}

.business-section {
  margin-bottom: 120px;
  scroll-margin-top: 100px; /* ← ヘッダーの高さを指定 */
}
.business-section:last-child {
  margin-bottom: 0;
}

.business-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 30px;
}

/* タイトル全体をまとめるコンテナ */
.business-section-header {
  margin-bottom: 30px;
}

/* 新しいメインタイトル (h2) */
.business-main-title {
  font-size: 48px; /* 大胆に大きく */
  font-weight: 900; /* 最も太く */
  color: #1a1a1a;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* 新しいサブタイトル (h3) */
.business-subtitle {
  font-size: 22px; /* メインタイトルよりは控えめに */
  font-weight: 700;
  color: #555;
}
.business-main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 30px;
  border-radius: 8px;
}

.business-description {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.business-details {
  margin-bottom: 40px;
}

.business-details h4 {
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 20px;
}

.business-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px 20px;
  align-items: start; /* テキストの上端を揃える */
}

.business-details dt {
  font-size: 2rem; /* 大胆に大きくする */
  font-weight: 800; /* より太くする */
  color: #111; /* 濃い色にする */
  line-height: 1.2; /* 行間を詰めてバランスを取る */
}

.business-details dd {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.business-sub-images {
  display: flex;
  gap: 20px;
  justify-content: space-between;
}
.business-sub-images figure {
  margin: 0;
  flex: 1;
  text-align: center;
}
.business-sub-images img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}
.business-sub-images figcaption {
  font-size: 14px;
  color: #333;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .business-wrapper {
    flex-direction: column;
    padding: 40px 15px;
    gap: 0;
  }

  .business-nav {
    width: 100%;
    margin-bottom: 40px;
  }
  .business-nav-inner {
    position: static; /* sticky解除 */
  }

  .business-content {
    width: 100%;
  }

  .business-title {
    font-size: 28px;
  }
  .business-main-title {
    font-size: 32px; /* スマホ用に調整 */
  }
  .business-subtitle {
    font-size: 18px; /* スマホ用に調整 */
  }
  .business-section {
    margin-bottom: 80px;
    scroll-margin-top: 80px;
  }

  .business-sub-images {
    flex-direction: column;
  }
}

/* ---------------------------------------------------- */
/* ===== 取扱いメーカーセクションのスタイル ===== */

/* フィルターボタンのコンテナ */
.brand-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

/* フィルターボタンのスタイル */
.brand-filter-btn {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  font-family: "Mozilla Text", "M PLUS 2", sans-serif;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.brand-filter-btn:hover {
  background-color: #e0e0e0;
  border-color: #ccc;
}
/* アクティブなボタンのスタイル */
.brand-filter-btn.active {
  background-color: #333;
  color: #fff;
  border-color: #333;
}

/* ロゴグリッドのコンテナ */
.brand-grid {
  display: grid;
  gap: 30px; /* カード間のスペース */

  /* --- ▼▼▼ PC表示を4列に設定 (ここが変更点) ▼▼▼ --- */
  /* デフォルト（スマホ）は2列 */
  grid-template-columns: repeat(2, 1fr);
}

/* タブレットサイズ (768px以上) では3列に */
@media (min-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* PCサイズ (1200px以上) では4列に */
@media (min-width: 1200px) {
  .brand-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- ▼▼▼ 各ボックスのデザインを刷新 (ここからがメイン) ▼▼▼ --- */
.brand-item.hide {
  display: none !important; /* !importantで強制的に非表示にする */
}

/* JSで挿入するサブタイトルのスタイル（区切りを強調したデザイン） */
.brand-category-subtitle {
  /* グリッドの全幅を使用 */
  grid-column: 1 / -1;
  /* フォントスタイル */
  font-size: clamp(1.5rem, 4vw, 1.8rem); /* レスポンシブなフォントサイズ */
  font-weight: 800; /* より太くして見出し感を強調 */
  color: #111; /* 文字色を濃くする */
  letter-spacing: 0.05em; /* 文字間を少し広げて視認性を向上 */
  /* ★★★ 区切りのための重要な調整 ★★★ */
  /* 1. 前のカテゴリとの間に大きな余白を作成 */
  margin-top: 80px;
  /* 2. サブタイトルとメーカーリストの間の余白を調整 */
  margin-bottom: 25px;
  /* 3. 下線とテキストの間の余白 */
  padding-bottom: 15px;
  /* 4. 目立つ下線を引いて区切りを明確化 */
  border-bottom: 3px solid #00529b; /* 太さと色を調整（色はサイトのテーマカラーに合わせてください） */
}


.used-title {
  /* グリッドの全幅を使用 */
  grid-column: 1 / -1;
  /* フォントスタイル */
  font-size: clamp(1.5rem, 4vw, 1.8rem); /* レスポンシブなフォントサイズ */
  font-weight: 800; /* より太くして見出し感を強調 */
  color: #111; /* 文字色を濃くする */
  letter-spacing: 0.05em; /* 文字間を少し広げて視認性を向上 */
  /* ★★★ 区切りのための重要な調整 ★★★ */
  /* 1. 前のカテゴリとの間に大きな余白を作成 */
  margin-top: 80px;
  /* 2. サブタイトルとメーカーリストの間の余白を調整 */
  margin-bottom: 25px;
  /* 3. 下線とテキストの間の余白 */
  padding-top: 15px;
  padding-bottom: 15px;
  /* 4. 目立つ下線を引いて区切りを明確化 */
  border-top: 3px solid #00529b;
  border-bottom: 3px solid #00529b; /* 太さと色を調整（色はサイトのテーマカラーに合わせてください） */
  text-align: center;
}


/* ===== カテゴリ見出しに「（あいうえお順）」を追記 ===== */
.brand-category-subtitle::after {
  content: "（あいうえお順）"; /* 表示するテキスト */
  font-size: 0.6em; /* 親要素（見出し）の60%のサイズにする */
  font-weight: 500; /* 少し細めのフォントにする */
  color: #555; /* 少し薄いグレーの文字色にする */
  margin-left: 10px; /* 見出しとの間に余白を設ける */
  vertical-align: middle; /* 垂直方向の位置を中央に揃える */
  letter-spacing: normal; /* 親要素の文字間隔を継承しないようにリセット */
}
/* 最初のサブタイトルだけ上のマージンをなくす */
.brand-category-subtitle:first-of-type {
  margin-top: 0;
}

/* 各メーカーのアイテム（カード） */
.brand-item {
  /* background-color: #fff;  <-- これを削除（またはコメントアウト） */
  
  /* ↓ ここにシルバーのグラデーションを追加 */
  background-image: linear-gradient(
    to right, 
    #ccc 0%, 
    #fefefe 50%, /* 白より少し暗いハイライト */
    #ccc 100%
  );
  
  /* ↓ 他のスタイルはそのまま */
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* カードにマウスを乗せた時のホバーエフェクト */
.brand-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: #00529b; /* サイトのテーマカラーに合わせてください */
}

/* カード内のリンク要素 */
.brand-item a {
  display: block;
  width: 100%;
  padding: 20px 15px;
  text-decoration: none;
  text-align: center;
}

/* ロゴを囲むラッパーは削除されたので、関連スタイルは不要 */
.brand-logo-wrapper {
  display: none; /* 念のため非表示に */
}

/* 会社名のスタイル */
.brand-name {
  font-size: 15px;
  color: #333;
  font-weight: 500;
  line-height: 1.5;
  /* 以前のスタイルは不要 */
  padding: 0;
  background-color: transparent;
}




/* ===== 主な取扱いメーカーページ専用スタイル ===== */
.manufacturers-section {
  padding: 100px 0;
  font-family: "Mozilla Text", "M PLUS 2", sans-serif;
}

/* 幅広のコンテナ */
.container-wide {
  width: 90%;
  width: 80%;
  max-width: 1400px; /* 通常のcontainerより広く設定 */
  margin: 0 auto;
}
@media (max-width: 768px) {
  .container-wide {
    width: 90%;
  }
}
/* フィルターボタンを中央揃えに */
.brand-filters {
  justify-content: center;
  margin-bottom: 50px;
}

/* ===== 統合事業セクションのスタイル (端保機工のことページ) ===== */
.integrated-business {
  padding: 80px 0;
  background-color: #f9f9f9; /* 背景色を変えてセクションを区切る */
}
.integrated-business:nth-of-type(even) {
  background-color: #fff; /* 交互に背景色を変える */
}

.integrated-business-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 40px;
}

/* 画像とテキストの順番を逆にするクラス */
.integrated-business-content.reverse {
  grid-template-areas: "text image";
}
.integrated-business-content.reverse .integrated-business-image {
  grid-area: image;
}
.integrated-business-content.reverse .integrated-business-text {
  grid-area: text;
}

.integrated-business-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.integrated-business-text .description {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
  padding: 0;
  background-color: transparent;
}
.integrated-business-text .details h4 {
  font-size: 18px;
  font-weight: 700;
  border-bottom: 2px solid #333;
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.integrated-business-text .details ul {
  list-style-type: none;
  padding-left: 0;
}
.integrated-business-text .details ul li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 15px;
}
.integrated-business-text .details ul li::before {
  content: "✔";
  color: #007bff; /* サイトのアクセントカラーに合わせて変更 */
  position: absolute;
  left: 0;
  font-weight: bold;
}

@media (max-width: 768px) {
  .integrated-business-content,
  .integrated-business-content.reverse {
    grid-template-columns: 1fr;
    grid-template-areas: unset;
  }
  .integrated-business-content .integrated-business-image,
  .integrated-business-content.reverse .integrated-business-image {
    grid-area: unset;
    margin-bottom: 30px;
  }
  .integrated-business-content .integrated-business-text,
  .integrated-business-content.reverse .integrated-business-text {
    grid-area: unset;
  }
}

/* ===== 見出し(h2)の強調 & CSSアニメーション ===== */
.integrated-business .section-heading h2 {
  font-weight: 800; /* 文字を太くする */
  font-size: 3rem;
  margin-bottom: 5px;
}

/* CSSスライドアニメーション */
.css-slide-up {
  overflow: hidden; /* はみ出したspanを隠すマスクの役割 */
}
.css-slide-up span {
  display: block; /* transformを適用するため */
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 親の .gsap-fade-up に is-inview が付いたらアニメーションを開始 */
.gsap-fade-up.is-inview .css-slide-up span {
  transform: translateY(0);
  opacity: 1;
}
/* ============================================= */
/* マッチングサービスセクション デザイン刷新     */
/* ============================================= */

.matching-service-layout {
  display: grid;
  /* 左カラム(特長) : 右カラム(マップ) の比率を 1 : 1.2 に変更 */
  /* これにより、右カラムが左カラムより20%広くなります */
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
  margin-top: 50px;
}

/* --- 左カラム：特長リスト (以前のカードデザインに戻す) --- */
.matching-service-features .feature-list {
  display: grid;
  grid-template-columns: 1fr; /* 1列のまま */
  gap: 25px;
}
.matching-service-features .feature-item {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 35px 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.matching-service-features .feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.matching-service-features .feature-list {
  counter-reset: feature-counter;
}
.matching-service-features .feature-item::before {
  counter-increment: feature-counter;
  content: "0" counter(feature-counter);
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.04);
  z-index: 0;
  line-height: 1;
}
.matching-service-features .feature-item__icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #eaf4ff;
  color: #007bff;
  font-size: 1.8rem;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}
.matching-service-features .feature-item__text {
  position: relative;
  z-index: 1;
}
.matching-service-features .feature-item__text h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #212529;
}
.matching-service-features .feature-item__text p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #6c757d;
}

/* --- 右カラム：ネットワークマップ (アニメーション対応) --- */
.matching-service-map h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}
.matching-service-map p {
  line-height: 1.8;
  margin-bottom: 30px;
  color: #555;
}
/* ★★★ アニメーション用のラッパー ★★★ */
.map-animation-wrapper {
  position: relative; /* 子要素を絶対配置する基準 */
}
.map-image-wrapper {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}
.map-image-wrapper img {
  width: 100%;
  height: auto;
}
/* ★★★ アニメーション用のオーバーレイSVG (位置修正版) ★★★ */
#map-animation-overlay {
  position: absolute;
  /* 親(.map-image-wrapper)のpadding分だけ内側に配置 */
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  /* これで、背景画像と全く同じエリアに重なります */

  overflow: visible;
}
/* アニメーション用の円（パルス） */
#map-animation-overlay .pulse-circle {
  fill: #e94709; /* 中心の円の色 */
  stroke: #e94709; /* 外側の円の色 */
  stroke-width: 2;
  opacity: 0.6;
}
/* アニメーション用の線 */
#map-animation-overlay .network-line {
  stroke: #f39800; /* 線の色 */
  stroke-width: 1;
  stroke-linecap: round;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 992px) {
  .matching-service-layout {
    /* スマホ・タブレットでは従来通り1列にする */
    grid-template-columns: 1fr;
    gap: 50px;
  }
}
