/* ============================================================
   スクール：料金表（.dg-price-container）
   読み込み：inc/school-assets.php（shared/css のあとに読むので、同じ強さの指定ならこちらが勝つ）
   2026-11-12 作成。HTML は固定ページの本文（dg-price-container 〜）をそのまま使う
   - スマホ：1列 ／ 768px 以上：2列（入会金のカードは横いっぱい）
   - 色：入会金＝濃いグリーン、土日＝グリーン、平日＝黄オレンジ、全日＝ライトブルー、ジュニア＝ピンク
   ============================================================ */
.dg-price-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 32px auto;
  padding: 0 12px;
  box-sizing: border-box;
  font-family: inherit;
}
.dg-price-container *,
.dg-price-container *::before,
.dg-price-container *::after { box-sizing: border-box; }

/* カード */
.dg-price-container .dg-price-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* カードの見出し（コース名） */
.dg-price-container .dg-card-header {
  padding: 14px 16px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
}
.dg-price-container .bg-fee-green { background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%); }
.dg-price-container .bg-weekend   { background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%); }
.dg-price-container .bg-weekday   { background: linear-gradient(135deg, #ef6c00 0%, #ffb300 100%); }
.dg-price-container .bg-allday    { background: linear-gradient(135deg, #0277bd 0%, #4fc3f7 100%); }
.dg-price-container .bg-junior    { background: linear-gradient(135deg, #c2185b 0%, #f06292 100%); }

/* カードの中身 */
.dg-price-container .dg-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* 区切り線の高さを横並びのカードでそろえる */
  padding: 20px 20px 22px;
  text-align: center;
  color: #333;
}

/* 料金 */
.dg-price-container .dg-card-price {
  margin: 0 0 4px;
  padding: 0;
  color: #222;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
}
.dg-price-container .dg-card-price span {   /* ※レッスン受け放題 */
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 14px;
  font-weight: normal;
}

/* 税込の金額（色は本文の style で各コースの色が付く） */
.dg-price-container .dg-time-note {
  margin: 0;
  padding: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

/* 本文の閉じタグの重複（</p></p>）でできる空の段落は出さない */
.dg-price-container p:empty { display: none; }

/* 区切り線 */
.dg-price-container .dg-card-divider {
  height: 1px;
  margin: 16px 0;
  background: #e5e5e5;
}

/* レッスン可能時間 */
.dg-price-container .dg-card-time {
  color: #333;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}
.dg-price-container .dg-time-label {   /* 「レッスン可能時間」：時間の上に置く */
  display: block;
  width: fit-content;
  margin: 0 auto 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: #f1f3f1;
  color: #555;
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* 入会金（横いっぱいのカード） */
.dg-price-container .dg-fee-card-wide .dg-card-body { justify-content: center; }

/* 768px 以上：2列。入会金は横いっぱい */
@media (min-width: 768px) {
  .dg-price-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0;
  }
  .dg-price-container .dg-fee-card-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }
  .dg-price-container .dg-fee-card-wide .dg-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
  }
  .dg-price-container .dg-card-price { font-size: 28px; }
}

/* ------------------------------------------------------------
   スマホ（767px 以下）：コースは必ず1列、横幅いっぱいに使う
   2026-11-12 追加。ほかの CSS（追加 CSS や本文の <style> など）が
   横並びの指定をしていても負けないよう、並び方の指定だけ !important にしている
   ------------------------------------------------------------ */
@media (max-width: 767.98px) {
  html body .dg-price-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    width: auto !important;
    max-width: none !important;
    margin: 24px 0 !important;
    padding: 0 !important;
  }
  html body .dg-price-container > * {
    grid-column: 1 / -1 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
  }
  html body .dg-price-container .dg-card-body {
    padding: 16px 16px 18px;
  }
}

/* ------------------------------------------------------------
   PC（768px 以上）：コースの数が奇数のとき（伊丹校など）、最後の1枚を真ん中に置く
   入会金が1枚目なので、最後のカードが偶数番目＝コースが奇数個
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  .dg-price-container > .dg-price-card:last-child:nth-child(even) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 24px) / 2);
  }
}

/* ------------------------------------------------------------
   3列版（伊丹校など、コースが3つのページ用）
   使い方：<div class="dg-price-container dg-price-3col">
   PC（1024px 以上）でコースを3列に並べる。入会金は横いっぱいのまま。
   768〜1023px は通常どおり2列（最後の1枚は真ん中）、スマホは1列
   ------------------------------------------------------------ */
@media (min-width: 1024px) {
  .dg-price-container.dg-price-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dg-price-container.dg-price-3col > .dg-price-card:last-child:nth-child(even) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }
}
