/* =========================================================================
   Retura IR – ny header (rammeverk). Scopet til IR via body.ir-custom-header.
   Design-tokens hentet fra returatrv.no for mest mulig lik stil.
   ========================================================================= */

:root {
	--ir-red: #dd0f1e;        /* rød topp-bar + seksjonsetiketter */
	--ir-red-dark: #c20510;
	--ir-label: #dd0f1e;      /* seksjonsoverskrifter (BEDRIFT osv.) */
	--ir-text: #424c53;       /* menytekst (returatrv) */
	--ir-border: #f5f5f5;     /* skillelinjer (returatrv) */
	--ir-bar-h: 96px;         /* høyde på topp-bar (som returatrv/midt, mer luft rundt logoen) */
	--ir-panel-w: 400px;
	--ir-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Skjul Flatsome sin standard-header, bare på IR ---------------------- */
body.ir-custom-header #header,
body.ir-custom-header .header-wrapper,
body.ir-custom-header #masthead.header {
	display: none !important;
}
body.ir-custom-header .page-wrapper,
body.ir-custom-header #wrapper {
	padding-top: 0 !important;
}

/* Font for hele header-rammeverket */
.ir-header,
.ir-offcanvas { font-family: var(--ir-font); }

.ir-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #fff;
	padding: 10px 16px;
	z-index: 1000;
}
.ir-skip-link:focus { left: 8px; top: 8px; }

/* --- Rød topp-bar -------------------------------------------------------- */
.ir-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: var(--ir-red);
	height: var(--ir-bar-h);
	display: flex;
	align-items: center;
}
.ir-header__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ir-header__logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}
.ir-header__logo svg,
.ir-header__logo img { height: 54px; width: auto; display: block; }

