/* プラン表のスタイル */
.plan-table {
  width: 100%;
  margin: 3rem 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  table-layout: fixed;
}

.plan-table th,
.plan-table td {
  padding: 10px;
  text-align: center;
  border: 2px solid #fff;
}
.plan-table th {
  font-weight: 700;
}
/* プランヘッダーの色分け */
.plan-table tr:first-child th:nth-child(2) {
  /* ダイヤモンド */
  background-color: #00a5ff;
  color: #fff;
}

.plan-table tr:first-child th:nth-child(3) {
  /* プラチナ */
  background-color: #999999;
  color: #fff;
}

.plan-table tr:first-child th:nth-child(4) {
  /* ゴールド＋ */
  background-color: #fbd100;
  color: #333;
}

.plan-table tr:first-child th:nth-child(5) {
  /* コールド */
  background-color: #ffff00;
  color: #333;
}
.plan-table tr:first-child th:nth-child(6) {
  /* シルバー */
  background-color: #dedede;
  color: #333;
}

.plan-table th:nth-child(1),
.plan-table td:nth-child(1) {
  width: 100px;
  background-color: #f6f6f6;
  color: #333;
  box-sizing: border-box;
}

.plan-table th:nth-child(2),
.plan-table td:nth-child(2),
.plan-table th:nth-child(3),
.plan-table td:nth-child(3),
.plan-table th:nth-child(4),
.plan-table td:nth-child(4),
.plan-table th:nth-child(5),
.plan-table td:nth-child(5),
.plan-table th:nth-child(6),
.plan-table td:nth-child(6) {
  width: calc((100% - 100px) / 5);
  box-sizing: border-box;
}
.plan-table td.row {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.plan-table tr:nth-child(2) th {
  background-color: #f8f9fa;
  color: #2c3e50;
}

.plan-table td {
  background-color: #fff;
  vertical-align: middle;
}

/* ゴールドプランの強調 */
.plan-table tr:first-child th:nth-child(5) {
  position: relative;
}

.plan-table tr td:nth-child(2) {
  background-color: #e1ffff;
}

.plan-table tr td:nth-child(3) {
  background-color: #ebebeb;
}

.plan-table tr td:nth-child(4) {
  background-color: #fef2a6;
}

.plan-table tr td:nth-child(5) {
  background-color: #ffffda;
}

.plan-table tr:nth-child(9) td:nth-child(2) {
  background-color: #fff;
}
.plan-table tr:first-child th:nth-child(5)::after {
  content: "おすすめ";
  display: block;
  position: absolute;
  top: -20px;
  right: -10px;
  background-color: #e41b23;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #fff;
}

/* サービス内容のスタイル */
.plan-table ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.plan-table li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.plan-table td .price {
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-table td .price strong {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e41b23;
  display: block;
  margin-bottom: 0.3rem;
}

.plan-table td .price .price-note {
  font-size: 0.8rem;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .plan-table {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .plan-table th:nth-child(1),
  .plan-table td:nth-child(1) {
    width: 100px;
  }

  .plan-table th:nth-child(2),
  .plan-table td:nth-child(2),
  .plan-table th:nth-child(3),
  .plan-table td:nth-child(3),
  .plan-table th:nth-child(4),
  .plan-table td:nth-child(4),
  .plan-table th:nth-child(5),
  .plan-table td:nth-child(5),
  .plan-table th:nth-child(6),
  .plan-table td:nth-child(6) {
    width: 180px !important;
  }

  .plan-table tr:nth-child(4) td .price strong {
    font-size: 1.1rem;
  }

  .plan-table td.row {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .plan-table {
    font-size: 0.9rem;
  }

  .plan-table th,
  .plan-table td {
    padding: 8px;
  }

  .plan-table tr:first-child th:nth-child(4)::after {
    top: -15px;
  }

  .plan-table tr td:nth-child(4)::after {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .plan-table tr:nth-child(4) td .price strong {
    font-size: 1rem;
  }
}

.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .table-container {
    padding-top: 20px;
  }
}
