/* ======================================
   Header - 移管元サイト完全一致
   2重構造: site-header > header-inner > header-container
   ====================================== */

/* リセット */
.site-header ul,
.site-header li {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ------------------------------------------------------------
   共通フォント（トップページ以外）
   - Contact と同じ: Zen Maru Gothic
   ※ トップは front-page.css がセクション単位で別フォントをスコープしているため除外
   ------------------------------------------------------------ */
body:not(.kotomachi--front-page) {
	font-family: "Zen Maru Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif !important;
}

/* トップページも header だけは共通フォントに揃える */
body.kotomachi--front-page .site-header {
	font-family: "Zen Maru Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
}

/* ページ個別CSSの font-family を上書きして統一（アイコン系は除外して別指定） */
body:not(.kotomachi--front-page) :where(
	h1, h2, h3, h4, h5, h6,
	p, a, span, li, dt, dd, th, td, label, small, strong, em,
	button, input, select, textarea
) {
	font-family: inherit !important;
}

body:not(.kotomachi--front-page) .material-icons {
	font-family: "Material Icons" !important;
}

body:not(.kotomachi--front-page) button,
body:not(.kotomachi--front-page) input,
body:not(.kotomachi--front-page) select,
body:not(.kotomachi--front-page) textarea,
body:not(.kotomachi--front-page) .wp-element-button,
body:not(.kotomachi--front-page) .wp-block-button__link {
	font-family: "Zen Maru Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif !important;
}

/* site-header: 固定・透明背景（白バー位置: margin-top 34px） */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	margin-top: 34px;
	padding-top: 0;
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 0;
	background: transparent;
	z-index: 1000;
	box-sizing: border-box;
	height: auto;
}

/*
 * header-inner: 白バー（DevTools実測）
 * width 1452px / min-height 65.33px / padding 0 32px
 */
.header-inner {
	width: 1452px;
	max-width: calc(100% - 48px);
	min-height: 65.33px;
	margin: 0 auto;
	padding: 0 32px;
	background: #ffffff;
	border-radius: 96px;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* header-container: 内側レイアウト（白背景は header-inner に集約） */
.header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
	height: auto;
	min-height: inherit;
	box-sizing: border-box;
}

/* ロゴ */
.header-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-right: 36px;
}

.header-logo img {
	width: 288px;
	height: auto;
	max-width: 100%;
	aspect-ratio: 288 / 65.33;
	object-fit: contain;
}

/* header-content: navとactionsを右端にまとめる */
.header-content {
	display: flex;
	align-items: center;
	gap: 32px;
	flex: 1;
	justify-content: flex-end;
	min-width: 0;
}

/* ナビゲーション（右寄せ：auto margin を外して nav + actions を一塊に） */
.header-nav {
	display: flex;
	align-items: center;
	margin-left: 0;
	margin-right: 0;
	flex-shrink: 0;
}

