/* ===============================
   全体コンテナ
================================ */
.content {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===============================
   ページタイトル（H1）
================================ */
.content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 50px;
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  .content h1 {
    font-size: 22px;
  }
}

/* ===============================
   H2
================================ */

.content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #222;

  margin: 40px 0 20px;
  padding-left: 14px;

  border-left: 4px solid #1c66a6;
  border-bottom: 1px solid #cfcfcf;

  padding-bottom: 10px;
}

/* ===============================
   H3
================================ */

.content h3 {
  font-size: 16px;
  font-weight: 700;

  margin: 30px 0 10px;
  padding-left: 12px;

  border-left: 3px solid #1c66a6;
}



/* スマホ用調整 */
@media (max-width: 768px) {
  .content h3 {
    font-size: 18px;
    padding: 12px 16px;
    margin: 20px 0 20px;
  }
}



/* ===============================
   paragraph
================================ */

.content p {
  line-height: 1.9;
  margin-bottom: 18px;
}

/* 背景色が付いたブロック共通 */
[class*="has-"][class*="-background-color"] {
  padding: 1rem;
  border-radius: 0.5rem;
}



/* ===============================
   カラムレイアウト（Gutenberg）
================================ */
.content .wp-block-columns {
  gap: 80px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .content .wp-block-columns {
    gap: 30px;
  }
}

/* ===============================
   リストデザイン（Gutenberg想定）
   - 管理画面で「・」→ ul の点が出る
   - 管理画面で「数字」→ ol の番号が出る
   - ネストしても崩れにくい
================================ */

/* 既存の「ul のデフォルトを消す」は削除/無効化してOK */
/* .content ul { list-style: none; padding-left: 0; margin: 0; } */

/* ul/ol 共通 */
.content ul,
.content ol {
  margin: 18px 0;
  padding-left: 1.6em;
  /* マーカーが綺麗に見える左余白 */
}

/* それぞれのマーカーを必ず表示 */
.content ul {
  list-style: disc;
  /* ・ */
  list-style-position: outside;
}

.content ol {
  list-style: decimal;
  /* 1,2,3 */
  list-style-position: outside;
}

/* リスト項目 */
.content li {
  margin: 8px 0;
  line-height: 1.75;
}

/* ネスト（2段目以降）は少し詰める */
.content li>ul,
.content li>ol {
  margin-top: 10px;
  margin-bottom: 0;
  padding-left: 1.4em;
}

.content ul ul {
  list-style: circle;
}

.content ul ul ul {
  list-style: square;
}

/* 箇条書き/番号の見た目を整える（モダンブラウザ向け） */
.content li::marker {
  color: rgba(3, 59, 89, 0.9);
  font-weight: 700;
}

/* ブロックエディタの「リスト」ブロックが入っても崩れにくく */
.content .wp-block-list {
  margin: 18px 0;
  padding-left: 1.6em;
}

/* ===============================
   リンクデザイン（大学サイト風）
================================ */
.content a {
  color: #003399;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.content a:hover {
  opacity: 0.75;
}

/* ===============================
   セクション間余白調整
================================ */
.content h2:first-of-type {
  margin-top: 0;
}

/* ===============================
   パンくず調整（任意）
================================ */
.content nav {
  margin-bottom: 20px;
  font-size: 13px;
  color: #64748b;
}

/* ===============================
   画像まわり
================================ */

.content img {
  margin-bottom: 20px !important;
}

.content .has-text-align-center img {
  margin: 0 auto;
}

/* ===============================
   Table表示の設定
================================ */

.content table {
  margin: 20px auto;
}

/* スマホ：テーブルは横スクロールで表示（折り返さない） */
@media (max-width: 767px) {

  .content figure.wp-block-table,
  .content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 8px;
  }

  /* テーブルは自然な列幅計算に戻す */
  .content .wp-block-table table,
  .content figure.wp-block-table table,
  .content table {
    table-layout: auto;
    width: max-content;
    /* 内容幅を維持（横スクロール前提） */
    min-width: 640px;
    /* ここは列数に応じて調整OK */
    border-collapse: collapse;
  }

  /* ★重要：セルの中身は折り返す（はみ出し防止） */
  .content table th,
  .content table td {
    white-space: normal;
    overflow-wrap: anywhere;
    /* 長い単語/URLも折れる */
    word-break: break-word;
  }

  /* リンクも折れるように */
  .content table a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ===============================
   Fileブロック（PDF/WORD）
   - 通常：カードUI（リンク + ボタン + バッジ）
   - PDF embed：カードUIを無効化して崩れ防止（埋め込みは100%表示）
================================ */

