/* 理事長あいさつ */
.profile-card img {
  border-radius: 10px;
}
@media (max-width: 781px) {
  .profile-card img {
    max-width: 300px;
    margin: auto;
  }
}

/*見出し*/
.main-content h2.wp-block-heading {
  position: relative;
  font-size: 24px;
  line-height: 1.5em;
  padding-bottom: 10px;
  margin: 40px 0;
  letter-spacing: 0.05em;
}
.main-content h2.wp-block-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, #696dc8 50px, rgba(0, 0, 0, 0.1) 10px);
}
@media (max-width: 700px) {
  .main-content h2.wp-block-heading {
    font-size: 20px;
    margin: 20px 0;
  }
}

.main-content h3 {
  font-size: 20px;
  line-height: 1.6em;
  margin-top: 10px;
  margin-bottom: 15px;
  font-weight: 500;
  color: #222681;
}
.main-content h4 {
  font-size: 17px;
  line-height: 1.6em;
  margin: 20px 0 10px;
  font-weight: bold;
  border-bottom: solid 1px #e5e5e5;
  padding-bottom: 8px;
}
@media (max-width: 1050px) {
  .main-content > h2 {
    margin: 30px 0;
  }
}
@media (max-width: 700px) {
  .main-content > h2 {
    font-size: 20px;
    margin: 20px 0;
    padding-bottom: 5px;
    line-height: 1.6em;
  }
  .main-content h3 {
    font-size: 16px;
    line-height: 1.5em;
  }
  .main-content h4 {
    font-size: 15px;
    padding-bottom: 5px;
  }
}

