/**
 * 広告LP 無料体験フォーム（.kef--simple）
 * ---------------------------------------------------------------------------
 * 出典: 本番の固定ページ `lp-form` に「カスタムHTML」で埋め込まれていたCSS（実装: 甘利さん）を
 * テーマ側へ移設したもの。
 *
 * 全セレクタを `.kef-page-wrap` 配下にスコープしてある。
 * 元CSSは `.kef` `.kef-card` `.kef-field` `.err-msg` `.hint` `.flow` など、
 * /guarantee・教室ページで使う public/css/kef-form.css と同名のクラスを素で定義しており、
 * 両方を同じページで読み込むと壊れるため。スコープによりどこで読み込んでも安全になる。
 * ※ マークアップ側の最上位が .kef-page-wrap である前提（固定ページのグループブロック）。
 */


/* ==================================================
   かるん♪ 無料体験フォーム
   CSSタブ用：<style>タグは付けない
================================================== */

.kef-page-wrap{
  --kef-blue: #004aad;
  --kef-yellow: #fbc03c;
  --kef-orange: #f5a623;
  --kef-text: #353231;
  --kef-muted: #666;
  --kef-error: #d64545;
  --kef-bg: #f3f2ee;
  --kef-focus: rgba(0, 74, 173, 0.18);

  /*
   * 移設時に削除:
   *   width: min(100%, 1000px) !important;
   *   max-width: 1000px !important;
   *   margin-inline: auto !important;
   * 固定ページに直書きしていた頃、テンプレート側で幅を制御できなかったため
   * ここで1000pxに固定していた。これがあると背景を画面幅へ広げられない
   * （2026-07-23定例「1,000px外の左右の白背景を指定できない」の直接原因）。
   * 幅と中央寄せは template-lp-fullwidth.php が持つ（ACFでページごとに変更可）。
   */
  color: var(--kef-text);
  font-family: "Noto Sans JP", sans-serif;
  background: var(--kef-bg);
  overflow: hidden;
}

.kef-page-wrap, .kef-page-wrap *, .kef-page-wrap *::before, .kef-page-wrap *::after{
  box-sizing: border-box;
}

.kef-page-wrap > .wp-block-group__inner-container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.kef-page-wrap .wp-block-html, .kef-page-wrap .wp-block-shortcode{
  width: 100%;
  max-width: none;
  margin-block: 0;
}

/* ==================================================
   上部エリア
================================================== */

.kef-page-wrap .kef-top-area, .kef-page-wrap .kef-shell{
  width: 100%;
  padding-right: max(16px, calc((100% - 640px) / 2));
  padding-left: max(16px, calc((100% - 640px) / 2));
  background: var(--kef-bg);
}

.kef-page-wrap .kef-top-area{
  padding-top: 20px;
  padding-bottom: 14px;
  text-align: center;
}

/* ---------- メインバナー ---------- */

.kef-page-wrap .kef-hero{
  width: min(100%, 750px);
  margin: 0 auto 14px;
}

.kef-page-wrap .kef-hero img{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.08);
}

/* ---------- 画像形式のお申し込みボタン ---------- */

