/*
Theme Name: Arbeidsliv i Norden
Author: wp-hosting.no
Author URI: 
Theme URI: 
Tags: full-site-editing, block-patterns
Text Domain: arbeidsliv-i-norden
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 100.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
html {
	scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

/*body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}*/

/* HELPERS */

@media (max-width: 959px) { /* WP column breakpoint */

	.hide-mobile {display: none !important}
	
	.wp-block-site-logo {width: 144px}

}

@media (min-width: 960px) { /* WP column breakpoint */
	.hide-desktop {display: none !important}
}

@media (max-width: 779px) { /* WP column breakpoint */

	.wp-block-columns.reverse-mobile {margin-block-start: 0 !important;}
	
	
	.reverse-mobile .wp-block-column:first-child {order: 2;}
	.reverse-mobile .wp-block-column:last-child {order: 1;}
	
	.reverse-mobile .wp-block-column:last-child .wp-block-query {margin-block-start: calc(var(--wp--preset--spacing--30) * -2)}

}

.taxonomy-issue + .wp-block-post-title,
.taxonomy-category + .wp-block-post-title {margin-top: -6px !important}

body.single-post .taxonomy-issue + .wp-block-post-title {margin-top: 16px !important}
body.single-post .fremhevet-sak-inline .taxonomy-issue + .wp-block-post-title {margin-top: 0 !important}

.wp-block-post-navigation-link a {text-underline-offset: 0.2em;}



/******************
	NAVIGATION -
	DESKTOP MENU
*******************/

.wp-block-navigation .wp-block-navigation-item {
    align-items: center;
    background-color: inherit;
    display: flex;
    position:relative
}

/***********************************
	ACF - FEATURE IMAGE DESCRIPTION
	CORE FIGCAPTION
************************************/

.feature-image-description {
	box-sizing: border-box;
	margin: 0;
	padding: 8px 0;
	/*background: #f1f1f1; */
	font-family: 'Sans Serif';
	font-size: 14px;
	
	p {margin-block-start: 0 !important; margin-block-end: 0 !important}
}

.wp-element-caption em {
	font-style: normal !important;
}

:root :where(.wp-element-caption, .wp-block-audio figcaption,
.wp-block-embed figcaption, .wp-block-gallery figcaption,
.wp-block-image figcaption, .wp-block-table figcaption,
.wp-block-video figcaption) {
	font-family: 'Sans Serif';
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}


/****************
	WP SWIPER
*****************/

:root {
    --swiper-theme-color: var(--wp--preset--color--primary-40);
    --swiper-pagination-bullet-inactive-color: var(--wp--preset--color--primary-40);
    --swiper-navigation-size:24px;
    --swiper-navigation-top-offset:;
}

.swiper-horizontal > .swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal, .swiper-pagination-custom, .swiper-pagination-fraction {
    top: unset !important;
    bottom: -2em;
    left: 0;
    width: 100%;
}


.wp-swiper > .wp-swiper__wrapper {margin-bottom: 0}


.swiper .swiper-slide.swiper-custom-slide,
.swiper-custom-slide .wp-swiper__slide-content  {
	display: flex;
	height: 100% !important
}

.swiper-custom-slide .wp-swiper__slide-content > .wp-block-group {
	display: flex;
	flex-direction: column;
	justify-content: space-between
}

.wp-swiper__slide .wp-swiper__slide-content {}

.swiper .swiper-slide a {text-decoration: none !important}

.swiper-button-next, .swiper-button-prev {
    position: absolute;
    top: /* var(--swiper-navigation-top-offset, 50%)*/ calc(50% - var(--swiper-navigation-size));
    width: calc(var(--swiper-navigation-size) / 44 * 27);
    height: var(--swiper-navigation-size);
    margin-top: calc(0px -(var(--swiper-navigation-size) / 2));
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color:var(--swiper-navigation-color, var(--swiper-theme-color))
}

.swiper-button-prev {left: -28px;}
.swiper-button-next {right: -28px}

.utgaver-swiper h3 a {
	transition: all ease-out .15s;

	&:hover {color: var(--wp--preset--color--primary-80);}
}

.wp-swiper .wp-element-caption {display: none}



/* ISSUES TEMPLATE */

.ch-55 {max-width: 55ch}

.wp-block-query.utgaver-utlisting > ul > li:first-child {display: none;}
.wp-block-query.utgaver-utlisting > ul > li:nth-child(2) {margin-top: 0 !important;}

.wp-block-query.utgaver-hovedsak > ul > li {display: none}
.wp-block-query.utgaver-hovedsak > ul > li:first-child {display: block;}


/* Issues Select */

.utgave-select select.postform {
  display: block;
  font-size: 16px;
  font-family: sans-serif;
  font-weight: 500;
  color: #000;
  line-height: 1.3;
  padding: .6em 1.4em .5em .8em;
  width: 100%;
  max-width: 100%; /* useful when width is set to anything other than 100% */
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #aaa;
  box-shadow: 0 /*1px 0 1px rgba(0,0,0,.04)*/;
  border-radius: 8px;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25.41 14.12'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: none; stroke: %23aaa; stroke-miterlimit: 10; stroke-width: 2px; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cpolyline class='cls-1' points='24.71 .71 12.71 12.71 .71 .71'/%3E%3C/g%3E%3C/svg%3E"),
  /* url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),*/
   linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%);
  background-repeat: no-repeat, repeat;
  /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/
  background-position: right .7em top 50%, 0 0;
  /* icon size, then gradient */
  background-size: 1.5em auto, 100%;
}
.utgave-select  select.postform::-ms-expand {
  display: none;
}
.utgave-select  select.postform:hover {
  border-color: #888;
}
.utgave-select  select.postform:focus {
  border-color: #aaa;
  /* It'd be nice to use -webkit-focus-ring-color here but it doesn't work on box-shadow */
  box-shadow: 0 0 1px 3px rgba(59, 153, 252, .7);
  box-shadow: 0 0 0 3px -moz-mac-focusring;
  color: #222; 
  outline: none;
}

