/* ==================================================
   Wesoły Czas - Karuzela Inspiracji
   Frontend CSS
   Cel tej wersji:
   - zwarte, niższe kafelki,
   - usunięty napis „Wesołe inspiracje” z kropkami,
   - dolne kropki ukryte,
   - strzałki wyśrodkowane,
   - multikolor hover na strzałkach i przycisku,
   - „Czytaj więcej” pojawia się dopiero po najechaniu na kafelek.
================================================== */

/* Gdy shortcode jest owinięty sekcją z motywu, zdejmujemy jej ciężar. */
.wcmw-section--inspiracje-carousel {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 18px !important;
	padding-bottom: 18px !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

.wci-carousel {
	--wci-per-view: 5;
	margin: 0 auto;
	padding: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wci-text, #2f3a33);
	box-shadow: none;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
}

.wci-carousel,
.wci-carousel * {
	box-sizing: border-box;
}

.wci-carousel__inner {
	width: 100%;
}

.wci-carousel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.wci-carousel__title-area {
	max-width: 760px;
}

/* Ukrywamy górny napis „Wesołe inspiracje” razem z kolorowymi kropkami. */
.wci-carousel__kicker,
.wci-carousel__kicker::before {
	display: none !important;
	content: none !important;
}

.wci-carousel__title {
	margin: 0;
	color: var(--wci-text, #2f3a33);
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.05;
	font-weight: 900;
}

.wci-carousel__subtitle {
	margin: 8px 0 0;
	max-width: 680px;
	color: var(--wci-text, #2f3a33);
	opacity: .76;
	font-size: 15px;
	line-height: 1.45;
}

/* Strzałki */
.wci-carousel__arrows {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	flex: 0 0 auto;
	align-self: center;
}

.wci-carousel__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .85) !important;
	border-radius: 999px;
	background: #fff !important;
	color: var(--wci-text, #2f3a33) !important;
	box-shadow: 0 10px 24px rgba(42, 35, 28, .10) !important;
	font-size: 31px;
	line-height: 1;
	font-weight: 900;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition:
		transform .18s ease,
		box-shadow .18s ease,
		background .18s ease,
		color .18s ease;
}

/* GeneratePress ma globalne button:focus/active, które robiło chwilowe szare tło.
   Te reguły celowo są mocniejsze i dotyczą tylko strzałek tej karuzeli. */
.wci-carousel .wci-carousel__arrow:hover,
.wci-carousel .wci-carousel__arrow:focus-visible {
	transform: translateY(-2px);
	background: linear-gradient(
		135deg,
		rgba(255, 242, 189, .98),
		rgba(223, 243, 220, .98),
		rgba(238, 224, 255, .98),
		rgba(255, 224, 235, .98)
	) !important;
	background-size: 220% 220% !important;
	animation: wci-rainbow-soft 2.8s ease infinite;
	box-shadow:
		0 14px 30px rgba(42, 35, 28, .14),
		0 0 3px rgba(255, 255, 255, .5) !important;
	color: var(--wci-text, #2f3a33) !important;
}

.wci-carousel .wci-carousel__arrow:focus:not(:focus-visible),
.wci-carousel .wci-carousel__arrow:active {
	outline: none !important;
	background: #fff !important;
	color: var(--wci-text, #2f3a33) !important;
	box-shadow: 0 10px 24px rgba(42, 35, 28, .10) !important;
}

.wci-carousel__arrow::-moz-focus-inner {
	border: 0;
}

.wci-carousel__arrow:focus,
.wci-card:focus {
	outline: none;
}

.wci-carousel__arrow:focus-visible,
.wci-card:focus-visible {
	outline: 3px solid rgba(124, 199, 139, .55) !important;
	outline-offset: 4px;
}

/* Widok przewijania */
.wci-carousel__viewport {
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}

.wci-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.wci-carousel__track {
	display: flex;
	gap: var(--wci-gap, 16px);
	align-items: stretch;
}

.wci-carousel__slide {
	flex: 0 0 calc((100% - ((var(--wci-per-view) - 1) * var(--wci-gap, 16px))) / var(--wci-per-view));
	min-width: 0;
	scroll-snap-align: start;
}

/* Karta */
.wci-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	overflow: hidden;
	border-radius: 22px;
	background: var(--wci-card, #fff);
	color: var(--wci-text, #2f3a33);
	text-decoration: none;
	box-shadow: 0 10px 26px rgba(50, 43, 35, .08);
	border: 1px solid rgba(255, 255, 255, .78);
	transition: transform .2s ease, box-shadow .2s ease;
	isolation: isolate;
}

.wci-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(50, 43, 35, .13);
}

.wci-card--premium::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: 22px;
	box-shadow: inset 0 0 0 2px rgba(124, 199, 139, .34);
}

.wci-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, #fff2c6, #dff6e7 45%, #f6d9ec);
	flex: 0 0 auto;
}

.wci-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.01);
	transition: transform .28s ease;
}

