/* Sidhuvud med megameny – Västerbottens folkhögskola */
.vfh {
	--vfh-ink: #2D2926;
	--vfh-muted: #6B635E;
	--vfh-line: #E7E1DD;
	--vfh-bg: #FFFFFF;
	--vfh-soft: #F8F1F5;
	--vfh-pink: #C785A9;
	--vfh-pink-d: #9E5680;
	--vfh-yellow: #EFD561;
	--vfh-h: 76px;
	--vfh-radius: 6px;
	position: relative;
	width: 100%;
	font-family: "Barlow", system-ui, sans-serif;
	color: var(--vfh-ink);
	-webkit-font-smoothing: antialiased;
}
.vfh *, .vfh *::before, .vfh *::after, .vfh-mob, .vfh-mob * { box-sizing: border-box; }
.vfh ul, .vfh-mob ul { list-style: none; margin: 0; padding: 0; }
.vfh p { margin: 0; }
.vfh a, .vfh-mob a { color: inherit; text-decoration: none; }
.vfh button, .vfh-mob button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; letter-spacing: inherit; text-transform: none; }
.vfh button:hover, .vfh button:focus, .vfh-mob button:hover, .vfh-mob button:focus { background: none; color: inherit; }
.vfh-i { width: 1em; height: 1em; flex: none; }
.vfh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.vfh :focus-visible, .vfh-mob :focus-visible { outline: 3px solid var(--vfh-ink); outline-offset: 2px; border-radius: 6px; }

.vfh-skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--vfh-ink); color: #fff !important; padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.vfh-skip:focus { top: 8px; }

/* ---------- Bar ---------- */
.vfh-bar { display: flex; align-items: center; gap: 28px; min-height: var(--vfh-h); }
.vfh-logo { display: inline-flex; align-items: center; flex: none; }
.vfh .vfh-logo-img, .vfh-mob .vfh-logo-img { display: block; height: 38px !important; width: auto !important; max-width: 210px !important; object-fit: contain; object-position: left center; }
.vfh-logo-text { font-weight: 700; font-size: 18px; }

.vfh-nav { flex: 1 1 auto; min-width: 0; }
.vfh-menu { display: flex; align-items: center; gap: 4px; }
.vfh-item { position: static; }
.vfh-item:not(.vfh-item--mega) { position: relative; }
.vfh .vfh-top {
	display: inline-flex; align-items: center; gap: 6px;
	height: 44px; padding: 0 14px; border-radius: 6px;
	font-size: 16px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
	transition: background-color .15s ease;
}
.vfh .vfh-top:hover, .vfh .vfh-top[aria-expanded="true"] { background: var(--vfh-soft); }
.vfh-item.is-current > .vfh-top, .vfh-item.is-current > .vfh-split { box-shadow: inset 0 -3px 0 var(--vfh-pink); border-radius: 0; }
/* Delad knapp: länk till sidan + pil som öppnar undermenyn */
.vfh-split { display: inline-flex; align-items: center; border-radius: 6px; transition: background-color .15s ease; }
.vfh-item:hover > .vfh-split, .vfh-split:has([aria-expanded="true"]) { background: var(--vfh-soft); }
.vfh .vfh-split .vfh-top, .vfh .vfh-split .vfh-top:hover { background: none; }
.vfh .vfh-split .vfh-top--link { padding-right: 4px; }
.vfh .vfh-split .vfh-top--link:hover { text-decoration: underline; text-underline-offset: 4px; }
.vfh .vfh-split .vfh-top--toggle { padding: 0 12px 0 6px; }
.vfh-top .vfh-i { font-size: 16px; transition: transform .2s ease; }
.vfh-top[aria-expanded="true"] .vfh-i { transform: rotate(180deg); }

/* Enkel dropdown */
.vfh-drop {
	position: absolute; top: calc(100% + 10px); left: 0; z-index: 50; min-width: 240px;
	background: var(--vfh-bg); border: 1px solid var(--vfh-line); border-radius: var(--vfh-radius);
	box-shadow: 0 18px 40px rgba(45, 41, 38, .12); padding: 8px;
}
.vfh-drop a { display: block; padding: 10px 14px; border-radius: 6px; font-size: 15px; font-weight: 500; }
.vfh-drop a:hover { background: var(--vfh-soft); }
.vfh-drop-overview a { font-weight: 700; }

