/**
 * Costuba LP Base Styles
 * - `page-eiken-lp.php` を基準に、LP共通のトンマナ（余白/タイポ/見出し/CTA/料金カード）を集約
 * - 必ず `.custom-lp-template` 配下に閉じて干渉を防止
 */

/* ======================================
   0) Scope & tokens
   ====================================== */
.custom-lp-template {
  --lp-main: var(--main_color, #00704a);
  --lp-main-dark: var(--main_color_dark, #00563b);
  --lp-accent: var(--accent_color, var(--content_link_color, #cba258));
  --lp-accent-strong: #f9b42d;

  --lp-text: #333;
  --lp-soft: #f0f8f5;
}

.custom-lp-template * { box-sizing: border-box; }

/* ======================================
   1) Layout / typography (post content)
   ====================================== */
.custom-lp-template #page_contents {
  width: 100% !important;
  max-width: 1000px !important;
  margin: 0 auto !important;
  float: none !important;
  padding: 0 20px;
}

.custom-lp-template .post_content {
  color: var(--lp-text);
  font-size: 16px !important;
  line-height: 2.0 !important;
}
@media (min-width: 768px) {
  .custom-lp-template .post_content {
    font-size: 18px !important;
    line-height: 2.2 !important;
  }
}

.custom-lp-template .post_content p {
  margin-bottom: 2em !important;
  letter-spacing: 0.05em;
}

.custom-lp-template .post_content ul,
.custom-lp-template .post_content ol {
  margin-bottom: 2.5em;
  padding-left: 1.5em;
}

.custom-lp-template .post_content li {
  line-height: 1.8 !important;
  margin-bottom: 0.8em !important;
}

/* ======================================
   2) Headings (H2/H3)
   ====================================== */
.custom-lp-template .post_content h2,
.custom-lp-template .post_content h2.styled_h2,
.custom-lp-template .post_content .lp-h2 {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: var(--lp-main) !important;
  border-bottom: 3px solid var(--lp-accent-strong) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
  padding: 0 0 10px 0 !important;
  margin: 60px 0 30px !important;
  text-align: center !important;
}

.custom-lp-template .post_content h3,
.custom-lp-template .post_content h3.styled_h3 {
  margin-top: 60px !important;
  margin-bottom: 30px !important;
  font-size: 22px !important;
  color: var(--lp-main) !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  text-align: left !important;
}

/* LP内の“強調H3”（料金プラン等で使用する専用クラス） */
.custom-lp-template .lp-h3 {
  font-size: 20px !important;
  background: #f0f7f4;
  padding: 15px;
  border-left: 8px solid var(--lp-main);
  margin: 0 0 20px !important;
  font-weight: 700;
  color: var(--lp-text);
}
.custom-lp-template .text-tutor { border-left-color: #d32f2f !important; background: #fff5f5 !important; }

.custom-lp-template .lp-text-content { margin: 40px 0; padding: 0 10px; }

@media screen and (max-width: 768px) {
  .custom-lp-template .post_content h2,
  .custom-lp-template .post_content h2.styled_h2,
  .custom-lp-template .post_content .lp-h2 { font-size: 22px !important; }

  .custom-lp-template .post_content h3,
  .custom-lp-template .post_content h3.styled_h3 { font-size: 20px !important; }
}

/* ======================================
   3) CTA: Free consultation banner
   ====================================== */
.custom-lp-template .free-plan-banner {
  display: block !important;
  background: var(--lp-soft);
  border: 2px solid var(--lp-main);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  max-width: 1000px;
  margin: 40px auto 50px;
  padding: 40px;
  text-align: center;
}

.custom-lp-template .free-plan-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--lp-text);
  margin: 0 0 20px;
}

.custom-lp-template .free-plan-title__sub {
  font-size: 16px;
  font-weight: 400;
}

.custom-lp-template .free-plan-action { margin-top: 20px; }

.custom-lp-template .free-plan-banner .free-price,
.custom-lp-template .free-plan-banner .price-amount.free-price {
  font-size: 50px !important;
  color: #d32f2f !important;
  font-weight: 900 !important;
  line-height: 1;
  margin: 0 0 15px !important;
  text-shadow: 2px 2px 0 #fff;
  font-family: Arial, sans-serif;
}

.custom-lp-template .free-plan-banner ul.price-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto 10px !important;
  display: inline-block;
  border: none;
  text-align: left;
}
.custom-lp-template .free-plan-banner ul.price-features li {
  list-style: none;
  padding: 5px 0 5px 25px !important;
  position: relative;
  font-weight: 700;
  border: none;
}
.custom-lp-template .free-plan-banner ul.price-features li:before {
  content: "✔";
  color: var(--lp-main);
  position: absolute;
  left: 0;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  .custom-lp-template .free-plan-banner { padding: 25px 20px !important; }
}

/* ======================================
   4) Buttons (used in CTA / price cards)
   ====================================== */
.custom-lp-template .price-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  padding: 15px 0;
  background: #fff;
  color: var(--lp-main);
  border: 2px solid var(--lp-main);
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.3s;
  margin-top: 12px;
}
.custom-lp-template .price-btn:hover {
  background: var(--lp-main);
  color: #fff;
  transform: translateY(-2px);
}
.custom-lp-template .price-btn.btn-primary {
  background: var(--lp-main);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 112, 74, 0.25);
}
.custom-lp-template .price-btn.btn-primary:hover {
  background: var(--lp-main-dark);
  border-color: var(--lp-main-dark);
}