.header-nav-menu {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.header-nav-menu .menu-item {
	margin: 0;
	padding: 0;
}

.header-nav-link {
	display: inline-flex;
	align-items: center;
	color: #000000;
	text-decoration: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 32px;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.header-nav-link:hover {
	color: #2F8F6B;
}

/* 右側ボタンエリア（actions） */
.header-actions {
	display: flex;
	gap: 14px;
	align-items: center;
	flex-shrink: 0;
}

.header-button {
	height: 36px;
	padding: 0 18px;
	border-radius: 9999px;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	text-decoration: none;
	font-family: inherit;
	font-weight: 600;
	line-height: 1;
	border: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: all 0.2s ease;
}

.header-button:hover {
	opacity: 0.85;
}

/* よくある質問 */
.header-button-faq {
	background-color: #F3E6C8;
	color: #6B5B3E;
}

/* お問い合わせ */
.header-button-contact {
	background-color: #16A172;
	color: #FFFFFF;
}

/* ハンバーガーボタン（1240px以下で表示・1241px以上は非表示） */
.header-hamburger {
	display: none;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	box-sizing: border-box;
	z-index: 1001;
}

.hamburger-line {
	width: 22px;
	height: 2px;
	background-color: #333;
	border-radius: 1px;
	transition: all 0.3s ease;
	display: block;
}

.header-hamburger.is-active .hamburger-line:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

.header-hamburger.is-active .hamburger-line:nth-child(2) {
	opacity: 0;
}

.header-hamburger.is-active .hamburger-line:nth-child(3) {
	transform: rotate(-45deg) translate(6px, -6px);
}

/* ======================================
   Responsive: 840px以下はヘッダーバー縮小 + ハンバーガー
   ====================================== */

@media screen and (max-width: 840px) {
	/* 左右 16px は site-header の padding。白バーは親の content 幅に収める（100% + min-width:0 で横膨張防止） */
	.site-header {
		margin-top: 12px;
		padding-left: 16px;
		padding-right: 16px;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		overflow-x: visible;
	}

	.header-inner {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 0 auto;
		padding: 0 16px;
		min-height: 72px;
		border-radius: 96px;
		box-sizing: border-box;
	}

	.header-container {
		position: relative;
		width: 100%;
		max-width: none;
		min-width: 0;
		padding: 0;
		min-height: inherit;
		height: auto;
	}

	.header-logo {
		min-width: 0;
		max-width: calc(100% - 52px);
		flex-shrink: 1;
	}

	.header-logo img {
		width: 288px;
		max-width: 100%;
		height: auto;
		aspect-ratio: 288 / 65.33;
		object-fit: contain;
	}

	.header-hamburger {
		display: flex;
		margin-left: auto;
		flex-shrink: 0;
	}

	.header-content {
		display: none;
	}
}

/* 841〜1240px：ナビはハンバーガー＋オーバーレイ（ヘッダーバーはPCベースのまま） */
@media screen and (min-width: 841px) and (max-width: 1240px) {
	.header-hamburger {
		display: flex;
		margin-left: auto;
	}

	.header-content {
		display: none;
	}
}

/* bodyスクロール禁止（モーダル開時） */
body.header-modal-open {
	overflow: hidden;
	height: 100%;
}

/* ======================================
   SPメニューオーバーレイ
   ====================================== */

.menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: #F9F3EF;
	z-index: 1000;

	display: none;
	flex-direction: column;
	padding: 80px 32px 40px;
	box-sizing: border-box;

	font-family: "Tsukushi A Round Gothic", sans-serif;
}

.menu-overlay.is-open {
	display: flex;
}

/* メニュー */
.menu-list {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
}

/* 各項目 */
.menu-overlay .menu-item {
	font-size: 16px;
	color: #544631;
	padding: 16px 0;
	border-bottom: 1px solid #E5CFAF;
	text-decoration: none;
}

.menu-overlay .menu-item:hover {
	color: #2F8F6B;
}

/* TOP（先頭リンク）：左寄せ */
.menu-overlay .menu-item:first-child {
	text-align: left;
	margin-bottom: 16px;
}

/* 閉じるボタン */
.menu-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid #544631;
	background: transparent;
	cursor: pointer;

	display: flex;
	align-items: center;
	justify-content: center;

	font-size: 18px;
	color: #544631;
}

/* Instagram：「サイト利用規約」直下（下線は最終 .menu-item の border-bottom） */
.menu-footer {
	margin-top: 0;
	padding-top: 16px;
	display: flex;
	justify-content: center;
	flex: 0 0 auto;
}

.menu-footer a {
	color: #544631;
	text-decoration: none;
	border: none;
}

.menu-footer a:hover,
.menu-footer a:focus,
.menu-footer a:active {
	text-decoration: none;
}

/* インスタ */
.menu-footer img {
	width: 24px;
	height: 24px;
}

.menu-footer .fa-brands {
	width: 28px;
	height: 32px;
	font-size: 28px;
	line-height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 1241px以上ではオーバーレイを常に非表示（横並びナビ表示） */
@media screen and (min-width: 1241px) {
	.menu-overlay {
		display: none !important;
	}
}

@media screen and (max-width: 480px) {
	/* 840px ブロックの padding 16px と整合（20px だと内幅 + 親 padding で計算が膨らむ） */
	.header-inner {
		padding: 0 16px;
	}
}

/* 〜420px：ハンバーガーはやや小さめ（白バー寸法は下記 540px に任せる） */
@media screen and (max-width: 420px) {
	.header-hamburger {
		width: 40px;
		height: 40px;
		padding: 6px;
		flex-shrink: 0;
	}

	.hamburger-line {
		width: 20px;
	}
}

/* 1240px以下（ハンバーガー表示時）：ロゴ 180×42・ハンバーガーをやや左へ */
@media screen and (max-width: 1240px) {
	.header-logo {
		margin-right: 0;
		min-width: 0;
		max-width: calc(100% - 60px);
	}

	.header-logo img {
		width: 180px;
		height: 42px;
		max-width: min(180px, 100%);
		aspect-ratio: 180 / 42;
		object-fit: contain;
	}

	.header-hamburger {
		margin-left: auto;
		margin-right: 4px;
		flex-shrink: 0;
	}
}

/* 太字は親のフォントサイズより 2px 大きく（全ページ） */
strong,
b {
	font-size: calc(1em + 2px) !important;
}
