/* =========================================================
   NAVBAR ROW (DESKTOP)
   Menu on the left, search on the right, always on one
   line. IMPORTANT: never use overflow-x:auto/hidden here —
   per the CSS spec, setting overflow-x to anything but
   visible forces overflow-y to "auto" too, which would clip
   the dropdown submenus that pop out below each menu item.
   Fit is instead guaranteed by the width-tiered rules below.
   ========================================================= */
@media (min-width: 992px) {
	.header-navbar__row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: nowrap;
		gap: 24px;
	}

	.header-navbar .header-menu {
		min-width: 0;
	}

	.header-navbar .header-menu__list {
		white-space: nowrap;
	}

	/* white-space is inherited, so the nowrap above also reaches into
	   dropdown submenus and forces long item labels (e.g. "Regulament
	   de Organizare și Funcționare (ROF)") onto one line, overflowing
	   past the submenu's fixed 250px width. Reset it for submenu
	   content so those labels wrap normally again. */
	.header-navbar .header-menu__submenu {
		white-space: normal;
	}
}

/* Tighter menu spacing in the narrow-desktop range, so there's less
   chance of ever needing more room than is available. */
@media (min-width: 992px) and (max-width: 1320px) {
	.header-navbar .header-menu__item-link--level-0 {
		padding: 10px 10px;
		font-size: 0.85em;
	}
}

/* =========================================================
   SEARCH IN THE NAVBAR — ONLY WHERE IT ACTUALLY FITS
   Measured: menu + search only fit on one line from
   ~1180px up (even with the tighter padding above). Below
   that, showing search in the navbar would force the menu
   to wrap to a 2nd line, which grows the (permanently fixed)
   navbar taller than the hardcoded 63px space reserved for
   it below — and it would overlap the hero content.
   ========================================================= */
@media (min-width: 1180px) {
	.header__content-inner {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.header-navbar .header-search {
		flex-shrink: 0;
	}

	.header-navbar .c-search-form__input-holder {
		height: 34px;
	}

	.header-navbar .c-search-form__input {
		padding: 0 40px 0 14px;
		line-height: 34px;
		font-size: 13px;
	}

	.header-navbar .c-search-form__button {
		width: 34px;
		height: 34px;
	}

	.header-toolbar .header-search {
		display: none;
	}
}

/* =========================================================
   992–1179px: NOT ENOUGH ROOM FOR MENU + SEARCH TOGETHER
   Keep search in the hero instead (hide the navbar's copy)
   and center the logo group with a 3-column grid so it
   doesn't collide with the search box sitting on the right.
   ========================================================= */
@media (min-width: 992px) and (max-width: 1179px) {
	.header-navbar .header-search {
		display: none;
	}

	.header__content-inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		column-gap: 24px;
	}

	.header-logo {
		grid-column: 2;
		width: auto;
		margin: 0;
	}

	.header-toolbar {
		position: static;
		grid-column: 3;
		justify-self: end;
		top: auto;
		right: auto;
	}
}

/* =========================================================
   HERO BACKGROUND OVERLAY
   Darkens the header photo so the logo/title text reads
   clearly without needing a heavy white text outline.
   ========================================================= */
.header-background::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 8;
	background-color: rgba(0, 0, 0, 0.4);
	pointer-events: none;
}