/* Megameny */
.vfh-mega {
	position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 50;
	background: var(--vfh-bg); border: 1px solid var(--vfh-line); border-radius: var(--vfh-radius);
	box-shadow: 0 24px 60px rgba(45, 41, 38, .14);
}
.vfh-mega:not([hidden]), .vfh-drop:not([hidden]) { animation: vfh-in .16s ease-out; }
@keyframes vfh-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.vfh-mega-inner { display: grid; grid-template-columns: 1fr 300px; }
.vfh-mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 28px; padding: 28px 32px; }
.vfh-mega-h { font-size: 12px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--vfh-muted); margin: 0 0 10px !important; }
.vfh-mega-col a { display: flex; flex-direction: column; padding: 8px 10px; margin: 0 -10px; border-radius: 6px; }
.vfh-mega-col a:hover { background: var(--vfh-soft); }
.vfh-mega-col a:hover .vfh-c-t { text-decoration: underline; text-underline-offset: 3px; }
.vfh-c-t { font-size: 16px; font-weight: 600; line-height: 1.3; }
.vfh-c-m { font-size: 13px; color: var(--vfh-muted); line-height: 1.35; }
.vfh-mega-side { background: var(--vfh-soft); padding: 24px; border-radius: 0 var(--vfh-radius) var(--vfh-radius) 0; display: flex; flex-direction: column; gap: 10px; }
.vfh-mega-side .vfh-mega-h { margin-top: 10px !important; margin-bottom: 0 !important; }
.vfh-cta-card {
	display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 6px;
	/* Tonad rosa: mörkare nyans bakom texten (vit text klarar 4,5:1 – uppmätt),
	   er rosa glöder in från nedre högra hörnet där ingen text står. */
	background: radial-gradient(80% 80% at 100% 100%, var(--vfh-pink) 0%, rgba(199, 133, 169, 0) 60%), var(--vfh-pink-d);
	color: #fff !important; border: 0;
	transition: box-shadow .15s ease, background-color .15s ease;
}
.vfh-cta-card:hover { background-color: #8F4A73; box-shadow: 0 8px 22px rgba(158, 86, 128, .35); }
.vfh-cta-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.vfh-cta-title { font-size: 20px; font-weight: 700; line-height: 1.2; }
.vfh-cta-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.vfh-cta-card:hover .vfh-cta-link .vfh-i { transform: translateX(3px); }
.vfh-cta-link .vfh-i { transition: transform .15s ease; }
.vfh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vfh-chips a { display: inline-block; padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--vfh-line); font-size: 14px; font-weight: 500; }
.vfh-chips a:hover { border-color: var(--vfh-ink); }

