@charset "utf-8";

/* ===================================
   トップページ専用スタイル
   =================================== */

/* メインイメージ */
#mainimg {
	clear: left;
	width: 100%;
	max-width: 1400px; /* 最大幅を制限 */
	margin: 0 auto 0px; /* 中央揃え */
	position: relative;
}

.slide1 {
	width: 100%;
	height: auto; /* 画像の縦横比を維持 */
	display: block;
}

/* ===================================
   News & スライドショー
   =================================== */
#new0 {
	display: flex;
	justify-content: space-between;
	height: 450px; /* vwではなく固定値に変更 */
	width: 100%;
	margin-top: 0px;
	gap: 20px;
}

#news {
	height: 150px;
	margin-top: 180px;
}

#new {
	position: relative;
	height: 100%;
	width: 50%;
	overflow-y: scroll;
	overflow-x: hidden;
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#new dl {
	padding-right: 0;
	width: 90%;
}

#new dt {
	float: left;
	width: 9em;
}

#new dd {
	padding-left: 0;
}

#new dd,
#new dt {
	font-size: 18px; /* 固定サイズ */
}

/* スライドショー */
.slide-show {
	width: 50%;
	position: relative;
	height: auto;
	overflow: hidden;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slide-show img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fadeimg {
	position: absolute;
	width: 100%;
	height: 100%;
	opacity: 0;
	animation: change-img-anim 15s infinite;
}

.fadeimg:nth-of-type(1) {
	animation-delay: 0s;
}

.fadeimg:nth-of-type(2) {
	animation-delay: 5s;
}

.fadeimg:nth-of-type(3) {
	animation-delay: 10s;
}

.fadeimg:nth-of-type(4) {
	animation-delay: 15s;
}

@keyframes change-img-anim {
	0% {
		opacity: 0;
	}
	28% {
		opacity: 1;
	}
	33% {
		opacity: 1;
	}
	45% {
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

/* スライドインジケーター */
.slide-indicators {
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.slide-indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background 0.3s;
}

.slide-indicator.active {
	background: rgba(255, 255, 255, 1);
}

.slide-indicator:hover {
	background: rgba(255, 255, 255, 0.8);
}

/* ===================================
   About Us & Dear Students
   =================================== */
.check {
	font-size: 18px; /* vwではなく固定値 */
	margin-left: 3%;
	margin-right: 3%;
	line-height: 1.7;
}

/* ===================================
   Information (ご案内)
   =================================== */
.container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
}

.information,
.map {
	flex: 1;
	padding: 0 3%;
	min-width: 300px;
}

.information-table {
	width: 100%;
	border-collapse: collapse;
}

.information-table td {
	padding: 12px; /* vwではなく固定値 */
	border: 1px solid #ccc;
	font-size: 16px; /* vwではなく固定値 */
	word-break: break-word;
}

.map iframe {
	width: 100%;
	height: 450px;
	max-height: 50vh;
}

/* ===================================
   レスポンシブ - スマホのみ
   768px以下でのみレイアウト変更
   =================================== */
@media (max-width: 768px) {
	/* メインイメージ - スマホでメニューバーの下に表示 */
	#mainimg {
		margin-top: 60px; /* メニューバーの高さ分 */
		margin-bottom: -80px;
	}
	
	.slide1 {
		height: auto; /* 画像の縦横比を維持 */
	}

	/* News & スライドショー */
	#new0 {
		flex-direction: column;
		height: auto;
		gap: 20px;
	}

	#new {
		width: 100%;
		min-height: 300px;
		max-height: 350px;
		padding: 15px;  /* スマホ用に少し小さく */
	}

	#new dd,
	#new dt {
		font-size: 13px;
	}

	.slide-show {
		width: 100%;
		min-height: 300px;
		max-height: 350px;
	}

	/* テキスト */
	.check {
		font-size: 14px;
		line-height: 1.7;
		margin-left: 5%;
		margin-right: 5%;
	}

	/* Information */
	.container {
		flex-direction: column;
		align-items: center;
	}

	.information {
		width: 100%;
		margin-bottom: 20px;
	}

	.map {
		width: 100%;
	}

	.map iframe {
		width: 100%;
		height: 250px;
	}

	.information-table td {
		font-size: 12px;
		padding: 8px;
	}
}

/* ===================================
   PC・タブレット（769px以上）
   ズームしてもレイアウトは変わらない
   =================================== */
@media (min-width: 769px) {
	/* メインイメージ：画像の縦横比を維持 */
	#mainimg {
		margin-bottom: 0px;
	}
	
	.slide1 {
		height: auto; /* 画像の元サイズを維持 */
	}
	
	/* 固定レイアウトを維持 */
	#new0 {
		display: flex;
		flex-direction: row;
		height: 450px;
	}
	
	#new {
		width: 50%;
		height: 100%;
	}
	
	.slide-show {
		width: 50%;
		height: 100%;
	}
	
	/* フォントサイズも固定 */
	#new dd,
	#new dt {
		font-size: 18px;
	}
	
	.check {
		font-size: 18px;
	}
	
	.information-table td {
		font-size: 16px;
		padding: 12px;
	}
}