.wci-card:hover .wci-card__media img {
	transform: scale(1.045);
}

.wci-card__placeholder {
	display: flex;
	width: 100%;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-align: center;
	color: var(--wci-text, #2f3a33);
}

.wci-card__placeholder span {
	font-size: 34px;
}

.wci-card__placeholder strong {
	font-size: 15px;
	font-weight: 900;
}

.wci-card__label {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	max-width: calc(100% - 24px);
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: var(--wci-text, #2f3a33);
	font-size: 11px;
	font-weight: 900;
	line-height: 1.15;
	box-shadow: 0 7px 16px rgba(45, 37, 30, .10);
}

.wci-card__body {
	position: relative;
	display: block;
	padding: 14px 16px 15px;
	min-height: 145px;
	max-height: 145px;
	overflow: hidden;
	flex: 0 0 145px;
}

.wci-card__title {
	margin: 0;
	color: var(--wci-text, #2f3a33);
	font-size: 18px;
	line-height: 1.14;
	font-weight: 900;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wci-card__excerpt {
	margin: 9px 0 0;
	color: var(--wci-text, #2f3a33);
	opacity: .70;
	font-size: 14px;
	line-height: 1.42;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* „Czytaj więcej” pokazuje się dopiero po najechaniu */
.wci-card__button {
	position: absolute;
	left: 50%;
	bottom: 14px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .86);
	background: linear-gradient(
		135deg,
		rgba(255, 242, 189, .98),
		rgba(223, 243, 220, .98),
		rgba(238, 224, 255, .98),
		rgba(255, 224, 235, .98)
	);
	background-size: 220% 220%;
	color: var(--wci-text, #2f3a33);
	font-size: 13px;
	font-weight: 900;
	line-height: 1.1;
	white-space: nowrap;
	box-shadow:
		0 12px 24px rgba(58, 45, 84, .14),
		0 0 3px rgba(255, 255, 255, .45);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, 8px);
	transition:
		opacity .22s ease,
		transform .22s ease,
		visibility .22s ease,
		box-shadow .22s ease;
}

.wci-card:hover .wci-card__button,
.wci-card:focus .wci-card__button,
.wci-card:focus-visible .wci-card__button {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	animation: wci-rainbow-soft 2.8s ease infinite;
}

/* Dolne kropki karuzeli ukryte */
.wci-carousel__dots,
.wci-carousel__dot {
	display: none !important;
}

.wci-empty-admin {
	margin: 24px 0;
	padding: 16px 18px;
	border-radius: 16px;
	background: #fff8e5;
	border: 1px solid #f2d48a;
	color: #604000;
	font-weight: 700;
}

/* Tablet */
@media (max-width: 900px) {
	.wcmw-section--inspiracje-carousel {
		padding-top: 16px !important;
		padding-bottom: 16px !important;
	}

	.wci-carousel__header {
		align-items: flex-start;
		flex-direction: column;
		margin-bottom: 12px;
	}

	.wci-carousel__arrows {
		align-self: flex-end;
	}

	.wci-card__body {
		min-height: 138px;
		max-height: 138px;
		flex-basis: 138px;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.wcmw-section--inspiracje-carousel {
		padding-top: 14px !important;
		padding-bottom: 14px !important;
	}

	.wci-carousel__title {
		font-size: 28px;
	}

	.wci-carousel__subtitle {
		font-size: 14px;
	}

	.wci-carousel__arrow {
		width: 40px;
		height: 40px;
		font-size: 29px;
	}

	.wci-card__body {
		padding: 13px 15px 14px;
		min-height: 140px;
		max-height: 140px;
		flex-basis: 140px;
	}

	.wci-card__title {
		font-size: 18px;
	}

	.wci-card__excerpt {
		font-size: 14px;
		-webkit-line-clamp: 4;
	}
}

/* Na dotyku przycisk pokazujemy stale, bo nie ma klasycznego hovera */
@media (hover: none) {
	.wci-card__button {
		opacity: 1;
		visibility: visible;
		transform: translate(-50%, 0);
	}
}

/* Delikatny multikolor */
@keyframes wci-rainbow-soft {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}
