/* =========================================================
   CUSTOM BLOCKS CSS – JALOIN THEME
   Räätälöityjen lohkojen säätö ja ulkoasu.
   ========================================================= */






/* =========================================================
   LOHKO: Asiakastarinat
   ========================================================= */

.tarinat-slider {
	position: relative;
	overflow: hidden;
	max-width: 900px;
}

.tarinat-slider .slider-track {
	display: flex !important;
	flex-wrap: nowrap !important;
	width: 100%;
	transition: transform 0.4s ease !important;
}

@media (prefers-reduced-motion: reduce) {
	.tarinat-slider .slider-track {
		transition: none !important;
	}
}

.tarinat-slider .slide {
	position: relative;
	box-sizing: border-box;
	flex: 0 0 100% !important;
	min-width: 100% !important;
	padding: 2rem 0;
}

.tarinat-slider blockquote,
.tarinat-slider .tarina-sitaatti {
	margin: 0;
	padding: 0;
	border: 0;
}

.tarinat-slider .tarina-sitaatti {
	position: relative;
	padding-left: clamp(56px, 6vw, 84px);
}

.tarinat-slider .tarina-sitaatti::before {
	content: "“";
	position: absolute;
	left: 0;
	top: -0.05em;
	font-size: clamp(100px, 12vw, 100px);
	line-height: 1;
	color: var(--global-palette7);
	font-family: "Times", serif;
	font-weight: 700;
}

.tarinat-slider .tarina-sitaatti p {
	margin: 0;
}

.tarinat-slider .tarina-meta {
	margin-top: var(--global-kb-spacing-md, 1.5rem);
	padding-left: clamp(56px, 6vw, 84px);
}

.tarinat-slider .tarina-nimi {
	font-weight: 400;
}

.tarinat-slider .tarina-tiedot {
	margin-top: 0.25rem;
	opacity: 0.9;
}

/* =========================================================
   Slider arrows
   ========================================================= */


.tarinat-slider .slider-ui {
	position: relative;
	min-height: 52px;
	margin-top: var(--global-kb-spacing-md, 1.5rem);
}


.tarinat-slider .slider-arrows {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}


.tarinat-slider .slider-prev,
.tarinat-slider .slider-next {
	display: inline-grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--global-palette5);
	box-shadow: none;
	cursor: pointer;
	font-size: 0;
	line-height: 1;
	transition:
		background-color 0.2s ease,
		opacity 0.2s ease,
		transform 0.2s ease;
}

.tarinat-slider .slider-prev:hover,
.tarinat-slider .slider-next:hover {
	background: var(--global-palette4);
}


.tarinat-slider .slider-prev::before,
.tarinat-slider .slider-next::before {
	content: "";
	display: block;
	width: 11px;
	height: 11px;
	border-right: 2px solid var(--global-palette3);
	border-bottom: 2px solid var(--global-palette3);
}


.tarinat-slider .slider-prev::before {
	transform: rotate(135deg);
	margin-left: 4px;
}


.tarinat-slider .slider-next::before {
	transform: rotate(-45deg);
	margin-right: 4px;
}


.tarinat-slider .slider-prev:disabled,
.tarinat-slider .slider-next:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}


.tarinat-slider .slider-prev:focus-visible,
.tarinat-slider .slider-next:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* =========================================================
   YHTEINEN: Tekstialue
   ========================================================= */

.tekstialue {
	display: flex;
	align-items: center;
	min-width: 0;
}



.huomio .tekstialue-sisus {
	width: 100%;
	padding: 1.5rem;
}

.kuva-teksti .tekstialue-sisus {
	padding: 1.5rem;
	}

.kuva-teksti--no-bg .tekstialue-sisus {
	width: 100%;
	padding: 1.5rem 0;
}


/* Taustakuvio (yleinen mekanismi) */
.tekstialue.has-bg-pattern {
	background-repeat: no-repeat;
	background-position: right bottom;
	background-size: 40% auto;
}

@media (min-width: 1025px) {
	.kuva-teksti .tekstialue-sisus {
		padding: 3rem;
	}
	
	.huomio .tekstialue-sisus {
	width: 100%;
	padding: 1.5rem;
}


	.tekstialue.has-bg-pattern {
		background-size: contain;
	}
}



/* =========================================================
   LOHKO: Kuva + teksti
   ========================================================= */

.kuva-teksti {
	padding-left: 0;
	padding-right: 0;
	padding-bottom:2rem;
	clear: both;
}

/* Mobiili: 1 palsta */
.kuva-teksti .kuva-teksti-sisus {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
		
}