.utgave-select  select.postform option {
  font-weight:normal;
}


/* VERTICAL SPACING, SINGLE POSTS */

:root .single-post :where(.is-layout-constrained) .entry-content > *,
:root .single-post :where(.is-layout-constrained) .entry-content > * {
    margin-block-start: var(--wp--preset--spacing--50);
    margin-block-end: 0;
}

:root .single-post.post-template :where(.is-layout-constrained) .entry-content > p:first-child {
    margin-block-start: 0 !important;
}

:root .single-post :where(.is-layout-constrained) .entry-content > h2,
:root .single-post :where(.is-layout-constrained) .entry-content > h3,
:root .single-post :where(.is-layout-constrained) .entry-content > h4 {
	padding-top: var(--wp--preset--spacing--20) !important;
	margin-bottom: var(--wp--preset--spacing--30) !important
}

:root .single-post :where(.is-layout-constrained) .entry-content > h2 + p,
:root .single-post :where(.is-layout-constrained) .entry-content > h3 + p,
:root .single-post :where(.is-layout-constrained) .entry-content > h4 + p {
	margin-top: 0
}


.entry-content.wp-block-post-content p:first-child {margin-top: 0 !important}

h2.wp-block-post-title.has-medium-font-size {letter-spacing: 0.015em}

.wp-block-spacer {margin-block-start: 0 !important}

.wp-block-post-title a {
	transition: all ease-in-out .2s
}


/* PREFIX TWEAKS - NORWEGIAN ONLY: ARCHIVE TEMPLATE TITLE + TAG NAME */

.archive.tag .wp-block-query-title:before {
 	content: 'Emne: ';
}

.category.category-nyhet .wp-block-query-title:after {
 	content: 'er';
} 

/* FRONT PAGE FLEX ROW TWEAKS: QUERY LOOPS  */


.has-post-thumbnail .nyheter-forside-query figure {width: 33.33% !important}
.has-post-thumbnail .nyheter-forside-query > div {width: 66.66% !important}

.has-post-thumbnail .nyheter-forside-query-v2 figure {width: 25% !important}
.has-post-thumbnail .nyheter-forside-query-v2 > div {width: 75% !important}

.emner-query-toppsak .has-post-thumbnail  figure {width: 25% !important}
.emner-query-toppsak .has-post-thumbnail  figure + div {width: 75% !important}



/* FEATURED IMAGE :HOVER  */


.wp-block-post-featured-image {transition: ease-in 0.15s}
.wp-block-post-featured-image:hover {opacity: 0.7} 
.single-post .wp-block-post-featured-image:hover {opacity: 1 !important} 


/* SIDEBAR SINGLE PAGE*/

/* Don't display sidebar for the relevant template if sidebar is empty IOK 2025-05-23 */
body.post-template-wp-custom-template-enkeltinnlegg-med-sidebar .main-content-area:not(:has(aside.sidebar-content)) .wp-block-column:nth-child(1) {
  flex-basis:100% !important;
}

body.post-template-wp-custom-template-enkeltinnlegg-med-sidebar .main-content-area:not(:has(aside.sidebar-content)) .wp-block-column:nth-child(2) {
  display:none;
  flex-basis:0% !important;
}

/* SIDEBAR SINGLE PAGE*/


.byline {
	font-family: "Sans Serif";
	font-size: var(--wp--preset--font-size--small)
}

.wp-block-separator {border-top: 1px solid !important}

.inline-kategorimeny {margin-left:0; padding-left: 0}
.inline-kategorimeny li {
	display: inline-flex;
	margin-right: 16px;
	list-style: none;
	font-size: var(--wp--preset--font-size--normal)
}

.inline-kategorimeny li a {
	text-decoration: none;
	font-size: 19px;
	font-weight: 450;
	color: black
}

.inline-kategorimeny li a:hover {text-decoration: underline}


h3 a {text-decoration: none}

.home .wp-block-query .category-leder figure.wp-block-post-featured-image {
	width: 75%;
	height: auto;
	aspect-ratio: 1 !important;
	border-radius: 100%;
	overflow: hidden
}

/* Make sure (imported) article images don't exceed main column width HL 2025-05-24 */

.sidebar-content {
	font-family: 'Sans Serif';
	color: var(--wp--preset--color--primary-100);
	
	h3 {
		font-family: 'Sans Serif' !important;
		font-weight: normal !important;
		font-size: var(--wp--preset--font-size--medium);
		
	}
	
	p, ul, ol, dl, li, code {
		font-size: var(--wp--preset--font-size--small)
	}
}

aside img,
.single-post.post-template-default .entry-content p img,
.single-post.post-template-wp-custom-template-enkeltinnlegg-med-sidebar .entry-content p img {
	max-width: 100%;
}








