/* MITEOKU Global Header & Footer v1.0.1 */

:root {
	--mtk-chrome-bg: #ffffff;
	--mtk-chrome-page: #f7f7f8;
	--mtk-chrome-soft: #f3f3f4;
	--mtk-chrome-text: #202123;
	--mtk-chrome-muted: #6b6b73;
	--mtk-chrome-faint: #96969d;
	--mtk-chrome-line: #e5e5e8;
	--mtk-chrome-accent: #b0413e;
	--mtk-chrome-max: 1200px;
}

/* Hide Kadence's native chrome while this plugin is active. */
body.mtk-global-chrome-active #masthead,
body.mtk-global-chrome-active header#masthead,
body.mtk-global-chrome-active .site-header:not(.mtk-global-header),
body.mtk-global-chrome-active #colophon,
body.mtk-global-chrome-active footer#colophon,
body.mtk-global-chrome-active .site-footer:not(.mtk-global-footer) {
	display: none !important;
}

/* Header */
.mtk-global-header {
	position: sticky;
	top: 0;
	z-index: 999;
	width: 100%;
	background: rgba(255,255,255,.96);
	border-bottom: 1px solid var(--mtk-chrome-line);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--mtk-chrome-text);
	font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-bar .mtk-global-header {
	top: 32px;
}

.mtk-global-header * {
	box-sizing: border-box;
}

.mtk-global-header a {
	text-decoration: none;
}

.mtk-global-header-inner {
	max-width: var(--mtk-chrome-max);
	min-height: 72px;
	margin: 0 auto;
	padding: 0 40px;
	display: flex;
	align-items: center;
	gap: 40px;
}

.mtk-global-brand {
	flex: 0 0 auto;
	display: inline-flex;
	flex-direction: column;
	color: var(--mtk-chrome-text) !important;
	line-height: 1;
}

.mtk-global-logo {
	font-size: 22px;
	font-weight: 900;
	letter-spacing: .08em;
}

.mtk-global-tagline {
	margin-top: 6px;
	color: #A2A2A8;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .04em;
}

.mtk-global-nav {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 30px;
}

.mtk-global-nav-link {
	position: relative;
	padding: 26px 0 25px;
	color: #3f3f44 !important;
	font-size: 13.5px;
	font-weight: 500;
	white-space: nowrap;
	transition: color .18s ease;
}

.mtk-global-nav-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 18px;
	height: 1px;
	background: var(--mtk-chrome-accent);
	transition: right .18s ease;
}

.mtk-global-nav-link:hover,
.mtk-global-nav-link.is-active {
	color: var(--mtk-chrome-accent) !important;
}

.mtk-global-nav-link:hover::after,
.mtk-global-nav-link.is-active::after {
	right: 0;
}

.mtk-global-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mtk-global-icon-button {
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #4a4a4f;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.mtk-global-icon-button:hover {
	color: var(--mtk-chrome-accent);
}

.mtk-search-toggle svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
}

.mtk-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
}

.mtk-menu-toggle span {
	display: block;
	width: 22px;
	height: 1.5px;
	background: currentColor;
	transition: transform .18s ease, opacity .18s ease;
}

.mtk-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}
.mtk-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.mtk-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

/* Search panel */
.mtk-search-panel {
	border-top: 1px solid var(--mtk-chrome-line);
	background: #fff;
}

.mtk-search-panel[hidden] {
	display: none !important;
}

.mtk-search-panel-inner {
	max-width: var(--mtk-chrome-max);
	margin: 0 auto;
	padding: 22px 40px 24px;
}

.mtk-search-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	max-width: 640px;
	margin-left: auto;
}

.mtk-search-form input {
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--mtk-chrome-line);
	border-radius: 2px;
	background: #f8f8f9;
	color: var(--mtk-chrome-text);
	font: inherit;
	font-size: 14px;
	outline: none;
}

.mtk-search-form input:focus {
	border-color: #bdbdc3;
	background: #fff;
	box-shadow: 0 0 0 2px rgba(176,65,62,.08);
}

.mtk-search-form button {
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 2px;
	background: var(--mtk-chrome-text);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.mtk-search-form button:hover {
	background: #343438;
}

/* Mobile menu */
.mtk-mobile-menu {
	display: none;
	border-top: 1px solid var(--mtk-chrome-line);
	background: #fff;
}

.mtk-mobile-menu[hidden] {
	display: none !important;
}

.mtk-mobile-menu-inner {
	padding: 6px 20px 18px;
}

.mtk-mobile-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 0;
	border-bottom: 1px solid #efeff1;
	color: #333338 !important;
	font-size: 14px;
	font-weight: 600;
}

