/* Toppmeny */
#topmenu{
	font-family: 'Lato', sans-serif;
	position:absolute; /*Använd fixed om den ska ligga över toppbild, annars absolute */
	display:block;
	z-index:1000;
	width:100%;
	max-width:100%;
	height:80px;
	text-align:right;
	text-transform: none;
	background: rgba(255, 255, 255, 1);
	overflow:hidden;
}
#topmenu #topmenuContent{
	margin-right:25px;
}

/* Används om menyn ska ligga kvar i toppen - sticky (styrs även av js på rad 255 funktion: ellibot_topmenu_scrolling) */
#topmenu.fixed{position:fixed; top:0;}
#wpadminbar{position:fixed !important;}


#topmenu ul{
	list-style-type:none;
	margin:0;
	padding:0;
	width:100%;
	margin:auto;
	font-size:0; /* Tar bort margin mellan li */
}
#topmenu ul li{
	display:inline-block;
	margin:0;
	padding:0;
	font-size:16px;
}
#topmenu ul li a{
	display:block;
	margin:0;
	padding:30px 10px;
	text-decoration:none;
	background-color:transparent;
	transition: background-color 0.5s ease 0s;
	font-weight:700;
	letter-spacing:1px;
}
#topmenu ul li a:link, #topmenu ul li a:visited, #topmenu ul li a:active{
	text-decoration:none;
	color:#104c96;
}
#topmenu ul li a:hover{
	color:#104c96;
	background-color:#eee;
}

#topmenu ul li.page_item_has_children{
	position:relative;
}
#topmenu ul li.page_item_has_children ul.children li{
	display:block;
}

#topmenu button{
	cursor:pointer;
	border-radius:0;
}
#topmenu button:focus, #topmenu a:focus{
	cursor:pointer;
	border-radius:0;
}
/*
#topmenu button:focus:not(:hover), #topmenu a:focus:not(:hover){
	outline:solid 1px #000;
	outline-offset:-2px;
}
*/

/* Aktiv länk */
.page_item_active{
	background-color:#eee !important;
}


/* Utfällbar meny (stor skärm) */
#topmenu.topmenu-closed ul li.page_item_has_children a::after{
	font-family: "Font Awesome 5 Pro";
	content: "\f0d7";
	display: inline-block;
	padding-left: 5px;
	vertical-align: top;
	font-weight: 900;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li a::after{
	display: none;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li.page_item_has_children a::after{
	font-family: "Font Awesome 5 Pro";
	content: "\f0da";
	display: inline-block;
	padding-left: 5px;
	vertical-align: top;
	font-weight: 900;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li.page_item_has_children li a::after{
	display: none;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li.page_item_has_children ul.children li.page_item_has_children a::after{
	font-family: "Font Awesome 5 Pro";
	content: "\f0da";
	display: inline-block;
	padding-left: 5px;
	vertical-align: top;
	font-weight: 900;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li.page_item_has_children ul.children li.page_item_has_children li a::after{
	display: none;
}

#topmenu.topmenu-closed ul li.page_item_has_children ul.children{
	display:none;
	position:absolute;
	z-index:1000;
	left:0;
	width:auto;
	text-align:left;
	padding:0 0 0 0;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li a{
	padding:10px 10px 10px 10px;
	background-color:#eee;
	color:#000;
	font-weight:400;
	font-size:14px;
	text-transform: none;
}

#topmenu.topmenu-closed ul li.page_item_has_children ul.children li a:hover{
	background-color:#ddd;
	color:#000;
}
#topmenu.topmenu-closed .topmenuOpener{
	display:none;
}

#topmenu.topmenu-closed ul.children{
	white-space: nowrap;
}

/* Vald huvudmeny länk */
#topmenu.topmenu-closed ul li.current_page_item > a, #topmenu.topmenu-closed ul li.current_page_ancestor > a{
	color:#fff;
	background-color:#104c96;
	/*border-radius:0px 0px 10px 10px;*/
	/*background: rgb(17,17,17);*/
	/*background: linear-gradient(0deg, rgba(17,17,17,0) 0%, rgba(52,119,149,1) 100%);*/ /* #347795 */
	/*border-bottom:solid 2px #0071ce;*/
}
#topmenu.topmenu-closed ul li.current_page_item > a:hover, #topmenu.topmenu-closed ul li.current_page_ancestor > a:hover{
	color:#fff;
}


