/* =========================================
   KUMIHIMO固有デザイン 拡張ユーティリティ
========================================= */

/* --- 1. 見出し：上部センターの縦線装飾 (旧 .ttl-type01 + .ttl-bar2) --- */
.m-heading--bar-top {
  position: relative;
  padding-top: 90px;
  text-align: center;
  font-family: var(--font-mincho, serif);
  font-weight: bold;
  font-size: 4.0rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.m-heading--bar-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 60px;
  background-color: var(--color-main1, #F5002F);
  transition: height 2.5s ease;
}

/* --- SP（スマホ）表示対応 --- */
@media screen and (max-width: 768px) {
  .m-heading--bar-top {
    padding-top: 80px;
    font-size: clamp(2.4rem, 4vw + 1rem, 4.0rem);
  }

  .m-heading--bar-top::before {
    height: 50px;
  }
}

/* --- 2. バナータイトル：2色のアンダーライン (旧 .bnrTtl) --- */
.m-heading--bnr-line {
  position: relative;
  font-weight: bold;
  padding-bottom: 10px;
}

.m-heading--bnr-line::before {
  display: block;
  content: "";
  width: 3em;
  height: 1px;
  background-color: var(--color-main1);
  position: absolute;
  left: 0;
  bottom: 0;
}

.m-heading--bnr-line::after {
  display: block;
  content: "";
  width: calc(100% - 3em);
  height: 1px;
  background-color: #efe7e7;
  position: absolute;
  right: 0;
  bottom: 0;
}

/* =========================================
   Module: Award Box (.m-award)
   用途：コンテストの受賞企業紹介カード
========================================= */

.m-award {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-color-white, #ffffff);
  border: 1px solid var(--color-support5, #cccccc);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: clamp(3rem, 4vw, 5rem);
}

.m-award__figure {
  width: 100%;
  margin: 0 0 3rem;
}

.m-award__img {
  width: 100%;
  max-width: 800px;
  height: auto;
  vertical-align: bottom;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
}

.m-award__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* --- 企業ロゴと名前 --- */
.m-award__company {
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

/* =========================================
   モディファイア：複数企業を横並びにする（2カラムレイアウト）
========================================= */

.m-award__company--row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
}

.m-award__company--row .m-award__company-link {
  width: calc(50% - 1rem);
  max-width: 300px;
}

.m-award__company--row .m-award__company-logo {
  width: 100%;
  max-width: 280px;
  height: 120px;
  padding: 20px 20px 0;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

.m-award__company--row .m-award__company-name {
  height: 60px;
}

@media screen and (max-width: 768px) {
  .m-award__company--row {
    flex-direction: column; /* SP時は窮屈になるため、自動で縦積みに戻す */
    align-items: center;
    gap: 3rem;
  }

  .m-award__company--row .m-award__company-link {
    width: 100%;
    max-width: 280px;
  }

  .m-award__company--row .m-award__company-logo {
    width: 100%;
    max-width: 250px;
    height: 100px;
    padding: 0 16px 12px 16px;
  }

  .m-award__company--row .m-award__company-name {
    height: initial;
  }
}
@media screen and (max-width: 420px) {
  .m-award__company--row .m-award__company-logo {
    width: 100%;
    max-width: 180px;
    height: 80px;
    padding: 0 12px 8px 12px;
  }
}

.m-award__company-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  max-width: 100%;
}

.m-award__company-logo {
  width: 100%;
  max-width: 280px;
  height: 120px;
  padding: 0 24px 16px 24px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

.m-award__company-name {
  font-weight: var(--weight-b, bold);
  font-size: var(--fz-txt-md, 1.6rem);
  display: flex;
  align-items: center;
}

a.m-award__company-link:hover .m-award__company-name {
  opacity: 0.7;
}

/* --- 紹介テキスト（行数指定で高さを揃える） --- */
.m-award__txt {
  font-size: var(--fz-txt-md, 1.6rem);
  line-height: var(--lh, 1.8);
  margin: 0 0 4rem;
  min-height: calc(1.8em * 5);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 応募アイデア枠 --- */
.m-award__idea {
  margin-bottom: 0;
}

.m-award__idea-label {
  position: relative;
  font-size: var(--fz-txt-md, 1.6rem);
  font-weight: var(--weight-b, bold);
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 6px 14px 6px 16px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.m-award__idea-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1em;
  background-color: var(--color-main1, #ea002a);
  border-radius: 0 2px 2px 0;
}

/* --- 応募アイデア枠のタイトル（PCレイアウト） --- */
.m-award__idea-title {
  margin: 0;
  font-size: var(--fz-txt-lg, 1.8rem);
  font-weight: var(--weight-b, bold);
  color: var(--color-main1, #ea002a);
  line-height: 1.6;
  min-height: calc(1.6em * 2);

  /* 省略しないためコメントアウト
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      */
}

/* モディファイア：縦並び(column)を横並び(row)に上書き */
.m-award__company-link--horizontal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* ★ ロゴの「ボックスサイズ」を厳密に規定 */
.m-award__company-link--horizontal .m-award__company-logo {
  justify-self: flex-end;
  width: 220px;
  height: 80px;
  flex-shrink: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  background-color: #ffffff;
  border-radius: 4px;
  object-fit: contain;
  object-position: center center;
}

/* 会社名のマージンリセット（念のため） */
.m-award__company-link--horizontal .m-award__company-name {
  justify-self: flex-start;
  margin: 0;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: left;
  line-height: 1.5;
}

.m-award__company-link--horizontal .m-award__company-name:only-child {
  grid-column: 1 / -1;
  justify-self: center;
}

/* =========================================
   Modifier: フルサイズ表示 (.m-award--full)
   用途：最優秀賞などの単一カラム用（行数制限を解除）
========================================= */
.m-award--full .m-award__txt,
.m-award--full .m-award__idea-title {
  min-height: initial;
  display: block;
  -webkit-line-clamp: initial;
  line-clamp: initial;
  overflow: visible;
}

/* --- SP（スマホ）表示対応 --- */
@media screen and (max-width: 768px) {
  .m-award {
    padding: 3rem 2rem;
  }

  .m-award__idea-label {
    font-size: 1.4rem;
    padding: 5px 12px 5px 14px;
    margin-bottom: 1.0rem;
  }

  .m-award__idea-title {
    font-size: var(--fz-txt-md, 1.6rem);
  }

  .m-award__company-logo {
    width: 100%;
    max-width: 250px;
    height: 100px; /* SP用の固定高さ */
    padding: 0 16px 12px 16px; /* SP用の少し狭いセーフティマージン */
  }

  .m-award__company-link--horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .m-award__company-link--horizontal + .m-award__company-link--horizontal {
    margin-top: 2.0rem;
  }

  .m-award__company-link--horizontal .m-award__company-logo {
    width: 240px;
    height: 80px;
    padding: 6px 10px;
    margin-right: 0;
  }

  .m-award__company-link--horizontal .m-award__company-name {
    text-align: center;
    margin-top: 5px;
  }

  /* スマホ等で縦積みになった際は、高さを揃える必要がないため全解除 */
  .m-award__txt,
  .m-award__idea-title {
    min-height: initial;
    display: block;
    -webkit-line-clamp: initial;
    line-clamp: initial;
    overflow: visible;
  }
}

/* --- SP（スマホ）表示対応 --- */
@media screen and (max-width: 420px) {
  .m-award__company-logo {
    width: 100%;
    max-width: 180px;
    height: 80px; /* さらに小さい画面用の固定高さ */
    padding: 0 12px 8px 12px; /* さらに小さいセーフティマージン */
  }

  .m-award__company-link--horizontal .m-award__company-logo {
    width: 100%;
    max-width: 200px;
    height: 70px;
  }
}

/* --- H2 スタイル 04 --- */
/* 用途：文章量が多いリード見出し・イントロダクション用 */
.m-heading--h2-04 {
  font-family: var(--font-mincho, serif);
  font-weight: var(--weight-b, bold);
  font-size: clamp(2rem, 1.14rem + 2.68vw, 3.2rem);
  line-height: 1.6;
  text-align: center;
}

/* =========================================
   Module: Award Title (.m-award-title)
   用途：コンテストの賞名見出し（最優秀賞・優秀賞など）
========================================= */

.m-award-title {
  /* 中央揃えとレイアウト */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  /* フォントと色 */
  color: var(--color-main1, #ea002a);
  font-weight: var(--weight-b, bold);
  font-family: var(--font-mincho, serif);
  font-size: clamp(2.2rem, 1.48rem + 1.5vw, 3.2rem);
  margin-bottom: clamp(2.4rem, 4vw, 4rem);
}

/* --- 装飾アイコン（HTMLから分離してCSSで描画） --- */
.m-award-title::before,
.m-award-title::after {
  content: "";
  display: block;
  width: 1.8em;
  height: 2em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 左側のアイコン */
.m-award-title::before {
  background-image: url("/ja-jp/asset/kumihimo-tech-camp/archive/img/icon-award-left.svg");
}

/* 右側のアイコン */
.m-award-title::after {
  background-image: url("/ja-jp/asset/kumihimo-tech-camp/archive/img/icon-award-right.svg");
}

/* =========================================
   Module: KUMIHIMO Local Nav (.m-kumihimo-nav)
   (※固有ブレイクポイント: 900px)
========================================= */

.m-kumihimo-nav {
  background-color: #3d464e;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: top 0.3s ease;
}

.m-kumihimo-nav__inner {
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
}

.m-kumihimo-nav__logo {
  color: #ffffff;
  font-weight: bold;
  font-size: 1.6rem;
  text-decoration: none;
}

.m-kumihimo-nav__logo:hover {
  opacity: 0.8;
}

/* =========================================
   ドロップダウン（過去の取り組み）の矢印【PC・SP共通】
   ※必ず @media の外側に記述してください
========================================= */

/* --- 1. buttonタグのスタイルリセット --- */
/* buttonは文字色がリセットされやすいため、強制的に親要素に合わせる */
.m-kumihimo-nav__link--btn {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

/* --- 2. 矢印の基本設定（下向き） --- */
.m-kumihimo-nav__item--dropdown .m-kumihimo-nav__link::after {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-bottom: 4px;
}

/* --- 3. 開いた状態（上向き矢印） --- */
.m-kumihimo-nav__item--dropdown.is-open .m-kumihimo-nav__link::after {
  transform: rotate(-135deg);
  margin-bottom: -4px;
}

/* =========================================
   PCレイアウト (901px以上)
========================================= */
@media screen and (min-width: 901px) {
  /* ナビインナー：中央配置の基準となるため relative を指定 */
  .m-kumihimo-nav__inner {
    padding: 0 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 1300px以下での左右の安全並び用 */
    position: relative;
    min-height: 60px;
    /* ヘッダーの高さを固定 */
  }

  .m-kumihimo-nav__toggle {
    display: none;
  }

  /* --- 1. メニュー全体の配置（旧版の完全中央配置ロジックを完全再現） --- */
  .m-kumihimo-nav__menu {
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    /* 旧版指定の 800px */
    z-index: 2;
  }

  .m-kumihimo-nav__list {
    display: flex;
    justify-content: space-between;
    /* 800px の中で均等に美しく分配 */
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .m-kumihimo-nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: #ffffff;
    font-size: 1.4rem;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    border-bottom: 2px solid transparent;
  }

  .m-kumihimo-nav__link:hover {
    font-weight: bold;
  }

  /* カレント（アクティブ）時の赤下線 */
  .m-kumihimo-nav__item.is-current > .m-kumihimo-nav__link {
    font-weight: bold;
    border-bottom: 2px solid var(--color-main1, #ea002a);
  }

  /* --- 2. 過去の取り組み：ドロップダウン幅のバグ修正 --- */
  /* 親要素(li)を基準にするために relative を明記 */
  .m-kumihimo-nav__item--dropdown {
    position: relative;
  }

  .m-kumihimo-nav__sub {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 150px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  /* ドロップダウン展開時（フワッと中央に降りてくる綺麗な演出） */
  .m-kumihimo-nav__item--dropdown.is-open .m-kumihimo-nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .m-kumihimo-nav__sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .m-kumihimo-nav__sub-list li:not(:last-child) {
    border-bottom: 1px dotted #d2d2d2;
  }

  .m-kumihimo-nav__sub-link {
    display: block;
    padding: 13px 15px;
    color: var(--color-support1, #525b5c);
    font-size: 1.4rem;
    text-decoration: none;
    text-align: center;
    /* 文字を中央寄せにして見やすく */
  }

  .m-kumihimo-nav__sub-link:hover {
    text-decoration: none;
    font-weight: bold;
    color: var(--color-main1);
  }

  /* =========================================
     PC中間レイアウト（旧版のレスポンシブ考慮の完全移植）
  ========================================= */

  /* --- 画面幅 1700px 以下のとき：メニューの横幅をわずかに縮める --- */
  @media screen and (max-width: 1700px) {
    .m-kumihimo-nav {
      padding: 0 2rem;
      /* パディングを左右一律に調整 */
    }

    .m-kumihimo-nav__menu {
      width: 780px;
    }
  }

  /* --- 画面幅 1400px 以下のとき：ロゴとの衝突を防ぐため、中央浮遊を解除して右寄せにする --- */
  @media screen and (max-width: 1400px) {
    .m-kumihimo-nav__inner {
      padding: 0;
    }

    .m-kumihimo-nav__menu {
      position: static;
      /* 絶対配置を解除 */
      transform: none;
      /* 中央寄せの計算をリセット */
      width: auto;
      /* 固定幅を解除し、なりゆきに */
    }

    .m-kumihimo-nav__list {
      justify-content: flex-end;
      /* 右側に綺麗に並べる */
      gap: 20px;
      /* 項目間に適度な余白を空ける */
    }
  }

  /* --- 画面幅 1050px 以下のとき：文字サイズをわずかに縮めて綺麗に収める --- */
  @media screen and (max-width: 1050px) {
    .m-kumihimo-nav__logo {
      font-size: 1.3rem;
    }

    .m-kumihimo-nav__link {
      font-size: 1.2rem;
    }

    .m-kumihimo-nav__list {
      gap: 12px;
      /* 隙間も少し詰める */
    }
  }
}

/* --- SPレイアウト (900px以下) --- */
@media screen and (max-width: 900px) {
  .m-kumihimo-nav__logo {
    font-size: 1.4rem;
    white-space: nowrap;
  }

  .m-kumihimo-nav__inner {
    flex-direction: column;
    padding: 0;
  }

  .m-kumihimo-nav__brand {
    width: 100%;
    background: #3d464e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 2;
  }

  /* ボタン本体：背景画像を削除し、Flexboxで中身を中央に配置 */
  .m-kumihimo-nav__toggle {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: transform 0.3s ease;
  }

  /* アイコン本体：borderを使って「下向き矢印」を描画 */
  .m-kumihimo-nav__toggle-icon {
    display: block;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    transform: rotate(45deg);
    margin-bottom: 4px;
    /* 視覚的にど真ん中に見えるよう微調整 */
  }

  /* メニューが開いた時：ボタン全体をクルッと180度回転（上向きに） */
  body.is-sp-menu-open .m-kumihimo-nav__toggle {
    transform: rotate(180deg);
  }

  .m-kumihimo-nav__menu {
    display: none;
    width: 100%;
    background: #ffffff;
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .m-kumihimo-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .m-kumihimo-nav__link {
    display: flex;
    align-items: center;
    padding: 15px;
    color: var(--color-support1, #525b5c);
    font-size: 1.4rem;
    border-bottom: 1px solid #d3d3d3;
    text-decoration: none;
  }

  .m-kumihimo-nav__link--btn {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #d3d3d3;
  }

  .m-kumihimo-nav__item.is-current > .m-kumihimo-nav__link {
    font-weight: bold;
    color: var(--color-main1, #ea002a);
  }

  .m-kumihimo-nav__item--dropdown .m-kumihimo-nav__link {
    justify-content: space-between;
  }

  .m-kumihimo-nav__item--dropdown .m-kumihimo-nav__link::after {
    margin-right: 15px;
  }

  /* SPドロップダウン（アコーディオン） */
  .m-kumihimo-nav__sub {
    display: none;
    /* 初期非表示（JSでスライド） */
    background: #f9f9f9;
  }

  .m-kumihimo-nav__sub-link {
    display: block;
    padding: 15px 20px 15px 2em;
    color: var(--color-support1, #525b5c);
    font-size: 1.4rem;
    border-bottom: 1px dotted #d3d3d3;
    text-decoration: none;
  }

  /* 暗幕（オーバーレイ） */
  .m-kumihimo-nav__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
  }

  body.is-sp-menu-open {
    overflow: hidden;
  }

  body.is-sp-menu-open .m-kumihimo-nav__overlay {
    opacity: 1;
    visibility: visible;
  }
}

/* =========================================
   Kumihimo Modal
========================================= */

/* =========================================
   1. トリガーカード（一覧部分）
========================================= */

.m-theme-card {
  background: #ffffff;
  border: 1px solid #e5e2e0; /* 旧版のボーダー色 */
  padding: 30px 25px; /* 旧版の余白 */
  cursor: pointer;
  transition: border 0.5s ease; /* 旧版の0.5秒かけて変化するトランジション */
  display: flex;
  flex-direction: column;
}

/* 旧版のホバー演出：枠線がブランドカラー（赤）に変わる */
.m-theme-card:hover {
  border: 1px solid var(--color-main1, #ea002a); 
}

/* ヘッダーの背景色などを消し、旧版と同じシンプルな枠に */
.m-theme-card__header {
  width: 100%;
  margin-bottom: 10px;
}

.m-theme-card__title {
  font-size: 2.2rem; /* 旧版のPCサイズ */
  font-weight: bold;
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.m-theme-card__figure {
  margin: 0;
  text-align: center;
}

.m-theme-card__img {
  display: block;
  width: 100%;
  max-width: 230px; /* 旧版の画像最大幅 */
  height: auto;
  margin: 10px auto 20px; /* 旧版の画像上下マージン */
}

.m-theme-card__body {
  flex-grow: 1;
  margin-bottom: 20px;
}

.m-theme-card__text {
  font-size: 1.4rem;
  line-height: 1.8;
  margin: 0;
}

.m-theme-card__action {
  display: block;
  margin-top: auto;
  margin-left: auto;
  font-size: 1.5rem; /* 旧版の矢印ボタンのフォントサイズ */
  font-weight: bold;
  color: var(--color-main1, #ea002a);
}

.m-theme-card__action::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 10px;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
  .m-theme-card {
    padding: 20px;
  }
  
  .m-theme-card__title {
    font-size: 2.0rem; /* 旧版のSPサイズ */
  }
}

/* =========================================
   2. モーダル本体（BEM仕様）
========================================= */

.m-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* 背景の暗幕 */
.m-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

/* スライドエリア（画面中央配置） */
.m-modal__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* モーダルの白い箱 */
.m-modal__dialog {
  position: relative;
  background: #ffffff;
  width: 100%;
  max-width: 900px;
  max-height: 90vh; /* 画面高さの90%を上限に */
  overflow-y: auto; /* はみ出たらスクロール */
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 閉じるボタン（右上の×印） */
.m-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.m-modal__close::before,
.m-modal__close::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 5px;
  width: 30px;
  height: 2px;
  background-color: #333;
  transition: background-color 0.3s;
}

.m-modal__close:hover::before,
.m-modal__close:hover::after {
  background-color: var(--color-main1, #ea002a);
}

.m-modal__close::before { transform: rotate(45deg); }
.m-modal__close::after { transform: rotate(-45deg); }

/* --- モーダル内のコンテンツ装飾 --- */

/* 1. ヘッダー領域（画像左・テキスト右のレイアウト） */
.m-modal__header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 30px;
}

.m-modal__header-img {
  flex-shrink: 0;
  width: 160px; /* 旧版の固定幅 */
  max-width: 160px;
  height: auto;
  margin-right: 20px;
  object-fit: contain;
}

.m-modal__header-titles {
  margin-bottom: 10px;
}

.m-modal__header-sub {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color-main1, #ea002a); /* 旧版の赤文字 */
  margin: 0;
}

.m-modal__header-main {
  font-size: 2.4rem;
  font-weight: bold;
  line-height: 1.6;
  margin: 0;
}

/* 2. セクション領域 */
.m-modal__section {
  margin-top: 30px;
}

/* 薄いピンク背景のタグ装飾 */
.m-modal__label {
  display: inline-block;
  color: var(--color-support1, #525B5C); /* 旧版のダークグレー */
  background: var(--color-support5, #feeeed); /* 旧版のピンク背景 */
  margin-bottom: 5px;
  padding: 0 10px;
  font-size: 1.4rem;
  font-weight: normal;
}

.m-modal__text {
  font-size: 1.4rem;
  line-height: 1.8;
  margin: 0;
}

/* リスト装飾（黒丸） */
.m-modal__list {
  margin: 0.5em 0 0 0;
  padding-left: 0;
}

.m-modal__list li {
  list-style-type: disc;
  margin-left: 2em;
  line-height: 1.8;
  font-size: 1.4rem;
}

/* 動画エリア（サムネイルとタイトルの比率を再現） */
.m-modal__movie {
  display: flex;
  align-items: center;
}

.m-modal__movie-thumbnail {
  width: calc(42% + 1em);
  margin-left: -1em;
}

.m-modal__movie-title {
  width: 58%;
  box-sizing: border-box;
  font-size: 1.4rem;
  font-weight: bold;
}

.m-modal__movie-time {
  font-weight: normal;
  margin-left: 1em;
}

/* リンクとボタンのラッパー余白調整 */
.m-modal__link-wrapper {
  margin-top: 10px;
}


/* =========================================
   3. スマホ(SP)用レスポンシブ
========================================= */

@media screen and (max-width: 768px) {
  
  .m-modal__dialog {
    padding: 45px 25px 25px; /* 旧版のモーダル内パディング */
  }
  
  .m-modal__header {
    display: block; /* 縦積みに変更 */
    margin-bottom: 20px;
  }

  .m-modal__header-img {
    width: 60%;
    max-width: 100%;
    margin: 0 auto 20px;
    display: block;
  }

  .m-modal__header-main {
    font-size: 2.2rem; /* SP用の見出しサイズ */
  }
  
  .m-modal__movie {
    display: block; /* 縦積みに変更 */
  }

  .m-modal__movie-thumbnail {
    width: 100%;
    margin-left: 0;
  }

  .m-modal__movie-title {
    width: 100%;
    margin-top: 10px;
  }
  
  /* スマホ時はスライド矢印を小さくして画面端に配置 */
  .m-modal__nav {
    width: 35px;
    height: 40px;
  }
  
  .m-modal__nav::after {
    width: 10px;
    height: 10px;
  }
}

/* --- 2. PDFアイコンのサイズ指定（★追記） --- */
.m-icon-pdf {
  /* テキストのサイズ（1文字分）に自動でピタッと合わせる旧版の魔法です */
  width: 1em;
  height: 1em;
  vertical-align: middle;
  margin-left: 0.5em;
}


/* -- news --*/

/* =========================================
   新着情報エリア（News）
========================================= */

.m-news {
  display: flex;
  max-width: 1200px;
  margin: 100px auto 50px;
  background: #ffffff;
  border: 1px solid #e5e2e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* モダンなわずかな浮遊感 */
  border-radius: 4px; /* 極めてシャープな角丸で堅牢さとモダンさを両立 */
  overflow: hidden;
}

/* タイトルエリア（左カラム） */
.m-news__header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 220px; /* 余白依存から固定幅に変更し安定させる */
  background: #3D464E;
  color: #ffffff;
  padding: 30px 20px;
}

.m-news__title {
  font-size: 2.0rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  margin: 0;
}

/* コンテンツエリア（右カラム） */
.m-news__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  padding: 35px 50px;
  gap: 25px;
}

/* リスト部分 */
.m-news__list {
  width: 100%;
  margin: 0;
  padding: 0;
}

.m-news__item {
  display: flex;
  align-items: flex-start; /* 複数行になった際に上揃えにする */
  font-size: 1.5rem;
  line-height: 1.8;
  border-bottom: 1px dashed #efefef; /* 記事間の区切り線をさりげなく追加 */
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.m-news__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 日付 */
.m-news__date {
  font-weight: bold;
  font-family: 'Arial', sans-serif; /* 日付をスッキリ見せる */
  color: var(--color-support1, #525B5C);
  flex-shrink: 0;
  width: 110px; /* 日付の幅を固定し、右側のテキストを綺麗に揃える */
}

/* テキスト・リンク部分 */
.m-news__text {
  flex-grow: 1;
}

.m-news__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #dcdcdc; /* ニュースの邪魔をしない控えめなグレーの下線 */
  text-underline-offset: 4px;     /* 下線を少し離して可読性をアップ */
  display: inline-block;
  position: relative;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.m-news__link:not(.m-link--external) {
  padding-right: 1.5em; /* 矢印を置くための余白を右に確保 */
}

/* CSSで右アロー（＞）を描画する */
.m-news__link:not(.m-link--external)::after {
  content: "";
  position: absolute;
  right: 0.3em;
  top: 57.5%;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg); /* ひし形を回転させて「＞」を作る魔法 */
  margin-top: -1px; /* 視覚的な中央調整 */
}

/* ホバー時の挙動 */
.m-news__link:hover {
  color: var(--color-main1, #ea002a);
  text-decoration-color: var(--color-main1, #ea002a); /* ホバー時は下線も赤く光らせる */
}

.m-news__icon-ext {
  width: 1em;
  height: 1em;
  vertical-align: baseline;
  margin-left: 0.3em;
}

/* ボタンエリア */
.m-news__action {
  width: 100%;
  text-align: right;
}

.m-news__action .m-btn {
  min-width: 200px;
}

/* =========================================
   スマホ(SP)用レスポンシブ
========================================= */
@media screen and (max-width: 768px) {
  
  .m-news {
    flex-direction: column;
    margin: 60px auto 40px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .m-news__header {
    width: 100%;
    padding: 15px 20px;
  }

  .m-news__title {
    font-size: 1.6rem;
  }

  .m-news__body {
    padding: 30px 20px;
    gap: 25px;
  }

  .m-news__item {
    flex-direction: column; /* SP時は日付とテキストを縦並びに */
    gap: 5px;
  }

  .m-news__date {
    width: auto;
    font-size: 1.4rem;
  }

  .m-news__text {
    font-size: 1.4rem;
  }

  .m-news__action {
    text-align: center; /* SP時は真ん中配置にする */
    margin-top: 10px;
  }
  
  /* スマホのボタンを幅広にする場合（汎用クラス側で設定されていれば不要です） */
  .m-news__action .m-btn {
    width: 100%;
    max-width: 320px;
  }
}


/* =========================================
   イベント情報コンポーネント（Event Info）
========================================= */

/* 全体を囲むコンテナ：ニュースモジュールとトーンを合わせ、薄い影と枠線で構築 */
.m-event-info {
  background: #ffffff;
  border: 1px solid #e5e2e0;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  margin-top: 40px;
  margin-bottom: 60px;
}

/* 各セクション（行）の定義 */
.m-event-info__section {
  display: flex; /* PC時はFlexboxで綺麗な2カラム（テーブル状）にする */
  align-items: stretch; /* 左右の要素の高さを揃え、タイトルの背景色を下に充填させる */
  border-bottom: 1px solid #e5e2e0;
}

.m-event-info__section:last-child {
  border-bottom: none; /* 最後の行の線は消す */
}

/* 左カラム：見出しタイトル */
.m-event-info__title {
  display: flex;
  align-items: center; /* タイトルテキストを上下中央に配置 */
  flex-shrink: 0;
  width: 240px; /* 見出しの横幅を固定して縦のラインを美しく揃える */
  background: #f9f9f9; /* ほんのりグレーを敷いて solidity（堅牢感）を演出 */
  border-right: 1px solid #e5e2e0;
  padding: 30px;
  margin: 0;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-support1, #3D464E);
  letter-spacing: 0.05em;
}

/* 右カラム：コンテンツ本文エリア */
.m-event-info__body {
  flex-grow: 1;
  padding: 30px 40px;
}

/* 基本テキスト */
.m-event-info__text {
  font-size: 1.5rem;
  line-height: 1.8;
  margin: 0;
  color: var(--color-support1, #525B5C);
}

/* 重要・強調テキスト（募集締め切り等のメッセージを劇的にモダン化） */
.m-event-info__text--emphasis {
  color: var(--color-main1, #ea002a) !important;
  font-weight: bold;
  background: var(--color-support5, #feeeed); /* 優しいピンク背景 */
  border: 1px solid #fcd3d1; /* 馴染みの良い薄い赤の枠線 */
  padding: 20px;
  border-radius: 4px;
  line-height: 1.6;
}

/* 注記・注意書き（※印などのスモールテキスト） */
.m-event-info__note {
  font-size: 1.3rem;
  color: #757c7d;
  line-height: 1.6;
  margin: 0;
}


/* =========================================
   汎用リストコンポーネント（List）
========================================= */

/* リストの土台リセット */
.m-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ① Bullet（黒丸・赤丸）スタイルのリスト */
.m-list--bullet > li {
  position: relative;
  padding-left: 1.5em; /* 記号の分、左に余白を空ける */
  font-size: 1.5rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

.m-list--bullet > li:last-child {
  margin-bottom: 0;
}

/* 手打ちの「・」を廃止し、CSSの擬似要素で美しいドットを描画 */
.m-list--bullet > li::before {
  content: "";
  position: absolute;
  left: 0.3em;
  top: 0.65em; /* テキストの1行目の中央に配置 */
  width: 6px;
  height: 6px;
  background-color: var(--color-main1, #ea002a); /* KUMIHIMOトーンに合わせた赤丸（お好みで#333等に変更可） */
  border-radius: 50%;
}

/* ② Dash（ダッシュ — ）スタイルのリスト（入れ子構造用） */
.m-list--dash {
  margin-top: 8px;
  margin-bottom: 8px;
}

.m-list--dash > li {
  position: relative;
  padding-left: 1.2em;
  font-size: 1.4rem; /* 親の文字より一回り小さくして主従関係を明確に */
  line-height: 1.7;
  margin-bottom: 6px;
  color: #666666;
}

.m-list--dash > li:last-child {
  margin-bottom: 0;
}

/* 手打ちの「-」を廃止し、綺麗なダッシュ記号を挿入 */
.m-list--dash > li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #999999;
}


/* =========================================
   スマホ(SP)用レスポンシブ
========================================= */
@media screen and (max-width: 768px) {
  
  /* スマホ時は外枠の左右線をなくし、画面を広く使う */
  .m-event-info {
    margin-top: 30px;
    margin-bottom: 40px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none; /* スマホではフラットにしてスッキリさせる */
  }

  /* テーブル型から、縦積みのレイアウトへ変換 */
  .m-event-info__section {
    display: block;
    padding: 25px 20px; /* 行ごとにパディングを設定 */
  }

  /* 見出しタイトルを上部に配置 */
  .m-event-info__title {
    width: 100%;
    background: transparent; /* スマホ時は背景のグレーを消して軽やかに */
    border-right: none;
    padding: 0;
    margin-bottom: 12px; /* 下のコンテンツとの余白 */
    font-size: 1.6rem;
    
    /* スマホ限定のアクセント：タイトルの左側にブランドカラーの縦線を引く */
    border-left: 4px solid var(--color-main1, #ea002a);
    padding-left: 10px;
  }

  /* コンテンツ本文エリア */
  .m-event-info__body {
    width: 100%;
    padding: 0; /* 親のsectionに余白を任せてリセット */
  }

  .m-event-info__text {
    font-size: 1.4rem;
  }

  .m-event-info__text--emphasis {
    padding: 15px;
    font-size: 1.4rem;
  }

  .m-list--bullet > li {
    font-size: 1.4rem;
  }
}

/* =========================================
   Slick.js 初期化前の横スクロール（チラつき）防止
========================================= */

/* ① スライダーの親枠（ulやdiv）に対するアプローチ */
/* 準備が完了していないスライダーは、強制的にはみ出しをカットする */
.post-list-slider:not(.slick-initialized) {
  overflow: hidden;
}

/* ② 中のスライド要素（liやdiv）に対するアプローチ（より完璧に防ぐ場合） */
/* 準備が完了するまでは、1枚目のスライド以外を非表示にしておく */
.post-list-slider:not(.slick-initialized)>.slide-item {
  display: none;
}

.post-list-slider:not(.slick-initialized)>.slide-item:first-child {
  display: block;
  /* 1枚目だけは見せておくことで、カクつきを最小限にする */
}

/* =========================================
   Utility: Display (表示・非表示の切り替え)
========================================= */

/* --- スマホ(768px以下)の時だけ消す（旧: .pc_only） --- */
@media (max-width: 768px) {
  .u-hidden-sp {
    display: none !important;
  }
}

/* --- PC(769px以上)の時だけ消す（旧: .view-sp） --- */
@media (min-width: 769px) {
  .u-hidden-pc {
    display: none !important;
  }
}