/* ===============================
   0) PDF embed 判定（Gutenbergの出力差分を吸収）
================================ */
.content .wp-block-file:has(.wp-block-file__embed),
.content .wp-block-file:has(object[type="application/pdf"]),
.content .wp-block-file:has(embed[type="application/pdf"]),
.content .wp-block-file:has(iframe[src*=".pdf"]) {
  /* embedがある場合は後段で上書き */
}

/* ===============================
   1) 通常のFileカード（embedが無い時）
================================ */
.content .wp-block-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin: 14px 0;

  border: 1px solid rgba(3, 59, 89, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(2, 24, 38, 0.06);
}

/* ファイル名リンク */
.content .wp-block-file>a:not(.wp-block-file__button) {
  flex: 1;
  min-width: 0;
  position: relative;

  text-decoration-thickness: 1px;
  text-underline-offset: 3px;

  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========== バッジ（PC：リンク内 absolute） ========== */
.content .wp-block-file>a[href$=".pdf"]:not(.wp-block-file__button),
.content .wp-block-file>a[href*=".pdf?"]:not(.wp-block-file__button),
.content .wp-block-file>a[href$=".doc"]:not(.wp-block-file__button),
.content .wp-block-file>a[href$=".docx"]:not(.wp-block-file__button),
.content .wp-block-file>a[href*=".doc?"]:not(.wp-block-file__button),
.content .wp-block-file>a[href*=".docx?"]:not(.wp-block-file__button) {
  padding-right: 72px;
}

/* PDF（赤） */
.content .wp-block-file>a[href$=".pdf"]:not(.wp-block-file__button)::after,
.content .wp-block-file>a[href*=".pdf?"]:not(.wp-block-file__button)::after {
  content: "PDF";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;

  color: #fff;
  background: #d32f2f;
  border-radius: 999px;
}

/* WORD（青） */
.content .wp-block-file>a[href$=".doc"]:not(.wp-block-file__button)::after,
.content .wp-block-file>a[href$=".docx"]:not(.wp-block-file__button)::after,
.content .wp-block-file>a[href*=".doc?"]:not(.wp-block-file__button)::after,
.content .wp-block-file>a[href*=".docx?"]:not(.wp-block-file__button)::after {
  content: "WORD";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;

  color: #fff;
  background: #185abd;
  border-radius: 999px;
}

/* ダウンロードボタン */
.content .wp-block-file .wp-block-file__button {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 999px;

  font-weight: 700;
  font-size: 14px;
  line-height: 1;

  background: #0c5f8a !important;
  color: #fff !important;

  border: 1px solid rgba(12, 95, 138, 0.35) !important;
  box-shadow: 0 10px 18px rgba(12, 95, 138, 0.18);

  text-decoration: none !important;
}

.content .wp-block-file .wp-block-file__button:visited {
  color: #fff !important;
}

.content .wp-block-file .wp-block-file__button:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(12, 95, 138, .22);
}

.content .wp-block-file .wp-block-file__button:active {
  transform: translateY(0);
}

.content .wp-block-file .wp-block-file__button:focus-visible {
  outline: 3px solid rgba(12, 95, 138, .35);
  outline-offset: 3px;
}

/* ===============================
   2) PDF embed がある場合だけ：カードUIを無効化して崩れを止める
================================ */
.content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) {
  display: block;
  /* flexをやめる */
  padding: 0;
  /* 見た目は必要なら下で付ける */
  margin: 14px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* embed本体は100%表示 + 枠 */
.content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) :is(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: min(80vh, 900px) !important;
  min-height: 520px !important;

  border-radius: 12px;
  border: 1px solid rgba(3, 59, 89, 0.18);
  background: #fff;
  box-shadow: 0 6px 16px rgba(2, 24, 38, 0.06);
}

/* embed時：ファイル名とボタンは下に（カード風に） */
.content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"])>a:not(.wp-block-file__button) {
  display: inline-block;
  margin-top: 10px;
  padding-right: 0;
  /* バッジ余白不要（embed時は非表示） */
  writing-mode: horizontal-tb;
}

/* embed時はバッジを出さない（崩れ要因なのでOFF） */
.content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"])>a:not(.wp-block-file__button)::after {
  content: none !important;
}

/* embed時：ボタンは下に */
.content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) .wp-block-file__button {
  margin-top: 10px;
}

