/* ==========================================================================
   高校留学ガイドページ（page-high-school-guide.php）専用スタイル
   既存コンポーネント（c-title / c-content-block / c-units-table / c-button /
   c-accordion / c-flow-step / p-high-school-*）に加えて使う追加スタイル。
   接頭辞: .p-hsg-
   ========================================================================== */

.p-hsg {
  --hsg-red: #c53f36;
  --hsg-navy: var(--main-color, #2d3b81);
  --hsg-green: #2e9e5b;
  --hsg-gray: #6b7280;
  --hsg-beige: #ede8d8;
  --hsg-bg: var(--bg-color, #f5f3ed);
  --hsg-line: #d9d4c7;
}

/* ---------- 共通 ---------- */
.p-hsg-section { margin-top: 5.5rem; }
.p-hsg-section:first-child { margin-top: 0; }
.p-hsg-lead { font-size: max(10px, .9375rem); line-height: 2; margin-top: 1.5rem; }
.p-hsg-note { font-size: max(10px, .75rem); color: #777; line-height: 1.6; margin-top: .75rem; }
.p-hsg-more { margin-top: 1.5rem; }
.p-hsg-more a { font-size: max(10px, .875rem); font-weight: 700; color: var(--hsg-navy); text-decoration: none; display: inline-flex; align-items: center; gap: .375rem; }
.p-hsg-more a::after { content: "→"; }
.p-hsg-more a:hover { text-decoration: underline; }
.p-hsg-h3 { font-size: max(10px, 1.125rem); font-weight: 700; line-height: 1.5; margin: 2.5rem 0 1rem; }
.p-hsg-h3--navy { color: var(--hsg-navy); }
.p-hsg-updated { font-size: max(10px, .75rem); color: #777; margin-top: .75rem; }

/* 見出しの英語サブタイトル（Montserrat）サイズ調整 */
.p-hsg .c-title__sub,
.p-hsg .p-hsg-en { font-family: var(--en-font); font-size: max(10px, 2.5rem) !important; font-weight: 300 !important; letter-spacing: -.0625rem; line-height: 1.1; text-transform: uppercase; margin-top: 0; }

/* ---------- グループ見出し（① 基本情報 / ② 高校準備コース） ---------- */
.p-hsg-group { margin-top: 5.5rem; padding: 2.25rem 2rem; border-radius: .5rem; background: var(--hsg-bg); text-align: center; }
.p-hsg-group:first-child { margin-top: 0; }
.p-hsg-group__title { font-size: max(10px, 2rem); font-weight: 700; line-height: 1.4; margin: 0; color: var(--hsg-navy); }
.p-hsg-group__text { font-size: max(10px, .9375rem); line-height: 1.7; color: #444; margin: .5rem 0 0; }
.p-hsg-group--navy { background: var(--hsg-navy); }
.p-hsg-group--navy .p-hsg-group__title { color: #fff; }
.p-hsg-group--navy .p-hsg-group__text { color: #dfe3f3; }
.p-hsg-group + .p-hsg-section { margin-top: 3.5rem; }
.p-hsg-toc-group { grid-column: 1 / -1; margin-top: .5rem; }
.p-hsg-toc-group:first-child { margin-top: 0; }
.p-hsg-toc-group__link.c-toc-nav__link { background: var(--hsg-navy); color: #fff; font-weight: 700; }

/* ---------- ボタン ---------- */
.p-hsg-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.p-hsg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.125rem; padding: 0 1.75rem; border-radius: .3125rem; font-size: max(10px, .875rem); font-weight: 700; text-decoration: none; transition: opacity .2s; }
.p-hsg-btn:hover { opacity: .85; }
.p-hsg-btn--red { background: var(--hsg-red); color: #fff; }
.p-hsg-btn--navy { background: var(--hsg-navy); color: #fff; }
.p-hsg-btn--beige { background: var(--hsg-beige); color: var(--font-color); }

/* ---------- カード ---------- */
.p-hsg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.75rem; }
.p-hsg-cards--2 { grid-template-columns: repeat(2, 1fr); }
.p-hsg-card { background: #fff; border-radius: .375rem; padding: 1.5rem; box-shadow: 0 1px 0 #e8e3d8; display: flex; flex-direction: column; gap: .625rem; }
.p-hsg-card__head { display: flex; align-items: center; gap: .75rem; }
.p-hsg-card__title { font-size: max(10px, 1rem); font-weight: 700; line-height: 1.5; margin: 0; }
.p-hsg-card__text { font-size: max(10px, .875rem); line-height: 1.8; color: #444; margin: 0; }
.p-hsg-card--accent { border: 2px solid var(--hsg-red); }
.p-hsg-card--accent .p-hsg-card__title { color: var(--hsg-red); }
.p-hsg-card--alert { border-left: 4px solid var(--hsg-red); }
.p-hsg-num { width: 2rem; height: 2rem; border-radius: 50%; background: var(--hsg-navy); color: #fff; font-family: var(--en-font); font-weight: 500; font-size: max(10px, .875rem); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- 表（グリッド型） ---------- */
.p-hsg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 1rem; }
.p-hsg-table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: #fff; }
.p-hsg-table th, .p-hsg-table td { padding: .75rem .875rem; border: 1px solid var(--hsg-line); font-size: max(10px, .8125rem); line-height: 1.6; text-align: left; vertical-align: top; }
.p-hsg-table thead th { background: var(--hsg-navy); color: #fff; font-weight: 700; white-space: nowrap; }
.p-hsg-table tbody th { background: var(--hsg-bg); font-weight: 700; white-space: nowrap; }
.p-hsg-table--compare td { min-width: 7.5rem; }
.p-hsg-table .is-nz { background: #fff6f5; font-weight: 700; }
.p-hsg-table .u-right { text-align: right; white-space: nowrap; }
.p-hsg-table--schools th:nth-child(1) { min-width: 13rem; }

/* ---------- 目次ボックス（ページ上部） ---------- */
.p-hsg-index { background: #fff; border-radius: .375rem; padding: 1.25rem 1.5rem; margin-top: 1.75rem; }
.p-hsg-index__title { font-family: var(--en-font); font-size: max(10px, 1rem); font-weight: 500; margin: 0 0 .75rem; }
.p-hsg-index__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .375rem 1.25rem; font-size: max(10px, .8125rem); line-height: 1.6; list-style: none; padding: 0; margin: 0; }
.p-hsg-index__list a { color: var(--font-color); text-decoration: none; }
.p-hsg-index__list a:hover { color: var(--hsg-navy); text-decoration: underline; }
.p-hsg-index__list a::before { content: attr(data-no) " "; font-family: var(--en-font); color: var(--hsg-navy); }

/* ---------- 進路ルート比較 ---------- */
.p-hsg-routes { display: grid; gap: .875rem; margin-top: 1.5rem; }
.p-hsg-route { background: #fff; border-radius: .375rem; padding: 1rem 1.25rem; display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; align-items: center; }
.p-hsg-route--best { border: 2px solid var(--hsg-navy); }
.p-hsg-route__name { font-size: max(10px, .9375rem); font-weight: 700; line-height: 1.5; }
.p-hsg-route__badge { display: inline-block; background: var(--hsg-navy); color: #fff; font-size: max(10px, .6875rem); padding: .125rem .5rem; border-radius: .1875rem; margin-bottom: .375rem; }
.p-hsg-route__bar { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: .25rem; }
.p-hsg-route__bar--3 { grid-template-columns: 1fr 2fr 1fr; }
.p-hsg-route__seg { padding: .625rem .75rem; border-radius: .25rem; color: #fff; font-size: max(10px, .75rem); line-height: 1.5; }
.p-hsg-route__seg b { display: block; font-size: max(10px, .8125rem); }
.p-hsg-route__seg--red { background: var(--hsg-red); }
.p-hsg-route__seg--navy { background: var(--hsg-navy); }
.p-hsg-route__seg--green { background: var(--hsg-green); }
.p-hsg-route__seg--gray { background: var(--hsg-gray); }
.p-hsg-route__seg--light { background: #9aa3b2; }
.p-hsg-route__seg--warn { background: #e8a33d; }
.p-hsg-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1rem; }
.p-hsg-benefit { background: var(--hsg-bg); border-radius: .375rem; padding: 1rem 1.125rem; }
.p-hsg-benefit b { display: block; font-size: max(10px, .9375rem); margin-bottom: .25rem; }
.p-hsg-benefit p { font-size: max(10px, .8125rem); line-height: 1.7; margin: 0; color: #444; }

/* ---------- 費用 ---------- */
.p-hsg-fees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.75rem; align-items: start; }
.p-hsg-fee { background: #fff; border-radius: .375rem; overflow: hidden; border-top: 4px solid var(--hsg-navy); box-shadow: 0 1px 0 #e8e3d8; }
.p-hsg-fee--first { border-top-color: var(--hsg-red); }
.p-hsg-fee__head { padding: 1rem 1.125rem .5rem; }
.p-hsg-fee__title { font-size: max(10px, 1rem); font-weight: 700; margin: 0; }
.p-hsg-fee__period { font-size: max(10px, .75rem); color: #777; margin: .25rem 0 0; line-height: 1.6; }
.p-hsg-fee__table { width: 100%; border-collapse: collapse; }
.p-hsg-fee__table td { padding: .5rem 1.125rem; font-size: max(10px, .8125rem); border-top: 1px solid var(--hsg-line); line-height: 1.5; }
.p-hsg-fee__table td:last-child { text-align: right; white-space: nowrap; }
.p-hsg-fee__table tr.is-total td { background: var(--hsg-navy); color: #fff; font-weight: 700; }
.p-hsg-total { background: #1a224a; color: #fff; border-radius: .375rem; padding: 1.5rem 2rem; margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; }
.p-hsg-total__label { font-size: max(10px, .9375rem); }
.p-hsg-total__num { font-family: var(--en-font); font-size: max(10px, 2.25rem); font-weight: 500; }
.p-hsg-total__jpy { font-size: max(10px, .8125rem); color: #c9cde0; }

/* ---------- チップ ---------- */
.p-hsg-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.p-hsg-chip { background: #fff; border: 1px solid var(--hsg-line); border-radius: 1.25rem; padding: .25rem .75rem; font-size: max(10px, .75rem); }

/* ---------- KPI ---------- */
.p-hsg-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.5rem; }
.p-hsg-kpi { background: #fff; border-radius: .375rem; padding: 1.25rem .75rem; text-align: center; }
.p-hsg-kpi b { display: block; font-family: var(--en-font); font-size: max(10px, 2.5rem); font-weight: 400; color: var(--hsg-navy); line-height: 1; }
.p-hsg-kpi b small { font-size: max(10px, 1rem); margin-left: .125rem; }
.p-hsg-kpi span { display: block; font-size: max(10px, .75rem); color: #555; margin-top: .5rem; }

/* ---------- 学校一覧 ---------- */
.p-hsg-school-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.p-hsg-area { margin-top: 2.5rem; }
.p-hsg-area__title { font-size: max(10px, 1.125rem); font-weight: 700; color: var(--hsg-navy); margin: 0; }
.p-hsg-area__note { font-size: max(10px, .75rem); color: #777; margin: .25rem 0 0; }
.p-hsg-schoolgrid { display: grid; grid-template-columns: 1fr 19rem; gap: 1.5rem; margin-top: 1.75rem; align-items: start; }
.p-hsg-schoolgrid__table { min-width: 0; }
.p-hsg-schoolgrid__table .p-hsg-table { margin-top: 0; }
.p-hsg-table--schools th, .p-hsg-table--schools td { padding: .625rem .625rem; font-size: max(10px, .75rem); line-height: 1.5; }
.p-hsg-table--schools thead th { font-size: max(10px, .6875rem); }
.p-hsg-table--schools tbody th { white-space: normal; min-width: 9rem; }
.p-hsg-table--schools .u-center { text-align: center; }
.p-hsg-table--schools .u-nowrap { white-space: nowrap; }
.p-hsg-table--schools td:nth-child(5) { color: var(--hsg-navy); font-weight: 700; }
.p-hsg-schoolrow.is-hidden { display: none; }
.p-hsg-schoolgrid__more { display: block; width: 100%; margin-top: .5rem; padding: .875rem; border: 1px solid var(--hsg-line); border-radius: .3125rem; background: #fff; font: inherit; font-size: max(10px, .8125rem); font-weight: 700; color: var(--hsg-navy); cursor: pointer; transition: background .2s; }
.p-hsg-schoolgrid__more:hover { background: var(--hsg-bg); }
.p-hsg-schoolgrid__map { position: sticky; top: calc(var(--header-height, 5rem) + 1rem); display: grid; gap: .75rem; }
.p-hsg-map { background: #fff; border-radius: .375rem; padding: .75rem; }
.p-hsg-map img { width: 100%; height: auto; display: block; }
.p-hsg-card--small { padding: 1rem 1.125rem; }
.p-hsg-card--small .p-hsg-card__title { font-size: max(10px, .875rem); }
.p-hsg-card--small .p-hsg-card__text { font-size: max(10px, .75rem); line-height: 1.7; }
.p-hsg-school-types { margin-top: 1.25rem; }

/* ---------- 強調（学校一覧「エバコナ校に隣接」） ---------- */
.p-hsg-em { color: var(--hsg-red); font-weight: 700; background: #fff1ef; padding: 0 .25em; border-radius: .125rem; }

/* ---------- 図版（CEFRグラフなど） ---------- */
.p-hsg-figure { margin: 1.5rem auto 0; background: #fff; border-radius: .375rem; padding: 1rem; text-align: center; }
.p-hsg-figure img { width: 50%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.p-hsg-figure figcaption { margin-top: .5rem; }

/* ---------- 09 留学生サポート（資料準拠） ---------- */
.p-hsg-support-intro { text-align: center; margin-top: 1.5rem; }
.p-hsg-support-intro__title { font-size: max(10px, 1.5rem); font-weight: 700; margin: .5rem 0 0; }
.p-hsg-support-intro .p-hsg-lead { margin-top: .5rem; }
.p-hsg-tag--red { color: #fff; background: var(--hsg-red); border-color: var(--hsg-red); }
.p-hsg-predep { background: #fff; border-radius: .375rem; padding: 1.25rem 1.5rem; margin-top: 1rem; }
.p-hsg-predep__list { list-style: disc; margin: 0; padding-left: 1.25rem; font-size: max(10px, .875rem); line-height: 1.9; columns: 2; column-gap: 2.5rem; }
.p-hsg-support { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.p-hsg-support__block { background: #fff; border-radius: .375rem; overflow: hidden; box-shadow: 0 1px 0 #e8e3d8; display: grid; grid-template-columns: 7.5rem 1fr; }
.p-hsg-support__block--wide { grid-column: 1 / -1; grid-template-columns: 7.5rem 1fr; }
.p-hsg-support__photo { position: relative; margin: 0; }
.p-hsg-support__photo img { width: 100%; height: 100%; min-height: 12rem; object-fit: cover; display: block; }
.p-hsg-support__no { position: absolute; left: 0; top: 0; background: var(--hsg-navy); color: #fff; font-family: var(--en-font); font-size: max(10px, 1.25rem); font-weight: 500; line-height: 1; padding: .5rem .75rem; border-radius: 0 0 .375rem 0; }
.p-hsg-support__block--wide .p-hsg-support__photo img { min-height: 8rem; }
.p-hsg-support__body { min-width: 0; }
.p-hsg-support__ttl { background: var(--hsg-navy); color: #fff; padding: .75rem 1.125rem; }
.p-hsg-support__ttl b { display: block; font-size: max(10px, 1rem); line-height: 1.4; }
.p-hsg-support__ttl span { display: block; font-size: max(10px, .75rem); opacity: .85; margin-top: .125rem; }
.p-hsg-support__list { list-style: disc; margin: 0; padding: .875rem 1.125rem 1rem 2.25rem; font-size: max(10px, .8125rem); line-height: 1.85; }
.p-hsg-support__text { margin: 0; padding: .875rem 1.125rem 1rem; font-size: max(10px, .875rem); line-height: 1.9; }

/* ---------- タイムライン（8ステップ） ---------- */
.p-hsg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: 1.5rem; }
.p-hsg-step { background: #fff; border-radius: .375rem; padding: .875rem .75rem; display: flex; align-items: center; gap: .625rem; text-align: left; }
.p-hsg-step--navy { background: var(--hsg-navy); color: #fff; }
.p-hsg-step--navy .p-hsg-num { background: #fff; color: var(--hsg-navy); }
.p-hsg-step b { font-size: max(10px, .8125rem); line-height: 1.4; }
.p-hsg-step span { font-size: max(10px, .6875rem); opacity: .8; }

/* ---------- 中間CTA ---------- */
.p-hsg-midcta { background: #fff; border: 1px solid #e3ded2; border-radius: .5rem; padding: 1.75rem 2rem; margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.p-hsg-midcta__text { font-size: max(10px, 1rem); font-weight: 700; margin: 0; line-height: 1.6; }
.p-hsg-midcta .p-hsg-btns { margin-top: 0; }

/* ---------- 不登校 / 保護者の声 ---------- */
.p-hsg-tag { display: inline-block; font-size: max(10px, .6875rem); font-weight: 700; color: var(--hsg-navy); border: 1px solid var(--hsg-navy); border-radius: .1875rem; padding: .125rem .5rem; }
.p-hsg-quote { background: #fff; border-radius: .375rem; padding: 1.5rem; margin-top: 1.5rem; }
.p-hsg-quote p { font-size: max(10px, .875rem); line-height: 1.9; margin: .75rem 0 0; }

/* ---------- 参加資格・向いている人（アイコン付き） ---------- */
.p-hsg-elig { display: grid; grid-template-columns: repeat(2, 1fr); gap: .625rem; margin-top: 1rem; list-style: none; padding: 0; }
.p-hsg-elig li { background: #fff; border-radius: .375rem; padding: .875rem 1rem; display: flex; align-items: center; gap: .75rem; font-size: max(10px, .8125rem); line-height: 1.6; }
.p-hsg-elig img { width: 2.5rem; height: 2.5rem; flex: none; }

/* ---------- FAQ（c-accordion を流用） ---------- */
.p-hsg .p-faq__list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-color); }
.p-hsg .c-accordion--faq .c-accordion__head { padding: 1.75rem 1rem; }

/* ---------- 導入文（見出し下・写真の上） ---------- */
.p-hsg-intro { padding: 3rem 0 1.75rem; } /* 上余白＝見出し帯の点線（.c-page-header + * の -2.5rem）を避ける */
.p-hsg-intro__text { font-size: max(10px, .9375rem); line-height: 2; margin: 0 0 .75rem; }
.p-hsg-intro__text:last-child { margin-bottom: 0; }

/* ---------- 〇付きリスト（必要な英語力） ---------- */
.p-hsg-checklist { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: .5rem; }
.p-hsg-checklist li { position: relative; padding-left: 1.5rem; font-size: max(10px, .9375rem); line-height: 1.8; }
.p-hsg-checklist li::before { content: "○"; position: absolute; left: 0; color: var(--hsg-navy); font-weight: 700; }

/* ---------- 保護者の声 ---------- */
.p-hsg-parents { margin-top: 2.5rem; }
.p-hsg-parents__title { font-family: var(--en-font); font-size: max(10px, 2rem); font-weight: 300; margin: .5rem 0 1rem; line-height: 1.1; }
.p-hsg-parents__item { background: #fff; border-radius: .5rem; padding: 1.25rem 1.5rem; margin-top: .75rem; box-shadow: 0 1px 0 #e8e3d8; }
.p-hsg-parents__head { font-size: max(10px, 1rem); font-weight: 700; margin: 0 0 .5rem; padding-left: .875rem; border-left: 4px solid var(--hsg-navy); line-height: 1.5; }
.p-hsg-parents__text { font-size: max(10px, .875rem); line-height: 1.9; margin: 0; color: #444; }

/* ---------- 単位表：上の「目標単位」表と同じスタイルに統一 ---------- */
.p-hsg-table--units tbody th { width: 30%; font-weight: 500; white-space: normal; }

/* ---------- ABOUT：Feature 01〜03 の見出しを小さく ---------- */
.p-hsg .p-high-school-top__item-title { font-size: max(10px, 1.5rem); line-height: 1.5; }
.p-hsg .p-high-school-top__item-title .p-high-school-top__title-line { font-size: inherit; }

/* ---------- SP ---------- */
@media (max-width: 767px) {
  .p-hsg-section { margin-top: 3.5rem; }
  .p-hsg-intro { padding: 3rem var(--container-padding-x) 1.25rem; }
  .p-hsg .p-high-school-top__item-title { font-size: max(10px, 1.25rem); }
  .p-hsg-parents__item { padding: 1rem 1.125rem; }
  .p-hsg-group { margin-top: 3.5rem; padding: 1.5rem 1.25rem; }
  .p-hsg-group__title { font-size: max(10px, 1.375rem); }
  .p-hsg .c-title__sub, .p-hsg .p-hsg-en { font-size: max(10px, 1.875rem) !important; }
  .p-hsg-cards, .p-hsg-cards--2, .p-hsg-fees, .p-hsg-benefits, .p-hsg-school-types { grid-template-columns: 1fr; }
  .p-hsg-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-hsg-kpi b { font-size: max(10px, 1.75rem); }
  .p-hsg-index__list { font-size: max(10px, .75rem); }
  .p-hsg-route { grid-template-columns: 1fr; }
  .p-hsg-route__bar, .p-hsg-route__bar--3 { grid-template-columns: 1fr; }
  .p-hsg-steps { grid-template-columns: repeat(2, 1fr); }
  .p-hsg-step b { display: block; }
  .p-hsg-midcta { flex-direction: column; align-items: stretch; padding: 1.25rem; }
  .p-hsg-midcta .p-hsg-btn { width: 100%; }
  .p-hsg-btn { width: 100%; }
  .p-hsg-elig { grid-template-columns: 1fr; }
  .p-hsg-total { padding: 1.25rem; }
  .p-hsg-total__num { font-size: max(10px, 1.875rem); }
  .p-hsg-figure img { width: 100%; }
  .p-hsg-predep__list { columns: 1; }
  .p-hsg-support { grid-template-columns: 1fr; }
  .p-hsg-support__block, .p-hsg-support__block--wide { grid-template-columns: 1fr; }
  .p-hsg-support__photo img { height: 10rem; min-height: 0; }
  .p-hsg-schoolgrid { grid-template-columns: 1fr; }
  .p-hsg-schoolgrid__map { position: static; }
  .p-hsg-schoolgrid__table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .p-hsg-table--schools { min-width: 44rem; }
  .p-hsg-table--compare { min-width: 40rem; }
}
