/* JapanBiz header v2 + home hero (2026-11) */
:root {
	--jb-navy: #1b2a4a;
	--jb-red: #d42a3c;
	--jb-red-dark: #b51f30;
	--jb-text: #1f2937;
	--jb-line: #e5e7eb;
}

/* Wider site: theme default container was 1030px */
@media (min-width: 1200px) {
	body .container { width: 100% !important; max-width: 1440px; padding-left: 40px; padding-right: 40px; }
}

/* old header was fixed and pushed content down; new header is sticky */
.site-main { margin-top: 0 !important; }

.jb-header,
.jb-hero-wrap { font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

.jb-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	border-top: 4px solid var(--jb-navy);
	border-bottom: 1px solid var(--jb-line);
}
.admin-bar .jb-header { top: 32px; }
.jb-header__row {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: 84px;
}
.jb-header__logo { flex: 0 0 auto; }
.jb-header__logo img { display: block; max-height: 52px; width: auto; }

/* Nav */
.jb-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.jb-nav__list,
.jb-nav__list ul { list-style: none; margin: 0; padding: 0; }
.jb-nav__list { display: flex; align-items: center; gap: 28px; }
.jb-nav__list > li { position: relative; }
.jb-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 30px 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--jb-navy);
	text-decoration: none;
	white-space: nowrap;
}
.jb-nav__list > li.menu-item-has-children > a::after {
	content: "";
	width: 6px; height: 6px;
	margin: 6px 0 0 4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: .6;
	align-self: flex-end;
	margin-bottom: 4px;
}
.jb-nav__list > li > a:hover,
.jb-nav__list > li.current-menu-item > a,
.jb-nav__list > li.current-menu-ancestor > a { color: var(--jb-red); }

.jb-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 240px;
	background: #fff;
	border: 1px solid var(--jb-line);
	border-top: 3px solid var(--jb-red);
	border-radius: 0 0 8px 8px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.jb-nav__list > li:hover > .sub-menu,
.jb-nav__list > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
/* Hidden dropdowns of neighbouring items must never catch the mouse,
   and the open one sits above its neighbours. */
.jb-nav__list > li > .sub-menu { pointer-events: none; z-index: 30; }
.jb-nav__list > li:hover > .sub-menu,
.jb-nav__list > li:focus-within > .sub-menu { pointer-events: auto; }
.jb-nav__list > li:hover,
.jb-nav__list > li:focus-within { z-index: 40; }
/* While the mouse is on the menu, only the hovered item's dropdown shows
   (a keyboard-focused item must not stay open underneath). */
@media (min-width: 992px) {
	.jb-nav__list:hover > li:not(:hover) > .sub-menu { opacity: 0; visibility: hidden; pointer-events: none; }
	.jb-nav__list:hover > li:not(:hover) { z-index: auto; }
}
.jb-nav__list > li:not(:hover):not(:focus-within) > .sub-menu { transition: opacity .12s, transform .12s, visibility 0s linear .12s; }
.jb-nav .sub-menu a {
	display: block;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--jb-text);
	text-decoration: none;
}
.jb-nav .sub-menu a:hover { background: #f8f1f2; color: var(--jb-red); }
.jb-sub-toggle { display: none; }

/* Mega menu (top item with class jb-mega) */
@media (min-width: 992px) {
	.jb-header .container { position: relative; }
	.jb-nav__list > li.jb-mega { position: static; }
	.jb-nav__list > li.jb-mega > .sub-menu {
		left: 15px; right: 15px; min-width: 0;
		display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
		padding: 28px 32px 30px;
		border-top: 1px solid var(--jb-line);
		border-radius: 0 0 10px 10px;
	}
	.jb-nav__list > li.jb-mega > .sub-menu > li > a {
		padding: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--jb-navy); background: none;
	}
	.jb-nav__list > li.jb-mega > .sub-menu > li > a:hover { color: var(--jb-red); background: none; }
	.jb-nav .sub-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		border: 0; box-shadow: none; border-radius: 0; padding: 0; min-width: 0; background: none;
	}
	.jb-nav .sub-menu .sub-menu a { padding: 6px 0; font-size: 14px; font-weight: 400; color: #374151; }
	.jb-nav .sub-menu .sub-menu a:hover { background: none; color: var(--jb-red); }
	.jb-nav__list > li.jb-mega > .sub-menu > li.jb-mega-cta > a { padding: 0; display: flex; flex-direction: column; gap: 10px; }
}
.jb-mega-cta__h { font-size: 15px; font-weight: 700; color: var(--jb-navy); }
.jb-mega-cta__d { font-size: 13.5px; font-weight: 400; color: #6b7280; }
.jb-mega-cta__btn { margin-top: 8px; width: 100%; box-sizing: border-box; }
.jb-mega-cta > a:hover .jb-mega-cta__btn { background: var(--jb-red-dark); }

@media (min-width: 992px) {
	/* 4-column mega: compact, opens under its own item */
	.jb-nav__list > li.jb-mega { position: relative; }
	.jb-nav__list > li.jb-mega > .sub-menu { left: -32px; right: auto; width: 860px; max-width: calc(100vw - 32px); gap: 28px; }
	.jb-nav__list > li.jb-mega--2 { position: relative; }
	.jb-nav__list > li.jb-mega--2 > .sub-menu {
		grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px;
		left: -32px; right: auto; width: 600px; max-width: calc(100vw - 32px);
		border-radius: 0 0 10px 10px;
	}
}

/* Buttons */
.jb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 22px;
	background: var(--jb-red);
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	border-radius: 6px;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(212, 42, 60, .25);
	transition: background .15s, transform .15s;
	white-space: nowrap;
}
.jb-btn:hover { background: var(--jb-red-dark); transform: translateY(-1px); }
.jb-header__cta { flex: 0 0 auto; }
.jb-nav__cta-mobile { display: none; }

