/* ==========================================================
   WordPress 本体ブロック ＋ VK Blocks（Lightningテーマ）の
   最低限のレイアウト。プラグインのCSSを持ち込まずに、
   記事本文が崩れずに読める状態にするためのもの。
   2026-09-12 静的化にともない作成。
   ========================================================== */

/* ── 画像まわり ───────────────────────────────── */
.a-body .wp-block-image { margin: 30px 0; }
.a-body .wp-block-image img { display: block; height: auto; }
.a-body .wp-block-image.is-resized img { width: auto; max-width: 100%; }
.a-body .is-style-rounded img { border-radius: 999px; }
.a-body .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.a-body .aligncenter img { margin-left: auto; margin-right: auto; }
.a-body .alignright { float: right; margin: 0 0 18px 22px; max-width: 46%; }
.a-body .alignleft  { float: left;  margin: 0 22px 18px 0; max-width: 46%; }
.a-body .alignwide, .a-body .alignfull { max-width: 100%; }
.a-body .wp-element-caption,
.a-body figcaption {
  margin-top: 10px; font-size: 13px; line-height: 1.85;
  color: var(--ink3); text-align: center;
}
.a-body::after { content: ''; display: block; clear: both; }

/* ── 区切り・余白 ─────────────────────────────── */
.a-body .wp-block-separator {
  margin: 44px auto; border: 0; border-top: 1px solid var(--line2); max-width: 100%;
}
.a-body .wp-block-separator.has-alpha-channel-opacity { opacity: 1; }
.a-body .wp-block-spacer, .a-body .vk_spacer { height: 24px; }

/* ── カラム ───────────────────────────────────── */
.a-body .wp-block-columns {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
}
.a-body .wp-block-column { flex: 1 1 250px; min-width: 0; }
@media (max-width: 700px) {
  .a-body .wp-block-columns { gap: 18px; }
  .a-body .wp-block-column { flex: 1 1 100%; }
}

/* ── メディアと文章 ───────────────────────────── */
.a-body .wp-block-media-text {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center;
}
.a-body .wp-block-media-text__media img { width: 100%; border-radius: 8px; }
.a-body .wp-block-media-text__content > * + * { margin-top: 14px; }
@media (max-width: 700px) {
  .a-body .wp-block-media-text { grid-template-columns: 1fr; gap: 16px; }
}

/* ── 埋め込み（YouTube ほか）───────────────────── */
.a-body .wp-block-embed { margin: 30px 0; }
.a-body .wp-block-embed__wrapper { position: relative; }
.a-body .wp-embed-aspect-16-9 .wp-block-embed__wrapper,
.a-body .wp-block-embed-youtube .wp-block-embed__wrapper {
  aspect-ratio: 16 / 9;
}
.a-body .wp-block-embed iframe {
  display: block; width: 100%; height: 100%; border: 0; border-radius: 8px;
}
.a-body iframe { max-width: 100%; }

/* ── 引用 ─────────────────────────────────────── */
.a-body .wp-block-quote {
  margin: 30px 0; padding: 20px 24px;
  background: var(--white); border-left: 4px solid var(--gold-lt);
  border-radius: 0 8px 8px 0;
}
.a-body .wp-block-quote cite {
  display: block; margin-top: 10px; font-size: 13px; color: var(--ink3); font-style: normal;
}