/* Vald undermeny länk */
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li.current_page_item > a{
	color:#000;
}

/* Gör att länkarna hamnar på flera rader i bredd */
#topmenu.topmenu-closed ul li.page_item_has_children ul.children{
	min-width:150px !important;
}
/*
#topmenu.topmenu-closed ul li.page_item_has_children ul.children{
	min-width:400px !important;
}
#topmenu.topmenu-closed ul li.page_item_has_children ul.children li{
    float:left;
	width:50%;
}
*/


/* Mobil meny (liten skärm) */
#topmenu.topmenu-open, #topmenu.search-open{
	text-transform: none;
	width:100%;
	height:auto;
}
#topmenu.topmenu-open ul li{
	text-align:left;
	margin:0;
	padding:0;
	float:none;
	width:100%;
}
#topmenu.topmenu-open ul li a{
	padding:15px 10px 15px 10px;
	font-weight:400;
	padding-right:60px;
	font-size:14px;
}
#topmenu.topmenu-open .topmenuOpener{
	position:absolute;
	top:0;
	right:0;
	margin:0;
	padding:0;
	display:block;
	padding:0px 22px;
	line-height:53px;
	font-size:16px;
	font-weight: 900;
	vertical-align: middle;
	text-align:center;
	transition: background-color 0.5s ease-in-out;
}
#topmenu.topmenu-open .topmenuOpener span{
	display:none;
}



/* Sök */
header #searchForm{
	display:none;
}
header #searchForm label{
	display:none;
}
header #searchForm input[type="search"]{
	-moz-appearance: none;
	-webkit-appearance: none; 
	appearance: none;
	font-size:16px;
	height:40px;
	border:none;
	border-radius:30px 0px 0px 30px;
	width:100%;
	padding:0;
	padding-left:20px;
	padding-right:10px;
	/* Gör att bredden blir rätt trots padding */
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
header #searchForm button{
	position:absolute;
	right:0;
	top:30px;
	background-color:#505e6a;
	border:none;
	border-radius:0px 30px 30px 0px;
	height:40px;
	width:50px;
	cursor:pointer;
	color:#fff;
	padding:0;
	line-height:45px;
}
header #searchForm button i{
	margin-right:5px;
}
header #searchForm button span{
	display:none;
}
@media only screen and (max-width: 1024px){
	header #searchForm{
		display:block;
	}
	header #searchForm button{
		top:0;
		right:0;
		width:60px;
	}
}

/* Sökfält (liten skärm) */
#searchContent{
	clear:both;
	display:none;
	background-color:#1e303f;
	padding:15px 10px;
	color:#fff;
}
#searchContent div{
	position:relative;
	padding-right:60px;
}

#topmenuLogotype a{
	/*display:none;*/
	position:absolute;
	z-index:100;
	top:15px;
	background-position:center left;
	background-repeat:no-repeat;
	transition: background-image 0.5s ease-in-out;
	left:15px;
	top:20px;
	height:40px;	/* Ange hur stor bilden ska vara (max 60px hög) */
	width:216px; 	/* Ange bildens max-bredd */
	background-size:216px 40px; /* Anges om ej svg-fil */
	background-image:url(/gfx/logo.svg);
	/*filter: grayscale(1) invert(1) brightness(2);*/
	font-size:0;
}


/* Meny knappar (öppna stäng mobil meny, visa sök) */
#topmenuBtns{
	display:none;
}
@media only screen and (max-width: 1024px){
	#topmenuBtns{
		display:block;
		float:right;
	}
	#topmenuToggle, #searchToggle{
		display:block;
		float:left;
		width: 56px;
		height: 60px;
		margin:0;
		padding:0;
		padding-top:7px;
		line-height:25px;
		background-color:#104c96;
		color:#fff;
		border:none;
		cursor:default;
		font-size:15px;
		text-align:center;
	}
	#topmenuToggle i, #searchToggle i{
		display:block;
	}
}

