/*
 * YGH 下層ページ共通テンプレート CSS
 * 想定配置: /assets/css/page-subpage-template.css
 */
   /* ロゴ */
    .ygh-site-header__brand {
        width: 320px !important;
        max-width: none !important;
        min-width: 320px !important;
    }

    .ygh-site-header__brand img {
        display: block;
        width: 320px !important;
        max-width: none !important;
        height: auto !important;
    }
.ygh-page--subpage .ygh-hero {
    display: none;
}

/*
 * 下層ページ ヒーロー — ヒーロー画像 1 枚・トップスライダーの半分の高さ
 * 透過ヘッダーが上に重なるため、コンテンツはヘッダー高さ分下げて配置
 */
.ygh-page-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(140px, 22vh, 240px);
    aspect-ratio: 32 / 5; min-height: clamp(130px, 20vh, 200px); 

    padding: calc(var(--ygh-header-height, 90px) + clamp(10px, 2vw, 20px)) 16px clamp(16px, 2.4vw, 28px);
    color: #ffffff;
    background-color: #003c8c;
    background-image:
      
        var(--ygh-banner-img, url("../img/about_bg.jpg"));
    background-size: cover;
    background-position: center;
}

.ygh-page-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0) 22%),
        radial-gradient(circle at 15% 80%, rgba(255, 255, 255, 0.10) 0, rgba(255, 255, 255, 0) 18%);
    pointer-events: none;
}


.ygh-page-banner__inner {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.ygh-page-banner__eyebrow {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 10px rgba(4, 20, 48, 0.5);
}

.ygh-page-banner__title {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.18;
    font-weight: 800;
	 letter-spacing: 0.06em;
    text-shadow: 0 1px 12px rgba(4, 20, 48, 0.55);
}
/* スマホ時のみページバナータイトルを縮小 */
@media screen and (max-width: 767px) {
	
	.ygh-page-banner__eyebrow {
    margin: 0 0 6px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 10px rgba(4, 20, 48, 0.5);
}
    .ygh-page-banner__title {
        font-size: 1.5rem;        /* お好みのサイズに調整（例: 24px相当） */
        line-height: 1.4;
        letter-spacing: 0.05em;   /* 必要なら */
    }
}


.ygh-page-banner__lead {
    max-width: 900px;
    margin: 8px 0 0;
    font-size: 1.2rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 10px rgba(4, 20, 48, 0.5);
}

.ygh-page-content {
    background: #fff;
    padding: 28px 0 80px;
}

.ygh-breadcrumb {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 18px;
}

.ygh-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ygh-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: #516273;
}

.ygh-breadcrumb__item + .ygh-breadcrumb__item::before {
    content: "/";
    color: #8aa0b7;
}

.ygh-breadcrumb__item a {
    color: #003c8c;
    text-decoration: none;
}

.ygh-breadcrumb__item a:hover,
.ygh-breadcrumb__item a:focus-visible {
    text-decoration: underline;
}

.ygh-page-content__section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.ygh-page-content__inner {
    min-height: 360px;
    padding: clamp(24px, 4vw, 40px);
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 46, 108, 0.08);
    box-shadow: 0 18px 40px rgba(18, 48, 88, 0.06);
}

@media (max-width: 767px) {
    .ygh-page-banner {
		   min-height: 120px;        /* 追記 */
        aspect-ratio: 16 / 5;     /* 追記 */
        padding: calc(var(--ygh-header-height, 90px) - 6px) 12px clamp(20px, 6vw, 30px);
    }

    .ygh-page-banner__inner,
    .ygh-breadcrumb,
    .ygh-page-content__section {
        width: min(100% - 24px, 1200px);
    }

    .ygh-page-content {
        padding: 22px 0 60px;
    }

    .ygh-page-content__inner {
        min-height: 240px;
        border-radius: 16px;
    }
}

/* ==========================================================
 * ページ内 h2（シンプル・見やすい共通デザイン 2026-08-28）
 * ========================================================== */
