/* =========================================================================
   RSW SIDEBAR — widzet "Czytaj dalej" (.ndc-*) + szerokosc sidebara na artykulach
   Ladowane na CALEJ witrynie (plugin rsw-sidebar), zeby sidebar wygladal
   identycznie wszedzie (na artykulach category.css sie nie laduje).
   WGRANIE: rsw-sidebar/assets/css/sidebar.css, podbij RSW_SIDEBAR_VERSION,
   LiteSpeed "Oprozn wszystko" + Ctrl+F5.
   ========================================================================= */

/* ---------- HERO (duzy, wyrozniajacy obrazek) ---------- */
.ndc-hero-link { text-decoration: none; }

.ndc-widget .ndc-hero-link {
	position: relative;
	height: auto !important;
	min-height: 100px;
	display: flex !important;
	flex-direction: column;
	justify-content: flex-end;
}
.ndc-widget .ndc-hero-img,
.ndc-widget .ndc-hero-overlay {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
}
.ndc-widget .ndc-hero-img { object-fit: cover; }

.ndc-hero-link::before {
	content: "";
	position: absolute; inset: 0; z-index: 2; pointer-events: none;
	opacity: 0; transition: opacity .35s ease;
	background: linear-gradient(45deg, rgba(252,1,109,.55), rgba(132,1,252,.5));
}
.ndc-hero-link::after {
	content: "";
	position: absolute; inset: 0; z-index: 3; pointer-events: none;
	opacity: 0; transition: opacity .35s ease;
	background:
		radial-gradient(60% 60% at 0% 0%,     #8401fc 0%, rgba(252,0,109,.9) 42%, transparent 72%),
		radial-gradient(60% 60% at 100% 100%, #fc006d 0%, rgba(132,1,252,.9) 42%, transparent 72%);
}
.ndc-hero-link:hover::before,
.ndc-hero-link:hover::after { opacity: 1; }

.ndc-widget .ndc-hero-text { position: relative !important; z-index: 4; }
.ndc-hero-cat  { position: relative; z-index: 5; }

.ndc-widget .ndc-hero-title {
	display: inline !important;
	-webkit-box-decoration-break: clone !important;
	box-decoration-break: clone !important;
	padding: 1px 6px;
	border-radius: 4px;
	color: #fff;
	background-image: linear-gradient(to right, #fc016d 0%, #8401fc 100%) !important;
	background-repeat: no-repeat !important;
	background-position: left center !important;
	background-size: 0% 100% !important;
	transition: background-size .45s ease, color .2s ease;
}
.ndc-widget .ndc-hero-link:hover .ndc-hero-title,
.ndc-widget .ndc-hero-link:focus-within .ndc-hero-title {
	background-size: 100% 100% !important;
	color: #fff !important;
}

/* ---------- MINIATURKI (obrazek z lewej + tytul) ---------- */
/* Obrazek owiniety w .ndc-thumb-wrap (zmiana w widzecie), zeby przyjac overlay+bloby. */
.ndc-thumb-wrap {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}
.ndc-thumb-wrap .ndc-thumb-round {
	width: 100%;
	height: 100%;
	display: block;
}
/* przeslona rozowo-fioletowa na miniaturce (hover) */
.ndc-thumb-wrap::before {
	content: "";
	position: absolute; inset: 0; z-index: 2; pointer-events: none;
	opacity: 0; transition: opacity .3s ease;
	background: linear-gradient(45deg, rgba(252,1,109,.55), rgba(132,1,252,.5));
}
/* bloby narozne na miniaturce (hover) */
.ndc-thumb-wrap::after {
	content: "";
	position: absolute; inset: 0; z-index: 3; pointer-events: none;
	opacity: 0; transition: opacity .3s ease;
	background:
		radial-gradient(65% 65% at 0% 0%,     #8401fc 0%, rgba(252,0,109,.9) 42%, transparent 72%),
		radial-gradient(65% 65% at 100% 100%, #fc006d 0%, rgba(132,1,252,.9) 42%, transparent 72%);
}
.ndc-item:hover .ndc-thumb-wrap::before,
.ndc-item:hover .ndc-thumb-wrap::after { opacity: 1; }

/* zoom obrazka + poswiata na wrapperze (box-shadow na obrazku bylby przyciety) */
.ndc-item .ndc-thumb-round {
	transition: filter .3s ease, transform .3s ease;
}
.ndc-item:hover .ndc-thumb-round {
	transform: scale(1.05);
	filter: saturate(1.1);
}
.ndc-thumb-wrap { transition: box-shadow .3s ease; }
.ndc-item:hover .ndc-thumb-wrap {
	box-shadow: 0 6px 16px rgba(252,0,109,.45);
}

/* zakreslacz miniaturki — obejmuje tekst, konczy sie na ostatniej literze */
.ndc-widget .ndc-item .ndc-title {
	display: inline !important;
	-webkit-box-decoration-break: clone !important;
	box-decoration-break: clone !important;
	padding: 1px 5px;
	border-radius: 4px;
	color: #fff;
	background-image: linear-gradient(to right, #fc016d 0%, #8401fc 100%) !important;
	background-repeat: no-repeat !important;
	background-position: left center !important;
	background-size: 0% 100% !important;
	transition: background-size .45s ease, color .15s ease;
}
.ndc-widget .ndc-item .ndc-title::before { content: none !important; }
.ndc-widget .ndc-item:hover .ndc-title,
.ndc-widget .ndc-item:focus-within .ndc-title {
	background-size: 100% 100% !important;
	color: #fff !important;
}

/* =========================================================================
   SZEROKOSC SIDEBARA NA ARTYKULACH (single) — 320px, jak na kategorii.
   Na kategorii robi to category.css (uklad 70/30). Tu robimy to samo dla
   pojedynczych wpisow (body.single), bo category.css tam sie nie laduje.
   ========================================================================= */
@media (min-width: 1000px) {
	/* KLUCZOWE: na single wiersz musi byc flexem, zeby kolumny staly obok siebie.
	   Na kategorii robi to category.css; tu robimy to samo dla body.single. */
	body.single .site-content-row {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: flex-start !important;
		gap: 30px;
	}
	body.single .site-content-row #primary.col-lg-8 {
		flex: 1 1 auto !important;
		max-width: none !important;
		min-width: 0 !important;      /* pozwala kolumnie tresci sie kurczyc */
		margin: 0 !important;
	}
	body.single .site-content-row #secondary.col-lg-4.widget-area {
		flex: 0 0 320px !important;
		max-width: 320px !important;
		width: 320px !important;
		margin: 0 !important;
		float: none !important;
	}
	body.single #secondary .sticky-sidebar {
		position: sticky;
		top: 20px;
	}
}