/**
 * ブログ記事本文の共通スタイル
 * - 公開: .blogArticleContent
 * - 編集: .editor-styles-wrapper
 */

.blogArticleContent,
.editor-styles-wrapper {
  --main-color: rgb(217, 106, 61);
  --sub-color: #fff;
  --sub-color2: rgb(44, 75, 144);
  --sub-color3: rgb(235, 224, 173);
  color: var(--sub-color);
  font-family: "futura-pt", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.85;
  word-break: break-all;
}

.blogArticleContent {
  width: 90%;
  margin: 0 auto 8%;
}

.blogArticleContent > *:first-child,
.editor-styles-wrapper > *:first-child,
.editor-styles-wrapper .is-root-container > *:first-child {
  margin-top: 0;
}

/* ----- 段落・ブロック間余白 ----- */
.blogArticleContent p,
.blogArticleContent ul,
.blogArticleContent ol,
.blogArticleContent blockquote,
.blogArticleContent figure,
.blogArticleContent .wp-block-image,
.blogArticleContent .wp-block-quote,
.blogArticleContent .wp-block-embed,
.blogArticleContent .wp-block-gallery,
.blogArticleContent .wp-block-separator,
.blogArticleContent .wp-block-table,
.blogArticleContent .wp-block-code,
.blogArticleContent .wp-block-preformatted,
.blogArticleContent .wp-block-buttons,
.blogArticleContent .wp-block-pullquote,
.editor-styles-wrapper p,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol,
.editor-styles-wrapper blockquote,
.editor-styles-wrapper figure,
.editor-styles-wrapper .wp-block-image,
.editor-styles-wrapper .wp-block-quote,
.editor-styles-wrapper .wp-block-embed,
.editor-styles-wrapper .wp-block-gallery,
.editor-styles-wrapper .wp-block-separator,
.editor-styles-wrapper .wp-block-table,
.editor-styles-wrapper .wp-block-code,
.editor-styles-wrapper .wp-block-preformatted,
.editor-styles-wrapper .wp-block-buttons,
.editor-styles-wrapper .wp-block-pullquote {
  margin-top: 0;
  margin-bottom: 1.4em;
}

/* ----- 見出し（オレンジ背景に馴染むエディトリアル風） ----- */
.blogArticleContent h2,
.blogArticleContent h3,
.blogArticleContent h4,
.blogArticleContent h5,
.blogArticleContent h6,
.blogArticleContent .wp-block-heading,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6,
.editor-styles-wrapper .wp-block-heading {
  color: var(--sub-color);
  font-weight: 700;
  line-height: 1.4;
}

/* H2：クリームの下線（ページバナーとは別の、本文用スタイル） */
.blogArticleContent h2,
.blogArticleContent h2.wp-block-heading,
.editor-styles-wrapper h2,
.editor-styles-wrapper h2.wp-block-heading {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 2.2em 0 0.9em;
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--sub-color3);
}

/* H3：左ラインのみ */
.blogArticleContent h3,
.blogArticleContent h3.wp-block-heading,
.editor-styles-wrapper h3,
.editor-styles-wrapper h3.wp-block-heading {
  font-size: 1.25rem;
  margin: 1.8em 0 0.65em;
  padding-left: 0.85em;
  border-left: 3px solid var(--sub-color3);
}

/* H4：小さめ・クリーム */
.blogArticleContent h4,
.blogArticleContent h4.wp-block-heading,
.editor-styles-wrapper h4,
.editor-styles-wrapper h4.wp-block-heading {
  font-size: 1.1rem;
  color: var(--sub-color3);
  margin: 1.5em 0 0.5em;
  letter-spacing: 0.03em;
}

.blogArticleContent h5,
.blogArticleContent h6,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-size: 1rem;
  color: var(--sub-color);
  opacity: 0.9;
  margin: 1.3em 0 0.45em;
}

