/*
 * サイト共通の枠組み: ヘッダー / グローバルメニュー / 見出し画像 / パンくず / 本文の枠 / フッター / ページ先頭へ
 * 770px 以下を SP として切り替える（旧テーマの responsive.css と同じ境目）。
 */

/* ===================================================================== ヘッダー */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-height);
	background: var(--color-ink);
	transition: box-shadow var(--duration-fast) ease;
}

.site-header.is-fixed {
	box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
}

.site-header__inner {
	position: relative;
	height: 100%;
}

.site-logo {
	position: absolute;
	top: 0;
	left: var(--gutter);
	z-index: 2;
	font-family: var(--font-serif);
	font-size: 20px;
	font-weight: 400;
	line-height: var(--header-height);
}

.site-logo__link {
	display: inline-block;
	color: var(--color-white);
}

.site-logo__image {
	display: none;
}

/* PC はロゴを出さない（旧テーマの設定 logo_font_size=0 と同じ見た目）。読み上げ用に文字は残す */
@media (min-width: 771px) {
	.site-logo__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

/* ===================================================================== グローバルメニュー（PC） */
.menu-button {
	display: none;
}

.global-nav__list {
	display: flex;
	justify-content: center;
	height: var(--header-height);
}

.global-nav__list > li {
	position: relative;
}

.global-nav__list > li > a {
	display: block;
	height: var(--header-height);
	padding: 0 35px;
	font-size: var(--fs-s);
	font-weight: bold;
	line-height: var(--header-height);
	color: var(--color-white);
}

.global-nav__list > li > a:hover,
.global-nav__list > .current-menu-item > a {
	color: var(--color-accent);
}

.global-nav .sub-menu {
	display: none;
	position: absolute;
	top: var(--header-height);
	left: 0;
	width: 220px;
	text-align: left;
}

.global-nav__list > li:hover > .sub-menu,
.global-nav__list > li:focus-within > .sub-menu {
	display: block;
}

.global-nav .sub-menu a {
	display: block;
	padding: 14px 35px 12px;
	font-size: 11px;
	line-height: 1.6;
	color: var(--color-white);
	background: var(--color-ink);
}

.global-nav .sub-menu a:hover {
	text-decoration: none;
	background: var(--color-accent);
}

/* SP で子メニューを開くボタン（site.js が追加する） */
.global-nav__toggle {
	display: none;
}

/* ===================================================================== 見出し画像 */
.page-hero {
	position: relative;
	width: 100%;
}

.page-hero__image {
	display: block;
	width: 100%;
	height: auto;
}

.page-hero__caption {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	padding: 0 150px;
	color: var(--color-white);
	text-align: center;
	transform: translateY(-50%);
}

.page-hero__title {
	font-family: var(--font-serif);
	font-size: var(--hero-font-size, 30px);
	font-weight: 400;
	line-height: 1;
	animation: page-hero-fade 3s ease 1s both;
}

.page-hero--no-image {
	height: 200px;
	background: var(--color-black);
}

/* PC と SP で別画像の見出し（template-parts/split-hero.php）。画像の比率のまま全幅で出す */
.page-hero--split,
.page-hero--split .page-hero__image {
	height: auto !important;
}

.page-hero--split .page-hero__image {
	width: 100% !important;
	max-width: 100% !important;
}

@keyframes page-hero-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ===================================================================== パンくず */
.breadcrumb {
	height: var(--crumb-height);
	background: var(--color-ink);
}

.breadcrumb__list {
	display: flex;
	align-items: center;
	max-width: var(--width-inner);
	height: 100%;
	margin: 0 auto;
	font-size: var(--fs-s);
	line-height: 1.6;
	color: var(--color-white);
}

.breadcrumb__item {
	position: relative;
	min-width: 0;
	margin: 0 0 0 30px;
	padding: 0 15px 0 0;
	white-space: nowrap;
}

/* 区切りの「>」 */
.breadcrumb__item::before {
	--icon: var(--icon-chevron-right);
	position: absolute;
	top: 50%;
	left: -16px;
	width: 8px;
	height: 8px;
	transform: translateY(-50%);
}

.breadcrumb__item:last-child > span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.breadcrumb__item--home {
	margin: 0;
	padding: 0;
}

.breadcrumb__item--home::before {
	content: none;
}

.breadcrumb__link {
	color: var(--color-white);
}

.breadcrumb__item--home .breadcrumb__link {
	display: block;
	width: 15px;
	height: 14px;
}

.breadcrumb__item--home .breadcrumb__link::before {
	--icon: var(--icon-home);
	width: 15px;
	height: 14px;
}

.breadcrumb__link:hover {
	color: var(--color-white);
}

/* ===================================================================== 本文の枠 */
.l-container {
	max-width: var(--width-site);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.l-container--main {
	margin-top: 70px;
	margin-bottom: 100px;
}

/* 固定ページの本文幅（旧 #left_col。サイドバーは無いが左寄せの 840px を保つ）。
   旧テーマは float だったため、本文最後の余白が外へ抜けない。flow-root で同じにする */
.l-narrow {
	display: flow-root;
	width: var(--width-narrow);
	max-width: 100%;
}

/* ===================================================================== フッター */
.site-footer__top {
	padding: 65px 0 50px;
	text-align: center;
	background: var(--color-surface);
}

.site-footer__logo {
	margin: 0 0 65px;
	line-height: 0;
}

.site-footer__logo-image {
	display: block;
	margin: 0 auto;
}

.site-footer__banner {
	display: block;
	width: min(30%, 360px); /* 旧テーマは 1200px の枠の 30% */
	margin: 0 auto;
}

.site-footer__banner img {
	display: block;
	width: 100%;
	margin-bottom: 7px; /* 旧テーマは画像が文字の行に乗っていて、下に行の余白があった */
}

.site-footer__bottom {
	max-width: var(--width-inner);
	margin: 0 auto;
	padding: 20px 0 30px;
	text-align: center;
}

.social-links {
	display: flex;
	justify-content: center;
	height: 37px;
}

.social-links__link {
	position: relative;
	display: block;
	width: 30px;
	height: 30px;
	color: var(--color-border);
	transition: none;
}

.social-links__link::before {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 17px;
	height: 17px;
	transform: translate(-50%, -50%);
}

.social-links__item--facebook .social-links__link::before { --icon: var(--icon-facebook); }
.social-links__item--instagram .social-links__link::before { --icon: var(--icon-instagram); }
.social-links__item--rss .social-links__link::before { --icon: var(--icon-rss); }

.social-links__item--facebook .social-links__link:hover { color: #3b5998; }
.social-links__item--instagram .social-links__link:hover { color: #8a3ab9; }
.social-links__item--rss .social-links__link:hover { color: #fc0; }

.footer-nav {
	margin: 15px 0 0;
}

.footer-nav__list {
	display: flex;
	justify-content: center;
	font-size: var(--fs-s);
	line-height: calc(var(--fs-base) * 1.6);
}

.footer-nav__list a {
	display: block;
	margin: 0 15px 0 0;
	padding: 0 15px 0 0;
	border-right: 1px solid var(--color-border);
}

.footer-nav__list li:last-child a {
	margin: 0;
	padding: 0;
	border: 0;
}

.site-footer__copyright {
	height: 60px;
	font-size: var(--fs-s);
	line-height: 60px;
	color: var(--color-white);
	text-align: center;
	background: var(--color-black);
}

.site-footer__copyright a {
	color: var(--color-white);
}

/* ===================================================================== ページ先頭へ */
.return-top {
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: 90;
	width: 60px;
	height: 60px;
	color: var(--color-white);
	background: var(--color-overlay);
	transform: translateY(200%);
	transition: transform 0.35s, background-color var(--duration-fast) ease;
}

.return-top.is-visible {
	transform: none;
}

.return-top::before {
	--icon: var(--icon-chevron-up);
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	transform: translate(-50%, -50%);
}

.return-top:hover {
	color: var(--color-white);
	background: var(--color-accent);
}

/* ===================================================================== SP（770px 以下） */
@media (max-width: 770px) {
	.site-main {
		padding-top: var(--header-height-sp);
	}

	/* トップはヘッダーが全画面の写真に重なるので、本文を下げない */
	.home .site-main {
		padding-top: 0;
	}

	.site-header {
		position: fixed;
		left: 0;
		width: 100%;
		height: var(--header-height-sp);
		background: var(--color-white);
	}

	.site-header.is-fixed {
		box-shadow: none;
	}

	.site-logo {
		left: 15px;
		height: var(--header-height-sp);
		line-height: 0;
	}

	.site-logo__link {
		display: flex;
		align-items: center;
		height: 100%;
	}

	.site-logo__text {
		display: none;
	}

	.site-logo__image {
		display: block;
	}

	/* メニューボタン */
	.menu-button {
		position: absolute;
		top: 0;
		right: 0;
		z-index: 9;
		display: block;
		width: 56px;
		height: 56px;
		padding: 0;
		color: var(--color-black);
		cursor: pointer;
		background: none;
		border: 0;
	}

	.menu-button::before {
		--icon: var(--icon-menu);
		width: 18px;
		height: 18px;
		margin: 0 auto;
	}

	.menu-button:hover,
	.menu-button[aria-expanded="true"] {
		color: var(--color-white);
		background: #333;
	}

	/* メニュー本体 */
	.global-nav {
		position: absolute;
		top: 56px;
		left: 0;
		z-index: 9;
		display: none;
		width: 100%;
		box-shadow: 1px 2px 1.5px rgba(0, 0, 0, 0.1);
	}

	.global-nav.is-open {
		display: block;
	}

	.global-nav__list {
		display: block;
		height: auto;
	}

	.global-nav__list > li > a,
	.global-nav .sub-menu a {
		height: 50px;
		padding: 0 15px;
		overflow: hidden;
		font-size: 13px;
		font-weight: normal;
		line-height: 50px;
		color: var(--color-white);
		background: #333;
	}

	.global-nav__list > li > a:hover,
	.global-nav__list > .current-menu-item > a {
		color: var(--color-white);
	}

	.global-nav .sub-menu {
		position: static;
		width: auto;
	}

	.global-nav__list > li:hover > .sub-menu,
	.global-nav__list > li:focus-within > .sub-menu {
		display: none;
	}

	.global-nav__list > li.is-open > .sub-menu {
		display: block;
	}

	.global-nav .sub-menu a {
		padding-left: 28px;
		background: var(--color-ink);
	}

	.global-nav__toggle {
		position: absolute;
		top: 1px;
		right: 0;
		z-index: 9;
		display: block;
		width: 60px;
		height: 49px;
		padding: 0;
		cursor: pointer;
		background: none;
		border: 0;
	}

	.global-nav__toggle::before {
		content: "+";
		display: block;
		width: 20px;
		height: 20px;
		margin: 0 auto;
		font-size: 13px;
		line-height: 20px;
		color: #aaa;
		border: 1px solid #555;
		border-radius: 50%;
	}

	.global-nav__toggle:hover::before,
	.global-nav__toggle[aria-expanded="true"]::before {
		color: var(--color-white);
		border-color: var(--color-white);
	}

	/* 見出し画像 */
	.page-hero {
		height: 200px;
		overflow: hidden;
	}

	.page-hero__image {
		width: auto;
		max-width: none;
		height: 200px;
	}

	.page-hero__caption {
		padding: 0 var(--gutter-sp);
	}

	.page-hero__title {
		font-size: 28px;
		line-height: 1.6;
	}

	.page-hero--no-image {
		height: 150px;
	}

	/* パンくず */
	.breadcrumb {
		height: var(--crumb-height-sp);
		overflow: hidden;
	}

	.breadcrumb__list {
		margin: 0 var(--gutter-sp);
		font-size: var(--fs-xs);
	}

	.breadcrumb__item--home .breadcrumb__link,
	.breadcrumb__item--home .breadcrumb__link::before {
		width: 10px;
		height: 10px;
	}

	/* 本文の枠 */
	.l-container,
	.l-container--main {
		margin: 0;
		padding: 30px var(--gutter-sp);
	}

	.l-narrow {
		width: auto;
	}

	/* フッター: バナー → ロゴ → SNS の順に並べ替え、全体を薄い灰色にする */
	.site-footer {
		display: flex;
		flex-direction: column;
		background: var(--color-surface);
	}

	.site-footer__top,
	.site-footer__bottom {
		display: contents;
	}

	.site-footer__banner {
		order: 1;
		width: 100%;
		margin: 30px 0 0;
	}

	.site-footer__banner img {
		box-sizing: content-box; /* 旧テーマと同じく、幅 90% の外側に余白 2% */
		width: 90%;
		margin: 0 auto 7px;
		padding: 2%;
	}

	.site-footer__logo {
		order: 2;
		margin: 0 0 10px;
	}

	.social-links {
		order: 3;
		height: auto;
		padding: 0 0 37px;
	}

	.footer-nav {
		display: none;
	}

	.site-footer__copyright {
		order: 4;
	}
}

@media (max-width: 485px) {
	.page-hero__title {
		font-size: 20px;
	}
}