/* Burger */
.jb-burger { display: none; margin-left: auto; width: 42px; height: 42px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.jb-burger span { display: block; height: 2px; margin: 5px 0; background: var(--jb-navy); transition: transform .2s, opacity .2s; }
.jb-header.is-open .jb-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jb-header.is-open .jb-burger span:nth-child(2) { opacity: 0; }
.jb-header.is-open .jb-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.jb-hero-wrap { padding: 28px 0 36px; }
.jb-hero {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background-color: var(--jb-navy);
	background-size: cover;
	background-position: center 60%;
	min-height: 300px;
	display: flex;
	align-items: center;
}
.jb-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(20, 32, 60, .92) 0%, rgba(20, 32, 60, .78) 45%, rgba(20, 32, 60, .45) 100%);
}
.jb-hero__inner { position: relative; padding: 40px 30px; max-width: 680px; }
.jb-hero__eyebrow {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #f6b6bd;
}
.jb-hero__title {
	margin: 0 0 16px;
	font-size: 34px;
	line-height: 1.3;
	font-weight: 700;
	color: #fff;
}
.jb-hero__desc { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .9); max-width: 480px; }
.jb-hero__btns { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.jb-hero__btns .jb-btn { padding: 13px 24px; font-size: 16px; border-radius: 8px; }

/* Tablet / mobile */
@media (max-width: 1100px) {
	.jb-nav__list { gap: 18px; }
	.jb-nav__list > li > a { font-size: 14px; }
	.jb-header__row { gap: 20px; }
}
@media (max-width: 991px) {
	.jb-header__row { min-height: 68px; gap: 12px; }
	.jb-header__logo img { max-height: 42px; }
	.jb-header__cta { display: none; }
	.jb-burger { display: block; }
	.jb-nav {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 100%;
		flex-direction: column;
		background: #fff;
		border-bottom: 1px solid var(--jb-line);
		box-shadow: 0 12px 24px rgba(15, 23, 42, .1);
		padding: 8px 16px 20px;
		max-height: calc(100vh - 72px);
		overflow-y: auto;
	}
	.jb-header.is-open .jb-nav { display: flex; }
	.jb-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.jb-nav__list > li { border-bottom: 1px solid var(--jb-line); display: flex; flex-wrap: wrap; align-items: center; }
	.jb-nav__list > li > a { padding: 14px 0; flex: 1; }
	.jb-nav__list > li.menu-item-has-children > a::after { display: none; }
	.jb-sub-toggle {
		display: block; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative;
	}
	.jb-sub-toggle::before {
		content: ""; position: absolute; left: 16px; top: 14px; width: 8px; height: 8px;
		border-right: 2px solid var(--jb-navy); border-bottom: 2px solid var(--jb-navy); transform: rotate(45deg); transition: transform .2s;
	}
	.is-sub-open > .jb-sub-toggle::before { transform: rotate(-135deg); top: 18px; }
	.jb-nav .sub-menu {
		position: static; flex-basis: 100%; display: none; opacity: 1; visibility: visible; transform: none;
		border: 0; box-shadow: none; padding: 0 0 8px 12px; min-width: 0;
	}
	.jb-nav .is-sub-open > .sub-menu { display: block; }
	.jb-nav__list > li:hover > .sub-menu { display: none; }
	.jb-nav .is-sub-open:hover > .sub-menu { display: block; }
	.jb-nav__cta-mobile { display: inline-flex; margin-top: 16px; align-self: flex-start; }
	.jb-nav .sub-menu .sub-menu { display: block !important; padding: 0 0 6px 12px; }
	.jb-nav .sub-menu .jb-sub-toggle { display: none; }
	.jb-nav__list > li.jb-mega > .sub-menu > li > a { font-weight: 700; color: var(--jb-navy); }
	.jb-nav .jb-mega-cta { display: none; }

	.jb-hero { min-height: 0; }
	.jb-hero__inner { padding: 32px 22px; }
	.jb-hero__title { font-size: 26px; }
}
@media (max-width: 600px) {
	.admin-bar .jb-header { top: 0; }
	.jb-hero-wrap { padding: 16px 0 24px; }
	.jb-hero__title { font-size: 22px; }
	.jb-hero__desc { font-size: 14px; }
	.jb-hero__btns { gap: 12px; }
	.jb-hero__btns .jb-btn { flex: 1 1 100%; }
}
