/*
 * AFREVI 記事ページデザイン統一 v1.4.12
 * SWELLの見出し・ボックス・ボタン・リストをコーポレートデザインに上書きする。
 * テーマ本体・記事本文は変更しない。プラグイン無効化で元に戻る。
 */

/* ===== 1) ブランドカラー変数(SWELL全体の色を赤に統一) ===== */
:root{
  --color_main: #db0909 !important;
  --color_main_thin: rgba(219,9,9,.05) !important;
  --color_main_dark: #a90707 !important;
  --color_list_num: #db0909 !important;
  --color_list_check: #db0909 !important;
  --color_list_good: #db0909 !important;
  --color_list_triangle: #db0909 !important;
}

/* ===== 2) H2: 赤いラフな下線 ===== */
.post_content h2{
  background: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2,8 C25,4 55,10 98,5' fill='none' stroke='%23db0909' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left bottom !important;
  background-size: 100% 12px !important;
  display: table !important; /* 線の長さを見出しの文字幅に合わせる */
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #1a1a1a !important;
  font-weight: 900 !important;
  padding: 0 0 18px 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.post_content h2::before,
.post_content h2::after{
  content: none !important;
  display: none !important;
}

/* ===== 3) H3: 黒の縦線(少し傾けて手描き感) ===== */
.post_content h3{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #1a1a1a !important;
  font-weight: 900 !important;
  padding: 2px 0 2px 16px !important;
  position: relative !important;
}
.post_content h3::before{
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: 3px !important;
  bottom: 3px !important;
  width: 5px !important;
  height: auto !important;
  background: #1a1a1a !important;
  border-radius: 3px !important;
  transform: rotate(2.5deg);
}
.post_content h3::after{ content: none !important; display: none !important; }

/* ===== 3.5) 例外: アコーディオンのタイトルに見出し装飾を出さない ===== */
.post_content h2.swell-block-accordion__label,
.post_content h3.swell-block-accordion__label,
.post_content h4.swell-block-accordion__label{
  background: none !important;
  background-image: none !important;
  display: block !important;
  padding: 0 1em 0 0 !important;
  margin: 0 !important;
  font-weight: 700 !important;
}
.post_content h2.swell-block-accordion__label::before,
.post_content h3.swell-block-accordion__label::before{
  content: none !important;
  display: none !important;
}

/* ===== 4) キャプションボックス =====
   形・配置はSWELL標準のまま(7スタイルの構造を壊さないため)。
   色はエディター設定のカラーセット(黒#1A1A1A/赤#DB0909/グレー#9A9A9A)で統一。
   タイトルの太字化だけ行う。 */
.post_content .cap_box_ttl{
  font-weight: 900 !important;
}

/* ===== 5) ボーダーボックス: 赤=強調 / グレー=補足 ===== */
.post_content .is-style-border_sm{
  border: 2px solid #db0909 !important;
  border-radius: 18px 6px 16px 8px/8px 16px 6px 18px !important;
}
.post_content .is-style-border_dm{
  border: 2px dashed #db0909 !important;
  border-radius: 18px 6px 16px 8px/8px 16px 6px 18px !important;
}
.post_content .is-style-border_sg{
  border: 2px solid #d9d9d9 !important;
  border-radius: 18px 6px 16px 8px/8px 16px 6px 18px !important;
}
/* グレー破線ボックス → TOPの事業カードと同じ「紙カード」スタイルに */
.post_content .is-style-border_dg{
  background: #fffdf7 !important;
  border: 2.5px solid #1a1a1a !important;
  border-radius: 255px 18px 225px 18px/18px 225px 18px 255px !important;
}
.post_content .is-style-bg_gray,
.post_content .is-style-bg_main_thin,
.post_content .is-style-bg_stripe{
  border-radius: 18px 6px 16px 8px/8px 16px 6px 18px !important;
}

/* ===== 5.5) ブロックエディタの「ボーダー設定」(ボーダーセット01〜04) =====
   エディター設定で 01=赤 / 02=黒 / 03=グレー / 04=黒3px(紙カード) に登録して使う */
.post_content .has-border{
  border-width: 2.5px !important; /* 4セットとも紙カードと同じ太さに統一 */
}
.post_content .has-border.-border01{
  background: #fff !important; /* 赤枠(強調): 紙カードと同じ大きなゆがみ・中は白 */
  border-radius: 255px 18px 225px 18px/18px 225px 18px 255px !important;
}
.post_content .has-border.-border02,
.post_content .has-border.-border03{
  border-radius: 18px 6px 16px 8px/8px 16px 6px 18px !important;
}
.post_content .has-border.-border04{
  background: #fffdf7 !important; /* 紙カード: TOPの事業カードと同じ */
  border-radius: 255px 18px 225px 18px/18px 225px 18px 255px !important;
}
/* 背景色だけ付けた段落・グループも角を手描き風に */
.post_content p.has-background,
.post_content .wp-block-group.has-background{
  border-radius: 14px 5px 12px 6px/6px 12px 5px 14px !important;
}

/* ===== 5.8) 通常リストの点・番号もブランドの赤に ===== */
.post_content ul li::marker,
.post_content ol li::marker{
  color: #db0909;
}

/* ===== 6) ボタン: 丸ピル形(色は変数で赤に) ===== */
.post_content [class*=is-style-btn_]{
  --the-btn-radius: 100px;
}
.post_content .is-style-btn_normal a,
.post_content .is-style-btn_solid a{
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

/* ===== 7) 引用: グレーのまま角だけ手描き風 ===== */
.post_content blockquote{
  border-radius: 14px 5px 12px 6px/6px 12px 5px 14px !important;
}

/* ===== 8) WPForms(お問い合わせフォーム): 白黒赤に統一 v1.4.12 =====
   フォーム本体はWPFormsのまま。見た目だけ上書き(入力枠=黒2px手描き角丸/フォーカス赤/送信=赤ピル/必須=赤「必須」) */
.post_content .wpforms-container,.wpforms-container{margin:0 !important;}
.wpforms-container *{box-sizing:border-box;}
.wpforms-container .wpforms-field{padding:0 0 22px !important;}
.wpforms-container .wpforms-field-label{display:block !important;font-size:14px !important;font-weight:900 !important;color:#1a1a1a !important;letter-spacing:.06em;margin:0 0 8px !important;line-height:1.6;}
.wpforms-container .wpforms-required-label{color:#db0909 !important;font-size:0 !important;margin-left:6px;vertical-align:1px;}
.wpforms-container .wpforms-required-label::before{content:"必須";font-size:11px;font-weight:900;}
.wpforms-container .wpforms-field-description,.wpforms-container .wpforms-field-sublabel{font-size:12px !important;color:#9a9a9a !important;margin-top:6px !important;}
.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container select,
.wpforms-container textarea{
  width:100% !important;max-width:100% !important;
  border:2px solid #1a1a1a !important;background:#fff !important;color:#1a1a1a !important;
  border-radius:18px 6px 16px 8px/8px 16px 6px 18px !important;
  padding:12px 16px !important;font-size:15px !important;line-height:1.6 !important;height:auto !important;
  box-shadow:none !important;transition:border-color .15s,box-shadow .15s;
}
.wpforms-container input.wpforms-field-medium{max-width:480px !important;}
.wpforms-container select.wpforms-field-medium{max-width:480px !important;}
.wpforms-container textarea{min-height:200px !important;}
.wpforms-container input:focus,.wpforms-container select:focus,.wpforms-container textarea:focus{
  outline:none !important;border-color:#db0909 !important;box-shadow:0 0 0 3px rgba(219,9,9,.12) !important;
}
.wpforms-container ::placeholder{color:#b5b5b5;}
.wpforms-container select{appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 18 10'><path d='M2,2 L9,8.5 L16,2' fill='none' stroke='%231a1a1a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat:no-repeat !important;background-position:right 16px center !important;padding-right:44px !important;}
/* 同意文 */
.wpforms-container .wpforms-field-html .agree{font-size:13px;color:#555;line-height:1.9;margin:4px 0 0;}
.wpforms-container .wpforms-field-html .agree a{color:#1a1a1a;font-weight:800;text-decoration:none;border-bottom:2px solid #db0909;padding-bottom:1px;}
/* reCAPTCHA */
.wpforms-container .wpforms-recaptcha-container{padding:0 0 22px !important;}
/* 送信ボタン */
.wpforms-container .wpforms-submit-container{padding:4px 0 0 !important;text-align:center;}
.wpforms-container button[type=submit].wpforms-submit{
  display:inline-flex !important;align-items:center;gap:12px;
  background:#db0909 !important;color:#fff !important;border:2.5px solid #db0909 !important;
  font-weight:900 !important;font-size:15px !important;letter-spacing:.14em !important;
  padding:16px 56px !important;border-radius:100px !important;line-height:1 !important;height:auto !important;
  box-shadow:none !important;cursor:pointer;transition:background .15s,color .15s;
}
.wpforms-container button[type=submit].wpforms-submit:hover{background:#fff !important;color:#db0909 !important;}
/* エラー */
.wpforms-container label.wpforms-error{color:#db0909 !important;font-size:12.5px !important;font-weight:700;margin-top:6px !important;}
.wpforms-container .wpforms-has-error input,.wpforms-container .wpforms-has-error textarea,.wpforms-container .wpforms-has-error select{border-color:#db0909 !important;}
/* 送信完了メッセージ */
.wpforms-confirmation-container-full{background:#fffdf7 !important;border:2px solid #1a1a1a !important;
  border-radius:255px 14px 225px 14px/14px 225px 14px 255px !important;padding:30px 30px !important;text-align:center;font-size:14.5px;line-height:2;}
