/* ==================================================
  バレずに借りる流れ
================================================== */

.flow-section {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 40px;
  position: relative;
}

.flow-header {
  text-align: center;
  margin-bottom: 40px;
}

.flow-header h2 {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
}

.flow-header h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, #1a5fb4, #2980b9);
  border-radius: 2px;
}

/* PC用デザイン（パターン3） */
.flow-pc-design {
  display: block;
}

.flow-content {
  display: flex;
  flex-direction: column;
}

/* 上部：スマホ画面 */
.flow-phone-showcase {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
}

.flow-phone-item {
  width: 22%;
  text-align: center;
}

.flow-phone-container {
  width: 160px;
  height: 280px;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 10px;
  position: relative;
  overflow: hidden;
  margin: 0 auto 15px;
  border: 4px solid #333;
}

.flow-phone-screen {
  width: 100%;
  height: 100%;
  background-color: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.flow-app-header {
  background: linear-gradient(to right, #1a5fb4, #2980b9);
  color: white;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
}

.flow-app-content {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flow-app-icon {
  font-size: 36px;
  margin-bottom: 15px;
  color: #1a5fb4;
}

.flow-app-text {
  text-align: center;
  font-size: 12px;
  color: #555;
}

.flow-step-label {
  font-size: 18px;
  font-weight: 700;
  color: #1a5fb4;
}

/* フロー矢印 - シェブロンデザイン（clip-pathを使用） */
.flow-arrow-container {
  position: relative;
  margin-bottom: 40px;
  width: 100%;
}

.flow-arrow-wrapper {
  position: relative;
  height: 100px;
  width: 100%;
  background-color: #f5f5f5;
}

.flow-arrow {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.flow-steps {
  display: flex;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* シェブロン（山形）スタイルのステップ - clip-pathを使用 */
.flow-step {
  position: relative;
  display: flex;
  align-items: center;
  height: 100px;
  padding: 0 30px;
  color: white;
  text-decoration: none;
  flex: 1;
  margin-right: -20px;
  /* 重なりを作成 */
}

/* 各ステップの色設定 */
.flow-step:nth-child(1) {
  background: #5a9bd5;
  /* 最も薄い色 */
  z-index: 4;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 0 0);
}

.flow-step:nth-child(2) {
  background: #3a80d6;
  z-index: 3;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  padding-left: 40px;
  /* 左側の矢印部分のスペースを確保 */
}

.flow-step:nth-child(3) {
  background: #2a70c5;
  z-index: 2;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  padding-left: 40px;
  /* 左側の矢印部分のスペースを確保 */
}

.flow-step:nth-child(4) {
  background: #1a5fb4;
  /* 最も濃い色 */
  z-index: 1;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  padding-left: 40px;
  /* 左側の矢印部分のスペースを確保 */
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.flow-step-number {
  font-size: 42px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  margin-right: 15px;
}

.flow-step-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 下部：説明テキスト */
.flow-details {
  display: flex;
  justify-content: space-around;
}

.flow-detail-box {
  width: 22%;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.flow-detail-description {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #333;
}

.flow-caution-note {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #856404;
}

.flow-caution-note i {
  margin-right: 8px;
  color: #ffc107;
}

.flow-detail-points {
  list-style: none;
}

.flow-detail-points li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 13px;
}

.flow-detail-points li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: #1a5fb4;
}

/* スマホ用デザイン（パターン1） */
.flow-sp-design {
  display: none;
}

.flow-sp-flow-steps {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* SPフロー矢印 */
.flow-sp-flow-arrow {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  height: 80px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(to right, #1a5fb4, #2980b9);
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
}

/* ステップクラスを残しつつ、すべて同じ色に統一 */
.flow-sp-flow-arrow.flow-step-1,
.flow-sp-flow-arrow.flow-step-2,
.flow-sp-flow-arrow.flow-step-3,
.flow-sp-flow-arrow.flow-step-4 {
  background: linear-gradient(to right, #1a5fb4, #2980b9);
}

.flow-sp-step-number {
  font-size: 72px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
  /* PCと同じ色に変更 */
  margin-right: 20px;
  line-height: 1;
}

.flow-sp-step-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.flow-sp-step-content {
  display: flex;
  margin-bottom: 40px;
  flex-direction: row;
  align-items: flex-start;
}

.flow-sp-step-image {
  flex: 0 0 120px;
  /* 幅を120pxに設定 */
  margin-right: 15px;
}

.flow-sp-phone-mockup {
  width: 120px;
  /* 幅を120pxに設定 */
  height: 210px;
  /* 高さも比率を維持するために調整 */
  background-color: #fff;
  border-radius: 30px;
  /* 丸みを元に戻す */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 15px;
  position: relative;
  overflow: hidden;
  border: 4px solid #333;
  /* 元の太さと色に戻す */
}

.flow-sp-phone-screen {
  width: 100%;
  height: 100%;
  background-color: #f8f9fa;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.flow-sp-app-header {
  background: linear-gradient(to right, #1a5fb4, #2980b9);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
}

.flow-sp-app-content {
  flex: 1;
  padding: 15px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flow-sp-app-icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: #1a5fb4;
}

.flow-sp-app-text {
  text-align: center;
  font-size: 14px;
  color: #555;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
}

.flow-sp-step-details {
  flex: 1;
}

.flow-sp-step-description {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.8;
}

.flow-sp-caution-note {
  background-color: #fff3cd;
  padding: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #856404;
}

.flow-sp-caution-note i {
  margin-right: 8px;
  color: #ffc107;
}

.flow-sp-step-points {
  list-style: none;
  margin-left: 0;
  /* マージンを0に変更 */
}

.flow-sp-step-points li {
  position: relative;
  padding-left: 25px;
  /* パディングはそのまま */
  margin-bottom: 10px;
  font-size: 15px;
  text-indent: -25px;
  /* テキストを左に戻す */
  padding-left: 25px;
  /* インデントと同じ値のパディングを設定 */
}

.flow-sp-step-points li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  display: inline-block;
  /* インライン要素として表示 */
  width: 25px;
  /* アイコンの幅を固定 */
  text-indent: 0;
  /* アイコンのテキストインデントをリセット */
  color: #1a5fb4;
}

/* チェックアイコンの色をPCと同じに */
.flow-sp-step-points li i.fa-check {
  color: #1a5fb4;
  margin-right: 5px;
}


@media (max-width: 768px) {
  .flow-section {
    padding: 20px 10px;
  }
  
  .flow-section-title {
    font-size: 24px;
  }

  /* PC用デザインを非表示 */
  .flow-pc-design {
    display: none;
  }

  /* スマホ用デザインを表示 */
  .flow-sp-design {
    display: block;
  }

  .flow-sp-step-number {
    font-size: 50px;
  }

  .flow-sp-step-title {
    font-size: 20px;
  }

  /* スマホ画像とテキストを横並びに */
  .flow-sp-step-content {
    flex-direction: row;
  }

  .flow-sp-step-image {
    flex: 0 0 auto;
    margin-right: 20px;
  }

  .flow-sp-step-details {
    flex: 1;
  }

  .flow-step-number {
    font-size: 28px;
  }

  .flow-step-name {
    font-size: 12px;
  }

  /* 小さい画面でも横並びを維持 */
  .flow-sp-step-content {
    flex-direction: row;
  }

  .flow-sp-step-image {
    flex: 0 0 120px;
    /* 幅を120pxに設定 */
    margin-right: 15px;
  }

  .flow-sp-phone-mockup {
    width: 120px;
    /* 幅を120pxに設定 */
    height: 210px;
    /* 高さも比率を維持するために調整 */
    border-radius: 30px;
    /* 丸みを元に戻す */
    border: 4px solid #333;
    /* 元の太さと色に戻す */
    padding: 8px;
  }

  .flow-sp-app-header {
    padding: 8px;
    font-size: 10px;
  }

  .flow-sp-app-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .flow-sp-app-text {
    font-size: 9px;
    width: 100%;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
  }

  /* 小さい画面でも矢印を維持 */
  .flow-sp-flow-arrow {
    height: 60px;
    padding: 0 15px;
    width: 100%;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
  }

  .flow-sp-step-number {
    font-size: 36px;
    margin-right: 10px;
  }

  .flow-sp-step-title {
    font-size: 16px;
  }

  .flow-sp-step-description {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .flow-sp-caution-note {
    padding: 10px;
    font-size: 12px;
  }

  .flow-sp-step-points li {
    font-size: 12px;
    text-indent: -25px;
    /* テキストを左に戻す */
    padding-left: 25px;
    /* インデントと同じ値のパディングを設定 */
  }
}
