@charset "UTF-8";

/* =========================
   OUTLINE HEADER
========================= */

header {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 0.32;
	background: url("../img/top/main04.jpg") no-repeat center center / cover;
	overflow: visible;
}
@media only screen and (max-width: 769px) {
header {
	aspect-ratio: 1 / 1;
}
}

/*header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.22);
	z-index: 0;
}*/

header h1 {
	position: fixed !important; /* absolute から fixed に変更 */
	top: 22px;
	left: 24px;
	z-index: 99999;
	margin: 0;
	width: 30vw;
	/*height: 34px;*/
	background: url("../img/common/logow.svg") no-repeat left top / contain;
	overflow: hidden;
}

header h1 a {
	display: block;
	width: 100%;
	height: 100%;
}

header h1 span {
	display: block;
	overflow: hidden;
	text-indent: -9999px;
	white-space: nowrap;
}

@media only screen and (max-width: 769px) {
	header h1 {
		top: 0;
		left: 0;
		/*border: 1px solid #F00;*/
		margin-top: 2vw !important;
		width: 40vw; /*40vw*/
		height: 8vw; /*8vw*/
		/*margin-top: -8%;*/
		margin-left: 2vw;
	}
}

header h2 {
	position: absolute;
	top: 150px;
	left: 66px;
	z-index: 3;
	margin: 0;
	width: 500px; /*469:182*/
	height: 208px;
	background: url("../img/common/h2_fac_page.svg") no-repeat left top / contain;
}
@media only screen and (max-width: 769px) {
header h2 {
	width: 70vw !important;
	height: 27.2vw !important;
	background: url("../img/common/h2_fac_page_sp.svg") no-repeat left top / contain;
}
}

header h2 span {
	display: block;
	height: 0;
	overflow: hidden;
	text-indent: -9999px;
	white-space: nowrap;
}

/* 建学の綱領カード */
header p {
	position: absolute;
	left: 50%;
	bottom: -150px;
	transform: translateX(-50%);
	z-index: 5;
	margin: 0;
	width: 560px;
}

header p img {
	display: block;
	width: 100%;
	height: auto;
	background: #fff;
	box-shadow: 6px 6px 0 rgba(120, 145, 185, 0.45);
}

@charset "UTF-8";


/* =========================
    LOCAL NAV
========================= */

.fac-localnav {
	/* 背景色と罫線を削除 */
	background: transparent; 
	border: none;
}

.fac-localnav ul {
	max-width: 1100px;
	margin: 0 auto;
	padding: 18px 20px;
	display: flex;
	justify-content: center;
	gap: 32px; /* ｜を入れるため、少し広めに調整 */
	list-style: none;
}

.fac-localnav li {
	position: relative;
}

/* すべての項目の左側に「｜」を表示（これで一番左端もカバー） */
.fac-localnav li::before {
	content: "|";
	position: absolute;
	left: -18px; /* gapの約半分左に寄せる */
	color: #333; /* 棒の色 */
}

/* 一番最後の項目の右側にも「｜」を表示 */
.fac-localnav li:last-child::after {
	content: "|";
	position: absolute;
	right: -18px; /* gapの約半分右に寄せる */
	color: #333;
}

.fac-localnav a {
	/* フォントサイズと色の変更 */
	color: #000;
	font-size: 15px; 
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.3s;
}

.fac-localnav a:hover {
	opacity: 0.7;
}

/* =========================
   MAIN
========================= */

.fac-page {
	/*background: #f4f4f4;*/
}

.fac-page .wrap {
	max-width: 1100px;
	margin: 0 auto;
	/*padding: 42px 20px 80px;*/
	padding: 90px 20px 80px;
}

.fac-contents {
	display: block;
}

.fac-section {
	margin-bottom: 72px;
}

.fac-section:last-child {
	margin-bottom: 0;
}

.fac-section__title {
	margin: 0 auto 28px;
	background-repeat: no-repeat;
	background-position: center top;
	background-size: contain;
}

.fac-section__title span {
	display: block;
	height: 0;
	overflow: hidden;
	text-indent: -9999px;
	white-space: nowrap;
}

.fac-section__title--sogo { width: 480px; height: 72px; background-image: url("../img/fac/h3_fac01.svg"); }
.fac-section__title--support { width: 363px; height: 72px; background-image: url("../img/fac/h3_fac02.svg"); }
.fac-section__title--facility { width: 392px; height: 72px; background-image: url("../img/fac/h3_fac03.svg"); }
.fac-section__title--sangaku { width: 469px; height: 72px; background-image: url("../img/fac/h3_fac04.svg"); }
.fac-section__title--incentive { width: 344px; height: 72px; background-image: url("../img/fac/h3_fac05.svg"); }
.fac-section__title--fd { width: 704px; height: 72px; background-image: url("../img/fac/h3_fac06.svg"); }
.fac-section__title--benefit { width: 368px; height: 36px; background-image: url("../img/fac/h3_fac07.svg"); }