.blogArticleContent h2 + p,
.blogArticleContent h3 + p,
.blogArticleContent h4 + p,
.editor-styles-wrapper h2 + p,
.editor-styles-wrapper h3 + p,
.editor-styles-wrapper h4 + p {
  margin-top: 0.4em;
}

/* ----- リンク・強調 ----- */
.blogArticleContent a,
.editor-styles-wrapper a {
  color: var(--sub-color3);
  text-decoration: underline !important;
  transition: opacity 0.3s ease;
}

.blogArticleContent a:hover,
.editor-styles-wrapper a:hover {
  opacity: 0.8;
}

.blogArticleContent strong,
.editor-styles-wrapper strong {
  font-weight: 700;
  color: var(--sub-color);
}

.blogArticleContent em,
.editor-styles-wrapper em {
  font-style: italic;
  opacity: 0.95;
}

/* ----- リスト ----- */
.blogArticleContent ul,
.blogArticleContent ol,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  padding-left: 1.4em;
}

.blogArticleContent ul > li,
.editor-styles-wrapper ul > li {
  list-style: disc;
  margin-bottom: 0.45em;
  padding-left: 0.15em;
}

.blogArticleContent ol > li,
.editor-styles-wrapper ol > li {
  list-style: decimal;
  margin-bottom: 0.45em;
  padding-left: 0.15em;
}

/* ----- 画像 ----- */
.blogArticleContent img,
.editor-styles-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.blogArticleContent .wp-block-image,
.editor-styles-wrapper .wp-block-image {
  margin-bottom: 1.6em;
}

.blogArticleContent .wp-block-image figcaption,
.editor-styles-wrapper .wp-block-image figcaption {
  margin-top: 0.6em;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.8;
  color: var(--sub-color);
}

.blogArticleContent .alignleft,
.editor-styles-wrapper .alignleft {
  float: left;
  margin: 0 1.2em 1em 0;
  max-width: 45%;
}

.blogArticleContent .alignright,
.editor-styles-wrapper .alignright {
  float: right;
  margin: 0 0 1em 1.2em;
  max-width: 45%;
}

.blogArticleContent .aligncenter,
.editor-styles-wrapper .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

/* ----- 引用 ----- */
.blogArticleContent blockquote,
.blogArticleContent .wp-block-quote,
.editor-styles-wrapper blockquote,
.editor-styles-wrapper .wp-block-quote {
  border-left: 3px solid var(--sub-color3);
  padding: 0.8em 1em;
  margin-left: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 0 10px 10px 0;
}

.blogArticleContent .wp-block-quote cite,
.editor-styles-wrapper .wp-block-quote cite {
  display: block;
  margin-top: 0.7em;
  font-size: 0.88rem;
  font-style: normal;
  opacity: 0.75;
}

.blogArticleContent .wp-block-pullquote,
.editor-styles-wrapper .wp-block-pullquote {
  border-top: 2px solid var(--sub-color3);
  border-bottom: 2px solid var(--sub-color3);
  padding: 1.5em 0.5em;
  text-align: center;
  margin: 2em 0;
}

.blogArticleContent .wp-block-pullquote p,
.editor-styles-wrapper .wp-block-pullquote p {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0;
}

.blogArticleContent .wp-block-pullquote blockquote,
.editor-styles-wrapper .wp-block-pullquote blockquote {
  border: none;
  padding: 0;
  background: none;
}

/* ----- 区切り線 ----- */
.blogArticleContent .wp-block-separator,
.editor-styles-wrapper .wp-block-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  width: 36%;
  margin: 2.5em auto;
}

.blogArticleContent .wp-block-separator.is-style-wide,
.editor-styles-wrapper .wp-block-separator.is-style-wide {
  width: 100%;
}

.blogArticleContent .wp-block-separator.is-style-dots,
.editor-styles-wrapper .wp-block-separator.is-style-dots {
  border: none;
  text-align: center;
  color: var(--sub-color3);
}