/* ── 色つきの文字・背景（WordPressのプリセット）── */
.a-body .has-background { padding: 20px 24px; border-radius: 8px; }
.a-body .has-vivid-red-background-color { background: #b8432e; color: #fff; }
.a-body .has-vk-color-primary-background-color { background: var(--navy); color: #fff; }
.a-body .has-vk-color-primary-color { color: var(--navy); }
.a-body .has-white-background-color { background: var(--white); }
.a-body .has-pale-pink-background-color { background: #fbe4e4; }
.a-body .has-luminous-vivid-amber-background-color { background: #fcf0d0; }
.a-body .vk-has-luminous-vivid-orange-color { color: #c2410c; }
.a-body .has-text-align-center { text-align: center; }
.a-body .has-text-align-right { text-align: right; }
.a-body .has-text-align-left { text-align: left; }
.a-body .has-background * { color: inherit; }
.a-body .vk_highlighter {
  background: linear-gradient(transparent 62%, rgba(212, 175, 80, .55) 62%);
}

/* ══════════════════════════════════════════════════
   VK Blocks（Lightningテーマのブロック）
   ══════════════════════════════════════════════════ */

/* ── ボタン ───────────────────────────────────── */
.a-body .vk_button { margin: 22px 0; }
.a-body .vk_button-align-center { text-align: center; }
.a-body .vk_button-align-left { text-align: left; }
.a-body .vk_button-align-wide .vk_button_link { display: block; width: 100%; }
.a-body .vk_button_link,
.a-body .vk_button_link.btn {
  display: inline-block; padding: 14px 30px;
  background: var(--navy); color: #fff !important;
  border: 0; border-radius: 7px;
  font-size: 15px; font-weight: 700; text-decoration: none; line-height: 1.6;
  box-shadow: 0 3px 12px rgba(12, 27, 51, .2);
  transition: background .2s, transform .2s;
}
.a-body .vk_button_link:hover { background: var(--navy2); transform: translateY(-2px); }
.a-body .vk_button_link_txt { color: inherit; }
.a-body .vk_button_link_caption,
.a-body .vk_button_link_subCaption {
  display: block; font-size: 12px; font-weight: 400; opacity: .88; margin-top: 3px;
}
.a-body .vk_button_link_before { margin-right: 7px; }

/* ── 記事カード一覧（これが崩れの原因だった）──── */
.a-body .vk_posts,
.a-body .wp-block-vk-blocks-card {
  display: grid; gap: 16px; margin: 30px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none; padding: 0;
}
.a-body .vk_posts-layout-card-horizontal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-body .vk_post,
.a-body .vk_card_item {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; margin: 0;
}
/* 背景画像が敷き詰められていたのはここ。比率と cover を効かせる */
.a-body .vk_post_imgOuter {
  position: relative; display: block;
  aspect-ratio: 16 / 10;
  background-color: var(--warm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.a-body .vk_post_imgOuter_img,
.a-body .vk_post_imgOuter img {
  width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0;
}
.a-body .card-img-overlay { position: absolute; inset: 0; }
.a-body .vk_post_imgOuter_singleTermLabel {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 3px;
}
.a-body .vk_post_body, .a-body .card-body { padding: 14px 16px 16px; }
.a-body .vk_post_title, .a-body .card-title {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--ink); line-height: 1.6; margin: 0 0 7px;
  border: 0; padding: 0;
}
.a-body .vk_post_title a { color: inherit; text-decoration: none; }
.a-body .vk_post_title a:hover { color: var(--gold-dk); }
.a-body .vk_post_excerpt, .a-body .card-text {
  font-size: 13px; line-height: 1.85; color: var(--ink2); margin: 0;
}
.a-body .vk_post_date, .a-body .card-date {
  font-size: 11.5px; color: var(--ink3); margin: 0 0 5px;
}
.a-body .vk_post_btnOuter { margin-top: auto; padding-top: 12px; }
.a-body .vk_post_btn {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  color: var(--gold-dk); text-decoration: none;
}
@media (max-width: 860px) {
  .a-body .vk_posts, .a-body .wp-block-vk-blocks-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .a-body .vk_posts, .a-body .wp-block-vk-blocks-card,
  .a-body .vk_posts-layout-card-horizontal { grid-template-columns: 1fr; }
}

/* ── フロー（手順）──────────────────────────── */
.a-body .vk_flow { margin: 30px 0; padding: 0; list-style: none; }
.a-body .vk_flow_frame {
  position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px; margin-bottom: 14px;
}
.a-body .vk_flow_frame_image img { width: 100%; border-radius: 7px; }
.a-body .vk_flow_frame_text_title {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  color: var(--ink); margin: 0 0 7px; border: 0; padding: 0;
}
.a-body .vk_flow_frame_text_content { font-size: 14px; line-height: 1.9; }
.a-body .vk_flow-arrow-on .vk_flow_frame::after {
  content: ''; position: absolute; left: 50%; bottom: -13px;
  width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid var(--gold-lt); border-bottom: 2px solid var(--gold-lt);
}
.a-body .vk_flow_frame:last-child::after { display: none; }
@media (max-width: 600px) {
  .a-body .vk_flow_frame { grid-template-columns: 1fr; gap: 12px; }
}

/* ── アイコンカード ─────────────────────────── */
.a-body .vk_icon-card_item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px; text-align: center;
}
.a-body .vk_icon-card_item_icon_outer { margin-bottom: 12px; }
.a-body .vk_icon-card_item_icon { font-size: 30px; color: var(--gold); }
.a-body .vk_icon-card_item_title {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  color: var(--ink); margin: 0 0 9px; border: 0; padding: 0;
}
.a-body .vk_icon_card_item_summary { font-size: 14px; line-height: 1.9; margin: 0; }

/* ── スライダー（Swiper のJSは持ち込まないので縦に並べる）── */
.a-body .vk_slider { margin: 30px 0; }
.a-body .vk_slider .swiper-wrapper { display: grid; gap: 14px; }
.a-body .vk_slider_item, .a-body .swiper-slide {
  position: relative; width: auto !important;
  border-radius: 10px; overflow: hidden;
  background-size: cover; background-position: center;
}
.a-body .vk_slider_item_container { position: relative; z-index: 1; padding: 26px 24px; }
.a-body .vk_slider_item-background-area { position: absolute; inset: 0; }
.a-body .vk_slider .swiper-button-next,
.a-body .vk_slider .swiper-button-prev,
.a-body .vk_slider .swiper-pagination { display: none; }

/* ── グリッドカラムカード ─────────────────── */
.a-body .vk_gridColumn, .a-body .vk_gridcolcard {
  display: grid; gap: 16px; margin: 30px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.a-body .vk_gridColumn_item, .a-body .vk_gridcolcard_item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px; min-width: 0;
}
.a-body .vk_gridcolcard_item_body_inner > * + * { margin-top: 12px; }

/* ── 子ページ一覧（veu_card）───────────────── */
.a-body .childPage_list_box, .a-body .veu_card {
  display: grid; gap: 14px; margin: 24px 0;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  list-style: none; padding: 0;
}
.a-body .childPage_list_box_inner, .a-body .veu_card_inner {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px; height: 100%;
}
.a-body .childPage_list_title, .a-body .veu_card_title {
  font-family: var(--serif); font-size: 16px; font-weight: 700;
  color: var(--ink); margin: 0 0 9px; border: 0; padding: 0;
}
.a-body .childPage_list_text { font-size: 13.5px; line-height: 1.85; margin: 0; }
.a-body .childPage_list_more { margin-top: 12px; }

/* ── ページ内容の埋め込み（vk_pageContent）──── */
.a-body .vk_pageContent { margin: 26px 0; }

/* ── Bootstrap 由来の残骸 ──────────────────── */
.a-body .container { width: 100%; max-width: 100%; padding: 0; margin: 0; }
.a-body .btn {
  display: inline-block; padding: 12px 26px; border-radius: 7px;
  font-weight: 700; text-decoration: none;
}
.a-body .btn-primary { background: var(--navy); color: #fff !important; }
.a-body .btn-sm { padding: 8px 18px; font-size: 13px; }
.a-body .btn-md { padding: 12px 26px; }

/* ── 横に広いものは、そこだけ横スクロール ──── */
.a-body table { display: block; overflow-x: auto; max-width: 100%; }
@media (min-width: 720px) {
  .a-body table { display: table; }
}

/* 画像に付いたインライン幅が親をはみ出さないように */
.a-body img[width] { max-width: 100%; height: auto; }

/* ── WordPress標準の「最近の投稿」ブロック ────────── */
.a-body .wp-block-latest-posts,
.a-body .wp-block-latest-posts__list {
  list-style: none; margin: 26px 0; padding: 0;
  display: grid; gap: 12px;
}
.a-body .wp-block-latest-posts__list > li {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin: 0;
}
.a-body .wp-block-latest-posts__featured-image {
  float: none; margin: 0; grid-row: span 3;
}
.a-body .wp-block-latest-posts__featured-image img {
  width: 96px; height: 72px; object-fit: cover;
  border-radius: 7px; border: 0; margin: 0;
}
.a-body .wp-block-latest-posts__post-title {
  font-family: var(--serif); font-size: 15.5px; font-weight: 700;
  color: var(--ink); text-decoration: none; line-height: 1.6;
}
.a-body .wp-block-latest-posts__post-title:hover { color: var(--gold-dk); }
.a-body .wp-block-latest-posts__post-date {
  font-size: 11.5px; color: var(--ink3); display: block; margin-top: 4px;
}
.a-body .wp-block-latest-posts__post-excerpt {
  font-size: 13px; line-height: 1.85; color: var(--ink2); margin-top: 6px;
}
.a-body .wp-block-latest-posts__read-more { font-weight: 700; white-space: nowrap; }
.a-body .screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 560px) {
  .a-body .wp-block-latest-posts__list > li { grid-template-columns: 72px 1fr; gap: 12px; }
  .a-body .wp-block-latest-posts__featured-image img { width: 72px; height: 56px; }
}

/* ── 本文に残ったインライン幅が親をはみ出さないように ──
   （WordPress が書き出した style="width:1024px" などへの保険） */
.a-body [style*="width"] { max-width: 100%; }
.a-body img[style*="width"] { height: auto; }
.a-body figure[style*="width"], .a-body div[style*="width"] { max-width: 100% !important; }

/* ── 独自クラスの取りこぼし（仏陀研究会・AIデザイン講座）── */
.a-body .volunteer-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 9px; padding: 16px 18px; margin: 10px 0;
}
.a-body .childPage_list_body { font-size: 13.5px; line-height: 1.85; }
.a-body .member-info-label {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  color: var(--navy); background: var(--gold-pale);
  padding: 1px 9px; border-radius: 3px; margin-right: 8px;
}
