/* ==================================================
  人気カードローン徹底比較
================================================== */

.comparison-section {
  padding: 20px 20px;
  background: #fff;
}

.comparison-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* リボンサブタイトルのコンテナ */
.comparison-subtitle-ribbon {
  text-align: center;
  margin: 30px 0;
  position: relative;
}

/* リボン本体 */
.comparison-subtitle-ribbon span {
  background-color: #d32f2f;
  color: white;
  padding: 12px 40px;
  font-size: 30px;
  font-weight: 700;
  display: inline-block;
  position: relative;
  line-height: 1.2;
}

/* リボンの左側の尖った部分 */
.comparison-subtitle-ribbon span:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  left: -20px;
  bottom: 0;
  border-right: 20px solid #d32f2f;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
}

/* リボンの右側の尖った部分 */
.comparison-subtitle-ribbon span:after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  right: -20px;
  bottom: 0;
  border-left: 20px solid #d32f2f;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .comparison-subtitle-ribbon span {
    padding: 10px 30px;
    font-size: 24px;
  }

  .comparison-subtitle-ribbon span:before {
    left: -16px;
    border-right: 16px solid #d32f2f;
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
  }

  .comparison-subtitle-ribbon span:after {
    right: -16px;
    border-left: 16px solid #d32f2f;
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
  }
}

/* さらに小さい画面用 */
@media (max-width: 480px) {
  .comparison-subtitle-ribbon span {
    padding: 8px 20px;
    font-size: 17px;
  }

  .comparison-subtitle-ribbon span:before {
    left: -15.5px;
    border-right: 16px solid #d32f2f;
    border-top: 28px solid transparent;
    border-bottom: 28px solid transparent;
  }

  .comparison-subtitle-ribbon span:after {
    right: -15.5px;
    border-left: 16px solid #d32f2f;
    border-top: 28px solid transparent;
    border-bottom: 28px solid transparent;
  }
}

.comparison-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 900;
  color: #1a5fb4;
  margin-bottom: 40px;
  position: relative;
}

.comparison-title::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;
}

.comparison-subtitle {
  text-align: center;
  font-size: 1.4rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* 新しい比較表スタイル - 単一テーブル方式 */
.comparison-table-container {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  position: relative;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 900px;
}

.comparison-table th {
  background: #1a5fb4;
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #1a5fb4;
  position: relative;
}

/* ヘッダーの区切り線を表示するための追加スタイル */
.comparison-table th:not(:first-child)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 1px;
  background-color: white;
  z-index: 1;
}

.comparison-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 150px;
}

.comparison-table td {
  padding: 15px 10px;
  text-align: center;
  border: 1px solid #e0e0e0;
  background: white;
  vertical-align: middle;
  height: 150px;
}

.comparison-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: white;
  border-right: 1px solid #e0e0e0;
}

.comparison-table tr:hover td {
  background-color: #f8f9fa;
}

.comparison-table tr:hover td:first-child {
  background-color: #f8f9fa;
}

/* 公式サイト項目の改行スタイル */
.official-title {
  display: inline-block;
  line-height: 1.2;
}

.company-logo-small {
  width: 120px;
  height: 60px;
  margin: 0 auto 10px;
  background: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s;
}

.company-logo-small:hover {
  transform: scale(1.05);
}

.company-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ロゴ画像のスタイル調整 */
.logo-image {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* 会社名のスタイル */
.company-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1a5fb4;
  text-decoration: underline;
  margin-top: 5px;
  display: block;
  text-align: center;
}

.company-name:hover {
  color: #0d4a8f;
}

/* 公式サイトボタン */
.official-btn {
  display: inline-block;
  padding: 8px 12.5px;
  background: #ff6b6b;
  color: white;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: normal;
  width: 100px;
  line-height: 1.2;
}

.official-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.official-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.stars {
  display: flex;
  gap: 2px;
}

.stars i {
  color: #ffcc00;
}

.rating-score {
  font-weight: 700;
  color: #333;
}

/* リンクスタイル */
.company-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .comparison-title {
    font-size: 1.85rem;
  }

  .comparison-subtitle {
    font-size: 1.1rem;
  }

  .company-logo-small {
    width: 100px;
    height: 50px;
  }

  .company-name {
    font-size: 0.9rem;
  }

  .stars i {
    font-size: 0.8rem;
  }

  .rating-score {
    font-size: 0.8rem;
  }

  .official-btn {
    padding: 10px 10px;
    font-size: 0.8rem;
    width: 100px;
  }

  .comparison-table td,
  .comparison-table th {
    font-size: 0.9rem;
    padding: 10px 8px;
  }

  .comparison-table td {
    height: 130px;
  }

  /* スクロール時に境界線が消えないようにする */
  .comparison-table td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background-color: #e0e0e0;
    z-index: 2;
  }
}


/* 明るい緑のグラデーションボタン */
.apply-now-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2ecc71 0%, #1abc9c 100%);
  color: white;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3);
  border: none;
  position: relative;
  font-size: 16px;
}

.apply-now-btn:hover {
  background: linear-gradient(135deg, #27ae60 0%, #16a085 100%);
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 176, 80, 0.4);
}

.apply-now-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 176, 80, 0.3);
}

/* レスポンシブ対応（オプション） */
@media (max-width: 768px) {
  .apply-now-btn {
    padding: 12px 24px;
    font-size: 12.5px;
    width: 100%; /* モバイル表示時に幅いっぱいに広げる場合 */
  }
}