/* 文章 */
.main-content p {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.6em;
}
.main-content p.sub {
  font-size: 14px;
  line-height: 1.4em;
}
.main-content p.small {
  font-size: 12px;
  line-height: 1.4em;
}
@media (max-width: 1050px) {
  .main-content p {
    margin-bottom: 30px;
  }
}
@media (max-width: 700px) {
  .main-content p {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .main-content p.sub {
    font-size: 12px;
  }
  .main-content p.small {
    font-size: 11px;
  }
}

/* 横並び */
.flex {
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 1050px) {
  .flex {
    gap: 20px;
    margin-bottom: 30px;
  }
}
@media (max-width: 700px) {
  .flex {
    flex-direction: column !important;
  }
}

/* グリッド */
.grid-container {
  margin-bottom: 40px;
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
@media (max-width: 1050px) {
  .grid-container {
    margin-bottom: 30px;
  }
  .grid-3 {
    gap: 20px;
  }
}
@media (max-width: 700px) {
  .grid-container {
    margin-bottom: 20px;
  }
  .grid-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* リスト */
.main-content :is(ul, ol) {
  list-style-position: outside;
  margin-bottom: 40px;
}
.main-content ol {
  padding-left: 1.5em;
}
.main-content :is(ul, ol) :is(ul, ol) {
  margin-bottom: 5px;
  margin-left: 15px;
  margin-top: 5px;
}
.main-content :is(ul, ol) li {
  margin: 10px 0;
  padding-left: 2px;
}
.main-content ul li::marker {
  margin-right: 10px;
}
.main-content ol li::marker {
  color: #222681;
  font-weight: bold;
}

/* 入れ子のol（第2レベル） */
.main-content ol ol {
  margin-left: 0;
  margin-top: 8px;
  padding-left: 1.2rem;
  list-style-position: outside;
}
.main-content ol ol li {
  margin: 8px 0;
  padding-left: 5px;
  font-size: 14px;
}
.main-content ol ol li::marker {
  color: #333;
  font-weight: normal;
}
.main-content ul li {
  margin: 10px 0;
  list-style-type: none;
  position: relative;
  padding-left: 25px;
}
.main-content ul li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #222681;
}
@media (max-width: 1050px) {
  .main-content ul {
    margin-bottom: 30px;
  }
}
@media (max-width: 700px) {
  .main-content ul {
    margin-bottom: 20px;
  }
  .main-content :is(ul, ol) li {
    font-size: 14px;
  }
}

/* リンク */
.main-content p > a,
.main-content li > a,
.main-content td > a {
  color: #222681;
  text-decoration: underline;
  line-height: 1.6em;
}
.main-content a:hover {
  text-decoration: none;
}
.main-content .download a {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  margin-bottom: 40px;
}
.main-content .download a::before {
  content: "";
  position: relative;
  left: 0;
  top: 0;
  display: block;
  width: 15px;
  height: 20px;
  background: url(../images/file-download.svg) center no-repeat;
  background-size: contain;
}
@media (max-width: 1050px) {
  .main-content .download a {
    margin-bottom: 30px;
  }
}
@media (max-width: 700px) {
  .main-content .download a {
    margin-bottom: 15px;
  }
  .main-content .download a::before {
    width: 12px;
    height: 16px;
  }
}

/* 基本テーブル */
.main-content .wp-block-table {
  position: relative;
  overflow-x: auto;
  /* スクロールバーを常に表示 */
  scrollbar-width: thin; /* Firefox */
}

/* Webkit系ブラウザ（Chrome, Safari, Edge）のスクロールバースタイル */
.main-content .wp-block-table::-webkit-scrollbar {
  height: 8px;
}

.main-content .wp-block-table::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
  margin: 0 10px;
}

.main-content .wp-block-table::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.main-content .wp-block-table::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* スクロール可能なテーブルのみ上部にスペース確保 */
.main-content .wp-block-table.has-scroll {
  padding-top: 25px;
}

/* スクロールヒント */
.main-content .wp-block-table.has-scroll::before {
  content: "スクロールできます→";
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: normal;
  border-radius: 3px;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.main-content .wp-block-table.has-scroll.scrolled::before {
  opacity: 0;
}

.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  padding-bottom: 40px;
  border-radius: 5px;
  overflow: hidden;
  /* iOS Safariの自動テキストサイズ調整を無効化 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  table-layout: auto; /* セル幅を内容に応じて自動調整 */
}

/* fix-tableクラスの場合は上書き */
.main-content .fix-table table {
  border-collapse: separate !important;
  border-spacing: 0;
}
.wp-block-table thead {
  border: none;
}
.main-content table th,
.main-content table td {
  border: none;
  border-right: 2px solid #e5e5e5;
  padding: 12px 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.main-content table th {
  background-color: #f0f7fa;
  font-weight: bold;
  text-align: center;
  white-space: nowrap; /* ヘッダーは改行しない */
}
/* 最初の列（ラベル列など）は改行を抑制 */
.main-content table td:first-child {
  white-space: nowrap;
  width: 1%; /* 内容に応じて最小幅にする */
}
/* 特定のクラスに応じて対応した列の改行を無効化 */
.main-content
  :is(
    .no-wrap-2 tr td:nth-of-type(2),
    .no-wrap-3 tr td:nth-of-type(3),
    .no-wrap-4 tr td:nth-of-type(4),
    .no-wrap-5 tr td:nth-of-type(5),
    .no-wrap-6 tr td:nth-of-type(6),
    .no-wrap-7 tr td:nth-of-type(7),
    .no-wrap-8 tr td:nth-of-type(8),
    .no-wrap-9 tr td:nth-of-type(9),
    .no-wrap-10 tr td:nth-of-type(10)
  ) {
  white-space: nowrap;
}
.main-content table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}
/* theadがない場合、最初の行のtdに上ボーダーを追加 */
.main-content table:not(:has(thead)) tbody tr:first-child td {
  border-top: 5px solid #222681;
}
@media (max-width: 1050px) {
  .main-content table {
    margin-bottom: 30px;
  }
}
@media (max-width: 700px) {
  .main-content table {
    min-width: 100%;
    width: max-content;
    margin-bottom: 20px;
  }
  .main-content table th {
    white-space: nowrap;
  }
  .main-content table th,
  .main-content table td {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* メンバー表 */
.main-content .member {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}
@media (max-width: 900px) {
  .main-content .member {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.main-content .member p {
  position: relative;
  padding-left: 15px;
  margin: 10px 0;
  line-height: 18px;
}
@media (max-width: 700px) {
  .main-content .member p {
    padding-left: 10px;
  }
}
.main-content .member p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1em;
  background-color: #222681;
  border-radius: 5px 0 0 5px;
}

/* 詳細ブロック */
.detail-box {
  margin-bottom: 70px;
}
.detail-box .is-layout-flex {
  flex-wrap: wrap;
}
.detail-box .is-layout-flex div:first-child {
  font-weight: bold;
  flex-basis: 12% !important;
}
.detail-box .is-layout-flex div:last-child {
  flex-basis: 88% !important;
}
.detail-box .is-layout-flex div p {
  margin: 0 0 20px;
}
@media (max-width: 781px) {
  .detail-box {
    margin-bottom: 30px;
  }
  .detail-box .is-layout-flex {
    flex-direction: column !important;
    gap: 0;
  }
  .detail-box .is-layout-flex div:first-child,
  .detail-box .is-layout-flex div:last-child {
    flex-basis: 100% !important;
  }
  .detail-box .is-layout-flex div p {
    margin: 0 0 18px;
  }
  .detail-box .is-layout-flex div:first-child p {
    margin-bottom: 3px;
  }
}
/* 詳細ブロック（画像あり） */
.main-content .detail-box-2 {
  margin-bottom: 70px;
  border: solid 1px #e5e5e5;
  border-radius: 20px;
  padding: 50px;
}
@media (max-width: 781px) {
  .main-content .detail-box-2 {
    padding: 30px;
    margin-bottom: 30px;
  }
  .main-content .detail-box-2 .is-layout-flow .is-layout-flex {
    gap: 10px;
  }
  .main-content .detail-box-2 .is-layout-flow .is-layout-flex div:first-child {
    min-width: 35px !important;
  }
}
.main-content .detail-box-2 h2 {
  margin: 0 0 20px;
}
.main-content .detail-box-2 .is-layout-flex img {
  max-width: 400px;
  margin: auto;
  width: 100%;
}
.main-content .detail-box-2 .is-layout-flex p {
  margin: 0 0 20px;
}

/* ファイルリンク */
.file-link a {
  display: flex !important;
  align-items: center;
  gap: 15px;
  position: relative;
  margin-bottom: 40px;
}
.file-link a::before {
  content: "";
  position: relative;
  display: block;
  width: 15px;
  height: 20px;
  background: url(../images/file-icon.svg) center no-repeat;
  background-size: contain;
}

/* 外部リンク */
.external-link a::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 12px;
  background: url(../images/external-link-icon.svg) center no-repeat;
  background-size: contain;
}

/* ボタン（ブルーグラデーション） */
.main-content .button-blue a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #383c9e 0%, #222681 100%);
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
  padding: 20px 60px 20px 32px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  margin: auto;
  min-width: 200px;
}
.main-content .button-blue a::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url(../images/arrow-right.svg) center no-repeat;
  background-size: contain;
  transition: transform 0.3s ease;
}
.main-content .button-blue a:hover::after {
  transform: translateX(4px) translateY(-50%);
}
@media (max-width: 700px) {
  .main-content .button-blue a {
    padding: 15px 45px 15px 20px;
    font-size: 13px;
    min-width: 150px;
  }
  .main-content .button-blue a::after {
    right: 15px;
    width: 15px;
    height: 15px;
  }
}

/* 区切り線 */
.main-content hr {
  border: none;
  margin: 80px 0;
  height: 1px;
  background-color: #e5e5e5;
}
@media (max-width: 700px) {
  .main-content hr {
    margin: 60px 0;
  }
}

/* 固定テーブル */
.main-content .fix-table.has-scroll::before {
  content: "縦横にドラッグでスクロールできます";
}

.main-content .fix-table {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 500px;
  cursor: grab;
}

.main-content .fix-table:active {
  cursor: grabbing;
}
.main-content .fix-table table {
  overflow: auto;
}

/* ヘッダー行のセルを固定 */
.main-content .fix-table table thead tr {
  position: sticky;
  top: -30px;
  z-index: 3;
  background-color: #f0f7fa !important;
}
.main-content .fix-table table :is(th, td) {
  font-size: 12px;
}

/* 左列（1列目）を固定 */
.main-content .fix-table table th:first-child,
.main-content .fix-table table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

/* ヘッダーの左上セル（最高優先度） */
.main-content .fix-table table thead th:first-child {
  z-index: 4;
  background-color: #f0f7fa !important;
}

/* 左列のボディセルの背景色 */
.main-content .fix-table table tbody td:first-child {
  background-color: #fff !important;
}

.main-content .fix-table table tbody tr:nth-child(even) td:first-child {
  background-color: #f8f9fa !important;
}
