/* ==========================================================================
   プラン説明セクション (背景区別 ＆ 強調デザイン ＆ モーダル)
   ========================================================================== */

/* 前後のセクションと区別するための背景（やや濃い青みダーク ＋ 上下境界線） */
.wimax-plan-section {
  position: relative;
  /* background-color: rgba(18, 22, 30, 0.7); */
  background-image: url(../img/plan_bg.png);
  background-size: auto 100%;
  background-position: center center;
  background-repeat: no-repeat;

  /* border-top: 1px solid rgba(255, 107, 0, 0.2);
  border-bottom: 1px solid rgba(255, 107, 0, 0.2); */
  padding: 40px 0;
}

@media (min-width: 768px) {
  .wimax-plan-section {
    padding: 40px 0;
  }
}

/* 見出し */
.plan-section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 32px;
}

.plan-title-sub {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .plan-section-title {
    font-size: 40px;
    margin-bottom: 48px;
  }
}

/* プランカード配置 */
.plan-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: stretch;
  }
}

/* --- カード共通スタイル --- */
.plan-card {
  position: relative;
  background: rgba(24, 25, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
}

/* プラン名 */
.plan-name {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

/* リード文 */
.plan-lead {
  font-size: 13px;
  color: #b0b0b0;
  margin-bottom: 16px;
}

/* 商品画像 */
.plan-img-wrap {
  width: 100%;
  max-width: 220px;
  height: 140px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 料金表記 */
.plan-price-wrap {
  margin-bottom: 20px;
  line-height: 1;
}

.plan-price-label {
  font-size: 14px;
  color: #e0e0e0;
  margin-right: 4px;
}

.plan-price-num {
  font-size: 38px;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Arial Black', sans-serif;
}

.plan-price-unit {
  font-size: 14px;
  color: #ffffff;
  margin-left: 2px;
}

/* カード下部のアクション群 */
.plan-action-group {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* 「詳細を見る」：補助導線なのでオレンジグラデーション */
.plan-btn-detail {
  position: relative;
  width: 88%;
  max-width: 190px;
  min-height: 40px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #ff9800 0%, #ff7200 48%, #ff4b00 100%);
  border: 1px solid rgba(255, 190, 92, 0.72);
  border-radius: 22px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -2px 0 rgba(143, 38, 0, 0.30),
    0 5px 10px rgba(0, 0, 0, 0.34),
    0 0 13px rgba(255, 100, 0, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}

.plan-btn-detail::before,
.plan-btn-apply::before {
  content: '';
  position: absolute;
  inset: 1px 2px auto;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent);
  pointer-events: none;
}

.plan-btn-detail:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(143, 38, 0, 0.24),
    0 7px 14px rgba(0, 0, 0, 0.38),
    0 0 19px rgba(255, 111, 0, 0.54);
}

/* 「今すぐ申し込む」：主要CTAなのでブルーグラデーション */
.plan-btn-apply {
  position: relative;
  width: 100%;
  max-width: 230px;
  min-height: 50px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #00c6ff 0%, #008cff 48%, #006cff 100%);
  border: 1px solid rgba(126, 224, 255, 0.72);
  border-radius: 26px;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 49, 139, 0.34),
    0 7px 14px rgba(0, 0, 0, 0.40),
    0 0 18px rgba(0, 166, 255, 0.46);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}

.plan-btn-apply > span {
  position: relative;
  z-index: 1;
}

.plan-btn-apply-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.plan-btn-apply:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -2px 0 rgba(0, 49, 139, 0.25),
    0 9px 18px rgba(0, 0, 0, 0.44),
    0 0 25px rgba(0, 198, 255, 0.66);
}

.plan-btn-apply:hover .plan-btn-apply-arrow {
  transform: translateX(3px);
}

/* --- フリープラン（おすすめ）目立たせる意匠 --- */
.plan-card.is-recommended {
  border: 2px solid var(--color-primary);
  background: linear-gradient(180deg, rgba(35, 30, 30, 0.95) 0%, rgba(20, 20, 26, 0.98) 100%);
  box-shadow: 0 0 25px rgba(255, 107, 0, 0.35);
  transform: scale(1.02); /* 少し大きく表現 */
}

@media (min-width: 768px) {
  .plan-card.is-recommended {
    transform: scale(1.04);
  }
}

.plan-card.is-recommended .plan-name {
  color: var(--color-primary);
  font-size: 22px;
}

.plan-card.is-recommended .plan-price-num {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

/* 「おすすめ!!!」バッジ */
.plan-badge-recommend {
  position: absolute;
  top: -14px;
  background: linear-gradient(90deg, #ff8c00 0%, #ff3300 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255, 51, 0, 0.5);
  letter-spacing: 1px;
}

/* おすすめカードの「詳細を見る」も補助導線としてオレンジ系で統一 */
.plan-btn-recommend {
  background: linear-gradient(135deg, #ffad1f 0%, #ff7900 46%, #ff4b00 100%);
  border-color: rgba(255, 203, 116, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -2px 0 rgba(143, 38, 0, 0.30),
    0 5px 10px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(255, 107, 0, 0.46);
}

.plan-btn-recommend:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -2px 0 rgba(143, 38, 0, 0.24),
    0 7px 14px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 126, 0, 0.64);
}


/* ==========================================================================
   モーダルウィンドウ スタイル
   ========================================================================== */

.wimax-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 開いた状態 */
.wimax-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* 暗いオーバーレイ背景 */
.wimax-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

/* モーダル本体 */
.wimax-modal-container {
  position: relative;
  z-index: 2001;
  width: 100%;
  max-width: 520px;
  background-color: #1a1a20;
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 16px;
  padding: 28px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.wimax-modal.is-open .wimax-modal-container {
  transform: translateY(0);
}

/* 閉じる「×」ボタン */
.wimax-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wimax-modal-close:hover {
  color: #ffffff;
}

.wimax-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* スペックリスト（DL/DT/DD） */
.wimax-modal-spec {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-row {
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (min-width: 480px) {
  .spec-row {
    flex-direction: row;
    justify-content: space-between;
  }
}

.spec-row dt {
  font-size: 13px;
  color: var(--color-text-sub);
  font-weight: 700;
  margin-bottom: 4px;
}

@media (min-width: 480px) {
  .spec-row dt {
    width: 40%;
    margin-bottom: 0;
  }
}

.spec-row dd {
  font-size: 13px;
  color: #ffffff;
}

@media (min-width: 480px) {
  .spec-row dd {
    width: 60%;
    text-align: right;
  }
}

/* スペック内の装飾テキスト */
.text-highlight { color: var(--color-primary); font-weight: 700; }
.text-free { color: #00c6ff; font-weight: 700; }
.strike { text-decoration: line-through; color: #888888; font-size: 12px; }
.spec-note { font-size: 11px; color: #a0a0a0; }
/* ========================================================================== 
   スマホ表示：プラン切替タブ
   PC（768px以上）は従来の2カラム表示を維持
   ========================================================================== */

/* PCではタブUI自体を表示しない */
.plan-tab-radio,
.plan-tabs-sp {
  display: none;
}

@media (max-width: 767px) {
  /* ラジオボタンは表示せず、labelをタブとして利用 */
  .plan-tab-radio {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .plan-tabs-sp {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 18px;
    align-items: end;
  }

  .plan-tab {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .plan-tab-catch {
    display: block;
    min-height: 24px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
  }

  .plan-tab-name {
    position: relative;
    width: 100%;
    min-height: 54px;
    padding: 11px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.66);
    background: rgba(13, 15, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px 10px 4px 4px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  }

  .plan-tab-name::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid transparent;
    transform: translateX(-50%);
    transition: border-top-color 0.2s ease;
  }

  /* 選択中タブ：オレンジ面＋発光＋浮き上がりで明確に強調 */
  #plan-tab-basic:checked ~ .plan-tabs-sp .plan-tab-basic .plan-tab-name,
  #plan-tab-free:checked ~ .plan-tabs-sp .plan-tab-free .plan-tab-name {
    color: #ffffff;
    background: linear-gradient(135deg, #ff9a00 0%, #ff6a00 52%, #ff4300 100%);
    border: 2px solid #ffc15a;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.42),
      inset 0 -2px 0 rgba(128, 35, 0, 0.28),
      0 0 0 2px rgba(255, 119, 0, 0.16),
      0 8px 18px rgba(0, 0, 0, 0.34),
      0 0 20px rgba(255, 107, 0, 0.46);
    transform: translateY(-3px);
    filter: saturate(1.08);
  }

  #plan-tab-basic:checked ~ .plan-tabs-sp .plan-tab-basic .plan-tab-name::after,
  #plan-tab-free:checked ~ .plan-tabs-sp .plan-tab-free .plan-tab-name::after {
    border-top-color: #ff5200;
  }

  #plan-tab-basic:checked ~ .plan-tabs-sp .plan-tab-basic .plan-tab-catch,
  #plan-tab-free:checked ~ .plan-tabs-sp .plan-tab-free .plan-tab-catch {
    color: #ffad2f;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.52);
    transform: translateY(-1px);
  }

  /* スマホでは縦積みせず、選択されたカード1枚だけを表示 */
  .plan-grid {
    display: block;
    width: 100%;
    max-width: 560px;
  }

  .plan-grid .plan-card {
    display: none;
    width: 100%;
  }

  #plan-tab-basic:checked ~ .plan-grid .plan-basic,
  #plan-tab-free:checked ~ .plan-grid .plan-free {
    display: flex;
  }

  /* タブ表示では拡大による横はみ出しを防ぐ */
  .plan-card.is-recommended {
    transform: none;
  }
}