.mtk-mobile-menu a:last-child {
	border-bottom: 0;
}

.mtk-mobile-menu a:hover,
.mtk-mobile-menu a.is-active {
	color: var(--mtk-chrome-accent) !important;
}

.mtk-mobile-menu a span {
	color: var(--mtk-chrome-accent);
}

/* Footer */
.mtk-global-footer {
	margin: 0;
	padding: 56px 40px 24px;
	border-top: 1px solid var(--mtk-chrome-line);
	background: var(--mtk-chrome-soft);
	color: var(--mtk-chrome-text);
	font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mtk-global-footer * {
	box-sizing: border-box;
}

.mtk-global-footer a {
	text-decoration: none;
}

.mtk-global-footer-inner {
	max-width: var(--mtk-chrome-max);
	margin: 0 auto;
}

.mtk-footer-top {
	display: grid;
	grid-template-columns: minmax(240px, .85fr) minmax(0, 1.6fr);
	gap: 72px;
	align-items: start;
}

.mtk-footer-brand {
	max-width: 275px;
}

.mtk-footer-logo {
	color: var(--mtk-chrome-text) !important;
	font-size: 24px;
	font-weight: 900;
	letter-spacing: .08em;
}

.mtk-footer-brand > p:first-of-type {
	margin: 9px 0 0;
	color: #55565d;
	font-size: 12px;
	font-weight: 600;
}

.mtk-footer-brand-copy {
	margin: 16px 0 0 !important;
	color: var(--mtk-chrome-muted);
	font-size: 12.5px;
	line-height: 1.85;
}

.mtk-footer-nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 34px;
}

.mtk-footer-col h2 {
	margin: 0 0 14px;
	color: var(--mtk-chrome-faint);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
}

.mtk-footer-col a {
	display: block;
	margin: 0 0 9px;
	color: #4f4f55 !important;
	font-size: 12.5px;
	line-height: 1.6;
}

.mtk-footer-col a:hover {
	color: var(--mtk-chrome-accent) !important;
}


.mtk-footer-accordion-toggle {
	display: none;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mtk-chrome-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mtk-footer-accordion-panel {
	display: block;
}

.mtk-footer-bottom {
	margin-top: 40px;
	padding-top: 18px;
	border-top: 1px solid #dedee2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	color: #8c8c93;
	font-size: 11px;
}

.mtk-footer-bottom a {
	color: #8c8c93 !important;
}

.mtk-footer-bottom a:hover {
	color: var(--mtk-chrome-accent) !important;
}

/* Keep Kadence / WP wrappers from adding footer gaps after hidden native footer. */
body.mtk-global-chrome-active .site {
	min-height: 0;
}

/* Accessibility helper, if the theme does not already define it. */
.mtk-global-header .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

/* Tablet / mobile */
@media (max-width: 1020px) {
	.mtk-global-header-inner {
		padding: 0 24px;
		gap: 24px;
	}

	.mtk-global-nav {
		gap: 20px;
	}

	.mtk-global-nav-link {
		font-size: 12.5px;
	}
}

@media (max-width: 860px) {
	.mtk-global-header-inner {
		min-height: 68px;
		padding: 0 20px;
	}

	.mtk-global-nav {
		display: none;
	}

	.mtk-global-actions {
		margin-left: auto;
	}

	.mtk-menu-toggle {
		display: inline-flex;
	}

	.mtk-mobile-menu {
		display: block;
	}

	.mtk-search-panel-inner {
		padding: 18px 20px 20px;
	}

	.mtk-search-form {
		max-width: none;
		margin-left: 0;
	}

	.mtk-global-footer {
		padding: 56px 20px 24px;
	}

	.mtk-footer-top {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.mtk-footer-brand {
		max-width: 420px;
	}

	.mtk-footer-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 34px 28px;
	}
}

@media (max-width: 782px) {
	.admin-bar .mtk-global-header {
		top: 46px;
	}
}

@media (max-width: 540px) {
	.mtk-global-logo {
		font-size: 20px;
	}

	.mtk-global-tagline {
		font-size: 9px;
	}

	.mtk-global-icon-button {
		width: 34px;
		height: 34px;
	}

	.mtk-search-form {
		grid-template-columns: 1fr;
	}

	.mtk-footer-nav {
		grid-template-columns: 1fr;
	}

	.mtk-footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		margin-top: 24px;
		padding-top: 16px;
	}
}
