/* Slider naslovnice od slojeva (inc/slider.php). Velicine su u cqi (postotak
   sirine slidera), pa se sve skalira sa sirinom stupca, ne ekrana. */

.am-sl {
	position: relative;
	container-type: inline-size;
	margin-bottom: 10px;
}

.am-sl-traka {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.am-sl-traka::-webkit-scrollbar {
	display: none;
}

.am-sl-slajd {
	--nar: #fd6602;
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
	aspect-ratio: 3 / 1;
	display: grid;
	grid-template-columns: 1fr minmax(0, 1.45fr) 1fr;
	align-items: end;
	gap: 0 1cqi;
	padding: 0 2cqi;
	overflow: hidden;
	color: #262a33;
	text-decoration: none !important;
	background:
		url(../img/slider/poz-l.webp) left top / auto 100% no-repeat,
		url(../img/slider/poz-d.webp) right top / auto 100% no-repeat,
		linear-gradient(#fefefe, #ebebeb);
}

.am-sl-slajd:hover,
.am-sl-slajd:focus {
	color: #262a33;
}

/* proizvodi lijevo i desno */
.am-sl-l,
.am-sl-d {
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	max-height: 26cqi;
	object-fit: contain;
	object-position: bottom center;
	margin-bottom: 1.5cqi;
	filter: drop-shadow(0 .6cqi .8cqi rgba(0, 0, 0, .18));
	transition: transform .5s ease;
}

.am-sl-slajd:hover .am-sl-l { transform: translateX(.6cqi) scale(1.02); }
.am-sl-slajd:hover .am-sl-d { transform: translateX(-.6cqi) scale(1.02); }

/* tekst u sredini */
.am-sl-tekst {
	position: relative;
	z-index: 2;
	align-self: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .7cqi;
	text-align: center;
}

.am-sl-tekst p {
	margin: 0;
	line-height: 1.25;
}

.am-sl-tekst em {
	font-style: normal;
	color: var(--nar);
}

.am-sl-h {
	font-family: var(--wd-title-font, inherit);
	font-weight: 700;
	font-size: 3.1cqi;
	line-height: 1.08 !important;
	color: #1d2230;
	letter-spacing: -.01em;
}

.am-sl-tomos .am-sl-h em,
.am-sl-meteor .am-sl-h em,
.am-sl-kosilice .am-sl-h em {
	display: block;
}

.am-sl-kosilice .am-sl-h {
	text-transform: uppercase;
}

.am-sl-logo {
	width: auto;
	height: 6.5cqi;
	object-fit: contain;
}

.am-sl-agria .am-sl-logo { height: 8cqi; }
.am-sl-kontakt .am-sl-logo { height: 9cqi; }

.am-sl-p,
.am-sl-p2 {
	font-size: 1.6cqi;
	font-weight: 600;
}

.am-sl-marke {
	font-size: 1.4cqi;
	font-weight: 700;
	letter-spacing: .04em;
	max-width: 52cqi;
}

.am-sl-slogan {
	font-family: var(--wd-title-font, inherit);
	font-size: 2cqi;
	font-weight: 600;
	margin-top: .6cqi !important;
}

.am-sl-lista {
	list-style: none;
	margin: 0 !important;
	padding: 0;
	text-align: left;
	font-size: 1.65cqi;
	font-weight: 600;
	line-height: 1.45;
}

.am-sl-lista li {
	margin: 0;
	padding-left: 1.4em;
	position: relative;
}

.am-sl-lista li::before {
	content: "";
	position: absolute;
	left: .2em;
	top: .68em;
	width: .65em;
	height: .16em;
	border-radius: 1em;
	background: var(--nar);
}

.am-sl-gumb {
	margin-top: .5cqi;
	display: inline-flex;
	align-items: center;
	gap: .7em;
	padding: .55em 1.5em .55em 1.7em;
	border-radius: 999px;
	background: linear-gradient(180deg, #ff7d22, #ef5b00);
	box-shadow: 0 .5cqi 1.4cqi rgba(239, 91, 0, .35);
	color: #fff;
	font-weight: 700;
	font-size: 1.6cqi;
	line-height: 1.2;
	transition: transform .2s, box-shadow .2s;
}

.am-sl-gumb::after {
	content: "";
	width: .45em;
	height: .45em;
	border: solid currentColor;
	border-width: .14em .14em 0 0;
	transform: rotate(45deg);
}

.am-sl-slajd:hover .am-sl-gumb {
	transform: translateY(-2px);
	box-shadow: 0 .8cqi 1.8cqi rgba(239, 91, 0, .45);
}

/* trava uz donji rub (kosilice) */
.am-sl-trava {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 5cqi;
	object-fit: cover;
	object-position: top;
	opacity: .55;
	pointer-events: none;
}

/* Vodilice: tekst gore, tri proizvoda u redu */
.am-sl--red {
	grid-template-columns: 1fr;
}

.am-sl--red .am-sl-tekst {
	align-self: stretch;
	justify-content: center;
	gap: .4cqi;
}

.am-sl-red {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3cqi;
	width: 100%;
	margin: .8cqi 0 .2cqi;
}

.am-sl-red img {
	width: auto;
	height: 15.5cqi;
	max-width: 30%;
	object-fit: contain;
	filter: drop-shadow(0 .5cqi .7cqi rgba(0, 0, 0, .18));
}

/* Kontakt: sve u sredini + traka prednosti */
.am-sl--kontakt {
	grid-template-columns: 1fr;
}

.am-sl--kontakt .am-sl-tekst {
	gap: .5cqi;
}

.am-sl-prednosti {
	list-style: none;
	margin: .8cqi 0 0 !important;
	padding: 1cqi 2cqi;
	display: flex;
	gap: 2.5cqi;
	background: rgba(255, 255, 255, .92);
	border-radius: 1.2cqi;
	box-shadow: 0 .4cqi 1.6cqi rgba(0, 0, 0, .08);
	text-align: left;
}

.am-sl-prednosti li {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 1cqi;
	font-size: 1.05cqi;
	color: #6b7280;
	line-height: 1.3;
}

.am-sl-prednosti li + li {
	padding-left: 2.5cqi;
	border-left: 1px solid #f3c3a2;
}

.am-sl-prednosti b {
	display: block;
	font-size: 1.2cqi;
	color: #1d2230;
}

.am-sl-prednosti i {
	font-size: 2.2cqi;
	color: var(--nar);
}

/* strelice i tockice (isti izgled kao prije) */
.am-sl-str {
	position: absolute;
	top: calc(50% - 25px);
	z-index: 3;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
	color: var(--nar, #fd6602);
	cursor: pointer;
	transition: background-color .2s;
}

.am-sl-str::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border: solid #fd6602;
	border-width: 2.5px 2.5px 0 0;
	transform: translate(-65%, -50%) rotate(45deg);
}

.am-sl-pret { left: 10px; }
.am-sl-pret::before { transform: translate(-35%, -50%) rotate(-135deg); }
.am-sl-sljed { right: 10px; }

.am-sl-str:hover { background: #fd6602; }
.am-sl-str:hover::before { border-color: #fff; }

.am-sl-tocke {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}

.am-sl-tocke button {
	width: 10px;
	height: 10px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f3c3a2;
	cursor: pointer;
	transition: background-color .2s, transform .2s;
}

.am-sl-tocke button[aria-current] {
	background: #fd6602;
	transform: scale(1.25);
}

/* ---------- tablet / uzi stupac: malo visi slajd, veca slova ---------- */
@container (max-width: 860px) {
	.am-sl-slajd { aspect-ratio: 2.5 / 1; }
	.am-sl-h { font-size: 3.6cqi; }
	.am-sl-p, .am-sl-p2, .am-sl-lista { font-size: 1.8cqi; }
	.am-sl-marke { font-size: 1.55cqi; max-width: 60cqi; }
	.am-sl-gumb { font-size: 1.9cqi; }
	.am-sl-l, .am-sl-d { max-height: 30cqi; }
	.am-sl-red img { height: 18cqi; }
	.am-sl-prednosti li { font-size: 1.3cqi; }
	.am-sl-prednosti b { font-size: 1.45cqi; }
}

/* ---------- mobitel: tekst gore, proizvodi ispod jedan do drugoga ---------- */
@container (max-width: 600px) {
	.am-sl-slajd {
		aspect-ratio: auto;
		min-height: 105cqi;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1fr auto;
		grid-template-areas: "t t" "l d";
		gap: 0 3cqi;
		padding: 5cqi 4cqi 0;
		background:
			url(../img/slider/poz-l.webp) left bottom / auto 40% no-repeat,
			url(../img/slider/poz-d.webp) right top / auto 30% no-repeat,
			linear-gradient(#fefefe, #ebebeb);
	}

	.am-sl-tekst { grid-area: t; gap: 2cqi; padding: 0 7cqi; align-self: center; }
	.am-sl-l { grid-area: l; }
	.am-sl-d { grid-area: d; }

	.am-sl-l,
	.am-sl-d {
		max-height: 46cqi;
		margin-bottom: 4cqi;
		filter: drop-shadow(0 1.5cqi 2cqi rgba(0, 0, 0, .2));
	}

	.am-sl-h { font-size: 6.8cqi; }
	.am-sl-vodilice .am-sl-h em { display: block; }
	.am-sl-p, .am-sl-p2 { font-size: 3.9cqi; }
	.am-sl-lista { font-size: 4cqi; }
	.am-sl-marke { font-size: 3.2cqi; max-width: none; }
	.am-sl-slogan { font-size: 4.6cqi; }
	.am-sl-gumb { font-size: 4.2cqi; margin-top: 1cqi; box-shadow: 0 1.5cqi 3cqi rgba(239, 91, 0, .35); }
	.am-sl-logo { height: 13cqi; max-width: 70cqi; }
	.am-sl-agria .am-sl-logo { height: 18cqi; }
	.am-sl-kontakt .am-sl-logo { height: 22cqi; }
	.am-sl-trava { height: 10cqi; }

	.am-sl--red,
	.am-sl--kontakt {
		grid-template-columns: 1fr;
		grid-template-areas: "t";
		grid-template-rows: 1fr;
	}

	.am-sl--red .am-sl-tekst,
	.am-sl--kontakt .am-sl-tekst { align-self: center; padding: 0; }

	.am-sl-red { gap: 2cqi; margin: 4cqi 0; }
	.am-sl-red img { height: auto; max-height: 34cqi; max-width: 32%; }

	.am-sl-prednosti {
		flex-direction: column;
		gap: 2.5cqi;
		padding: 3.5cqi 5cqi;
		border-radius: 3cqi;
		margin: 2cqi 0 5cqi !important;
	}

	.am-sl-prednosti li { font-size: 3.2cqi; gap: 3.5cqi; }
	.am-sl-prednosti li + li { padding-left: 0; border-left: 0; }
	.am-sl-prednosti b { font-size: 3.6cqi; }
	.am-sl-prednosti i { font-size: 6cqi; width: 7cqi; text-align: center; }

	/* strelice ispod slajda, uz tockice – ne prekrivaju naslov ni proizvode */
	.am-sl-str { top: auto; bottom: 0; width: 34px; height: 34px; }
	.am-sl-pret { left: 12px; }
	.am-sl-sljed { right: 12px; }
	.am-sl-tocke { height: 34px; margin-top: 8px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
	.am-sl-l, .am-sl-d, .am-sl-gumb { transition: none; }
}

/* mobitel: slider preko cijele sirine (kao stari slajder) */
@media (max-width: 767px) {
	.home .am-sl {
		width: calc(100% + 30px);
		margin-left: -15px;
		margin-right: -15px;
	}
}