/* Mobil meny */
@media only screen and (max-width: 1024px){
	
	#topmenu{
		height:60px;
		border-bottom:0;
	}
	#topmenuContent{
		display:none;
		width:100%;
	}
	
	#topmenuLogotype a{
		display:block;
		position:absolute;
		z-index:100;
		background-position:center left;
		background-repeat:no-repeat;
		transition: background-image 0.5s ease-in-out;
		top:15px;
		left:10px;
		height:30px;	/* Ange hur stor bilden ska vara (max 60px hög) */
		width:162px; 	/* Ange bildens max-bredd */
		background-size:162px 30px; /* Anges om ej svg-fil */
		background-image:url(/gfx/logo.svg);
	}
	
	/* Används enbart om menyn är sticky ! */
	#topmenu{
		overflow-y: auto;
		max-height:100%;
		max-height:100vh;
	}
	
	/* Markerar vald länk i huvudmeny */
	#topmenu.topmenu-open ul li.current_page_item > a{
		/*background-color:#000 !important;*/
		color:#fff;
		text-indent:20px;
	}
	#topmenu.topmenu-open ul li.current_page_item > a::before{
		font-family: "Font Awesome 5 Pro";
		content: "\f105";
		display: inline-block;
		font-weight: 900;
		text-indent:-20px;
	}
	
	/* Länkar */
	#topmenu ul li a:hover, #topmenu ul.children li a:hover, #topmenu ul.children ul.children li a:hover, #topmenu ul.children ul.children ul.children li a:hover{
		background-color:#eee;
		color:#104c96;
	}

	/* Nivå 1*/
	#topmenu ul li a{
		display:block;
		color:#104c96 !important;
		background-color:#eee;
		border-bottom:solid 1px #ddd;
	}
	
	#topmenu .topmenuOpener{
		color:#104c96;
		background-color:transparent;
		border:none;
		border-left:solid 1px #eee;
	}
	
	/* Nivå 2*/
	#topmenu ul.children li a{
		color:#fff;
		background-color:#111;
		border-bottom:solid 1px #222;
		padding-left:30px;
	}
	#topmenu ul.children .topmenuOpener{
		color:#fff;
		background-color:transparent;
		border-left:solid 1px #222;
	}
	
	/* Nivå 3 */
	#topmenu ul.children ul.children li a{
		color:#fff;
		background-color:#111;
		border-bottom:solid 1px #222;
		padding-left:50px;
	}
	#topmenu ul.children ul.children .topmenuOpener{
		color:#fff;
		background-color:transparent;
		border-left:solid 1px #222;
	}
	
	/* Nivå 4 */
	#topmenu ul.children ul.children ul.children li a{
		color:#fff;
		background-color:#111;
		border-bottom:solid 1px #222;
		padding-left:70px;
	}
	#topmenu ul.children ul.children ul.children .topmenuOpener{
		color:#fff;
		background-color:transparent;
		border-left:solid 1px #222;
	}
	
}


/* Tillbaka till toppen-knapp */
#topmenuBackbutton{
	position:fixed;
	z-index:1000;
	bottom:15px;
	right:15px;
	height:40px;
	width: 40px;
	font-size:30px;
	line-height:40px;
	text-align:center;
	border-radius:5px;
	cursor:pointer;
	display:none;
	background-color:#025071;
	color:#fff;
	z-index:1000000;
	vertical-align:middle;
	opacity:0.9;
	border-radius:5px !important;
}
#topmenuBackbutton:focus:not(:hover){
	border:0;
	outline:solid 1px #fff;
}

/* Gör att valt element animerar rotation  */
#topmenu .spinForward{
	animation-name: doSpinForward;
	animation-duration: 1000ms;
	animation-iteration-count: infinite;
	animation-timing-function: linear; 
}
@keyframes doSpinForward {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}
#topmenu .spinBackward{
	animation-name: doSpinBackward;
	animation-duration: 1000ms;
	animation-iteration-count: infinite;
	animation-timing-function: linear; 
}
@keyframes doSpinBackward {
    from {
        transform:rotate(360deg);
    }
    to {
        transform:rotate(0deg);
    }
}