/* Verktyg: sök, katalog, sociala ikoner */
.vfh-tools { display: flex; align-items: center; gap: 14px; flex: none; margin-left: auto; }
.vfh-search { position: relative; display: flex; align-items: center; }
.vfh-search-icon { position: absolute; left: 14px; display: flex; font-size: 18px; color: var(--vfh-muted); pointer-events: none; }
.vfh .vfh-search-input, .vfh-mob .vfh-search-input {
	width: 260px; height: 44px; margin: 0; padding: 0 44px 0 42px;
	border: 1.5px solid var(--vfh-line); border-radius: 6px; background: #FAF8F7;
	font: 500 15px/1 "Barlow", system-ui, sans-serif; color: var(--vfh-ink);
	transition: border-color .15s ease, background-color .15s ease, width .2s ease;
	-webkit-appearance: none; appearance: none;
}
.vfh .vfh-search-input::placeholder, .vfh-mob .vfh-search-input::placeholder { color: #857C77; opacity: 1; }
.vfh .vfh-search-input:hover { border-color: #CFC6C0; }
.vfh .vfh-search-input:focus, .vfh-mob .vfh-search-input:focus { outline: none; border-color: var(--vfh-ink); background: #fff; }
.vfh-search-input::-webkit-search-cancel-button { display: none; }
.vfh .vfh-search-submit, .vfh-mob .vfh-search-submit {
	position: absolute; right: 5px; width: 34px; height: 34px; border-radius: 6px !important;
	display: inline-flex !important; align-items: center; justify-content: center; font-size: 16px;
	background: var(--vfh-ink) !important; color: #fff !important;
}
/* Kompakt sökfält i headern: litet "Sök", växer i sidled vid klick */
.vfh .vfh-search--bar .vfh-search-input {
	width: 116px; padding: 0 14px 0 40px; border-color: transparent; background: #F7F7F7; cursor: pointer;
	transition: width .25s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.vfh .vfh-search--bar .vfh-search-input::placeholder { color: var(--vfh-ink); font-weight: 600; }
.vfh .vfh-search--bar .vfh-search-input:hover { background: #EFEFEF; border-color: transparent; }
.vfh .vfh-search--bar .vfh-search-input:focus,
.vfh .vfh-search--bar .vfh-search-input:not(:placeholder-shown) {
	width: 300px; padding-right: 44px; cursor: text;
	background: #fff; border-color: var(--vfh-line); box-shadow: 0 4px 16px rgba(45, 41, 38, .08);
}
.vfh .vfh-search--bar .vfh-search-input:focus::placeholder { color: #857C77; font-weight: 500; }
.vfh .vfh-search--bar .vfh-search-icon { left: 13px; color: var(--vfh-ink); }
.vfh .vfh-search--bar .vfh-search-submit { opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s; }
.vfh .vfh-search--bar:focus-within .vfh-search-submit,
.vfh .vfh-search--bar:has(.vfh-search-input:not(:placeholder-shown)) .vfh-search-submit { opacity: 1; visibility: visible; }
.vfh-suggest {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; min-width: 320px;
	background: #fff; border: 1px solid var(--vfh-line); border-radius: var(--vfh-radius);
	box-shadow: 0 18px 40px rgba(45, 41, 38, .14); padding: 6px; max-height: 70vh; overflow: auto;
}
.vfh-search--bar .vfh-suggest { left: auto; width: 360px; }
.vfh-opt { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.vfh-opt:hover { background: var(--vfh-soft); }
.vfh-opt[aria-selected="true"] { background: #F1E1EA; box-shadow: inset 3px 0 0 var(--vfh-pink); }
.vfh-opt-t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.vfh-opt-t mark { background: rgba(239, 213, 97, .55); color: inherit; padding: 0 1px; border-radius: 2px; }
.vfh-opt-m { font-size: 13px; color: var(--vfh-muted); }
.vfh-opt--all { border-top: 1px solid var(--vfh-line); margin-top: 4px; border-radius: 0 0 6px 6px; }
.vfh-opt--all .vfh-opt-t { display: flex; align-items: center; gap: 6px; }
.vfh-empty { padding: 12px; font-size: 14px; color: var(--vfh-muted); }

.vfh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 20px; border-radius: 6px; white-space: nowrap;
	background: var(--vfh-ink); color: #fff !important; font-weight: 600; font-size: 15px;
	transition: background-color .15s ease, transform .15s ease;
}
.vfh-btn:hover { background: #000; }
.vfh-btn .vfh-i { font-size: 18px; }

.vfh-social { display: flex; align-items: center; gap: 2px; }
.vfh-social a, .vfh-social-nolink {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px;
	font-size: 16px; color: var(--vfh-ink); transition: background-color .15s ease, color .15s ease;
}
.vfh-social a:hover, .vfh-social a:focus-visible { color: var(--vfh-pink); }
.vfh-social svg { width: 16px; height: 16px; fill: currentColor; }
.vfh-social-nolink { opacity: .55; }

.vfh .vfh-burger, .vfh-mob .vfh-mob-close, .vfh .vfh-sbtn {
	display: none; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 12px; border-radius: 6px;
	border: 1.5px solid var(--vfh-line) !important; font-weight: 600; font-size: 15px;
}
.vfh-burger .vfh-i, .vfh-mob-close .vfh-i, .vfh-sbtn .vfh-i { font-size: 22px; }
.vfh .vfh-sbtn { width: 44px; padding: 0; justify-content: center; }

/* Smal desktop: kompaktare */
@media (max-width: 1279px) and (min-width: 1025px) {
	.vfh-bar { gap: 18px; }
	.vfh .vfh-search--bar .vfh-search-input:focus,
	.vfh .vfh-search--bar .vfh-search-input:not(:placeholder-shown) { width: 240px; }
	.vfh .vfh-top { padding: 0 10px; }
}

/* ---------- Mobil & surfplatta ---------- */
@media (max-width: 1024px) {
	.vfh { --vfh-h: 64px; }
	.vfh-bar { gap: 12px; }
	.vfh .vfh-logo-img { height: 30px !important; max-width: 170px !important; }
	.vfh-nav, .vfh-tools .vfh-search, .vfh-tools .vfh-btn--catalog, .vfh-social--bar { display: none; }
	.vfh .vfh-burger, .vfh .vfh-sbtn { display: inline-flex; }
}
@media (max-width: 340px) {
	.vfh-burger-t { display: none; }
	.vfh .vfh-burger { padding: 0 10px; }
}

/* Fullskärmsmeny (flyttas till <body> av skriptet) */
.vfh-mob {
	--vfh-ink: #2D2926; --vfh-muted: #6B635E; --vfh-line: #E7E1DD; --vfh-soft: #F8F1F5; --vfh-pink: #C785A9;
	position: fixed; inset: 0; z-index: 100000; background: #fff; color: var(--vfh-ink);
	display: flex; flex-direction: column; font-family: "Barlow", system-ui, sans-serif;
	overscroll-behavior: contain;
}
.vfh-mob[hidden] { display: none; }
.vfh-mob:not([hidden]) { animation: vfh-fade .18s ease-out; }
@keyframes vfh-fade { from { opacity: 0; } to { opacity: 1; } }
.vfh-mob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 16px; border-bottom: 1px solid var(--vfh-line); flex: none; }
.vfh-mob .vfh-mob-top .vfh-logo-img { height: 30px !important; max-width: 170px !important; }
.vfh-mob .vfh-mob-close { display: inline-flex; }
.vfh-mob-body > * { flex-shrink: 0; }
.vfh-mob-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.vfh-mob .vfh-search-input { width: 100%; height: 54px; font-size: 17px; padding-left: 46px; padding-right: 54px; }
.vfh-mob .vfh-search-icon { font-size: 20px; left: 16px; }
.vfh-mob .vfh-mob-body .vfh-search-submit { width: 42px; height: 42px; right: 6px; }
.vfh-mob .vfh-suggest { position: static; min-width: 0; box-shadow: none; margin-top: 8px; max-height: none; }
.vfh-mob .vfh-search { display: block; }
.vfh-mob .vfh-mob-body .vfh-search-icon { top: 17px; }
.vfh-mob .vfh-mob-body .vfh-search-submit { top: 6px; }
.vfh-btn--block { width: 100%; height: 54px; font-size: 17px; }

.vfh-mlist { border-top: 1px solid var(--vfh-line); }
.vfh-mitem { border-bottom: 1px solid var(--vfh-line); }
.vfh-mob .vfh-mtop {
	display: flex !important; align-items: center; justify-content: space-between; width: 100%;
	min-height: 64px; padding: 8px 2px !important; text-align: left;
	font-size: 24px !important; font-weight: 700 !important; line-height: 1.2;
}
/* Mobil: länk till sidan + separat knapp som fäller ut undermenyn */
.vfh-msplit { display: flex; align-items: center; gap: 12px; }
.vfh-mob .vfh-msplit .vfh-mtop--link { flex: 1 1 auto; width: auto; }
.vfh-mob .vfh-msplit .vfh-mtop--toggle {
	flex: none; width: 48px; height: 48px; min-height: 48px; padding: 0 !important; justify-content: center;
	border: 1.5px solid var(--vfh-line) !important; border-radius: 6px;
}
.vfh-mob .vfh-msplit .vfh-mtop--toggle[aria-expanded="true"] { background: var(--vfh-soft); border-color: var(--vfh-pink) !important; }
.vfh-mtop .vfh-i, .vfh-mgtop .vfh-i { font-size: 24px; transition: transform .2s ease; }
.vfh-mtop[aria-expanded="true"] .vfh-i, .vfh-mgtop[aria-expanded="true"] .vfh-i { transform: rotate(180deg); }
.vfh-msub { padding: 0 0 16px; }
.vfh-mgroup { border-radius: 6px; background: var(--vfh-soft); margin-bottom: 8px; }
.vfh-mob .vfh-mgtop {
	display: flex !important; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 8px 16px !important;
	font-size: 18px !important; font-weight: 600 !important; text-align: left;
}
.vfh-mgtop .vfh-i { margin-left: auto; font-size: 20px; }
.vfh-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 700; }
.vfh-mgroup ul { padding: 0 8px 10px; }
.vfh-mgroup a, .vfh-msimple a { display: flex; flex-direction: column; padding: 11px 10px; border-radius: 6px; min-height: 48px; justify-content: center; }
.vfh-mgroup a:active, .vfh-msimple a:active { background: #fff; }
.vfh-mgroup .vfh-c-t, .vfh-msimple a { font-size: 17px; font-weight: 600; }
.vfh-mall { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 2px; font-weight: 700; font-size: 17px; text-decoration: underline !important; text-underline-offset: 4px; }
.vfh-social--mob { justify-content: center; gap: 8px; padding-top: 8px; }
.vfh-social--mob a, .vfh-social--mob .vfh-social-nolink { width: 48px; height: 48px; font-size: 20px; border: 1px solid var(--vfh-line); color: var(--vfh-ink); }
.vfh-social--mob a:hover, .vfh-social--mob a:active, .vfh-social--mob a:focus-visible { color: var(--vfh-pink); }
.vfh-social--mob svg { width: 20px; height: 20px; }

html.vfh-lock, html.vfh-lock body { overflow: hidden !important; }

/* Fast header (headern som innehåller widgeten), skugga när man scrollat */
.elementor-location-header:has(.vfh) {
	position: sticky; top: 0; z-index: 9990; background: #fff;
	transition: box-shadow .2s ease;
}
.admin-bar .elementor-location-header:has(.vfh) { top: 32px; }
@media (max-width: 782px) { .admin-bar .elementor-location-header:has(.vfh) { top: 46px; } }
@media (max-width: 600px) { .admin-bar .elementor-location-header:has(.vfh) { top: 0; } }
.elementor-location-header.vfh-scrolled { box-shadow: 0 1px 0 #E7E1DD, 0 8px 24px rgba(45, 41, 38, .06); }

@media (prefers-reduced-motion: reduce) {
	.vfh *, .vfh-mob, .vfh-mob * { animation: none !important; transition: none !important; }
}
