@charset "UTF-8";

/* =========================================================
   header.css
   ヘッダー設定
========================================================= */

/*----------ヘッダーのレイアウト----------*/
.header-inner {
	display: flex;
	/*横並びにする*/
	justify-content: space-between;
	/*ロゴ左、メニュー右*/
	align-items: center;
	/*上下の高さ揃える*/
	padding: 10px 15px;
	/*上下左右の余白*/
	position: relative;
	z-index: 9999;
}

/*---ハンバーガーボタン---*/
/*ボタン外側*/
.openbtn {
	position: fixed;
	top: 10px;
	right: 10px;
	z-index: 2000;
	background: #004b88;
	cursor: pointer;
	width: 50px;
	height: 50px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	animation: blob-bounce 8s infinite alternate;
	transition: all 0.3s;
}

/*ボタン内側*/
.openbtn span {
	display: block;
	width: 18px;
	height: 2px;
	background-color: #ffffff;
	margin: 3px 0;
	border-radius: 2px;
	transition: all 0.4s;
}

.openbtn.active span:nth-of-type(1) {
	transform: translateY(8px) rotate(-45deg);
}

.openbtn.active span:nth-of-type(2) {
	opacity: 0;
}

.openbtn.active span:nth-of-type(3) {
	transform: translateY(-8px) rotate(45deg);
}


/* スマホ版メニューの隠し方 */
.nav {
	position: fixed;
	top: 0;
	right: -100%;
	/* 画面の右側に隠しておく */
	width: 80%;
	height: 100vh;
	background: white;
	padding-top: 80px;
	transition: 0.5s;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

/* スマホ版メニュー内のリスト（縦に並べる） */
#main-menu,
#sub-menu {
	display: flex;
	flex-direction: column;
	padding: 10px 20px;
}

#main-menu li {
	padding: 8px 0;
}

#main-menu ul li {
	padding: 5px 0 5px 15px;
	border-bottom: none;
}

#sub-menu li {
	font-size: 1.2rem;
	padding: 5px 0 5px 15px;
}


/*---スマホ用のナビ---*/
.nav {
	position: fixed;
	top: 0;
	right: -100%;
	/* 画面の右側に隠す */
	width: 80%;
	height: 100vh;
	background: rgba(255, 255, 255, 0.9);
	padding-top: 80px;
	transition: 0.5s;
	box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
	overflow-y: auto;
}

.sub-nav {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 15px;
	padding: 20px;
}

/*ボタンが押された時にJavaScriptでクラスをつけて表示させる*/
.nav.is-active {
	right: 0;
}

/* スマホ版メニュー内のリスト（縦に並べる） */
#main-menu,
#sub-menu {
	display: flex;
	flex-direction: column;
	padding: 20px;
}

#main-menu li {
	padding: 15px 0;
	border-bottom: 1px solid #eee;
}

/*タップした時の動作*/
#main-menu li ul li a:active {
	background-color: #F2F2F2;
}

#sub-menu li a:active {
	background-color: #F2F2F2;
}



#main-menu>li a:hover {
	color: #3EB3C1;
}

/*----------ロゴ部分----------*/
.logo-link {
	display: flex;
	align-items: center;
}

.ibaraki-logo {
	width: 3rem;
	height: auto;
	margin-right: 12px;
}

.logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.4;
}

.ibaraki-text {
	font-size: 1.5rem;
}

.school-name {
	font-size: 2rem;
}

.school-eng {
	font-size: 0.55rem;
}

