/* Podobne wpisy – :where() = zerowa specyficzność, motyw łatwo nadpisze. */
:where(.tbt-podobne) {
	--_kolumny: var(--tbt-podobne-kolumny, 3);
	--_odstep: var(--tbt-podobne-odstep, 24px);
}
:where(.tbt-podobne__tytul) { margin: 0 0 .8em; }
:where(.tbt-podobne__lista) { margin: 0; padding: 0; list-style: none; }
:where(.tbt-podobne__link) { display: flex; color: inherit; text-decoration: none; }
:where(.tbt-podobne__nazwa) { display: block; font-weight: 600; line-height: 1.3; }
:where(.tbt-podobne__data) { display: block; margin-top: .35em; font-size: .85em; opacity: .7; }

/* Karty */
:where(.tbt-podobne--karty .tbt-podobne__lista) {
	display: grid;
	gap: var(--_odstep);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(220px, calc((100% - (var(--_kolumny) - 1) * var(--_odstep)) / var(--_kolumny)))), 1fr));
}
:where(.tbt-podobne--karty .tbt-podobne__link) { flex-direction: column; gap: .75em; height: 100%; }
:where(.tbt-podobne--karty .tbt-podobne__obrazek) {
	display: block;
	aspect-ratio: var(--tbt-podobne-proporcje, 16 / 10);
	overflow: hidden;
	border-radius: var(--tbt-podobne-zaokraglenie, 8px);
	background: color-mix(in srgb, currentColor 8%, transparent);
}
:where(.tbt-podobne--karty .tbt-podobne__obrazek img) {
	display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease;
}
:where(.tbt-podobne--karty .tbt-podobne__link:hover img) { transform: scale(1.04); }
:where(.tbt-podobne--karty .tbt-podobne__link:hover .tbt-podobne__nazwa) { text-decoration: underline; }

/* Lista */
:where(.tbt-podobne--lista .tbt-podobne__item) { padding: .6em 0; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
:where(.tbt-podobne--lista .tbt-podobne__item:last-child) { border-bottom: 0; }
:where(.tbt-podobne--lista .tbt-podobne__link:hover .tbt-podobne__nazwa) { text-decoration: underline; }

/* Lista w dwóch kolumnach: kategoria nad tytułem, data i strzałka po prawej, linia pod każdym wpisem. */
:where(.tbt-podobne--kolumny .tbt-podobne__lista) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 40px); }
:where(.tbt-podobne--kolumny .tbt-podobne__item) { border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
:where(.tbt-podobne--kolumny .tbt-podobne__link) { align-items: center; gap: 16px; height: 100%; padding: 16px 0; }
:where(.tbt-podobne--kolumny .tbt-podobne__tekst) { flex: 1 1 auto; min-width: 0; }
:where(.tbt-podobne--kolumny .tbt-podobne__kategoria) { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
:where(.tbt-podobne--kolumny .tbt-podobne__nazwa) { font-size: 16px; font-weight: 500; line-height: 1.4; }
:where(.tbt-podobne--kolumny .tbt-podobne__data) { flex: 0 0 auto; margin: 0; font-size: 14px; font-weight: 600; opacity: 1; white-space: nowrap; }
:where(.tbt-podobne--kolumny .tbt-podobne__strzalka) { flex: 0 0 auto; color: var(--tbt-akcent, var(--tbt-kolor-akcent, #bc0000)); transition: transform .2s ease; }
:where(.tbt-podobne--kolumny .tbt-podobne__link:hover .tbt-podobne__nazwa) { color: var(--tbt-akcent, var(--tbt-kolor-akcent, #bc0000)); }
:where(.tbt-podobne--kolumny .tbt-podobne__link:hover .tbt-podobne__strzalka) { transform: translate(2px, -2px); }
@media (max-width: 767px) {
	:where(.tbt-podobne--kolumny .tbt-podobne__lista) { grid-template-columns: minmax(0, 1fr); }
	:where(.tbt-podobne--kolumny .tbt-podobne__link) { flex-wrap: wrap; row-gap: 6px; }
	:where(.tbt-podobne--kolumny .tbt-podobne__tekst) { flex-basis: calc(100% - 40px); }
	:where(.tbt-podobne--kolumny .tbt-podobne__data) { order: 3; flex-basis: 100%; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	:where(.tbt-podobne--kolumny .tbt-podobne__strzalka) { transition: none; }
	:where(.tbt-podobne--karty .tbt-podobne__obrazek img) { transition: none; }
}