@media only screen and (max-width: 769px) {
.fac-section__title--sogo { width: 70vw !important; height: 13.5vw !important; background-image: url("../img/fac/h3_fac01sp.svg"); }
.fac-section__title--support { width: 70vw !important; height: 14.0vw !important;  background-image: url("../img/fac/h3_fac02sp.svg"); }
.fac-section__title--facility { width: 70vw !important; height: 14.2vw !important; background-image: url("../img/fac/h3_fac03sp.svg"); }
.fac-section__title--sangaku { width: 70vw !important; height: 18.4vw !important;  background-image: url("../img/fac/h3_fac04sp.svg"); }
.fac-section__title--incentive { width: 60vw !important; height: 13.8vw !important; background-image: url("../img/fac/h3_fac05sp.svg"); }
.fac-section__title--fd { width: 80vw !important; height: 18.6vw !important; background-image: url("../img/fac/h3_fac06sp.svg"); }
.fac-section__title--benefit { width: 70vw !important; height: 6.6vw !important; background-image: url("../img/fac/h3_fac07sp.svg"); }
}

.fac-section__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 48px;
	align-items: start;
}

.fac-section__col {
	min-width: 0;
}

.fac-section__col p {
	margin: 0 0 1.2em;
}

.fac-linkbtn {
	margin-top: 18px !important;
}

.fac-linkbtn a,
.fac-linkbtn img {
	display: block;
	width: 500px;
	height: auto;
}
@media only screen and (max-width: 769px) {
.fac-linkbtn a,
.fac-linkbtn img {
	width: auto !important;
	height: auto;
}
}

/* =========================
   GALLERY
========================= */

.fac-gallery {
	margin-top: 24px;
	display: grid;
	gap: 10px;
}

.fac-gallery figure {
	margin: 0;
}

.fac-gallery img {
	display: block;
	width: 100%;
	height: auto;
}

.fac-gallery figcaption {
	margin-top: 6px;
	font-size: 11px;
	/*color: #666;*/
	text-align: center;
	padding-left: 2em;
}

/* =========================
   GALLERY (全幅表示への変更)
========================= */

.fac-gallery--four {
    grid-template-columns: repeat(4, 1fr);
    /* --- 追加箇所 --- */
    width: 100vw;               /* 画面幅いっぱいにする */
    margin-left: calc(50% - 50vw); /* 左側の余白を打ち消して端に寄せる */
    margin-right: calc(50% - 50vw);/* 右側の余白を打ち消す */
    gap: 3px;                   /* 写真同士の隙間をなくしてタイル状にする場合 */
    /* ---------------- */
}

/* キャプション（説明文）が端に寄りすぎないよう調整 */
.fac-gallery--four figcaption {
    padding: 0 10px;
    box-sizing: border-box;
}

@media only screen and (max-width: 769px) {
    .fac-gallery--four {
        grid-template-columns: repeat(2, 1fr); /* スマホでは2列 */
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        gap: 3px;
    }
	
	.fac-gallery figcaption {
		text-align: left;
	}
}

.fac-gallery--two-large {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: auto auto;
	gap: 12px;
	align-items: stretch;
}

.fac-gallery--two-large figure {
	margin: 0;
}

.fac-gallery--two-large img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 左の1枚を2段またがり */
.fac-gallery--two-large figure:nth-child(1) {
	grid-column: 1;
	grid-row: 1 / span 2;
}

/* 右上 */
.fac-gallery--two-large figure:nth-child(2) {
	grid-column: 2;
	grid-row: 1;
}

/* 右下 */
.fac-gallery--two-large figure:nth-child(3) {
	grid-column: 2;
	grid-row: 2;
}

/* =========================
   BENEFIT GRID
========================= */

.benefit-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	border-top: 1px solid #FFF;
	border-left: 1px solid #FFF;
	background: #F0F0F0;
}

.benefit-grid__item {
	grid-column: span 2; /* 通常は3列表示 */
	padding: 18px 16px;
	border-right: 1px solid #FFF;
	border-bottom: 1px solid #FFF;
	text-align: center;
	font-size: 14px;
	color: #01449A;
	box-sizing: border-box;
	/* --- 追記：縦方向・横方向の中央揃え --- */
    display: flex;
    flex-direction: column;   /* 中身（テキストとsmall）を縦に並べる */
    justify-content: center;  /* 【重要】縦方向の中央配置 */
    align-items: center;      /* 横方向の中央配置 */
    /* ------------------------------------ */
}

/* 最後の2つだけ2列レイアウト化 */
.benefit-grid__item:nth-last-child(2),
.benefit-grid__item:nth-last-child(1) {
	grid-column: span 3;
}

.benefit-grid__item small {
	display: block;
	margin-top: 6px;
	line-height: 1.5;
	font-size: 12px;
	color: #000;
}

@media only screen and (max-width: 769px) {
	.benefit-grid {
		grid-template-columns: 1fr;
	}

	.benefit-grid__item,
	.benefit-grid__item:nth-last-child(2),
	.benefit-grid__item:nth-last-child(1) {
		grid-column: span 1;
	}
}