/* ----- ボタン（ヘッダーメニュー風） ----- */
.blogArticleContent .wp-block-buttons,
.editor-styles-wrapper .wp-block-buttons {
  gap: 0.8em;
  margin: 1.8em 0;
}

.blogArticleContent .wp-block-button__link,
.editor-styles-wrapper .wp-block-button__link {
  background-color: var(--sub-color2);
  color: var(--sub-color) !important;
  border-radius: 999px;
  padding: 0.7em 1.6em;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 1px solid var(--sub-color2);
  transition: all 0.3s ease;
}

.blogArticleContent .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button__link:hover {
  opacity: 0.85;
}

.blogArticleContent .wp-block-button.is-style-outline .wp-block-button__link,
.editor-styles-wrapper
  .wp-block-button.is-style-outline
  .wp-block-button__link {
  background-color: transparent;
  color: var(--sub-color) !important;
  border: 1px solid var(--sub-color);
}

.blogArticleContent
  .wp-block-button.is-style-outline
  .wp-block-button__link:hover,
.editor-styles-wrapper
  .wp-block-button.is-style-outline
  .wp-block-button__link:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* ----- テーブル ----- */
.blogArticleContent .wp-block-table,
.editor-styles-wrapper .wp-block-table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  margin: 2em 0;
}

.blogArticleContent .wp-block-table table,
.editor-styles-wrapper .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

.blogArticleContent .wp-block-table th,
.blogArticleContent .wp-block-table td,
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td {
  border: 1px solid rgba(44, 75, 144, 0.15);
  padding: 0.7em 1em;
  background-color: #fff;
  color: var(--sub-color2);
  font-size: 0.98rem;
}

.blogArticleContent .wp-block-table th,
.editor-styles-wrapper .wp-block-table th {
  font-weight: 700;
  color: var(--sub-color2);
  background-color: var(--sub-color3);
}

.blogArticleContent .wp-block-table tbody tr:nth-child(even) td,
.editor-styles-wrapper .wp-block-table tbody tr:nth-child(even) td {
  background-color: #fafafa;
}

/* ----- コード ----- */
.blogArticleContent .wp-block-code,
.blogArticleContent pre,
.editor-styles-wrapper code,
.editor-styles-wrapper .wp-block-code,
.editor-styles-wrapper pre {
  background-color: rgba(0, 0, 0, 0.25);
  color: var(--sub-color3);
  border-radius: 10px;
  font-size: 0.92em;
}

.blogArticleContent code,
.editor-styles-wrapper code {
  padding: 0.15em 0.4em;
}

.blogArticleContent .wp-block-code,
.blogArticleContent pre,
.editor-styles-wrapper .wp-block-code,
.editor-styles-wrapper pre {
  padding: 1.2em;
  overflow-x: auto;
  line-height: 1.6;
}

/* ----- ギャラリー ----- */
.blogArticleContent .wp-block-gallery,
.editor-styles-wrapper .wp-block-gallery {
  gap: 0.65em;
  margin: 1.8em 0;
}

.blogArticleContent .wp-block-gallery img,
.editor-styles-wrapper .wp-block-gallery img {
  border-radius: 10px;
}

/* ----- 埋め込み ----- */
.blogArticleContent .wp-block-embed__wrapper,
.editor-styles-wrapper .wp-block-embed__wrapper {
  border-radius: 12px;
  overflow: hidden;
}

/* ----- クリアフィックス ----- */
.blogArticleContent::after,
.editor-styles-wrapper .is-root-container::after {
  content: "";
  display: table;
  clear: both;
}

/* ----- ブロックエディタ：本文ブロックの見た目を確実に反映 ----- */
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > h2.wp-block-heading,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > h3.wp-block-heading,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > h4.wp-block-heading {
  border-color: rgb(235, 224, 173);
}

.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > h2.wp-block-heading {
  border-bottom-style: solid;
  border-bottom-width: 2px;
}

.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > h3.wp-block-heading {
  border-left-style: solid;
  border-left-width: 3px;
}
