.kp-animals{
	--kp-an-gap:26px;
	--kp-an-per:3;
	max-width:1140px;
	margin:0 auto;
	padding:0 20px 10px;
	text-align:center;
}

.kp-animals__title{
	margin:0 0 16px;
	font-size:clamp(26px,3.2vw,42px);
	line-height:1.15;
	font-weight:700;
	color:#171717;
}

.kp-animals__intro{
	max-width:62ch;
	margin:0 auto 34px;
	font-size:17px;
	line-height:1.65;
	color:#4a4a4a;
}

.kp-animals__viewport{
	position:relative;
	margin:0 auto;
	padding:0 4px;
}

.kp-animals__viewport:focus-visible{
	outline:3px solid #ffd34f;
	outline-offset:4px;
	border-radius:20px;
}

.kp-animals__track{
	display:flex;
	gap:var(--kp-an-gap);
	margin:0;
	padding:4px 0 6px;
	list-style:none;
	overflow-x:auto;
	scroll-snap-type:x mandatory;
	scroll-behavior:smooth;
	scrollbar-width:none;
	-ms-overflow-style:none;
}

.kp-animals__track::-webkit-scrollbar{display:none}

.kp-animals__slide{
	position:relative;
	flex:0 0 calc((100% - (var(--kp-an-per) - 1) * var(--kp-an-gap)) / var(--kp-an-per));
	scroll-snap-align:start;
	border-radius:18px;
	overflow:hidden;
	background:#fff;
	box-shadow:0 14px 30px -18px rgba(0,0,0,.45);
}

.kp-animals__link{display:block;color:inherit;text-decoration:none}

.kp-animals__media{display:block;overflow:hidden;line-height:0}

.kp-animals__media img{
	width:100%;
	aspect-ratio:4 / 3;
	object-fit:cover;
	display:block;
	transition:transform .55s cubic-bezier(.2,.7,.3,1);
}

.kp-animals__slide:hover .kp-animals__media img{transform:scale(1.05)}

.kp-animals__caption{
	position:absolute;
	left:0;
	right:0;
	bottom:0;
	padding:26px 16px 14px;
	font-size:14px;
	font-weight:600;
	letter-spacing:.02em;
	color:#fff;
	text-align:left;
	background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.62) 78%);
}

.kp-animals__arrow{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:44px;
	height:44px;
	display:grid;
	place-items:center;
	border:0;
	border-radius:50%;
	background:rgba(255,255,255,.94);
	color:#171717;
	font-size:26px;
	line-height:1;
	cursor:pointer;
	box-shadow:0 8px 18px -8px rgba(0,0,0,.5);
	transition:background .18s ease,transform .18s ease,opacity .18s ease;
	z-index:3;
}

.kp-animals__arrow:hover{background:#ffd34f}
.kp-animals__arrow:focus-visible{outline:3px solid #ffd34f;outline-offset:2px}
.kp-animals__arrow[disabled]{opacity:.35;cursor:default}
.kp-animals__arrow--prev{left:-14px}
.kp-animals__arrow--next{right:-14px}

.kp-animals__dots{
	display:flex;
	justify-content:center;
	align-items:center;
	gap:8px;
	margin-top:22px;
}

.kp-animals__dots button{
	width:10px;
	height:10px;
	padding:0;
	border:0;
	border-radius:999px;
	background:#c9c3b8;
	cursor:pointer;
	transition:width .2s ease,background .2s ease;
}

.kp-animals__dots button[aria-current="true"]{
	width:28px;
	background:#171717;
}

.kp-animals__cta{margin:26px 0 0}

.kp-animals__btn{
	display:inline-block;
	padding:14px 32px;
	border-radius:999px;
	background:#ffd34f;
	color:#171717;
	font-weight:700;
	font-size:15px;
	letter-spacing:.02em;
	text-decoration:none;
	box-shadow:0 10px 22px -12px rgba(0,0,0,.55);
	transition:transform .18s ease,background .18s ease;
}

.kp-animals__btn:hover{background:#ffdf7a;transform:translateY(-1px);color:#171717}

@media (max-width:1024px){
	.kp-animals{--kp-an-gap:18px}
	.kp-animals__arrow--prev{left:-6px}
	.kp-animals__arrow--next{right:-6px}
}

@media (max-width:700px){
	.kp-animals{--kp-an-gap:14px}
	.kp-animals__intro{font-size:15.5px;margin-bottom:24px}
	.kp-animals__arrow{width:38px;height:38px;font-size:22px}
	.kp-animals__arrow--prev{left:-4px}
	.kp-animals__arrow--next{right:-4px}
	.kp-animals__caption{font-size:13px;padding:22px 12px 12px}
}

@media (prefers-reduced-motion:reduce){
	.kp-animals__track{scroll-behavior:auto}
	.kp-animals__media img{transition:none}
}

/* Kuvan avaus klikkauksella tai kosketuksella */

.kp-animals__media img[data-kp-zoom]{
	cursor:zoom-in;
}

.kp-animals__media img[data-kp-zoom]:focus-visible{
	outline:3px solid #ffd34f;
	outline-offset:-3px;
}

.kp-slider-lightbox{
	position:fixed;
	inset:0;
	z-index:100000;
	display:flex;
	align-items:center;
	justify-content:center;
	padding:24px;
	background:rgba(0,0,0,.86);
	cursor:zoom-out;
}

.kp-slider-lightbox img{
	width:auto;
	height:auto;
	max-width:100%;
	max-height:100%;
	border-radius:8px;
	box-shadow:0 20px 60px rgba(0,0,0,.5);
	cursor:zoom-out;
}

.kp-slider-lightbox__close{
	position:absolute;
	top:16px;
	right:16px;
	width:44px;
	height:44px;
	padding:0;
	border:0;
	border-radius:50%;
	background:rgba(255,255,255,.92);
	color:#1b1b1b;
	font-size:26px;
	line-height:1;
	cursor:pointer;
}

.kp-slider-lightbox__close:hover,
.kp-slider-lightbox__close:focus-visible{
	background:#fff;
}
