:root{
	--scrollbar-half: 8.5px;
}
@media not all and (min-resolution: .001dpcm){
	body{
		--scrollbar-half: 7.5px;
	}
}
@media (hover: none){
	:root{
		--scrollbar-half: 0px;
	}
}
@media (min-width: 576px){
	:root{
		--halfInnerContainer: 396px;
	}
}
@media (min-width: 768px){
	:root{
		--halfInnerContainer: 336px;
	}
}
@media (min-width: 992px){
	:root{
		--halfInnerContainer: 472px;
	}
}
@media (min-width: 1200px){
	:root{
		--halfInnerContainer: 562px;
	}
}
@media (min-width: 1600px){
	:root{
		--halfInnerContainer: 720px;
	}
}
:root{
	--bs-offset: 15px;
	--snap: -15px;
}
@media (min-width: 576px){
	:root{
		--bs-offset: calc( 50vw - var(--halfInnerContainer) - var(--scrollbar-half) );
		--snap: calc( -1 * var(--bs-offset) );
	}
}


body:not(.home) #content .container{
	max-width: 1920px;
	--bs-gutter-x: 60px;
}
body:not(.home) #content .container .row{
	--bs-gutter-x: 50px;
}


/* Editor improvements */

body.mce-content-body{
	margin: 15px;
}

.wp-block{
	max-width: 1290px;
}
.wp-block[data-align=wide],
.wp-block[data-align=wide] > .wp-block{
	max-width: 1360px;
}
.wp-block[data-align=full],
.wp-block[data-align=full] > .wp-block{
	max-width: none;
}
.wp-block.is-reusable{
	max-width: none;
}

:where(.wp-block-group.has-background){
	padding: 0;
}

/* Styling */

:root{
	--white: #fff;
	--black: #000;
	--orange: #008ac7;
	--green: #626667;
	--yellow: #efefef;
	--silver: #e3e3e3;
	--kmaagrey: #616667;
	--kmaalightgrey: #eff0f0;
	--kmaadarkblue: #004a80;
}

.has-white-color{ color: var(--white) !important }
.has-white-background-color{ background-color: var(--white) !important }
.has-orange-color{ color: var(--orange) !important }
.has-orange-background-color{ background-color: var(--orange) !important }
.has-green-color{ color: var(--green) !important }
.has-green-background-color{ background-color: var(--green) !important }
.has-yellow-color{ color: var(--yellow) !important }
.has-yellow-background-color{ background-color: var(--yellow) !important }
.has-silver-color{ color: var(--silver) !important }
.has-silver-background-color{ background-color: var(--silver) !important }

body{
	font-family: Inter, sans-serif;
	font-size: 18px;
	line-height: 1.5;
	color: var(--black);
}