/* =========================
   QA 全体
========================= */

.fac-qa {
	background: #cfd8e6; /* 外側背景 */
	padding: 60px 20px 90px;
	font-family: "Noto Sans JP", sans-serif !important;
}

/* =========================
   タイトル
========================= */

.fac-qa__title {
	text-align: center;
	margin: 0 0 40px;
	font-size: 1.6em;
	letter-spacing: 0.25em;
	color: #333;
	font-weight: 400;
}

/* 中央幅制御（これが最重要） */
.fac-qa__inner {
	max-width: 960px;
	margin: 0 auto;
}

/* =========================
   QAアイテム
========================= */

.qa-item {
	margin-bottom: 12px;
	border: none;
}

/* =========================
   Q（質問）
========================= */

.qa-item summary {
	list-style: none;
	cursor: pointer;
	position: relative;

	background: #ffffff;
	padding: 18px 60px 18px 20px;

	font-size: 15px;
	line-height: 1.6;
}

/* Qラベル */
.qa-q {
	display: inline-block;
	margin-right: 10px;
	font-weight: 700;
	color: #1f5fbf; /* 青 */
}

/* 質問テキスト */
.qa-item summary {
	color: #1f5fbf; /* ←ここが青（重要） */
}

/* 英語 */
.qa-item summary small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #1f5fbf;
}

/* 開閉アイコン */
.qa-item summary::after {
	content: "+";
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	color: #8a94a8;
}

.qa-item[open] summary::after {
	content: "×";
}

/* =========================
   A（回答）
========================= */

.qa-item__body {
	/*background: #d9e2ef;*/ /* ←白ではない（ここ重要） */
	padding: 18px 20px 20px;

	font-size: 14px;
	line-height: 1.8;
	color: #222; /* 黒 */
}

/* Aラベル */
.qa-a {
	display: inline-block;
	margin-right: 10px;
	font-weight: 700;
	color: #222;
}

/* 英語 */
.qa-item__body .eng {
	margin-top: 8px;
	font-size: 12px;
	/*color: #6e7b95;*/
}

/* =========================
   RESPONSIVE
========================= */

@media only screen and (max-width: 769px) {
	.fac-localnav ul {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.2em 2em;
		padding: 20px 20px 40px;
		text-align: center;
	}

	.fac-localnav li::before {
		/*display: none;*/
	}
	.fac-localnav li + li::before {
		/*display: none;*/
	}
	
	.fac-localnav li + li::after {
		/*display: none;*/
	}

	.fac-localnav li:first-child::after {
		left: auto;
	}

	.fac-localnav li {
		margin-top: 8px;
	}

	.fac-page .wrap {
		padding: 28px 28px 56px;
	}

	.fac-section {
		margin-bottom: 56px;
	}

	.fac-section__title {
		margin-bottom: 22px;
		max-width: 100%;
		background-size: contain;
	}

	.fac-section__title--sogo,
	.fac-section__title--support,
	.fac-section__title--facility,
	.fac-section__title--sangaku,
	.fac-section__title--incentive,
	.fac-section__title--fd,
	.fac-section__title--benefit {
		width: 100%;
		height: auto;
	}

	.fac-section__cols {
		grid-template-columns: 1fr;
		row-gap: 14px;
		/*margin-right: 2em;
		margin-left: 2em;*/
	}

	.fac-linkbtn a,
	.fac-linkbtn img {
		width: 160px;
	}

	/*.fac-gallery--four {
		grid-template-columns: repeat(2, 1fr);
	}*/

	.fac-gallery--two-large {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		gap: 8px;
	}

	.fac-gallery--two-large figure:nth-child(1) {
		grid-column: 1 / span 2;
		grid-row: 1;
	}

	.fac-gallery--two-large figure:nth-child(2) {
		grid-column: 1;
		grid-row: 2;
	}

	.fac-gallery--two-large figure:nth-child(3) {
		grid-column: 2;
		grid-row: 2;
	}

	.benefit-grid {
		grid-template-columns: 1fr;
	}

	.benefit-grid__item,
	.benefit-grid__item:nth-last-child(2),
	.benefit-grid__item:nth-last-child(1) {
		grid-column: span 1;
	}

	.fac-qa {
		padding: 44px 28px 64px;
	}
	
	.qa-item__body {
		padding: 0 20px 20px;
	}
	
	.qa-item__body > p:first-child {
		display: flex;
	}


}


/* 英語テキストの先頭に区切り線を追加 */
.qa-item__body .eng::before {
    content: "―――";
    display: block;      /* 線を独立した行にする */
    margin-bottom: 0.5em; /* 下の英文との間に少し隙間を作る */
    /*color: #999;*/         /* 線の色を少し薄くして馴染ませる（任意） */
    letter-spacing: 0.2em; /* 線の間隔を少し広げて綺麗に見せる（任意） */
}