/*-----------------------------------
	
   パソコン版

-----------------------------------*/
@media (min-width: 900px) {

	/*---font-size---*/
	.f-size-1 {
		font-size: 2.5rem;
	}

	.f-size-2 {
		font-size: 2.0rem;
	}

	.f-size-3 {
		font-size: 1.3rem;
	}

	.f-size-4 {
		font-size: 1.2rem;
	}

	.f-size-5 {
		font-size: 1.0rem;
	}

	/*ハンバーガーボタンを消す*/
	.openbtn {
		display: none;
	}

	/*ヘッダーの中身を中央寄せに*/
	.header-inner {
		width: 100%;
		margin: 0 auto;
		padding: 10px 20px;
		display: flex;
		justify-content: space-between;
		align-content: center;
	}

	.logo-link {
		flex-shrink: 0;
		margin-right: 15px;
	}

	.school-name {
		font-size: 1.8rem;
	}

	.school-eng {
		font-size: 0.5rem;
		flex-wrap: nowrap;
		display: block;
	}

	.ibaraki-logo {
		width: 2.5rem;
	}

	/*メニューを横並びにする*/
	.nav {
		position: static;
		width: auto;
		height: auto;
		background: none;
		box-shadow: none;
		display: block;
		padding-top: 0;
		overflow: visible;
		flex-grow: 1;
	}

	.nav nav {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
	}

	.sub-nav {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 10px;
		padding: 5px 10px 5px 0;
		margin-bottom: 0;
	}

	#main-menu,
	#sub-menu {
		display: flex;
		flex-direction: row;
		/* 横並び */
		flex-wrap: nowrap;
		padding: 0 10px;
		gap: 12px
	}

	#main-menu {
		order: 2;
		display: flex;
		padding-left: 10px;
		margin-left: 30px;
		margin-top: -5px;
	}

	#main-menu li {
		border-bottom: none !important;
	}

	/* --- PC版のプルダウン（ホバーで表示 --- */

	/* -- 1. 共通設定 -- */
	#main-menu>li {
		position: relative;
		z-index: 1000;
	}

	#main-menu>li:hover {
		z-index: 1001;
	}

	/* クリック範囲広げる */
	#main-menu>li>a {
		display: block;
		transition: all 0.3s ease;
		position: relative;
	}

	/*ホバー時の背景と文字の色*/
	#main-menu>li:hover>a {
		color: #3EB3C1;
	}

	/* -- 2. アンダーラインのアニメーション -- */
	#main-menu>li>a::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 50%;
		width: 0;
		height: 2px;
		background-color: #3EB3C1;
		transition: all 0.3s ease;
		transform: translateX(-50%);
	}

	#main-menu>li:hover>a::after,
	#main-menu>li.current>a::after {
		width: 100%;
	}

	/* -- 3. ドロップダウンメニュー（子要素ul） -- */
	#main-menu li ul {
		/* 状態の初期化 */
		visibility: hidden;
		opacity: 0;
		height: 0;
		overflow: hidden;
		pointer-events: none;
		/* 配置設定 */
		position: absolute;
		top: 100%;
		right: 50%;
		transform: translateX(50%);
		width: 270px;
		background-color: rgba(255, 255, 255, 0.95);
		padding: 20px 0;
		border-radius: 8px;
		transition: all 0.3s ease;
	}

	/* ドロップダウン表示時 */
	#main-menu li:hover>ul {
		visibility: visible;
		opacity: 1;
		height: auto;
		max-height: 400px;
		pointer-events: auto;
	}

	/* ドロップダウン内の各項目 */
	#main-menu li ul li {
		width: 100%;
		text-align: left;
	}

	#main-menu li ul li a {
		display: block;
		padding: 5px 10px;
		transition: background-color 0.2s;
	}

	#main-menu li ul li a:hover {
		background-color: #F5F5F5;
		color: #3EB3C1;
	}

	/* -- 4. サブメニュー -- */
	#sub-menu li a,
	.top-text {
		display: block;
		transition: all 0.2s;
	}

	#sub-menu li a:hover {
		color: #3EB3C1;
	}

	.top-text:hover {
		color: #3EB3C1;
	}

}

@media (min-width: 1060px) {

	/*---font-size---*/
	.f-size-1 {
		font-size: 2.5rem;
	}

	.f-size-2 {
		font-size: 2.0rem;
	}

	.f-size-3 {
		font-size: 1.4rem;
	}

	.f-size-4 {
		font-size: 1.2rem;
	}

	.f-size-5 {
		font-size: 1.0rem;
	}

	.logo-link {
		flex-shrink: 0;
		margin-right: 15px;
	}

	.school-name {
		font-size: 3rem;
	}

	.school-eng {
		font-size: 0.9rem;
		flex-wrap: nowrap;
		display: block;
	}

	.ibaraki-logo {
		width: 4rem;
	}

	.ibaraki-text {
		font-size: 2rem;
	}

}