.kk-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 16px;
	align-items: start;
	margin: 1.5em 0;
}

/* ---------- Suodattimet ---------- */

.kk-filters {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kk-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 10px 0 0;
	padding: 8px 16px;
	
	border:solid #5EC4BA;
	border-width:0 0 0 10px;
	padding:10px 10px;

	background: #fff;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	transition:ease all .3s
}

.kk-filter:hover,
.kk-filter:focus-visible {
	background: #f2f4f7;
	color: #1d2939;
	border-width:0 0 0 15px;
}

.kk-filter:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}


.kk-dot {
	display: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- Kartta ---------- */

.kk-map {
	height: var(--kk-height, 560px);
	min-height: 300px;
	border-radius: 8px;
	border: 1px solid #d0d5dd;
	z-index: 0;
}

.kk-ball {
	display: block;
	height: 20px !important;
	width: 20px !important;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s;
}

.kk-pin:hover .kk-ball {
	transform: scale(1.15);
}

.kk-pin svg {
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.kk-popup-meta {
	font-size: 0.9em;
	opacity: 1;
	margin-bottom: 20px;
}

.kk-popup-title {
	font-size: 1.2em;
	margin-bottom: 0px;
}

.kk-popup-actions {
	margin: 0px 0 0 !important;
}

.leaflet-popup-content {
	min-width: 200px !important;
}
.leaflet-popup-content-wrapper{
	border-radius: 5px;
}

/* ---------- Korttilista ---------- */

.kk-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: var(--kk-height, 560px);
	overflow-y: auto;
}

/* Vain korttien omat li-elementit, ei kuvauksen sisällä olevia luettelokohtia. */
.kk-list > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kk-list > li::before {
	content: none;
}

.kk-card {
	padding: 18px 14px !important;

	cursor: pointer;
	transition: background-color 0.15s;

	border-radius: 5px;

	margin: 10px !important;

	box-shadow: 0px 0px 6px #b2b2b2;
}

.kk-card:last-of-type {
	border-bottom: 0;
}

.kk-card[hidden],
.kk-no-results[hidden] {
	display: none;
}

.kk-card:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: -2px;
}

.kk-card-meta {
	line-height: 1.3;
	margin-bottom: 24px;
	color: #000; 
	font-size: .8em;
}

.kk-card-cat,.kk-card-city {
	font-weight: 700;
	letter-spacing: 0.02em;
	/*text-transform: uppercase;*/
	border: 2px solid;
	border-radius: 5px;
	padding: 4px 6px;
	margin: 0 5px 0 0;
}

.kk-card .kk-card-title {
	margin: 0px 0 20px 0;
	font-size: 1.15em;
	line-height: 1.25;
}

/* ---------- Kortin kuva ----------
   Muokkaa kuvan ulkoasua tässä. Pikamuutokset muuttujilla:
   --kk-img-ratio   kuvasuhde (esim. 16 / 9, 4 / 3, 1 / 1, 3 / 2)
   --kk-img-fit     cover = täyttää ja rajaa, contain = näyttää koko kuvan
   --kk-img-pos     rajauksen kohta (esim. center, top, 50% 30%)
   --kk-img-radius  kulmien pyöristys
   --kk-img-gap     väli kuvan ja otsikon välillä
*/
.kk-card {
	--kk-img-ratio: 16 / 9;
	--kk-img-fit: cover;
	--kk-img-pos: center;
	--kk-img-radius: 5px;
	--kk-img-gap: 16px;
}

.kk-card-media {
	margin: 0 0 var(--kk-img-gap);
	border-radius: var(--kk-img-radius);
	overflow: hidden;
	line-height: 0;
	background: #f2f4f7;
}

.kk-card-media .kk-card-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--kk-img-ratio);
	object-fit: var(--kk-img-fit);
	object-position: var(--kk-img-pos);
	max-width: 100%;
	margin: 0;
}

/* ---------- Kuvauksen muotoilu (otsikkotasot, luettelot jne.) ---------- */

.kk-card-content {
	position: relative;
	max-height: 9em;
	overflow: hidden;
	font-size: 0.92em;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.kk-card-content:not(.is-short)::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2em;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}

.kk-card:hover .kk-card-content:not(.is-short)::after {
	background: linear-gradient(rgba(249, 250, 251, 0), #f9fafb);
}

.kk-card.is-active .kk-card-content:not(.is-short)::after {
	background: linear-gradient(rgba(239, 246, 255, 0), #eff6ff);
}

/* Valittu kortti näyttää koko sisällön. */
.kk-card.is-active .kk-card-content {
	max-height: none;
}

.kk-card.is-active .kk-card-content::after {
	display: none;
}

.kk-card-content > :first-child {
	margin-top: 0;
}

.kk-card-content > :last-child {
	margin-bottom: 0;
}

.kk-card-content p {
	margin: 0 0 0.75em;
}

.kk-card-content h1,
.kk-card-content h2,
.kk-card-content h3,
.kk-card-content h4,
.kk-card-content h5,
.kk-card-content h6 {
	margin: 1em 0 0.4em;
	line-height: 1.25;
	font-weight: 700;
}

.kk-card-content h1 { font-size: 1.4em; }
.kk-card-content h2 { font-size: 1.25em; }
.kk-card-content h3 { font-size: 1.12em; }
.kk-card-content h4 { font-size: 1em; }
.kk-card-content h5 { font-size: 0.95em; }
.kk-card-content h6 { font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.03em; }

.kk-card-content ul,
.kk-card-content ol {
	margin: 0 0 0.75em;
	padding-left: 1.4em;
}

.kk-card-content ul {
	list-style: disc outside;
}

.kk-card-content ol {
	list-style: decimal outside;
}

.kk-card-content ul ul {
	list-style: circle outside;
}

.kk-card-content li {
	display: list-item;
	margin: 0.2em 0;
	padding: 0;
	list-style: inherit;
	border: 0;
}

.kk-card-content li::before {
	content: none;
}

.kk-card-content blockquote {
	margin: 0 0 0.75em;
	padding: 0.2em 0 0.2em 0.9em;
	border-left: 3px solid #d0d5dd;
	font-style: italic;
}

.kk-card-content img {
	max-width: 100%;
	height: auto;
}

.kk-card-content a {
	text-decoration: underline;
}

/* ---------- Painike ---------- */

.kk-card-actions {
	margin: 10px 0 0;
}

.kk-btn {
	display: inline-block;
	padding: 8px 16px;
	
	margin: 15px 0 5px 0;

	border: 2px solid #000;

	background: #fff;
	color: #000 !important;
	font-size: 0.9em;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;

	transition: ease all .3s;

}

.kk-btn:hover,
.kk-btn:focus-visible {
	border-width: 2px 2px 2px 15px;
	color: #f38366 !important;
}

.kk-btn-small {
	padding: 8px 14px;
	font-size: 0.9em;
	font-weight: 600;
	width: 100%;
}

.kk-empty,
.kk-no-results {
	padding: 14px 16px;
}

/* ---------- Mobiili ---------- */

@media (max-width: 800px) {
	.kk-wrap {
		grid-template-columns: 1fr;
	}

	.kk-map {
		height: 360px;
	}

	.kk-list {
		max-height: 480px;
	}
}