/* ===============================
   3) SP（embed無し）：縦積み + バッジは右端（被り防止） + 下線抑止
================================ */
@media (max-width: 640px) {

  /* embed無しだけ縦積み */
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"])) {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* タイトル行：右端にバッジを“レイアウトとして”置く */
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a:not(.wp-block-file__button) {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;

    padding-right: 0 !important;
    text-decoration: none !important;
    /* 下線がバッジまで伸びるのを防ぐ */
  }

  /* SP：バッジは通常フローへ（右端固定） */
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href$=".pdf"]:not(.wp-block-file__button)::after,
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href*=".pdf?"]:not(.wp-block-file__button)::after,
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href$=".doc"]:not(.wp-block-file__button)::after,
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href$=".docx"]:not(.wp-block-file__button)::after,
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href*=".doc?"]:not(.wp-block-file__button)::after,
  .content .wp-block-file:not(:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]))>a[href*=".docx?"]:not(.wp-block-file__button)::after {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto;
    margin-left: auto;
  }

  /* ボタンは下で横幅100% */
  .content .wp-block-file .wp-block-file__button {
    width: 100%;
    padding: 12px 16px;
    text-align: center;
  }

  /* embed時：埋め込み高さは少し下げる（任意） */
  .content .wp-block-file:has(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) :is(.wp-block-file__embed, object[type="application/pdf"], embed[type="application/pdf"], iframe[src*=".pdf"]) {
    min-height: 420px !important;
    height: min(70vh, 720px) !important;
  }
}

/* ===============================
   ダウンロードボタン統一
================================ */
.content .wp-block-file .wp-block-file__button {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 999px;

  font-weight: 700;
  font-size: 14px;
  line-height: 1;

  background: #0c5f8a !important;
  color: #fff !important;

  border: 1px solid rgba(12, 95, 138, 0.35) !important;
  box-shadow: 0 10px 18px rgba(12, 95, 138, 0.18);

  text-decoration: none !important;
}

.content .wp-block-file .wp-block-file__button:visited {
  color: #fff !important;
}

.content .wp-block-file .wp-block-file__button:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(12, 95, 138, .22);
}

.content .wp-block-file .wp-block-file__button:active {
  transform: translateY(0);
}

.content .wp-block-file .wp-block-file__button:focus-visible {
  outline: 3px solid rgba(12, 95, 138, .35);
  outline-offset: 3px;
}

/* ===============================
   スマホ時は縦積み
================================ */
@media (max-width: 640px) {
  .content .wp-block-file {
    flex-direction: column;
    align-items: flex-start;
  }

  .content .wp-block-file .wp-block-file__button {
    width: 100%;
    text-align: center;
  }
}


/* ===============================
   WP Accordion Block（白ベース）
================================ */

/* 外枠 */
.content .wp-block-accordion-item {
  border: 1px solid rgba(3, 59, 89, 0.15);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 24, 38, 0.06);
  overflow: hidden;
  margin: 16px 0;
}

/* 見出しボタン（白に変更） */
.content .wp-block-accordion-heading__toggle {
  width: 100%;
  text-align: left;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 18px 22px;
  font-weight: 800;
  font-size: 16px;
  color: #033b59;

  background: #ffffff;
  border: none;
}

/* 左アクセントバー */
.content .wp-block-accordion-heading__toggle::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #0c5f8a;
  flex: 0 0 auto;
}

/* タイトル */
.content .wp-block-accordion-heading__toggle-title {
  min-width: 0;
}

/* ＋アイコン（白背景で上品に） */
.content .wp-block-accordion-heading__toggle-icon {
  flex: 0 0 auto;

  width: 34px;
  height: 34px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(12, 95, 138, 0.25);
  background: #ffffff;
  color: #0c5f8a;

  font-weight: 900;
  transition: transform 0.15s ease, background 0.2s ease;
}

/* hover（ほんのり色付け） */
.content .wp-block-accordion-heading__toggle:hover {
  background: #f6f9fc;
}

/* 開いているとき */
.content .wp-block-accordion-heading__toggle[aria-expanded="true"] {
  background: #f1f6fa;
}

/* ＋回転 */
.content .wp-block-accordion-heading__toggle[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon {
  transform: rotate(45deg);
}

/* パネル */
.content .wp-block-accordion-panel {
  padding: 18px 22px;
  border-top: 1px solid rgba(3, 59, 89, 0.12);
  background: #ffffff;
}

/* ===============================
   Accordion内のH3は通常見出しとして扱う（崩れ防止）
================================ */
.content .wp-block-accordion-item h3,
.content .wp-block-accordion-panel h3 {
  font-size: 16px;
  font-weight: 700;
  color: #033b59;

  margin: 16px 0 10px;
  padding: 0;

  border: none;
  border-left: none;
  background: none;
  box-shadow: none;
}

/* Accordion内のH3を少しだけ区切りたい場合（任意） */
.content .wp-block-accordion-panel h3 {
  padding-left: 12px;
  border-left: 3px solid rgba(12, 95, 138, 0.5);
}