/* ORIME Program Manager v1.1.0 — 詳細ページ本文（ブロックエディターで編集する部分）のスタイル。
   公開ページでは .otv1-blocks 配下に適用。編集画面では .otv1 / .otv1-blocks を .editor-styles-wrapper に
   置き換えて同じCSSを読み込むため、編集中の見た目と公開ページの見た目が揃う。
   コアブロック（段落・見出し・リスト・画像・グループ・詳細）に付けた .otv1- のクラスにだけ適用する。 */

/* ---------- 共通 ---------- */
/* 旧形式のテーマで付く .wp-block-group__inner-container を、レイアウト上は無いものとして扱う */
.otv1-blocks .wp-block-group__inner-container{ display:contents; }
.otv1-blocks .wp-block-group{ margin-top:0; margin-bottom:0; }
/* グリッドで並べるカード（参加の流れ・参加者の声・FAQ）の間隔は gap だけで決める（テーマの上下余白を解除） */
.otv1-blocks :is(.otv1-steps, .otv1-voices, .otv1-faq) :is(.otv1-step, .otv1-voice, .otv1-faq__item){ margin:0 !important; max-width:none !important; }
.otv1-blocks div.otv1-steps{ display:grid; gap:12px; }
.otv1-blocks div.otv1-faq{ display:grid; gap:10px; }
.otv1-blocks div.otv1-voices{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
@media (max-width:700px){ .otv1-blocks div.otv1-voices{ grid-template-columns:1fr; } }
.otv1-blocks :is(.wp-block-group, .wp-block-group__inner-container) > :is(p, ul, ol, h2, h3, figure, details){ margin-top:0; margin-bottom:0; }
.otv1-blocks section.otv1__section{ margin:0; padding:40px max(24px, calc((100% - 1072px) / 2)); }
.otv1-blocks .otv1__section > *, .otv1-blocks .otv1__section > .wp-block-group__inner-container > *{ margin-left:auto; margin-right:auto; }
/* テーマ（SWELL）のリスト記号・余白を、ORIMEのリストでは解除 */
.otv1-blocks ul.wp-block-list{ padding:0; list-style:none; }
.otv1-blocks .wp-block-list > li{ list-style:none; margin:0; }
.otv1-blocks .wp-block-list > li::before{ content:none; }
.otv1-blocks .wp-block-image img{ border-radius:0; }

/* テーマ（・エディター）が本文の要素に付ける最大幅を、ORIMEのセクション内では解除し、デザイン上の幅を指定し直す */
.otv1-blocks .otv1__section :is(p, ul, ol, h2, h3, figure, details, div){ max-width:none !important; }
.otv1-blocks .otv1__section p.otv1__lead{ max-width:620px !important; }
.otv1-blocks .otv1__section ul.otv1-about__points{ max-width:640px !important; }
.otv1-blocks .otv1__section figure.otv1-about__media{ max-width:760px !important; }
.otv1-blocks .otv1__section :is(div.otv1-whybox, div.otv1-overview, div.otv1-conditionbox, p.otv1-faq__label, div.otv1-faq, div.otv1-notebox, ul.otv1-notelinks){ max-width:720px !important; }
.otv1-blocks .otv1__section p.otv1-totalhours{ max-width:520px !important; }
.otv1-blocks .otv1__section div.otv1-steps{ max-width:600px !important; }

/* 部品どうしの間隔はデザインの値（上側の余白）で固定し、テーマが付ける上下余白は解除する */
.otv1-blocks .otv1__section :is(.otv1-dayflow, .otv1-overview, .otv1-whybox, .otv1-conditionbox, .otv1-faq, .otv1-faq__label, .otv1-cta-block, .otv1-recommend, .otv1-safety, .otv1-steps, .otv1-notebox, .otv1-voices, .otv1-brandmessage, .otv1-notelinks, .otv1-totalhours){ margin-bottom:0 !important; }
.otv1-blocks .otv1__section :is(.otv1-dayflow, .otv1-overview, .otv1-recommend, .otv1-voices, .otv1-steps){ margin-top:22px !important; }
.otv1-blocks .otv1__section :is(.otv1-whybox, .otv1-safety, .otv1-brandmessage){ margin-top:24px !important; }
.otv1-blocks .otv1__section .otv1-conditionbox{ margin-top:16px !important; }
.otv1-blocks .otv1__section :is(.otv1-cta-block, .otv1-notebox){ margin-top:20px !important; }
.otv1-blocks .otv1__section .otv1-faq__label{ margin-top:32px !important; }
.otv1-blocks .otv1__section .otv1-faq{ margin-top:14px !important; }
.otv1-blocks .otv1__section .otv1-notelinks{ margin-top:12px !important; }
.otv1-blocks .otv1__section .otv1-totalhours{ margin-top:18px !important; }

.otv1-blocks p.otv1__kicker{ margin-bottom:12px; }
.otv1-blocks p.otv1__lead{ margin-top:14px; }

/* ---------- このプログラムについて ---------- */
.otv1-blocks ul.otv1-about__points{ margin-top:18px; margin-bottom:18px; }
.otv1-blocks figure.otv1-about__media{ margin-top:20px; margin-bottom:10px; aspect-ratio:auto; }
.otv1-blocks figure.otv1-about__media img{ width:100%; height:auto; }
.otv1-blocks p.otv1-about__caption{ margin-bottom:8px; }
.otv1-blocks div.otv1-brandmessage{ margin-top:24px; }
.otv1-blocks p.otv1-brandmessage__label{ margin-bottom:6px; }

/* ---------- 4日間の流れ ---------- */
.otv1-blocks div.otv1-whybox{ margin-top:24px; }
.otv1-blocks .otv1-whybox p + p{ margin-top:10px; }
.otv1-blocks p.otv1-totalhours{ margin-top:18px; }

/* ---------- こんな方におすすめ ---------- */
.otv1-blocks ul.otv1-recommend{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-top:22px; }
.otv1-blocks ul.otv1-recommend > li{
  position:relative; background:#fff; border:1px solid #ece3dd; border-radius:14px;
  padding:16px 18px 16px 54px; font-size:13px; color:#5a5450; line-height:1.75;
}
.otv1-blocks ul.otv1-recommend > li::before{
  content:"✓"; position:absolute; left:18px; top:16px; width:24px; height:24px; border-radius:50%;
  background: var(--rose); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700;
}
@media (max-width:700px){ .otv1-blocks ul.otv1-recommend{ grid-template-columns:1fr; } }

/* ---------- 参加者の声 ---------- */
.otv1-blocks div.otv1-voices{ margin-top:22px; }
.otv1-blocks .otv1-voice p.otv1-voice__who{ margin-top:8px; }

/* ---------- 開催概要・参加条件 ---------- */
.otv1-blocks div.otv1-conditionbox{ max-width:720px; margin-top:16px; background:#fff; border:1px solid #ece3dd; border-radius:20px; padding:18px 20px; }
.otv1-blocks h3.otv1-subhead{ font-size:14px !important; color: var(--bronze) !important; margin-bottom:10px; }
.otv1-blocks ul.otv1-condition > li::before{ content:"✓"; }

/* ---------- 参加までの流れ（番号は自動） ---------- */
.otv1-blocks div.otv1-steps{ max-width:600px; margin-top:22px; counter-reset: orime-step; }
.otv1-blocks div.otv1-step{ display:grid; grid-template-columns:32px minmax(0,1fr); gap:0 16px; align-items:start; text-align:left; }
/* テーマ側の「本文の子要素を中央寄せ・最大幅制限」する指定を、この部品では解除 */
.otv1-blocks .otv1-step p{ justify-self:stretch; max-width:none !important; margin-left:0 !important; margin-right:0 !important; }
.otv1-blocks div.otv1-step::before{
  counter-increment: orime-step; content: counter(orime-step); grid-row: 1 / span 2;
  width:32px; height:32px; border-radius:50%; background: var(--rose); color:#fff; font-weight:700; font-size:13px;
  display:flex; align-items:center; justify-content:center; font-family:"Shippori Mincho",serif;
}
.otv1-blocks .otv1-step p.otv1-step__title{ grid-column:2; margin-bottom:4px; }
.otv1-blocks .otv1-step p.otv1-step__desc{ grid-column:2; }

/* ---------- 安心して参加いただくために ---------- */
.otv1-blocks ul.otv1-safety{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:24px; }
.otv1-blocks ul.otv1-safety > li{
  background:#fff; border:1px solid #ece3dd; border-radius:14px; padding:16px 10px; text-align:center;
  font-size:12px; color:#5a5450; font-weight:600; line-height:1.9;
}
/* 1行目（改行の前）＝絵文字を大きく表示 */
.otv1-blocks ul.otv1-safety > li::first-line{ font-size:20px; line-height:1.7; }
@media (max-width:700px){ .otv1-blocks ul.otv1-safety{ grid-template-columns:repeat(2,1fr); } }

/* ---------- 注意事項・FAQ・規約リンク ---------- */
.otv1-blocks div.otv1-notebox{ margin-top:20px; }
.otv1-blocks .otv1-notebox p + p{ margin-top:10px; }
.otv1-blocks p.otv1-faq__label{ margin-top:32px; }
.otv1-blocks div.otv1-faq{ margin-top:14px; }
.otv1-blocks details.otv1-faq__item{ margin:0; }
.otv1-blocks details.otv1-faq__item > summary::before{ content:"Q"; flex:none; font-family:"Shippori Mincho",serif; color: var(--rose); }
.otv1-blocks details.otv1-faq__item > p{ margin:0; }
.otv1-blocks ul.otv1-notelinks{ margin-top:12px; }

/* ---------- 最後のメッセージ（背景画像＋文章＋申込ボタン） ---------- */
.otv1-blocks section.otv1-final{
  position:relative; margin:0; padding:0; overflow:hidden;
  min-height: clamp(420px, 54vw, 640px); display:flex; align-items:flex-end;
  background: linear-gradient(135deg, #5b4640, #3a2d29);
}
.otv1-blocks .otv1-final figure.otv1-final__bg:has(img){ position:absolute; inset:0; margin:0; z-index:0; width:auto; max-width:none !important; }
.otv1-blocks div.otv1-final__content{ max-width:none !important; margin:0 !important; }
.otv1-blocks .otv1-final figure.otv1-final__bg:has(img) > div{ width:100% !important; height:100% !important; }
.otv1-blocks .otv1-final figure.otv1-final__bg img{ width:100%; height:100%; object-fit:cover; object-position:center 30%; }
.otv1-blocks section.otv1-final:has(figure.otv1-final__bg img)::after{
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background: linear-gradient(180deg, rgba(41,32,28,.05) 30%, rgba(35,27,23,.5) 68%, rgba(28,21,18,.78) 100%);
}
.otv1-blocks div.otv1-final__content{ position:relative; z-index:2; width:100%; padding:44px 24px 40px; text-align:center; color:#fff; }
.otv1-blocks .otv1-final__content p{
  max-width:400px; margin:0 auto 10px; font-size:12.5px; line-height:1.8; color:#fdf9f6; text-shadow:0 2px 10px rgba(0,0,0,.4);
}
.otv1-blocks .otv1-final__content p:last-of-type{ margin-bottom:22px; font-weight:700; }
.otv1-blocks .otv1-cta-block--dark{ margin-top:0; }
@media (max-width:640px){
  .otv1-blocks section.otv1-final{ min-height:133vw; }
  .otv1-blocks div.otv1-final__content{ padding:32px 20px 30px; }
}