.ygh-page-content h2 {
    margin: clamp(26px, 3.6vw, 42px) 0 50px;
    padding: 0 0 15px;
    border-bottom: 1px solid var(--ygh-color-green, #009E96);
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #333;
}
.ygh-page-content h2:first-child { margin-top: 50px; }
@media (max-width: 767px) {
    .ygh-page-content h2 { font-size: 1.2rem; }
}
@media screen and (min-width: 769px) {
    .ygh-floating-cta {
        top: 40%;
        right: 0;
        transform: translateY(-50%);
    }

    .ygh-floating-cta .ygh-btn {
        width: 100px !important;
        min-height: 100px !important;
    }

    .ygh-floating-cta__icon {
        width: 30px !important;
        height: 30px !important;
    }
}


/* ==========================================================
 * 2026-11-12 スマートフォンでの文字・表・ボタンの見やすさ
 * ========================================================== */
@media screen and (max-width: 767px) {
    .ygh-page-content table,
    .ygh-page-content .tr-table,
    .ygh-page-content th,
    .ygh-page-content td { font-size: 14px; line-height: 1.7; }
    .ygh-page-content .ygh-btn,
    .ygh-page-content .btn { min-height: 44px; }
    .ygh-page-content a.ygh-detail-link { display: inline-block; padding: 6px 0; }
}

/* ==========================================================
 * 2026-11-12 補正：可読性（小さすぎる文字）と横はみ出し
 * ========================================================== */
.ygh-page-content__section { overflow-x: clip; }
.ygh-page-content { overflow-x: clip; }

@media screen and (max-width: 767px) {
    .ygh-page-banner__eyebrow { font-size: 11px !important; letter-spacing: 0.14em; }
    .ygh-page-banner__lead { font-size: 0.95rem; }
}
/* 表が画面幅を超える場合は横スクロールで全文を見られるようにする */
.ygh-page-content table { max-width: 100%; }
.ygh-page-content .tu-scroll,
.ygh-page-content .tr-scroll,
.ygh-page-content .ms-schedule,
.ygh-page-content .faq-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ygh-page-content .tu-scroll { padding-bottom: 4px; }

/* 2026-11-12 補正2：Bootstrap の row がスマホで左右にはみ出す問題 */
@media screen and (max-width: 767px) {
    .ygh-page-content .row { margin-left: 0; margin-right: 0; }
    .ygh-page-content .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
}

/* ==========================================================================
 * 2026-11-12 追加修正（統合版）
 *   1) スマートフォンのヘッダー：ロゴが固化してMENUボタンを押し出す問題
 *   2) 下層ページのページバナー：英字ラベルが見出し側で固定ヘッダーに潜る／
 *      リード文がバナー下端で切れる問題
 *   3) 固定フッターCTAに本文が隠れる問題
 *   以前の分割パッチ（補正3〜8）は、規則の重複と順序の曖昧さを避けるため
 *   この1ブロックに統合した（適用結果は同一）。
 * ========================================================================== */

/* ---- 1) スマホのヘッダー ---- */
@media screen and (max-width: 899px) {
    .ygh-site-header { overflow-x: clip !important; }
    .ygh-site-header__inner {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 14px !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }
    .ygh-site-header__brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 76px) !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
    }
    .ygh-site-header__brand img {
        width: auto !important;
        height: 40px !important;
        max-height: 40px !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
    .ygh-site-header__actions {
        flex: 0 0 auto !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    .ygh-menu-toggle { flex: 0 0 auto !important; }
}

/* ---- 2) ページバナー（全幅共通）
   固定高さ（aspect-ratio 32/5・min-height）だと中身が収まらず、
   中央揃えで上下に溢出 → 上がヘッダー裏に入り、下でリード文が切れていた。
   高さを内容に合わせ、上揃えにして解決する。 ---- */
html body .ygh-page-banner.ygh-page-banner {
    height: auto !important;
    aspect-ratio: auto !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    padding-top: max(calc(var(--ygh-header-height, 90px) + 24px), 108px) !important;
    padding-bottom: 26px !important;
    overflow: visible !important;
}

@media screen and (max-width: 899px) {
    html body .ygh-page-banner.ygh-page-banner {
        min-height: calc(var(--ygh-header-height, 90px) + 96px) !important;
        padding-top: calc(var(--ygh-header-height, 90px) + 16px) !important;
        padding-bottom: 18px !important;
    }
    html body .ygh-page-banner.ygh-page-banner .ygh-page-banner__inner { width: 100% !important; }
    .ygh-page-banner__eyebrow { font-size: 11px !important; letter-spacing: 0.14em; }
    .ygh-page-banner__title { font-size: 1.35rem !important; line-height: 1.35 !important; }
}

/* ---- 3) 固定フッターCTAに本文が隠れないよう下余白を確保 ---- */
@media screen and (max-width: 768px) {
    body { padding-bottom: 62px; }
}

/* ==========================================================================
 * 2026-11-12 コンテンツ幅の統一（最終）
 * 下層ページの本文領域を「最大1200px／左右32px（スマホ24px）」に統一する。
 * これまでページごとに 1168・1200・1260・358・374 などと差があったものを揃える。
 * ========================================================================== */
html body .ygh-page-content__section {
    width: min(1200px, calc(100% - 32px)) !important;
    margin-inline: auto !important;
}
@media screen and (max-width: 767px) {
    html body .ygh-page-content__section {
        width: calc(100% - 24px) !important;
    }
}

/* 入学案内トップのヒーロー内側もサイト標準幅に揃える */
html body .adm-hero__inner { width: min(1200px, calc(100% - 32px)) !important; margin-inline: auto !important; }
@media screen and (max-width: 767px) {
    html body .adm-hero__inner { width: calc(100% - 24px) !important; }
}

/* ---- CMS共通CSS（cms-common.css）の素の h1 { color / border-left / padding } が
   ページバナーの見出しに当たり、文字が白にならない問題を打ち消す（お知らせ・フォーム系ページ） ---- */
html body .ygh-page-banner .ygh-page-banner__title {
    color: #ffffff;
    border: 0;
    padding: 0;
    background: transparent;
}

/* ---- お知らせ・コラム詳細：記事タイトル(h1)の左の青線（cms-common.css の h1 装飾）を消す ---- */
html body .article-content > h1 {
    border-left: 0;
    padding-left: 0;
}
