/* Cabecera según diseño Figma "Formació 2026": barra blanca, menú en una línea,
   botón de socio en la fila superior. Solo escritorio. */
@media (min-width: 960px) {
	#mfn-header-template,
	#mfn-header-template .mcb-header-section:has(.top-header-menu),
	.home .mfn-header-tmpl .mcb-header-section:has(.top-header-menu) {
		background-color: #fff !important;
	}

	#mfn-header-template .mcb-header-section:not(:has(.top-header-menu)) {
		background-color: transparent !important;
	}

	.top-header-menu .mcb-wrap-inner,
	.home-header-menu .mcb-wrap-inner {
		background-color: transparent !important;
		border-radius: 0 !important;
		padding: 0 !important;
		min-height: 0 !important;
	}

	.top-header-menu .mfn-header-menu > .mfn-menu-li > .mfn-menu-link > .label-wrapper > .menu-label,
	.mfn-header-menu .mfn-menu-li > .mfn-menu-link .fas {
		color: #595959 !important;
	}

	.top-header-menu .mfn-header-menu > .current_page_item > .mfn-menu-link > .label-wrapper > .menu-label,
	.top-header-menu .mfn-header-menu > .current-menu-item > .mfn-menu-link > .label-wrapper > .menu-label,
	.top-header-menu .mfn-header-menu > .current-menu-ancestor > .mfn-menu-link > .label-wrapper > .menu-label {
		color: #ca0183 !important;
	}

	.top-header-menu .mfn-header-mainmenu,
	.mcb-section .mcb-wrap .mcb-item-f13b2c26f .mfn-header-menu {
		flex-wrap: nowrap !important;
		justify-content: flex-end !important;
	}

	.top-header-menu .mfn-header-mainmenu > .mfn-menu-li > .mfn-menu-link {
		padding: 8px 14px !important;
		white-space: nowrap;
	}

	.mcb-section .mcb-wrap .mcb-item-f13b2c26f .mcb-column-inner-f13b2c26f {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	/* logo rosa en todas las páginas */
	#mfn-header-template .logo-wrapper img {
		content: url("https://fbernadet.org/wp-content/uploads/2024/01/logo-FVB-rosa.svg");
	}

	.top-header-menu .column_button a.button {
		box-shadow: none !important;
		border: 0 !important;
		transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
	}

	.top-header-menu .column_button a.button:hover,
	.top-header-menu .column_button a.button:focus-visible {
		background: var(--mfn-button-theme-bg-hover) !important;
		color: var(--mfn-button-theme-color-hover) !important;
		box-shadow: inset 0 0 0 1px var(--mfn-button-theme-border-color-hover) !important;
	}

	.top-header-menu .column_button a.button:hover i,
	.top-header-menu .column_button a.button:focus-visible i {
		color: var(--mfn-button-theme-color-hover) !important;
	}

	#mfn-header-template #header_cart img {
		content: url("../assets/icons/cart-icon.svg");
	}

	#mfn-header-template #header_cart .header-cart-count {
		position: relative;
		top: -9px;
		left: 3px;
		display: inline-block;
		width: 16px;
		height: 16px;
		margin: 0 -4px;
		border-radius: 50%;
		background: #ca0183;
		line-height: 16px;
		text-align: center;
	}

	#mfn-header-template .mfn-header-link .icon-wrapper img {
		content: url("../assets/icons/campus.svg");
	}

	#mfn-header-template .mfn-header-search-link .icon-wrapper {
		background: url("../assets/icons/search.svg") center / 24px no-repeat;
	}

	#mfn-header-template .mfn-header-search-link .icon-wrapper svg {
		visibility: hidden;
	}

	.mfn-header-tmpl .mfn-searchbar-active .search_wrapper {
		left: 50% !important;
		top: 35px !important;
		width: 420px !important;
		max-width: calc(100vw - 32px) !important;
		box-sizing: border-box;
	}

	.mfn-header-tmpl .search_wrapper .form-searchform input.field {
		height: 56px !important;
		padding: 18px 16px 18px 52px !important;
	}

	.mfn-header-tmpl .search_wrapper .form-searchform input[type="submit"] {
		top: 9px !important;
	}
}

/* botón de socio en la fila superior (diseño completo) */
@media (min-width: 1240px) {
	/* botón de socio a la fila superior */
	.top-header-menu .mcb-wrap-inner {
		position: relative;
	}

	.mcb-header-section:not(:has(.top-header-menu)) {
		pointer-events: none;
	}

	.mcb-header-section:not(:has(.top-header-menu)) .mcb-column {
		pointer-events: auto;
	}

	.top-header-menu .column_button {
		position: absolute !important;
		top: -67px;
		right: 100px;
		width: auto !important;
		margin: 0 !important;
	}

	.home-top-header .mcb-wrap-d087cd1b3 .column:not(:last-child),
	.mcb-header-section:not(.top-header-page) .mcb-header-wrap .column_plain_text,
	.mcb-header-section:not(.top-header-page) .mcb-header-wrap .column_header_icon {
		/* left y no transform: un transform rompe el buscador (position: fixed) */
		left: -175px;
	}

	.header-sticky-custom .top-header-menu .column_button {
		position: relative !important;
		top: auto;
		right: auto;
	}
}

/* portátiles pequeños: el menú pasa a dos líneas si no cabe junto al botón */
@media (min-width: 960px) and (max-width: 1239px) {
	#mfn-header-template .top-header-menu .mfn-header-mainmenu,
	#mfn-header-template .mcb-section .mcb-wrap .mcb-item-f13b2c26f .mfn-header-menu {
		flex-wrap: wrap !important;
	}

	.top-header-menu .mfn-header-mainmenu > .mfn-menu-li > .mfn-menu-link {
		padding: 8px 6px !important;
		white-space: nowrap;
	}

	.top-header-menu .mfn-header-menu > .mfn-menu-li > .mfn-menu-link > .label-wrapper > .menu-label {
		font-size: 13px !important;
	}

	.mcb-section .mcb-wrap .mcb-item-f13b2c26f .mcb-column-inner-f13b2c26f {
		margin-left: 0 !important;
	}
}

/* Formació: el Subheader va vacío y solo deja 30px de padding entre la cabecera y el hero */
body.fvb-formacio-page #Subheader {
	display: none !important;
}
