.series-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	box-sizing: border-box;
	padding: 1rem;
	border-radius: 3vw; /* Zaokrąglone rogi */
	max-width: 84%; /* Maksymalna szerokość karty */
	background-color: var(--card-bg);
	margin: 2vw auto; /* Wyśrodkowanie na stronie */
}
.series-carousel {
	max-width: 800px;
	margin: auto;
	text-align: center;
}
.series-display {
	height: 500px; /* stała wysokość całej sekcji */
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	padding: 1rem;
	box-sizing: border-box;
	overflow: hidden;
	position: relative;
	transition: opacity 0.4s ease-in-out;
}
.series-display picture {
	display: block; /* zamiast inline */
	width: 100%;
	height: auto; /* dopasuj do obrazka */
	flex-shrink: 0; /* nie zgniataj */
	margin-bottom: 1rem; /* odstęp od tekstu */
	display: contents; /* usuwa dodatkowe pudełko picture z layoutu */
}
/* doprecyzowanie obrazka – wysokość z kontenera, bez rozpychania */
.series-display img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 60%;
	object-fit: contain;
	display: block;
	margin: 0 auto 1rem;
}

.series-display h3,
.series-display p,
.series-display a {
	position: relative;
	z-index: 2;
}
.series-display h3,
.series-display p {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.series-display h3 {
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0.5rem 0;
	text-align: center;
}

.series-display p {
	font-size: 1rem;
	line-height: 1.4;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 4; /* max 4 linijki */
	-webkit-box-orient: vertical;
	margin: 0.5rem 0;
}
.series-display a button {
	padding: 0.5em 1em;
	margin-top: 1em;
	cursor: pointer;
	background: #49abaa;
	color: white;
	border: none;
	border-radius: 5px;
}
.series-thumbnails {
	margin-top: 1em;
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}
.series-thumbnails img {
	width: 50px;
	height: 50px;
	object-fit: cover; /* utnie nadmiar */
	object-position: center; /* wyśrodkuj obrazek */
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.6;
	border: 2px solid transparent;
	transition: 0.3s;
}
.series-thumbnails img.active {
	border-color: #49abaa;
	opacity: 1;
}
.series-display.fade-ready {
	opacity: 1;
	transition: opacity 0.4s ease-in-out;
}
.series-display.fade-out {
	opacity: 0.2;
}

.series-thumbnails button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.series-thumbnails button.active img {
	outline: 2px solid var(--accent, #49abaa);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.series-card {
		max-width: 98%; /* Maksymalna szerokość karty */
	}
	.series-display {
		height: 400px; /* lub zostaw jak było */
		padding: 0.5rem;
	}

	.series-display img {
		max-height: 45%; /* mniej miejsca na małym ekranie */
	}

	.series-display h2 {
		font-size: clamp(22px, 6vw, 40px);
	}

	.series-display p {
		font-size: clamp(16px, 3vw, 24px);
		-webkit-line-clamp: 3;
	}

	.series-display a button {
		font-size: 0.9rem;
		padding: 0.4em 0.8em;
	}
}