/* 小さめボタン（インラインstyle置き換え用） */
.custom-lp-template .price-btn.price-btn--small {
  max-width: 260px;
  font-size: 14px;
  padding: 12px 0;
}

/* 大きめCTAボタン（既存 `big-btn` 互換） */
.custom-lp-template .big-btn {
  width: 100%;
  max-width: 400px;
  padding: 18px 0 !important;
  font-size: 20px !important;
  font-weight: 700;
  display: inline-block;
  border-radius: 50px;
  text-decoration: none !important;
  margin: 0 auto;
}

/* ======================================
   5) Price cards (step proposal style)
   ====================================== */
.custom-lp-template .morning-price-container > p,
.custom-lp-template .morning-price-container > br {
  display: none !important;
  position: absolute !important;
}

.custom-lp-template .lp-plan-merits {
  max-width: 820px;
  margin: 0 auto 20px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #e6eee9;
  background: #fbfdfc;
}
.custom-lp-template .lp-plan-merits__title {
  font-weight: 800;
  color: var(--lp-text);
  margin: 0 0 10px;
  text-align: center;
  letter-spacing: 0.03em;
}
.custom-lp-template .lp-plan-merits__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.custom-lp-template .lp-plan-merits__list li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 8px !important;
  line-height: 1.6 !important;
}
.custom-lp-template .lp-plan-merits__list li:last-child { margin-bottom: 0 !important; }
.custom-lp-template .lp-plan-merits__list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--lp-main);
}
.custom-lp-template .lp-plan-merits--coaching .lp-plan-merits__list li::before { color: #f9b42d; }
.custom-lp-template .lp-plan-merits--tutor .lp-plan-merits__list li::before { color: #d32f2f; }

.custom-lp-template .morning-price-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 15px !important;
  margin: 30px 0 !important;
  padding: 0 !important;
}

.custom-lp-template .morning-price-card {
  flex: 0 0 calc(33.333% - 15px) !important;
  min-width: 250px !important;
  max-width: 280px !important;
  margin: 0 0 20px 0 !important;
  border: 2px solid var(--lp-main);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* 4列版（英検LPなど） */
.custom-lp-template .morning-price-container.lp-price--4col .morning-price-card {
  flex: 0 0 calc(25% - 15px) !important;
  min-width: 220px !important;
  max-width: 240px !important;
}

@media (max-width: 1024px) {
  .custom-lp-template .morning-price-card {
    flex: 0 0 calc(50% - 15px) !important;
    max-width: 520px !important;
  }
}
@media (max-width: 600px) {
  .custom-lp-template .morning-price-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

.custom-lp-template .morning-price-card-header {
  background: var(--lp-main);
  color: #fff;
  padding: 15px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  line-height: 1.4;
}

.custom-lp-template .morning-price-card .price-body {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.custom-lp-template .morning-price-card .amount {
  font-size: 32px;
  font-weight: 900;
  color: #d32f2f;
  line-height: 1.2;
  font-family: Arial, sans-serif;
}
.custom-lp-template .morning-price-card .tax { font-size: 13px; color: #666; }

.custom-lp-template .price-hr {
  width: 80%;
  margin: 15px auto;
  border: 0;
  border-top: 1px solid #eee;
}

.custom-lp-template .price-list {
  text-align: left;
  font-size: 14px;
  list-style: none !important;
  padding: 0 !important;
  margin: 15px 0 0 !important;
}
.custom-lp-template .price-list li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}
.custom-lp-template .price-list li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
  content: "✔";
  color: var(--lp-main);
}

/* プラン差分（既存クラス互換） */
.custom-lp-template .coaching-bg { background: #f9b42d !important; }
.custom-lp-template .coaching-border { border-color: #f9b42d !important; }
.custom-lp-template .coaching-icon li::before { content: "★"; color: #f9b42d; }

.custom-lp-template .tutor-bg { background: #d32f2f !important; }
.custom-lp-template .tutor-border { border-color: #d32f2f !important; }
.custom-lp-template .tutor-icon li::before { content: "✔"; color: #d32f2f; }

/* ======================================
   6) Price table (plan comparison cards)
   ====================================== */
.custom-lp-template .price-table-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 60px 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
}

.custom-lp-template .price-item {
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.custom-lp-template .price-item.recommended {
  border: 2px solid var(--lp-main);
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 10px 20px rgba(0, 112, 74, 0.15);
}

.custom-lp-template .price-item .ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
}
.custom-lp-template .price-item .ribbon span {
  display: block;
  position: absolute;
  top: 25px;
  right: -30px;
  width: 160px;
  padding: 5px 0;
  background-color: var(--lp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transform: rotate(45deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-lp-template .price-header {
  background-color: #f9f9f9;
  padding: 25px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}
.custom-lp-template .price-item.recommended .price-header {
  background-color: var(--lp-main);
  color: #fff;
}

.custom-lp-template .plan-title {
  font-size: 22px !important;
  margin: 0 0 10px 0 !important;
  font-weight: 700;
  line-height: 1.3 !important;
}
.custom-lp-template .price-item.recommended .plan-title { color: #fff !important; }

.custom-lp-template .plan-desc {
  font-size: 14px;
  color: #666;
  margin: 0 !important;
}
.custom-lp-template .price-item.recommended .plan-desc { color: #e0f2f1; }

.custom-lp-template .price-body {
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.custom-lp-template .course-price-list {
  margin: 0 0 20px 0;
  padding: 10px 15px;
  list-style: none;
  text-align: center;
  background: #f9f9f9;
  border-radius: 6px;
}
.custom-lp-template .price-item.recommended .course-price-list { background: #eaf7f4; }

.custom-lp-template .course-price-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px dashed #ddd;
  font-size: 15px;
}
.custom-lp-template .course-price-item:last-child { border-bottom: none; }

.custom-lp-template .course-name {
  font-weight: 700;
  color: var(--lp-text);
  width: 100%;
  display: block;
  margin-bottom: 5px;
  line-height: 1.4;
  font-size: 15px;
}

.custom-lp-template .price-display { width: 100%; text-align: center; line-height: 1.2; }

.custom-lp-template .price-ex-tax {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1.2;
  font-family: Arial, sans-serif;
  margin-bottom: 2px;
}
.custom-lp-template .price-ex-tax small {
  font-size: 14px;
  color: inherit;
  font-weight: 400;
  margin-left: 2px;
}

.custom-lp-template .price-inc-tax {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 0;
  line-height: 1.2;
}

.custom-lp-template .price-item.recommended .price-ex-tax,
.custom-lp-template .price-item.recommended .price-ex-tax small {
  color: var(--lp-main);
}

/* 特徴リスト（価格カード内） */
.custom-lp-template ul.price-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 30px 0 !important;
  text-align: left;
}
.custom-lp-template ul.price-features li {
  padding: 10px 0 10px 25px;
  border-bottom: 1px dashed #eee;
  font-size: 15px !important;
  line-height: 1.6 !important;
  position: relative;
}
.custom-lp-template ul.price-features li:before {
  content: "✔";
  color: var(--lp-main);
  position: absolute;
  left: 0;
  font-weight: 700;
}
.custom-lp-template ul.price-features li.unavailable {
  color: #aaa;
  text-decoration: line-through;
}
.custom-lp-template ul.price-features li.unavailable:before { content: "×"; color: #aaa; }

.custom-lp-template .note { font-size: 13px; color: #888; display: block; }

@media screen and (max-width: 768px) {
  .custom-lp-template .price-table-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .custom-lp-template .price-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .custom-lp-template .price-item.recommended {
    transform: none;
    order: -1;
    margin: 0;
    border: 2px solid var(--lp-main);
  }
}