.kef-page-wrap .kef-apply-heading{
  display: block;
  width: min(100%, 550px);
  margin: 0 auto 10px;
  padding: 0;
  line-height: 0;
  background: transparent;
  border: 0;

  /* PNG内の形・影をそのまま表示する */
  border-radius: 0;
  box-shadow: none;
  overflow: visible;

  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.kef-page-wrap .kef-apply-heading:hover{
  opacity: 0.9;
  transform: none;
}

.kef-page-wrap .kef-apply-heading:focus-visible{
  outline: 3px solid rgba(0, 74, 173, 0.25);
  outline-offset: 3px;
}

.kef-page-wrap .kef-apply-heading img{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  transform: none;
}

/* ---------- 無料体験などの特徴 ---------- */

.kef-page-wrap .kef-assure{
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 7px;
  width: min(100%, 550px);
  margin: 0 auto;
}

.kef-page-wrap .kef-assure > span{
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 4px 8px;
  color: var(--kef-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #fff7d7;
  border-radius: 999px;
}

.kef-page-wrap .kef-assure > span::before{
  content: "✓";
  flex: 0 0 auto;
  color: var(--kef-blue);
  font-weight: 900;
}

/* ==================================================
   Contact Form 7・カード
================================================== */

.kef-page-wrap .wpcf7, .kef-page-wrap .wpcf7-form{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--kef-bg);
}

.kef-page-wrap .kef-shell{
  padding-top: 14px;
  padding-bottom: 28px;
}

.kef-page-wrap .kef{
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
}

.kef-page-wrap .kef--simple{
  scroll-margin-top: 24px;
}

.kef-page-wrap .kef-card{
  width: 100%;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
}

/* ==================================================
   質問数
================================================== */

.kef-page-wrap .kef-steps{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.kef-page-wrap .kef-steps__count{
  color: var(--kef-blue);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

/* 既存HTMLでbタグが残っている場合 */

.kef-page-wrap .kef-steps b{
  color: var(--kef-blue);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

/* ==================================================
   入力項目
================================================== */

.kef-page-wrap .kef-field{
  width: 100%;
  margin: 0 0 11px;
}

.kef-page-wrap .kef-label{
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 9px;
  min-height: 42px;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.kef-page-wrap .kef-label .no{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  background: var(--kef-blue);
  border-radius: 50%;
}

.kef-page-wrap .kef-label-text{
  min-width: 0;
  white-space: nowrap;
}

.kef-page-wrap .kef-label .req{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--kef-blue);
  border-radius: 999px;
}

/* ---------- CF7による余分な余白を削除 ---------- */

.kef-page-wrap .kef-field > p{
  margin: 0 !important;
  padding: 0 !important;
}

.kef-page-wrap .kef-field > br, .kef-page-wrap .kef-field .wpcf7-form-control-wrap + br{
  display: none !important;
}

.kef-page-wrap .kef .wpcf7-form-control-wrap{
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
  background: transparent !important;
}

.kef-page-wrap .kef .wpcf7-form-control-wrap::before, .kef-page-wrap .kef .wpcf7-form-control-wrap::after{
  display: none !important;
}

/* ---------- 入力欄 ---------- */

.kef-page-wrap .kef input.kef-input[type="text"], .kef-page-wrap .kef input.kef-input[type="tel"], .kef-page-wrap .kef input.kef-input[type="email"]{
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 54px;
  margin: 0;
  padding: 8px 12px;
  color: var(--kef-text);
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #707070;
  border-radius: 5px;
  outline: 0;
  box-shadow: none;
  appearance: none;
}

.kef-page-wrap .kef input.kef-input::placeholder{
  color: #cbcbcb;
  opacity: 1;
}

.kef-page-wrap .kef input.kef-input:focus{
  border-color: var(--kef-blue);
  box-shadow: 0 0 0 3px var(--kef-focus);
}

/* ---------- 入力欄下の説明 ---------- */

.kef-page-wrap .hint{
  margin: 4px 0 0;
  color: var(--kef-muted);
  font-size: 12px;
  line-height: 1.55;
}

.kef-page-wrap .err-msg{
  display: none;
  margin: 4px 0 0;
  color: var(--kef-error);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.kef-page-wrap .err-msg::before{
  content: "⚠ ";
}

.kef-page-wrap .kef-field.is-invalid .err-msg{
  display: block;
}

.kef-page-wrap .kef input.kef-input.invalid, .kef-page-wrap .kef input.kef-input.wpcf7-not-valid{
  background: #fff6f6;
  border-color: var(--kef-error);
}

.kef-page-wrap .kef .wpcf7-not-valid-tip{
  display: none;
}

/* ==================================================
   送信ボタン
================================================== */

.kef-page-wrap .kef-cta-wrap{
  position: relative;
  width: 100%;
  margin: 9px 0 0;
}

.kef-page-wrap .kef-cta-wrap br{
  display: none;
}

.kef-page-wrap .kef input.cta[type="submit"]{
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 66px;
  margin: 0;
  padding: 0 72px;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  background: var(--kef-orange) !important;
  border: 0;
  border-radius: 999px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  appearance: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.kef-page-wrap .kef input.cta[type="submit"]:not(:disabled):hover{
  opacity: 0.86;
  transform: translateY(-2px);
}

/* ---------- 入力未完了 ---------- */

.kef-page-wrap .kef input.cta[type="submit"]:disabled, .kef-page-wrap .kef-cta-wrap.is-disabled input.cta[type="submit"]{
  color: #aaa;
  background: #e7e7e7 !important;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 入力完了 ---------- */

.kef-page-wrap .kef-cta-wrap.is-ready input.cta[type="submit"]{
  color: #fff;
  background: var(--kef-orange) !important;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.kef-page-wrap .kef-cta-arrow{
  display: none;
}

/* ---------- ボタン右側の丸と矢印 ---------- */

.kef-page-wrap .kef-cta-wrap::after{
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.kef-page-wrap .kef-cta-wrap::before{
  content: "";
  position: absolute;
  top: 50%;
  right: 27px;
  z-index: 1;
  width: 13px;
  height: 13px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.kef-page-wrap .kef-cta-wrap.is-disabled::after{
  border-color: #c7c7c7;
}

.kef-page-wrap .kef-cta-wrap.is-disabled::before{
  border-color: #aaa;
}

.kef-page-wrap .kef-cta-wrap .wpcf7-spinner{
  position: absolute;
  top: 50%;
  right: 72px;
  margin: 0;
  transform: translateY(-50%);
}

/* ==================================================
   今後の流れ
================================================== */

.kef-page-wrap .kef-flow-title{
  margin: 17px 0 5px;
  color: var(--kef-blue);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.kef-page-wrap .flow{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 2px 0 0;
  color: var(--kef-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
}

.kef-page-wrap .flow > span{
  display: inline-block;
  white-space: nowrap;
}

.kef-page-wrap .flow .ar{
  color: var(--kef-blue);
  font-size: 18px;
  font-weight: 900;
}

/* ==================================================
   プライバシー
================================================== */

.kef-page-wrap .kef-privacy{
  margin: 12px 0 0;
  color: var(--kef-muted);
  font-size: 11px;
  text-align: center;
  white-space: normal;
}

.kef-page-wrap .kef-privacy a{
  color: inherit;
  text-decoration: underline;
}

.kef-page-wrap .kef-lock{
  position: relative;
  display: inline-block;
  width: 10px;
  height: 8px;
  margin-right: 5px;
  vertical-align: -1px;
  background: #666;
  border-radius: 1px;
}

.kef-page-wrap .kef-lock::before{
  content: "";
  position: absolute;
  top: -6px;
  left: 2px;
  width: 6px;
  height: 6px;
  border: 1.5px solid #666;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

/* ==================================================
   送信完了画面
================================================== */

.kef-page-wrap .kef-form-panel[hidden], .kef-page-wrap .kef-done[hidden]{
  display: none !important;
}

.kef-page-wrap .kef-done{
  padding: 8px 4px 6px;
  text-align: center;
}

.kef-page-wrap .kef-done .ic{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 4px auto 14px;
  color: var(--kef-blue);
  font-size: 40px;
  font-weight: 700;
  background: #fff7d7;
  border-radius: 50%;
}

.kef-page-wrap .kef-done h3{
  margin: 3px 0;
  font-size: 20px;
}

.kef-page-wrap .kef-done p{
  margin: 8px 0;
  color: var(--kef-muted);
  font-size: 15px;
}

.kef-page-wrap .wpcf7-response-output{
  max-width: 640px;
  margin: 16px auto 0 !important;
  padding: 12px 16px !important;
  font-size: 13px;
  border-radius: 8px;
}

.kef-page-wrap .kef-mail-sent .wpcf7-response-output{
  display: none;
}

/* ==================================================
   スマートフォン
================================================== */

@media (max-width: 680px) {
  .kef-page-wrap{
    width: 100% !important;
  }

  .kef-page-wrap .kef-top-area{
    padding: 14px 12px 12px;
  }

  .kef-page-wrap .kef-shell{
    padding: 12px 8px 22px;
  }

  .kef-page-wrap .kef-card{
    padding: 18px 14px;
  }

  .kef-page-wrap .kef-hero{
    width: min(100%, 320px);
    margin-bottom: 14px;
  }

  .kef-page-wrap .kef-apply-heading{
    width: min(100%, 290px);
    margin-bottom: 10px;
  }

  .kef-page-wrap .kef-assure{
    width: min(100%, 320px);
    gap: 5px;
  }

  .kef-page-wrap .kef-assure > span{
    min-height: 27px;
    padding: 3px 5px;
    font-size: clamp(9px, 2.65vw, 11px);
  }

  .kef-page-wrap .kef-steps{
    margin-bottom: 10px;
    font-size: 13px;
  }

  .kef-page-wrap .kef-steps__count, .kef-page-wrap .kef-steps b{
    font-size: 24px;
  }

  .kef-page-wrap .kef-field{
    margin-bottom: 10px;
  }

  .kef-page-wrap .kef-label{
    grid-template-columns: 39px minmax(0, 1fr) auto;
    column-gap: 8px;
    min-height: 39px;
    margin-bottom: 3px;
    font-size: 15px;
  }

  .kef-page-wrap .kef-label .no{
    width: 39px;
    height: 39px;
    font-size: 17px;
  }

  .kef-page-wrap .kef-label .req{
    padding: 2px 8px;
    font-size: 9px;
  }

  .kef-page-wrap .kef input.kef-input[type="text"], .kef-page-wrap .kef input.kef-input[type="tel"], .kef-page-wrap .kef input.kef-input[type="email"]{
    height: 52px;
    font-size: 16px;
  }

  .kef-page-wrap .hint{
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.5;
  }

  .kef-page-wrap .kef input.cta[type="submit"]{
    height: 62px;
    padding-inline: 64px;
    font-size: 15px;
  }

  .kef-page-wrap .kef-cta-wrap::after{
    width: 52px;
    height: 52px;
  }

  .kef-page-wrap .kef-cta-wrap::before{
    right: 25px;
    width: 12px;
    height: 12px;
  }

  .kef-page-wrap .kef-flow-title{
    margin-top: 15px;
    font-size: 14px;
  }

  .kef-page-wrap .flow{
    gap: 4px;
    font-size: 14px;
    line-height: 1.65;
  }

  .kef-page-wrap .flow .ar{
    font-size: 16px;
  }

  .kef-page-wrap .kef-privacy{
    font-size: clamp(8px, 2.5vw, 10px);
  }
}

/* ==================================================
   幅が狭いスマートフォン
================================================== */

@media (max-width: 390px) {
  .kef-page-wrap .kef-card{
    padding-inline: 12px;
  }

  .kef-page-wrap .kef-assure > span{
    padding-inline: 7px;
    font-size: 9px;
  }

  .kef-page-wrap .flow{
    gap: 3px;
    font-size: 13px;
  }

  .kef-page-wrap .flow .ar{
    font-size: 15px;
  }
}
/* ==================================================
   フォーム項目の余白を強制調整
   必ずCSSの一番最後に記述
================================================== */

/* 各項目全体：回答欄から次のタイトルまでの間隔 */
.kef-page-wrap .kef .kef-field{
  margin: 0 0 28px !important;
  padding: 0 !important;
}

/* タイトルから回答欄までの間隔 */
.kef-page-wrap .kef .kef-field .kef-label{
  margin: 0 0 14px !important;
}

/* Contact Form 7が自動生成するpタグの余白を削除 */
.kef-page-wrap .kef .kef-field p{
  margin: 0 !important;
  padding: 0 !important;
}

/* 自動挿入される改行を削除 */
.kef-page-wrap .kef .kef-field br{
  display: none !important;
}

/* 入力欄を囲む要素の余白を削除 */
.kef-page-wrap .kef .kef-field .wpcf7-form-control-wrap{
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 入力欄下の説明文 */
.kef-page-wrap .kef .kef-field .hint{
  margin: 6px 0 0 !important;
  padding: 0 !important;
}

/* エラー文 */
.kef-page-wrap .kef .kef-field .err-msg{
  margin: 6px 0 0 !important;
}

/* スマートフォン */
@media (max-width: 680px) {
  /* 回答欄から次のタイトルまで */
  .kef-page-wrap .kef .kef-field{
    margin-bottom: 24px !important;
  }

  /* タイトルから回答欄まで */
  .kef-page-wrap .kef .kef-field .kef-label{
    margin-bottom: 12px !important;
  }
}
