/*
 * Kawara Shared Header CSS
 * - .hdr-cta-* 系の中身のスタイルは「テーマ追加CSS (wp-custom-css)」がそのまま効くので、ここでは扱わない。
 * - このCSSは「ヘッダー全体の骨組み（sticky/flex/SPハンバーガー/ドロワー）」だけを担当する。
 */

.ks-header {
	background: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 0;
	z-index: 1000;
}
.ks-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 8px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.ks-header__logo a {
	display: inline-block;
	line-height: 0;
}
.ks-header__logo img {
	max-height: 56px;
	width: auto;
	display: block;
}
.ks-header__cta {
	display: flex;
	align-items: center;
}

/* --- Hamburger button (SP) --- */
.ks-header__hamburger {
	display: none;
	width: 44px;
	height: 44px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
}
.ks-hamburger-bar {
	width: 24px;
	height: 2px;
	background: #333;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.ks-header__hamburger[aria-expanded="true"] .ks-hamburger-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.ks-header__hamburger[aria-expanded="true"] .ks-hamburger-bar:nth-child(2) {
	opacity: 0;
}
.ks-header__hamburger[aria-expanded="true"] .ks-hamburger-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* --- Drawer --- */
.ks-header__drawer {
	display: none;
	position: fixed;
	top: 64px;
	right: 0;
	left: 0;
	background: #fff;
	border-top: 1px solid #eee;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
	z-index: 999;
	max-height: calc(100vh - 64px);
	overflow-y: auto;
}
.ks-header__drawer[aria-hidden="false"] {
	display: block;
}
.ks-drawer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ks-drawer-menu li {
	border-bottom: 1px solid #f0f0f0;
}
.ks-drawer-menu a {
	display: block;
	padding: 16px 20px;
	color: #1d2327;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}
.ks-drawer-menu a:active,
.ks-drawer-menu a:hover {
	background: #f7f7f7;
}
.ks-drawer-cta {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	padding: 16px 20px;
	background: #f8f8f8;
}
.ks-drawer-cta a {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 15px;
	font-weight: 700;
	gap: 8px;
}
.ks-drawer-cta-tel  { background: #fff8e0; color: #cb9800; }
.ks-drawer-cta-line { background: #06c755; color: #fff; }
.ks-drawer-cta-form { background: #f39800; color: #fff; }

/* --- Overlay --- */
.ks-drawer-overlay {
	position: fixed;
	inset: 64px 0 0 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 998;
}

/* --- ドロワーオープン時のbodyロック --- */
body.ks-drawer-open {
	overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 959px) {
	.ks-header__inner {
		padding: 6px 14px;
	}
	.ks-header__cta {
		display: none;
	}
	.ks-header__hamburger {
		display: inline-flex;
	}
	.ks-header__logo img {
		max-height: 44px;
	}
	.ks-header__drawer,
	.ks-drawer-overlay {
		top: 56px;
	}
	.ks-drawer-overlay {
		inset: 56px 0 0 0;
	}
}

/* --- Breadcrumb（ヘッダー直下に表示、最後の項目=H1） --- */
.ks-breadcrumb {
	background: #f5f3ef;
	padding: 10px 20px;
	font-size: 13px;
	line-height: 1.5;
}
.ks-breadcrumb-list {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	padding: 0;
	gap: 0;
}
.ks-breadcrumb-list li {
	display: inline-flex;
	align-items: center;
}
.ks-breadcrumb-list li:not(:last-child)::after {
	content: '›';
	margin: 0 10px;
	color: #999;
	font-size: 14px;
}
.ks-breadcrumb-list a {
	color: #c4883a;
	text-decoration: none;
}
.ks-breadcrumb-list a:hover {
	text-decoration: underline;
}
/* パンくず最後の項目を兼ねたH1: 見た目はパンくずのテキストと同等 */
.ks-breadcrumb-h1 {
	display: inline;
	font-size: inherit;
	font-weight: normal;
	font-family: inherit;
	line-height: inherit;
	color: #666;
	margin: 0;
	padding: 0;
}

@media (max-width: 768px) {
	.ks-breadcrumb {
		padding: 8px 14px;
		font-size: 12px;
	}
	.ks-breadcrumb-list li:not(:last-child)::after {
		margin: 0 6px;
	}
}
