@charset "utf-8";

/* -------------------- 奈良は学び・暮らしに適した環境 -------------------- */

#main_body [class^="detail_"]:nth-of-type(2) {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 0 20px;
	font-size: 1.6rem;
}
#main_body [class^="detail_"]:nth-of-type(2) h2 {
	width: 100%;
}
#main_body [class^="detail_"]:nth-of-type(2) p {
	max-width: calc((100% - 20px) / 2) !important;
	margin: 0 0 20px;
}
#main_body [class^="detail_"]:nth-of-type(2) p > img {
	max-width: calc(100% + 20px);
	height: auto !important;
}


/* -------------------- 奈良のアクセス -------------------- */

#main_body [class^="detail_"]:nth-of-type(3) {
	display: grid;
	grid-template-columns: 1fr 530px;
	grid-template-rows: auto 1fr;
	grid-column-gap: 80px;
	grid-row-gap: 60px;
}
#main_body [class^="detail_"]:nth-of-type(3) p {
	margin: 0;
}
#main_body [class^="detail_"]:nth-of-type(3) p:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
#main_body [class^="detail_"]:nth-of-type(3) p:nth-child(2) { grid-area: 2 / 1 / 3 / 2; }
#main_body [class^="detail_"]:nth-of-type(3) p:nth-child(3) { grid-area: 1 / 2 / 3 / 3; }


/* -------------------- 奈良のココが好き -------------------- */

#main_body [class^="detail_"]:nth-of-type(4) {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: stretch;
	gap: 0 20px;
}

#main_body [class^="detail_"]:nth-of-type(4) > h2,
#main_body [class^="detail_"]:nth-of-type(4) > h3,
#main_body [class^="detail_"]:nth-of-type(4) > h4,
#main_body [class^="detail_"]:nth-of-type(4) > h5,
#main_body [class^="detail_"]:nth-of-type(4) > h6,
#main_body [class^="detail_"]:nth-of-type(4) > p {
	width: 100%;
}
#main #main_body [class^="detail_"]:nth-of-type(4) > p {
	margin: 1em 0;
}
#main #main_body [class^="detail_"]:nth-of-type(4) h2 + p {
	margin: 0 0 10px;
}
#main_body [class^="detail_"]:nth-of-type(4) > div {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	box-sizing: border-box;
	width: calc(50% - 10px);
	min-width: 350px;
	min-height: 120px;
	margin: 10px 0;
	padding: 10px 30px;
	background: #efed80;
	border: none;
	border-radius: 5px;
	font-size: 1.6rem;
	text-align: left;
}
#main_body [class^="detail_"]:nth-of-type(4) > div > span:first-child {
	font-weight: bold;
	display: contents;
}


/* -------------------- 共通部品 -------------------- */
/* リンクボタン */
#main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a,
#main_body [class^="detail_"]:nth-of-type(4) p:last-child a {
	display: inline-block;
	margin: 0;
	padding: 15px 50px 15px 30px;
	border: 1px solid #fecb09;
	background: url(/img/site/nara-campuslife/arrow_blue.png) no-repeat right 20px center;
	font-size: 1.4rem;
	text-decoration: none;
	-webkit-transition: all 0.2s ease;
	-o-transition: all 0.2s ease;
	transition: all 0.2s ease;
}
#main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a:hover,
#main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a:focus,
#main_body [class^="detail_"]:nth-of-type(4) p:last-child a:hover,
#main_body [class^="detail_"]:nth-of-type(4) p:last-child a:focus {
	background-color: #fff5ce;
	text-decoration: underline;
}


/* ==================================================
タブレット
================================================== */

@media screen and (max-width: 1099px) {
	#main_body [class^="detail_"]:nth-of-type(3) {
		grid-template-columns: 1fr 55%;
		grid-column-gap: 20px;
		grid-row-gap: 40px;
	}
}

@media screen and (max-width: 800px) {
	#main_body [class^="detail_"]:nth-of-type(4) {
		justify-content: center;
	}
	#main_body [class^="detail_"]:nth-of-type(4) > div {
		width: calc(100% - 60px);
		min-width: auto;
		max-width: 500px;
	}
}


/* ==================================================
スマートフォン
================================================== */
@media screen and (max-width: 670px) {

	#main_body [class^="detail_"]:nth-of-type(2) p {
		max-width: 530px !important;
	}
	#main_body [class^="detail_"]:nth-of-type(2) p:last-child {
		margin-bottom: 0;
	}

	#main_body [class^="detail_"]:nth-of-type(3) {
		display: block;
	}
	#main_body [class^="detail_"]:nth-of-type(3) p {
		margin: 1em;
	}

	#main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2),
	#main_body [class^="detail_"]:nth-of-type(3) p:last-child,
	#main_body [class^="detail_"]:nth-of-type(4) p:last-child {
		text-align: center;
	}

}

/* ==================================================
背景色変更
================================================== */

.color_change #main_body [class^="detail_"]:nth-of-type(4) > div {
	background: none;
	outline: 1px solid rgb(255 255 255 / .5);
}

/* リンクボタン */
.color_change #main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a,
.color_change #main_body [class^="detail_"]:nth-of-type(4) p:last-child a {
	border-color: rgb(255 255 255 / .5);
}
.color_change #main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a:hover,
.color_change #main_body [class^="detail_"]:nth-of-type(3) p:nth-last-of-type(2) a:focus,
.color_change #main_body [class^="detail_"]:nth-of-type(4) p:last-child a:hover,
.color_change #main_body [class^="detail_"]:nth-of-type(4) p:last-child a:focus {
	background-color: transparent;
}