:root {
	--ibvp-header-bg: #ffffff;
	--ibvp-header-text: #1a4262;
	--ibvp-header-max: 1200px;
	--ibvp-header-height: 92px;
}

body.ibvp-has-site-header {
	--ibvp-header-offset: var(--ibvp-header-height);
}

.ibvp-header {
	position: relative;
	z-index: 1000;
	background: var(--ibvp-header-bg);
	border-bottom: 1px solid rgba(26, 66, 98, 0.08);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
	font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.ibvp-header__inner {
	box-sizing: border-box;
	max-width: var(--ibvp-header-max);
	margin: 0 auto;
	padding: 0.85rem 1.5rem;
	min-height: var(--ibvp-header-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.ibvp-header__brand {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	color: var(--ibvp-header-text);
	text-decoration: none;
	min-width: 0;
}

.ibvp-header__brand:hover,
.ibvp-header__brand:focus-visible {
	color: var(--ibvp-header-text);
	text-decoration: none;
}

.ibvp-header__logo {
	flex: 0 0 auto;
	width: 72px;
	height: auto;
	display: block;
}

.ibvp-header__title {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	font-size: clamp(1.15rem, 2.2vw, 1.65rem);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.ibvp-header__title-line {
	display: block;
	white-space: nowrap;
}

.ibvp-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--ibvp-header-text);
}

.ibvp-header__toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.ibvp-header__nav {
	display: flex;
	align-items: center;
}

.ibvp-header__menu {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ibvp-header__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #121511;
	font-size: 0.98rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.ibvp-header__link-icon {
	flex: 0 0 auto;
	display: block;
}

.ibvp-header__link:hover,
.ibvp-header__link:focus-visible {
	color: var(--ibvp-header-text);
	text-decoration: none;
}

.ibvp-header__link[aria-current="page"] {
	color: var(--ibvp-header-text);
	font-weight: 600;
}

.ibvp-header__menu-item--has-submenu {
	position: relative;
}

.ibvp-header__submenu-toggle {
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
}

.ibvp-header__submenu-chevron {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.ibvp-header__menu-item--has-submenu.is-open .ibvp-header__submenu-chevron,
.ibvp-header__menu-item--has-submenu:hover .ibvp-header__submenu-chevron,
.ibvp-header__menu-item--has-submenu:focus-within .ibvp-header__submenu-chevron {
	transform: rotate(180deg);
}

.ibvp-header__submenu {
	display: none;
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	min-width: 11.5rem;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	background: var(--ibvp-header-bg);
	border: 1px solid rgba(26, 66, 98, 0.1);
	border-radius: 0.5rem;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.ibvp-header__menu-item--has-submenu.is-open .ibvp-header__submenu,
.ibvp-header__menu-item--has-submenu:hover .ibvp-header__submenu,
.ibvp-header__menu-item--has-submenu:focus-within .ibvp-header__submenu {
	display: block;
}

.ibvp-header__submenu-link {
	display: block;
	padding: 0.65rem 1rem;
	color: #121511;
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.ibvp-header__submenu-link:hover,
.ibvp-header__submenu-link:focus-visible {
	color: var(--ibvp-header-text);
	background: rgba(26, 66, 98, 0.05);
	text-decoration: none;
}

.ibvp-header__submenu-link[aria-current="page"] {
	color: var(--ibvp-header-text);
	font-weight: 600;
	background: rgba(26, 66, 98, 0.06);
}

.ibvp-header__menu-item--has-submenu.is-active > .ibvp-header__submenu-toggle {
	color: var(--ibvp-header-text);
	font-weight: 600;
}

/* Brizy: la primera sección tenía margen negativo para solaparse con un header anterior */
body.ibvp-has-site-header.brz .brz-root__container > .brz-section:first-child {
	margin-top: 0 !important;
}

body.ibvp-has-article-header.brz .brz-root__container > .brz-section:first-child,
body.single-post.brz .brz-root__container > .brz-section:first-child {
	margin-top: 0 !important;
}

@media (min-width: 768px) {
	.ibvp-header__logo {
		width: 92px;
	}
}

@media (max-width: 767px) {
	:root {
		--ibvp-header-height: 76px;
	}

	.ibvp-header__inner {
		padding: 0.65rem 1rem;
	}

	.ibvp-header__toggle {
		display: flex;
	}

	.ibvp-header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		background: var(--ibvp-header-bg);
		border-bottom: 1px solid rgba(26, 66, 98, 0.08);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	}

	.ibvp-header__nav.is-open {
		display: block;
	}

	.ibvp-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.5rem 0 0.75rem;
	}

	.ibvp-header__menu-item {
		border-top: 1px solid rgba(26, 66, 98, 0.06);
	}

	.ibvp-header__link {
		display: block;
		padding: 0.85rem 1.25rem;
		white-space: normal;
	}

	.ibvp-header__submenu-toggle {
		width: 100%;
		justify-content: space-between;
		text-align: left;
	}

	.ibvp-header__submenu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: rgba(26, 66, 98, 0.03);
	}

	.ibvp-header__menu-item--has-submenu.is-open .ibvp-header__submenu {
		display: block;
	}

	.ibvp-header__submenu-link {
		padding: 0.75rem 1.25rem 0.75rem 2rem;
		white-space: normal;
	}

	.ibvp-header.is-menu-open .ibvp-header__toggle-bar:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.ibvp-header.is-menu-open .ibvp-header__toggle-bar:nth-child(2) {
		opacity: 0;
	}

	.ibvp-header.is-menu-open .ibvp-header__toggle-bar:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
}