/* Handlinger til høyre: Søk | Min side | Meny */
.ir-header__actions {
	display: flex;
	align-items: center;
	gap: 30px;
}
.ir-bar-action {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: none;
	border: 0;
	padding: 6px 0;
	margin: 0;
	color: #fff;
	font-family: var(--ir-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: normal;     /* nullstill Flatsome-arv (returatrv: normal) */
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
}
.ir-bar-action:hover { color: #fff; opacity: .85; }
.ir-bar-icon { display: block; color: #fff; }
.ir-bar-label { color: #fff; }

/* Søkefelt i den røde baren – kun desktop (≥1024px), som returatrv.
   Høy spesifisitet + reset for å slå Flatsome sine globale input/button-stiler
   (border-radius hele veien, box-shadow, min-height, margin) som ellers gjør
   feltet + knappen til to separate bokser. */
/* Søk-wrapper: kun desktop (≥1024px). Lukket = bare «Søk»-knappen,
   åpen (klikk) = hvitt felt + mørkerød Søk-knapp. */
.ir-bar-search { display: none; }
@media (min-width: 1024px) {
	.ir-header .ir-bar-search {
		display: flex;
		align-items: center;
		align-self: center;
		height: 40px;
		margin-right: 4px;
	}
}
.ir-bar-search.is-open .ir-bar-search-toggle { display: none; }
.ir-bar-searchform { display: none; }
.ir-bar-search.is-open .ir-bar-searchform {
	display: flex;
	align-items: center;
	align-self: center;
	height: 40px;
	margin: 0;
}
.ir-header .ir-bar-searchfield {
	height: 40px !important;
	min-height: 40px !important;
	width: 280px;
	max-width: 30vw;
	margin: 0;
	align-self: center;
	border: 0;
	border-radius: 8px 0 0 8px !important;
	background: #fff;
	color: #111;
	font-family: var(--ir-font);
	font-size: 16px;
	line-height: 40px;
	padding: 0 16px;
	box-shadow: none !important;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}
.ir-header .ir-bar-searchfield::placeholder { color: #6b7280; opacity: 1; }
.ir-header .ir-bar-searchfield:focus { outline: none; box-shadow: none !important; }
/* Mørkerød «Søk»-knapp med hvitt forstørrelsesglass + tekst */
.ir-header .ir-bar-searchbtn {
	height: 40px !important;
	min-height: 40px !important;
	max-height: 40px;
	margin: 0;
	align-self: center;
	padding: 0 18px;
	border: 0;
	border-radius: 0 8px 8px 0 !important;
	background: var(--ir-red-dark, #c20510) !important;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: none !important;
	font-family: var(--ir-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	text-transform: none;
}
.ir-header .ir-bar-searchbtn:hover { background: #a8040d !important; color: #fff; }
.ir-header .ir-bar-searchbtn svg { display: block; color: #fff; }
.ir-header .ir-bar-searchbtn-label { color: #fff; }

/* Hamburger-ikon */
.ir-header__toggle-icon {
	position: relative;
	width: 22px;
	height: 16px;
	display: inline-block;
}
.ir-header__toggle-icon .ir-bar {
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.ir-bar--1 { top: 0; }
.ir-bar--2 { top: 7px; }
.ir-bar--3 { top: 14px; }
.ir-header__toggle-label { color: #fff; }

/* Hamburger -> X når åpen */
body.ir-nav-open .ir-bar--1 { top: 7px; transform: rotate(45deg); }
body.ir-nav-open .ir-bar--2 { opacity: 0; }
body.ir-nav-open .ir-bar--3 { top: 7px; transform: rotate(-45deg); }

/* --- Off-canvas --------------------------------------------------------- */
.ir-offcanvas {
	position: fixed;
	inset: 0;
	z-index: 190;
	visibility: hidden;
	pointer-events: none;
}
body.ir-nav-open .ir-offcanvas { visibility: visible; pointer-events: auto; }
.ir-offcanvas__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .3s ease;
}
body.ir-nav-open .ir-offcanvas__backdrop { opacity: 1; }

.ir-offcanvas__panel {
	position: absolute;
	top: var(--ir-bar-h);
	right: 0;
	bottom: 0;
	width: var(--ir-panel-w);
	max-width: 90vw;
	background: #fff;
	box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	transform: translateX(100%);
	transition: transform .3s ease;
	padding: 44px 26px 48px;   /* mer topp-luft over øverste menypunkt (som TRV) */
}
body.ir-nav-open .ir-offcanvas__panel { transform: translateX(0); }

/* --- Søk i flyout (kun mobil/<1024px; på desktop ligger søk i baren) ----- */
.ir-search { position: relative; margin-bottom: 22px; }
@media (min-width: 1024px) { .ir-search { display: none; } }
.ir-search__field {
	width: 100%;
	height: 48px;
	border: 0;
	background: #ededed;
	border-radius: 4px;
	padding: 0 46px 0 18px;
	font-family: var(--ir-font);
	font-size: 16px;
	color: #333;
}
.ir-search__field:focus { outline: 2px solid var(--ir-red); background: #fff; }
.ir-search__submit {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	padding: 8px;
	color: #6b7280;
	cursor: pointer;
}

/* --- Meny --------------------------------------------------------------- */
.ir-menu { list-style: none; margin: 0; padding: 0; }
.ir-menu-item { margin: 0; }

.ir-menu-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--ir-border);
}
/* Forelder-rad som toggle-knapp: nullstill Flatsome sine button-stiler */
.ir-offcanvas .ir-menu-toggle {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	border-bottom: 1px solid var(--ir-border);
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	min-height: 0 !important;
	font: inherit;
	color: inherit;
	text-transform: none;
	cursor: pointer;
}
.ir-menu-link {
	flex: 1;
	display: block;
	padding: 16px 0;
	color: var(--ir-text);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
}
.ir-menu-link:hover,
.ir-menu-toggle:hover .ir-menu-link { color: var(--ir-red); }

.ir-menu-expand {
	display: inline-flex;
	align-items: center;
	padding: 10px;
	color: var(--ir-text);
	transition: transform .2s ease;
}
.ir-menu-item.is-open > .ir-menu-toggle .ir-menu-expand { transform: rotate(180deg); }
/* Fjern streken over undermenyen når den er åpen */
.ir-menu-item.is-open > .ir-menu-row,
.ir-menu-item.is-open > .ir-menu-toggle { border-bottom: 0; }

/* Seksjonsoverskrift (BEDRIFT / PRIVAT OG BORETTSLAG) */
.ir-menu-item.is-section-label { margin-top: 26px; }
.ir-menu-item.is-section-label:first-child { margin-top: 2px; }
.ir-menu-label {
	display: block;
	color: var(--ir-label);
	font-size: 16px;            /* returatrv: 16px */
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: normal;     /* returatrv: normal sperring */
	text-transform: uppercase;
	padding: 4px 0;
}

/* Undermeny (accordion) – avstander som returatrv: 2px rød kant, 12px innrykk,
   ligger helt inntil forelder (ingen gap/margin). */
.ir-submenu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 12px;
	border-left: 2px solid transparent;  /* skjul rød kant når kollapset */
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
}
.ir-menu-item.is-open > .ir-submenu {
	max-height: 1400px;
	border-left-color: var(--ir-red);
}
.ir-submenu .ir-menu-row { border-bottom: 0; }
.ir-submenu .ir-menu-link {
	padding: 4px 0;             /* returatrv: 4px vertikalt, innrykk fra kant via ul-padding */
	font-size: 16px;
	line-height: 1.5;
	color: var(--ir-text);
}
.ir-submenu .ir-menu-link:hover { color: var(--ir-red); }

/* --- Min side (i flyout) ------------------------------------------------- */
.ir-offcanvas__footer { margin-top: 28px; }
.ir-btn-minside {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #c9ced2;
	border-radius: 4px;
	padding: 11px 18px;
	color: var(--ir-text);
	font-size: 16px;
	text-decoration: none;
	background: #fff;
}
.ir-btn-minside:hover { border-color: var(--ir-red); color: var(--ir-red); }

/* --- Responsiv ---------------------------------------------------------- */
@media (max-width: 600px) {
	.ir-header__inner { padding: 0 16px; }
	.ir-header__logo svg,
	.ir-header__logo img { height: 38px; }
	.ir-header__actions { gap: 18px; }
	/* På små skjermer: skjul Min side i baren (ligger i flyout-footeren) */
	.ir-bar-minside { display: none; }
}