h1, h2, h3, h4, h5, h6{
	hyphens: auto;
	-ms-hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6{
	font-weight: bold;
}

h1, .h1, .is-style-h1{
	font-size: 45px;
}

article h1 {
	margin-bottom: 20px;
}

h2, .h2, .is-style-h2{
	margin: 0 auto 26px;
	font-size: 35px;
}

h3, .h3, .is-style-h3{
	margin: 0 auto 30px;
	font-size: 22px;
	font-weight: 500;
}

.page-template-default h3 {
	font-size: 24px;
}

.page-template-default h4 {
	margin: 0 auto 20px;
	font-size: 20px;
	font-weight: 500;
}

p,
ul[data-type="core/list"],
.modal ul,
article ul{
	margin: 0 auto 20px;
}

.lead,
.has-lead-font-size,
p.lead,
p.has-lead-font-size{
	font-size: 16px;
}

:is(p,ul):last-child{
	margin-bottom: 0;
}

a,
a:hover{
	color: var(--green);
}

.wp-block-group{
	position: relative;
}

.wp-block-cover-image.has-custom-content-position .wp-block-cover__inner-container.container,
.wp-block-cover.has-custom-content-position .wp-block-cover__inner-container.container{
	width: 100%;
}
.wp-block-cover-image .wp-block-cover__inner-container,
.wp-block-cover .wp-block-cover__inner-container{
	width: 100%;
}
.wp-block-cover,
.wp-block-cover-image{
	min-height: 0;
	padding: 0;
}
.wp-block-cover__image-background,
.wp-block-cover__video-background{
	width: 100%;
	height: 100%;
}

.wp-block-buttons{
	column-gap: 30px;
}
.wp-block-buttons > .wp-block-button{
	margin-right: 0;
	margin-bottom: 0;
}

.btn,
.btn:hover,
.wp-block-button__link,
.wp-block-button__link:hover{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 30px;
	line-height: 1.2;
	background: var(--kmaadarkblue) !important;
	border: 0 !important;
	border-radius: 7px;
	font-size: 18px;
	font-weight: 500;
	color: var(--white) !important;
	transition: opacity .3s ease;
}

.swiper-slide .btn,
.swiper-slide .btn:hover {
	background: var(--white) !important;
	color: var(--kmaadarkblue) !important;
}
.btn:hover,
.wp-block-button__link:hover{
	opacity: 0.8;
}

.btn-green,
.btn-green:hover,
.is-style-green .wp-block-button__link,
.is-style-green .wp-block-button__link:hover{
	background: var(--green) !important;
	color: var(--white) !important;
}

.btn-white,
.btn-white:hover,
.is-style-white .wp-block-button__link,
.is-style-white .wp-block-button__link:hover{
	background: var(--white) !important;
	color: var(--kmaadarkblue) !important;
}

.btn-up:before{
	content: url(../images/arrow-left.svg);
	flex-shrink: 0;
	display: block;
	font-size: 0;
	line-height: 1;
	transform: rotate(90deg);
	transform-origin: center;
	filter: brightness(0) saturate(100%) invert(17%) sepia(92%) saturate(1805%) hue-rotate(186deg) brightness(97%) contrast(102%);
}

.filter a.btn {
	background: var(--green) !important;
	color: var(--white) !important;
	border: 1px solid var(--green) !important;
}

.filter a.btn-green {
	background: var(--white) !important;
	color: var(--green) !important;
	border: 1px solid var(--green) !important;
}

.wp-block-image{
	margin: 0 auto;
}

.dont-break-out{
	overflow-wrap: break-word;
	word-wrap: break-word;
	-ms-word-break: break-all;
	word-break: break-all;
	word-break: break-word;
	-ms-hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.wa-footer-1 .menu,
.socials{
	display: inline-flex;
	gap: 10px;
}
.btn-search,
.wa-footer-1 .menu .nav-link,
.socials .nav-link{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	background: var(--kmaalightgrey);
	border: 0;
	border-radius: 50%;
	font-size: 24px;
	color: var(--black);
	transition: opacity .3s ease;
}
.wa-footer-1 .menu .nav-link:hover,
.socials .nav-link:hover{
	opacity: 0.8;
}

.blog-row{
	margin-top: 30px;
	margin-bottom: 30px;
	gap: 30px 0;
}
a.article-item{
	display: block;
	height: 100%;
	padding: 40px 20px;
	background: var(--white);
	text-decoration: none;
	font-size: 17px;
	line-height: normal;
	color: #000;
	border: 1px var(--yellow) solid; 
}

a.article-item .excerpt{
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
a.article-item .more{
	margin-top: 26px;
	font-size: 18px;
	color: var(--kmaadarkblue);
}

a.article-item .metas {
	margin: 0 0 14px;
    font-size: 17px;
}

a.article-item:hover {
	text-decoration: underline;
	border: 1px var(--yellow) solid;
}

.page-sidebar a.article-item {
	padding: 0;
	font-size: 16px;
	border: 0;
	border-bottom: 1px var(--yellow) solid;
	padding-bottom: 10px;
}

.page-sidebar a.article-item h3 {
	font-size: 18px;
	border: none;
	padding-bottom: 0;
}

.page-sidebar a.article-item .metas {
	font-size: 16px;
}

.page-sidebar a.article-item .more {
	font-size: 16px;
}

a.event-item{
	display: block;
	height: 100%;
	overflow: hidden;
	background: var(--white);
	border-radius: 5px;
	box-shadow: 0px 14px 25.2px 3.8px rgba(228, 228, 228, 0.74);
	font-size: 16px;
	color: var(--green);
	text-decoration: none;
}

a.event-item:hover {
	text-decoration: underline;
}


.event-item .image{
	aspect-ratio: 410/180;
	background: #e3e3e3;
}
.event-item .metas{
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--yellow);
}
.event-item .metas > div{
	display: flex;
	align-items: center;
	gap: 11px;
}
.event-item .metas .date{
	flex-shrink: 0;
}
.event-item h3{
	margin: 15px 20px;
	font-size: 20px;
	font-weight: 600;
	color: var(--black);
}

.downloads-list {
	margin: 20px 0;
}

.downloads-list .row{
	gap: 16px 0;
}
.downloads-list a{
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	background: var(--white);
	border: 1px solid var(--yellow);
	text-decoration: none;
	color: var(--kmaadarkblue)
}

.downloads-list a:hover{
	text-decoration: underline;
}

h1 + .kuva{
	margin-top: 30px;
}
.kuva + .ingressi{
	margin-top: 30px;
}

.kuva figcaption {
	background-color: var(--kmaalightgrey);
	padding: 10px;
	font-size: 16px;
	margin-bottom: 40px;
}


@media( max-width: 767px ){
	.btn, .btn:hover, .wp-block-button__link, .wp-block-button__link:hover{
		padding: 14px 24px;
	}
}

@media( max-width: 575px ){
	h1, .h1, .is-style-h1{
		font-size: 38px;
	}
}