:root {
  --primary-color: #007bff;
  --feature-bg: #CCE5FF;
  --feature-number-color: rgba(0, 85, 179, 0.1);
  --feature-title-color: #0055B3;
  --text-color: #333;
  --bg-light: #f9f9f9;
  --font-base: 'Helvetica Neue', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg-light);
  color: var(--text-color);
}

/* ─── Header ─── */
header {
  background: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  max-height: 40px; /* ロゴの最大高さを 40px に制限 */
  height: auto;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
}

nav a.cta {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
}

/* ─── Hero Section ─── */
.hero {
  background: linear-gradient(to bottom, #bce0fd, #e5f3ff);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}

/* ─── Problem Section ─── */
.problem-section {
  background: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
}

.problem-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.problem-container {
  display: grid;
  grid-template-areas:
    "top-left top-center top-right"
    "bottom-left avatar bottom-right"
    ". bottom-center .";
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
  justify-items: center;
}

.problem-item {
  background: #d3eaff;
  color: #003366;
  font-weight: bold;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  position: relative;
  max-width: 240px;
}

.bubble::after {
  content: "";
  position: absolute;
  border: 10px solid transparent;
}

.top-left { grid-area: top-left; }
.top-center { grid-area: top-center; }
.top-right { grid-area: top-right; }
.bottom-left { grid-area: bottom-left; }
.bottom-center { grid-area: bottom-center; }
.bottom-right { grid-area: bottom-right; }

.problem-avatar {
  grid-area: avatar;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-image {
  width: 120px;
  height: auto;
  /* 丸抜き解除: border-radius を削除 */
}

/* ─── Services Section ─── */
.service-features {
  display: grid;
  /* 「プロジェクト」セクションと同等のパディング */
  padding: 3rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  background: #fff;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* 背景色を白 (#fff) に変更して青い塗りつぶしを除去 */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.feature-image {
  width: 100%;
  height: 200px; /* 画像はすべて高さ 200px に揃える */
  overflow: hidden;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 中央をトリミングして均一に */
  display: block;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--feature-title-color);
  margin: 1rem 0 0.5rem;
}

.feature-desc {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
  padding: 0 1rem 1.5rem;
}

/* ─── New Process Section ─── */
.process-section {
  background: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
}

.process-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

/* 親要素で align-items: stretch を有効に */
.process-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch; /* 子要素（.process-item）の高さを揃える */
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.process-item {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* 内部要素の横幅と高さを揃えやすくする */
  text-align: center;
}

.process-icon {
  width: 80px;
  height: auto;
  margin: 0 auto 1rem;
}

.process-box {
  background: var(--feature-bg);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  flex: 1; /* 親要素 .process-item の高さに合わせて伸長 */
}

.process-box-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--feature-title-color);
  margin-bottom: 0.5rem;
}

.process-box-desc {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
}

/* ─── Projects Section ─── */
.projects-section {
  background: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
}

.projects-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.projects-container {
  display: grid;
  /* 各行 5 列ずつに固定 */
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-icon {
  background: var(--feature-bg);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-icon img {
  width: 50px;
  height: auto;
}

.project-label {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.4;
}

/* ─── Case Studies Section ─── */
.case-section {
  background: #ffffff;
  padding: 3rem 2rem;
}

.case-item {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;    /* 画像とテキストの高さを揃える */
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.case-item.reverse {
  flex-direction: row-reverse;
}

.case-image {
  flex: 1;                 /* 画像をコンテンツと同じ高さに伸ばす */
}

.case-image img {
  width: 100%;
  height: 100%;           /* 高さをコンテナいっぱいに */
  object-fit: cover;      /* 画像が崩れないように拡大縮小 */
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.case-content {
  flex: 1;
  min-width: 300px;
}

.case-title {
  font-size: 1.5rem;
  color: var(--feature-title-color);
  margin-bottom: 1rem;
}

.case-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* 3番目の span（=「導入目的」）の前に改行をいれる */
.case-info span:nth-of-type(3)::before {
  content: "";
  display: block;
  margin-top: 0.5rem;
}

.case-label {
  font-weight: bold;
  margin-right: 0.5rem;
}

.case-text {
  margin-right: 2rem;
  color: var(--text-color);
}

.case-block {
  background: #f2f2f2;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.case-block-step {
  background: var(--primary-color);
  color: #fff;
  display: inline-block;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.case-block-desc {
  color: var(--text-color);
  line-height: 1.6;
}

/* 矢印（簡易表示） */
.case-arrow {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* ─── Flow Section ─── */
.flow-section {
  background: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
}

.flow-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.flow-container {
  max-width: 1100px;
  margin: 0 auto;
}

.flow-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.flow-step {
  background: #d3eaff;
  color: #003366;
  font-weight: bold;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  position: relative;
  min-width: 180px;
  text-align: center;
}

/* 下向き矢印（吹き出しのしっぽ） */
.flow-step::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #d3eaff;
}

/* 最後のステップには矢印を表示しない */
.flow-step.last::after {
  content: none;
}

.flow-detail {
  text-align: left; /* 左寄せ */
}

.flow-note {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.case-logo img {
  width: 50%;
  height: auto;
}

/* ─── CTA Banner ─── */
/* ボタンのみを中央に配置 */
.cta-banner {
  background: #d7edff;
  text-align: center;
  padding: 2rem 0;     /* 高さを抑えて余白を減少 */
}

.cta-banner .btn {
  margin: 0 auto;
}

/* ─── Footer ─── */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .case-item, .flow-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .case-item.reverse {
    flex-direction: column;
  }
  .flow-detail {
  text-align: left; /* 左寄せ */
  }

@media (max-width: 600px) {
  .feature-image {
    height: 160px; /* スマホ等では少し小さめに */
  }
  .projects-container {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