.kuva-teksti .kuva,
.kuva-teksti .tekstialue {
	min-width: 0;
}

/* Kuvapuoli */
.kuva-teksti .kuva-sisus {
	position: relative;
	height: auto;
	overflow: hidden;
	aspect-ratio: 3 / 2;
}

.kuva-teksti .kuva img {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Kuva + teksti: tekstialueen tausta */
.kuva-teksti .tekstialue {
	background-color: var(--global-palette7);
	display:flex;
	align-items:center;
}




/* Desktop: 2 palstaa + järjestyksen kääntö */
@media (min-width: 1025px) {
	.kuva-teksti .kuva-teksti-sisus {
		grid-template-columns: 1fr 1fr;
	}

	.kuva-teksti .kuva {
		grid-column: 1;
	}

	.kuva-teksti .tekstialue {
		grid-column: 2;
	}

	.kuva-teksti.kuva-teksti--image-right .kuva-teksti-sisus {
		grid-template-columns: 50% 50%;
	}

	.kuva-teksti.kuva-teksti--image-right .kuva {
		grid-column: 2;
		grid-row: 1;
	}

	.kuva-teksti.kuva-teksti--image-right .tekstialue {
		grid-column: 1;
		grid-row: 1;
	}

	/* Desktopissa kuva venyy rivin korkeuteen */
	.kuva-teksti .kuva-sisus {
		aspect-ratio: auto;
		height: 100%;
	}

	.kuva-teksti .kuva img {
		position: static;
		width: 100%;
		height: 100%;
	}
}


/* =========================================================
   Kuva + teksti – taustaton versio
   ========================================================= */

.kuva-teksti--no-bg {
	/* Puretaan full-bleed */
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	max-width: 1536px;
	padding-left: 0;
	padding-right: 0;
	margin-top: 1rem;
	margin-bottom: 1.5rem;
}

.kuva-teksti--image-right.kuva-teksti--no-bg .tekstialue-sisus {
	padding-left: 0;
}



/* Piilota tausta */

.kuva-teksti--no-bg .tekstialue {
	background-color: transparent !important;
}

.kuva-teksti--no-bg .tekstialue.has-bg-pattern {
	background-image: none !important;
}



/* =========================================================
   LOHKO: Huomio
   ========================================================= */

.huomio {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.huomio .tekstialue {
	background-color: var(--global-palette8);
	border-radius: 10px;
}






/* =========================================================
   LOHKO: YHTEYSTIEDOT
   ========================================================= */

.yhteystiedot .yhteystiedot-grid{
	display:flex;
	flex-wrap:wrap;
	gap: clamp(24px, 3vw, 48px);
	justify-content: flex-start;
	align-items:flex-start;
}

.yhteystiedot .yhteystiedot-card{
	flex: 0 0 260px;
	max-width: 400px;
}

.yhteystiedot .yhteystiedot-kuva{
	width: 250px;
	aspect-ratio: 1 / 1;
	border-radius: 9999px;
	overflow:hidden;
	background: #fff;
}

.yhteystiedot .yhteystiedot-img{
	width:100%;
	height:100%;
	object-fit:cover;
	display:block;
}

.yhteystiedot .yhteystiedot-sisalto{
	margin-top: 16px;
	text-align:center;
}

.yhteystiedot a {
		text-align:center;
}

.yhteystiedot .yhteystiedot-nimi{
	font-size: 1.2rem;
	line-height: 1.2;
	font-weight: 500;
	margin: 0 0 6px 0;
}

.yhteystiedot .yhteystiedot-titteli{
	margin: 0 0 12px 0;
}

.yhteystiedot .yhteystiedot-rivi{
	display:flex;
	gap: 8px;
	align-items:baseline;
	margin-top: 6px;
	justify-content: space-evenly;
}

.yhteystiedot .yhteystiedot-label{
	opacity: .75;
}




/* =========================================================
   Palvelukortit
   ========================================================= */

.palvelukortti h2, h3 {
	font-family: var(--global-body-font);
}

.palvelukortti h2 {
		font-size: 1.4rem;
		letter-spacing: 0em;
}

.palvelukortti h3 {
		font-size: 1.4rem;
}

.palvelukortti .yrityskuva img {
	max-height: 60px;
	width: auto !important;
}

.palvelukortti .kb-button[href=""] {
	display: none !important;
}


/* =========================================================
   Palvelukortit
   ========================================================= */

.aktiviteettikortti .kt-blocks-accordion-title {
	font-size: 1.15rem !important;
	font-weight: 600 !important;
	letter-spacing: 0em;
}