/**
 * TREJKA Elements – style front-endu (to, co widzi odwiedzający stronę).
 *
 * Kolor akcentu bierze się ze zmiennej --tre-accent (wstrzykiwanej w <head>
 * na podstawie ustawień wtyczki). Jeśli jej nie ma, używamy #bc0000.
 *
 * Wszystkie klasy mają prefiks .tre- żeby nie kolidować z motywem klienta.
 */

/* Kolor akcentu pochodzi ze zmiennej --tre-accent wstrzykiwanej w <head>
   (per strona). NIE nadpisujemy jej lokalnie – używamy fallbacku w var(),
   żeby ustawienie z panelu faktycznie działało. */
.tre-btn,
.tre-columns,
.tre-list,
.tre-gallery,
.tre-divider,
.tre-heading,
.tre-steps,
.tre-faq,
.tre-cta,
.tre-section,
.tre-cards,
.tre-badge,
.tre-note,
.tre-table-wrap,
.tre-links {
	--tre-accent-dark: color-mix(in srgb, var(--tre-accent, #bc0000) 80%, #000);
	--tre-radius: 6px;
	box-sizing: border-box;
}
.tre-columns *,
.tre-list *,
.tre-gallery *,
.tre-steps *,
.tre-faq *,
.tre-cta *,
.tre-section *,
.tre-cards *,
.tre-note *,
.tre-links * { box-sizing: border-box; }

/* ============================================================
   SEKCJA Z TYTUŁEM  (opcjonalny title="" w [tr_steps] / [tr_faq])
   Owija tytuł + moduł; tytuł reużywa stylów [tr_heading].
============================================================ */
.tre-section { margin: 1.4em 0; }
/* Tytuł na górze sekcji – bez górnego marginesu; moduł pod nim przylega. */
.tre-section > .tre-section__title { margin-top: 0; }
.tre-section > .tre-steps,
.tre-section > .tre-faq { margin-top: 0; }

/* ============================================================
   PRZYCISK  [tr_button]
============================================================ */
.tre-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-align: center;
	border-radius: var(--tre-radius);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.tre-btn:hover  { text-decoration: none; }
.tre-btn:active { transform: translateY(1px); }
.tre-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--tre-accent, #bc0000) 35%, transparent); outline-offset: 2px; }

/* Rozmiary */
.tre-btn--sm { padding: 7px 16px;  font-size: 14px; }
.tre-btn--md { padding: 11px 24px; font-size: 16px; }
.tre-btn--lg { padding: 15px 34px; font-size: 18px; }

/* Opcjonalna ikona w przycisku (np. słuchawka przy „Zadzwoń") – dziedziczy
   kolor tekstu, skaluje się do wielkości czcionki przycisku. */
.tre-btn .tre-card__svg {
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
}

/* Warianty */
.tre-btn--primary {
	background: var(--tre-accent, #bc0000);
	color: #fff;
	border-color: var(--tre-accent, #bc0000);
}
.tre-btn--primary:hover {
	background: var(--tre-accent-dark);
	border-color: var(--tre-accent-dark);
	color: #fff;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--tre-accent, #bc0000) 35%, transparent);
}
.tre-btn--secondary {
	background: #1d2327;
	color: #fff;
	border-color: #1d2327;
}
.tre-btn--secondary:hover { background: #000; border-color: #000; color: #fff; }

.tre-btn--outline {
	background: transparent;
	color: var(--tre-accent, #bc0000);
	border-color: var(--tre-accent, #bc0000);
}
.tre-btn--outline:hover {
	background: var(--tre-accent, #bc0000);
	color: #fff;
}

/* Wariant „biały” – do użycia na ciemnym / akcentowym tle (np. box CTA). */
.tre-btn--white {
	background: #fff;
	color: #1d2327;
	border-color: #fff;
}
.tre-btn--white:hover {
	background: #f0f0f1;
	border-color: #f0f0f1;
	color: #1d2327;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

/* Wariant „ghost” – przezroczysty z jasnym obrysem; do drugiego przycisku
   na ciemnym / akcentowym tle (np. „Zadzwoń" obok „Wyślij zapytanie"). */
.tre-btn--ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, .55);
}
.tre-btn--ghost:hover {
	background: rgba(255, 255, 255, .14);
	border-color: #fff;
	color: #fff;
}

/* Wyrównanie */
.tre-btn-wrap { display: block; }
.tre-align-left   { text-align: left; }
.tre-align-center { text-align: center; }
.tre-align-right  { text-align: right; }

/* ============================================================
   KOLUMNY  [tr_columns] / [tr_col]
============================================================ */
.tre-columns {
	display: grid;
	grid-template-columns: repeat(var(--tre-cols, 2), minmax(0, 1fr));
	gap: var(--tre-gap, 24px);
	margin: 1.2em 0;
}
.tre-col { min-width: 0; }
.tre-col > :first-child { margin-top: 0; }
.tre-col > :last-child  { margin-bottom: 0; }

/* Tablet – maks. 2 kolumny */
@media (max-width: 900px) {
	.tre-columns { grid-template-columns: repeat(min(var(--tre-cols, 2), 2), minmax(0, 1fr)); }
}
/* Telefon – jedna kolumna */
@media (max-width: 600px) {
	.tre-columns { grid-template-columns: 1fr; }
}

/* ============================================================
   LISTY  [tr_list] / [tr_item]
============================================================ */
.tre-list {
	list-style: none;
	margin: 1em 0;
	padding: 0;
}
.tre-list .tre-list-item {
	position: relative;
	padding: 4px 0 4px 30px;
	margin: 0;
	line-height: 1.55;
}
.tre-list .tre-list-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 18px;
	height: 18px;
	background-color: var(--tre-accent, #bc0000);
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: center;
	        mask-position: center;
	-webkit-mask-size: contain;
	        mask-size: contain;
}

/* Ikony jako maski SVG (kolor = --tre-accent) */
.tre-list--check .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.285 6.709a1 1 0 0 0-1.414-1.418l-8.99 8.99-3.74-3.74A1 1 0 0 0 4.727 12l4.447 4.447a1 1 0 0 0 1.414 0z'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.285 6.709a1 1 0 0 0-1.414-1.418l-8.99 8.99-3.74-3.74A1 1 0 0 0 4.727 12l4.447 4.447a1 1 0 0 0 1.414 0z'/></svg>");
}
.tre-list--arrow .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z'/></svg>");
}
.tre-list--star .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>");
}
.tre-list--dot .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='6'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='6'/></svg>");
}
.tre-list--dash .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='11' width='16' height='2.5' rx='1.25'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='11' width='16' height='2.5' rx='1.25'/></svg>");
}
.tre-list--square .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='5' width='14' height='14' rx='1.5'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='5' width='14' height='14' rx='1.5'/></svg>");
}
.tre-list--bigdot .tre-list-item::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9'/></svg>");
}
/* Kwadrat/duża kropka są nieco większe – lekko korygujemy pionowe wyrównanie */
.tre-list--square .tre-list-item::before,
.tre-list--bigdot .tre-list-item::before { top: 0.3em; }

/* Listy w kilku kolumnach */
.tre-list--cols-2, .tre-list--cols-3 { display: grid; gap: 0 30px; }
.tre-list--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tre-list--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) {
	.tre-list--cols-2, .tre-list--cols-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   GALERIA  [tr_gallery]
============================================================ */
.tre-gallery {
	display: grid;
	grid-template-columns: repeat(var(--tre-gcols, 3), minmax(0, 1fr));
	gap: 12px;
	margin: 1.2em 0;
}
.tre-gallery-item {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--tre-radius);
	line-height: 0;
	background: #f0f0f1;
}
.tre-gallery-item .tre-gallery-img {
	width: 100%;
	height: 100%;
	aspect-ratio: var(--tre-ratio, 1 / 1);
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
/* Format oryginalny – bez kadrowania, zdjęcia zachowują naturalne proporcje. */
.tre-gallery--orig .tre-gallery-item { background: transparent; }
.tre-gallery--orig .tre-gallery-item .tre-gallery-img {
	aspect-ratio: auto;
	height: auto;
	object-fit: contain;
}
a.tre-gallery-item { cursor: zoom-in; }
a.tre-gallery-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background .2s ease;
}
a.tre-gallery-item:hover .tre-gallery-img { transform: scale(1.06); }
a.tre-gallery-item:hover::after { background: rgba(0,0,0,.12); }

/* Podpisy pod miniaturami (captions="1") */
.tre-gallery-fig {
	margin: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.tre-gallery-cap {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: #3c434a;
}
.tre-gallery--cap-center .tre-gallery-cap { text-align: center; }
.tre-gallery--cap-left   .tre-gallery-cap { text-align: left; }

@media (max-width: 600px) {
	.tre-gallery { grid-template-columns: repeat(min(var(--tre-gcols, 3), 2), minmax(0, 1fr)); }
}

.tre-gallery-empty {
	padding: 20px;
	border: 1px dashed #c3c4c7;
	border-radius: var(--tre-radius);
	color: #646970;
	background: #f6f7f7;
	font-size: 14px;
	text-align: center;
}

/* ============================================================
   LIGHTBOX (budowany przez frontend.js)
============================================================ */
.tre-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 17, 20, .92);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}
.tre-lb.is-open { opacity: 1; visibility: visible; }
.tre-lb__img {
	max-width: 92vw;
	max-height: 82vh;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0,0,0,.5);
	background: #222;
}
.tre-lb__cap {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 14px;
	padding: 0 20px;
	text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.tre-lb__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	font-size: 26px;
	line-height: 48px;
	cursor: pointer;
	transition: background .15s ease;
}
.tre-lb__btn:hover { background: rgba(255,255,255,.25); }
.tre-lb__prev { left: 18px; }
.tre-lb__next { right: 18px; }
.tre-lb__close {
	top: 18px;
	right: 18px;
	transform: none;
	width: 44px;
	height: 44px;
	line-height: 44px;
	font-size: 22px;
}
.tre-lb__prev, .tre-lb__next, .tre-lb__close { position: absolute; }
@media (max-width: 600px) {
	.tre-lb__btn { width: 40px; height: 40px; line-height: 40px; font-size: 22px; }
	.tre-lb__prev { left: 8px; }
	.tre-lb__next { right: 8px; }
}

/* ============================================================
   LINIA ROZDZIELAJĄCA  [tr_divider]
============================================================ */
.tre-divider {
	border: 0;
	border-top: var(--tre-dv-size, 2px) solid var(--tre-dv-color, var(--tre-accent, #bc0000));
	width: var(--tre-dv-width, 100%);
	height: 0;
	margin-top: var(--tre-dv-gap, 24px);
	margin-bottom: var(--tre-dv-gap, 24px);
	background: none;
}
.tre-divider--dashed { border-top-style: dashed; }
.tre-divider--dotted { border-top-style: dotted; }
.tre-divider--double { border-top-style: double; border-top-width: calc(var(--tre-dv-size, 2px) + 2px); }
/* Wyrównanie (istotne, gdy szerokość < 100%) */
.tre-divider--center { margin-left: auto;  margin-right: auto; }
.tre-divider--left   { margin-left: 0;     margin-right: auto; }
.tre-divider--right  { margin-left: auto;  margin-right: 0; }

/* ============================================================
   NAGŁÓWKI  [tr_heading]
============================================================ */
.tre-heading {
	--tre-hd-color: var(--tre-accent, #bc0000);
	margin: 1.1em 0 .6em;
	line-height: 1.25;
}
.tre-heading.tre-align-center { text-align: center; }
.tre-heading.tre-align-right  { text-align: right; }

/* Wariant: krótki akcent pod tekstem */
.tre-heading--underline { padding-bottom: .38em; }
.tre-heading--underline::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: .38em;
	border-radius: 3px;
	background: var(--tre-hd-color);
}
.tre-heading--underline.tre-align-center::after { margin-left: auto; margin-right: auto; }
.tre-heading--underline.tre-align-right::after  { margin-left: auto; }

/* Wariant: cienka linia na całej szerokości pod tekstem */
.tre-heading--underline-full {
	padding-bottom: .32em;
	border-bottom: 2px solid var(--tre-hd-color);
}

/* Wariant: akcent nad tekstem */
.tre-heading--overline { padding-top: .1em; }
.tre-heading--overline::before {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-bottom: .4em;
	border-radius: 3px;
	background: var(--tre-hd-color);
}
.tre-heading--overline.tre-align-center::before { margin-left: auto; margin-right: auto; }
.tre-heading--overline.tre-align-right::before  { margin-left: auto; }

/* Wariant: linia ciągnąca się do końca wiersza (tytuł sekcji) */
.tre-heading--sideline {
	display: flex;
	align-items: center;
	gap: 16px;
}
.tre-heading--sideline::after {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background: var(--tre-hd-color);
}
/* Wyśrodkowany: linia z obu stron */
.tre-heading--sideline.tre-align-center::before {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background: var(--tre-hd-color);
}
/* Do prawej: linia tylko z lewej */
.tre-heading--sideline.tre-align-right::before {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background: var(--tre-hd-color);
}
.tre-heading--sideline.tre-align-right::after { display: none; }

/* ============================================================
   MODUŁ WPISÓW  [tr_posts]  (lista / siatka)
============================================================ */
.tre-posts { margin: 1.4em 0; }

/* Siatka */
.tre-posts--grid {
	display: grid;
	grid-template-columns: repeat(var(--tre-pcols, 3), minmax(0, 1fr));
	gap: 28px 24px;
}
@media (max-width: 900px) {
	.tre-posts--grid { grid-template-columns: repeat(min(var(--tre-pcols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.tre-posts--grid { grid-template-columns: 1fr; }
}

/* Lista */
.tre-posts--list { display: flex; flex-direction: column; gap: 26px; }
.tre-posts--list .tre-post {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 22px;
	align-items: start;
}
@media (max-width: 600px) {
	.tre-posts--list .tre-post { grid-template-columns: 1fr; }
}

/* Kafelek */
.tre-post { min-width: 0; }
.tre-post-thumb {
	display: block;
	overflow: hidden;
	border-radius: var(--tre-radius);
	background: #f0f0f1;
	line-height: 0;
}
.tre-post-thumb .tre-post-img,
.tre-post-thumb img {
	width: 100%;
	height: 100%;
	aspect-ratio: var(--tre-ratio, 16 / 9);
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.tre-post-thumb:hover img { transform: scale(1.05); }
.tre-post-thumb--empty .tre-post-noimg {
	display: block;
	width: 100%;
	aspect-ratio: var(--tre-ratio, 16 / 9);
	background: linear-gradient(135deg, #e9e9eb 0%, #f4f4f6 100%);
}
.tre-posts--orig .tre-post-thumb img,
.tre-posts--orig .tre-post-thumb .tre-post-noimg { aspect-ratio: auto; height: auto; }

.tre-post-body { min-width: 0; }
.tre-posts--grid .tre-post-body { padding-top: 12px; }

.tre-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
	color: #646970;
	margin-bottom: 6px;
}
.tre-post-title {
	font-size: 19px;
	line-height: 1.3;
	margin: 4px 0 8px;
}
.tre-posts--list .tre-post-title { font-size: 22px; }
.tre-post-title a { color: inherit; text-decoration: none; }
.tre-post-title a:hover { color: var(--tre-accent, #bc0000); }

.tre-post-excerpt {
	margin: 0 0 12px;
	color: #3c434a;
	line-height: 1.6;
}
.tre-post-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	text-decoration: none;
	color: var(--tre-accent, #bc0000);
}
.tre-post-more::after { content: "→"; transition: transform .15s ease; }
.tre-post-more:hover::after { transform: translateX(3px); }

.tre-posts-empty {
	padding: 20px;
	border: 1px dashed #c3c4c7;
	border-radius: var(--tre-radius);
	color: #646970;
	background: #f6f7f7;
	font-size: 14px;
	text-align: center;
}

/* ============================================================
   KROKI / PROCES  [tr_steps] / [tr_step]
   Numerowana oś pionowa: kółko z numerem + linia łącząca kolejne
   kroki, obok tytuł i opis. Numery generowane licznikiem CSS,
   dzięki czemu respektują atrybut "start".
============================================================ */
.tre-steps {
	--tre-step-size: 36px;   /* średnica kółka z numerem */
	--tre-step-gap: 20px;    /* odstęp kółko ↔ treść */
	--tre-step-space: 30px;  /* pionowy odstęp między krokami */
	margin: 1.4em 0;
}
.tre-step {
	position: relative;
	display: grid;
	grid-template-columns: var(--tre-step-size) 1fr;
	gap: 0 var(--tre-step-gap);
	padding-bottom: var(--tre-step-space);
	counter-increment: tre-step;
}
.tre-step:last-child { padding-bottom: 0; }

/* Linia łącząca kolejne kółka (nie rysujemy pod ostatnim krokiem) */
.tre-step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: calc(var(--tre-step-size) / 2);
	top: var(--tre-step-size);
	bottom: 0;
	width: 2px;
	transform: translateX(-50%);
	background: #dcdfe3;
}

/* Kółko z numerem */
.tre-step__num {
	position: relative;
	z-index: 1;
	width: var(--tre-step-size);
	height: var(--tre-step-size);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	border: 2px solid transparent;
}
.tre-step__num::before { content: counter(tre-step); }

/* Warianty numerków */
.tre-steps--dark .tre-step__num {
	background: var(--tre-step-color, #1d2b3a);
	color: #fff;
	border-color: var(--tre-step-color, #1d2b3a);
}
.tre-steps--accent .tre-step__num {
	background: var(--tre-step-color, var(--tre-accent, #bc0000));
	color: #fff;
	border-color: var(--tre-step-color, var(--tre-accent, #bc0000));
}
.tre-steps--outline .tre-step__num {
	background: transparent;
	color: var(--tre-step-color, var(--tre-accent, #bc0000));
	border-color: var(--tre-step-color, var(--tre-accent, #bc0000));
}

/* Treść kroku */
.tre-step__body { min-width: 0; padding-top: 4px; }
.tre-step__title {
	margin: 0 0 4px;
	font-size: 18px;
	line-height: 1.3;
	color: #1d2327;
}
.tre-step__text { color: #646970; line-height: 1.6; }
.tre-step__text > :first-child { margin-top: 0; }
.tre-step__text > :last-child  { margin-bottom: 0; }

/* ============================================================
   FAQ / AKORDEON  [tr_faq] / [tr_qa]
   Rozwijane pytania. Bez JS wszystkie odpowiedzi są widoczne;
   klasa .is-enhanced (dodawana przez frontend.js) włącza zwijanie.
============================================================ */
.tre-faq {
	margin: 1.4em 0;
	border-top: 1px solid #e3e5e8;
}
.tre-faq__item { border-bottom: 1px solid #e3e5e8; }

.tre-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 18px 4px;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 700;
	font-size: 17px;
	line-height: 1.4;
	color: #1d2327;
	text-align: left;
	cursor: pointer;
}
.tre-faq__q:hover { color: var(--tre-accent, #bc0000); }
.tre-faq__q:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--tre-accent, #bc0000) 35%, transparent);
	outline-offset: 2px;
	border-radius: 4px;
}
.tre-faq__q-text { flex: 1 1 auto; }

/* Ikona +/− (rysowana bez obrazków) */
.tre-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}
.tre-faq__icon::before,
.tre-faq__icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	background: currentColor;
	transition: transform .2s ease, opacity .2s ease;
}
.tre-faq__icon::before { width: 16px; height: 2px; transform: translate(-50%, -50%); }        /* pozioma */
.tre-faq__icon::after  { width: 2px; height: 16px; transform: translate(-50%, -50%); }        /* pionowa */
/* Rozwinięte: pionowa kreska znika → „−” */
.tre-faq__item.is-open .tre-faq__icon::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

/* Odpowiedź */
.tre-faq__a-inner {
	padding: 0 4px 20px;
	color: #646970;
	line-height: 1.65;
}
.tre-faq__a-inner > :first-child { margin-top: 0; }
.tre-faq__a-inner > :last-child  { margin-bottom: 0; }

/* Zwijanie działa dopiero po włączeniu JS (progresywne ulepszenie).
   Animacja wysokości bez mierzenia w JS – dzięki grid-template-rows. */
.tre-faq.is-enhanced .tre-faq__a {
	display: grid;
	/* minmax(0, …) wymusza minimum toru = 0 (bez tego tor „fr” zostawia
	   min-content, przez co zwinięta odpowiedź nie chowa się do zera). */
	grid-template-rows: minmax(0, 0fr);
	/* Twarda siatka bezpieczeństwa: nawet gdy WordPress (wpautop) wstrzyknie
	   dodatkowe <p>/<br> w treść, zwinięta odpowiedź NIGDY nie „wyleje się"
	   poza swój (zerowej wysokości) kontener. */
	overflow: hidden;
	transition: grid-template-rows .25s ease;
}
.tre-faq.is-enhanced .tre-faq__a .tre-faq__a-inner {
	overflow: hidden;
	min-height: 0;
}
.tre-faq.is-enhanced .tre-faq__item.is-open .tre-faq__a { grid-template-rows: minmax(0, 1fr); }

/* ============================================================
   CTA  [tr_cta]  – box z wezwaniem do działania
============================================================ */
.tre-cta {
	margin: 1.4em 0;
	padding: 32px 36px;
	border-radius: 10px;
}

/* Układ: tekst z lewej, przycisk z prawej */
.tre-cta--row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	flex-wrap: wrap;
}
.tre-cta--row .tre-cta__content { flex: 1 1 320px; min-width: 0; }
.tre-cta--row .tre-cta__action { flex: 0 0 auto; }

/* Kontener przycisków (1–2 przyciski obok siebie) */
.tre-cta__action {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* Układ: wyśrodkowany */
.tre-cta--center {
	text-align: center;
}
.tre-cta--center .tre-cta__action { margin-top: 22px; justify-content: center; }

.tre-cta__title {
	margin: 0 0 8px;
	font-size: 26px;
	line-height: 1.25;
	color: inherit;
}
.tre-cta__text {
	line-height: 1.6;
	opacity: .9;
}
.tre-cta__text > :first-child { margin-top: 0; }
.tre-cta__text > :last-child  { margin-bottom: 0; }

/* Warianty tła */
.tre-cta--dark {
	background: #12212e;
	color: #fff;
}
.tre-cta--accent {
	background: var(--tre-accent, #bc0000);
	color: #fff;
}
.tre-cta--light {
	background: #f6f7f7;
	color: #1d2327;
	border: 1px solid #e3e5e8;
}

@media (max-width: 600px) {
	.tre-cta { padding: 26px 22px; }
	.tre-cta--row { flex-direction: column; align-items: flex-start; }
	/* W pionie (mobile) treść nie może narzucać wysokości bazowej – inaczej
	   powstaje pusta przerwa nad przyciskami. */
	.tre-cta--row .tre-cta__content { flex: 0 1 auto; }
	.tre-cta__action { width: 100%; flex-direction: column; align-items: stretch; }
	.tre-cta__action .tre-btn { width: 100%; }
	.tre-cta__title { font-size: 22px; }
}

/* ============================================================
   BOXY / KARTY  [tr_cards] / [tr_card]
============================================================ */
.tre-cards {
	display: grid;
	grid-template-columns: repeat(var(--tre-ccols, 3), minmax(0, 1fr));
	gap: var(--tre-cgap, 24px);
	margin: 1.4em 0;
}
/* Tablet → maks. 2 kolumny, telefon → 1 */
@media (max-width: 900px) {
	.tre-cards { grid-template-columns: repeat(min(var(--tre-ccols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.tre-cards { grid-template-columns: 1fr; }
}

/* Pojedyncza karta – kolumna, żeby link „→" trzymał się dołu */
.tre-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 28px 28px 26px;
	border-radius: 12px;
	background: #fff;
}

/* Warianty wyglądu */
.tre-cards--plain  .tre-card { border: 1px solid #e7e8ea; }
.tre-cards--border .tre-card { border: 1px solid #dcdfe3; }
.tre-cards--shadow .tre-card {
	border: 1px solid #eef0f2;
	box-shadow: 0 6px 24px rgba(18, 33, 46, .07);
}
.tre-cards--tint .tre-card {
	border: 1px solid transparent;
	background: color-mix(in srgb, var(--tre-accent, #bc0000) 6%, #fff);
}

/* Kafel z ikoną – tło w odcieniu akcentu, ikona w kolorze akcentu */
.tre-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 18px;
	border-radius: 14px;
	color: var(--tre-accent, #bc0000);
	background: color-mix(in srgb, var(--tre-accent, #bc0000) 12%, #fff);
}
.tre-card__svg { width: 26px; height: 26px; display: block; }

.tre-card__title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.3;
	color: #1d2327;
}
.tre-card__body { color: #4a5560; line-height: 1.6; }
.tre-card__body > :first-child { margin-top: 0; }
.tre-card__body > :last-child  { margin-bottom: 0; }

/* Link „→" na dole karty */
.tre-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	align-self: flex-start;
	font-weight: 600;
	text-decoration: none;
	color: var(--tre-accent, #bc0000);
}
.tre-card__link::after { content: "→"; transition: transform .15s ease; }
.tre-card__link:hover::after { transform: translateX(3px); }
/* Wariant „tylko strzałka" (bez tekstu) */
.tre-card__link--arrow { font-size: 22px; line-height: 1; }
.tre-card__link--arrow::after { margin: 0; }

/* Odstęp, gdy w karcie jest lista pod tekstem */
.tre-card__body .tre-list { margin: 14px 0 0; }

/* ============================================================
   BADGE / PIGUŁKA  [tr_badge]
============================================================ */
.tre-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--tre-accent, #bc0000);
	background: color-mix(in srgb, var(--tre-accent, #bc0000) 12%, #fff);
}
.tre-badge--solid {
	color: #fff;
	background: var(--tre-accent, #bc0000);
}
.tre-badge--outline {
	background: transparent;
	color: var(--tre-accent, #bc0000);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tre-accent, #bc0000) 40%, transparent);
}

/* ============================================================
   CALLOUT / WYRÓŻNIENIE  [tr_note]
   Kolor bazowy: --tre-note (ton z palety, własny hex lub akcent).
============================================================ */
.tre-note {
	--tre-note: var(--tre-accent, #bc0000);
	--tre-note-tint: color-mix(in srgb, var(--tre-note) 10%, #fff);
	margin: 1.4em 0;
	padding: 22px 26px;
	border-radius: 10px;
	line-height: 1.6;
}
.tre-note__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	margin-bottom: 10px;
	color: var(--tre-note-label, var(--tre-note));
}
.tre-note__body > :first-child { margin-top: 0; }
.tre-note__body > :last-child  { margin-bottom: 0; }

/* Wariant: delikatne tło w odcieniu koloru */
.tre-note--tint {
	background: var(--tre-note-tint);
	color: #1d2327;
}
/* Wariant: pasek z lewej + bardzo delikatne tło */
.tre-note--leftbar {
	background: color-mix(in srgb, var(--tre-note) 7%, #fff);
	border-left: 4px solid var(--tre-note);
	border-radius: 0 10px 10px 0;
	color: #1d2327;
}
/* Wariant: przerywana ramka, bez tła */
.tre-note--outline {
	background: transparent;
	border: 2px dashed color-mix(in srgb, var(--tre-note) 55%, #fff);
	color: #1d2327;
}
/* Wariant: pełne (ciemne) tło + jasny tekst */
.tre-note--solid {
	background: var(--tre-note);
	color: #fff;
}
.tre-note--solid .tre-note__label {
	color: var(--tre-note-label, color-mix(in srgb, var(--tre-note) 25%, #fff));
}
.tre-note--solid .tre-note__body { color: rgba(255, 255, 255, .92); }
.tre-note--solid a { color: #fff; text-decoration: underline; }
/* Listy wewnątrz calloutu – trochę oddechu */
.tre-note__body .tre-list { margin: 12px 0 0; }

/* ============================================================
   TABELA  [tr_table]  – ciemny nagłówek + zebra
============================================================ */
.tre-table-wrap {
	--tre-note: #12213a;
	margin: 1.4em 0;
	overflow-x: auto;            /* przewijanie na wąskich ekranach */
	border-radius: 10px;
	border: 1px solid #e3e5e8;
}
.tre-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}
.tre-table th {
	background: var(--tre-note);
	color: #fff;
	text-align: left;
	font-weight: 700;
	padding: 14px 18px;
	white-space: nowrap;
}
.tre-table td {
	padding: 13px 18px;
	border-top: 1px solid #eceef0;
	color: #3c434a;
	vertical-align: top;
}
.tre-table td:first-child { font-weight: 600; color: #1d2327; }
.tre-table--striped tbody tr:nth-child(even) { background: #f7f8f9; }

/* ============================================================
   LISTA ODNOŚNIKÓW  [tr_links] / [tr_linkitem]
============================================================ */
.tre-links {
	--tre-note: var(--tre-accent, #bc0000);
	margin: 1.4em 0;
	padding: 4px 26px;
	border-radius: 12px;
}
.tre-links--border { border: 1px solid #dcdfe3; }
.tre-links--plain  { border: 0; padding-left: 0; padding-right: 0; }

.tre-linkitem {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 0;
	border-top: 1px solid #eceef0;
}
.tre-linkitem:first-child { border-top: 0; }

.tre-linkitem__icon {
	flex: 0 0 auto;
	display: inline-flex;
	color: var(--tre-note);
	margin-top: 2px;
}
.tre-linkitem__icon svg { width: 24px; height: 24px; display: block; }

.tre-linkitem__body { min-width: 0; }
.tre-linkitem__title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: #1d2327;
}
.tre-linkitem__title a { color: inherit; text-decoration: none; }
.tre-linkitem__title a:hover { color: var(--tre-note); }
.tre-linkitem__desc {
	margin-top: 4px;
	color: #6b7280;
	line-height: 1.55;
}
.tre-linkitem__desc > :first-child { margin-top: 0; }
.tre-linkitem__desc > :last-child  { margin-bottom: 0; }

/* ============================================================
   ODSTĘP  [tr_spacer]  – pionowa, pusta przerwa
============================================================ */
.tre-spacer { display: block; width: 100%; }
.tre-spacer--xs  { height: 8px; }
.tre-spacer--sm  { height: 16px; }
.tre-spacer--md  { height: 32px; }
.tre-spacer--lg  { height: 56px; }
.tre-spacer--xl  { height: 88px; }
.tre-spacer--xxl { height: 128px; }
/* Tryb „własne px" – wysokość ze zmiennej ustawionej inline. */
.tre-spacer--custom { height: var(--tre-sp, 32px); }

/* Mobile: duże odstępy zmniejszamy, żeby nie robiły dziur. Przy własnej
   wysokości używamy --tre-sp-m, jeśli podano (inaczej zostaje --tre-sp). */
@media (max-width: 600px) {
	.tre-spacer--md  { height: 24px; }
	.tre-spacer--lg  { height: 40px; }
	.tre-spacer--xl  { height: 56px; }
	.tre-spacer--xxl { height: 80px; }
	.tre-spacer--custom { height: var(--tre-sp-m, var(--tre-sp, 32px)); }
}

/* ============================================================
   ODSTĘPY POMOCNICZE  (opcjonalne mt/mb na elementach blokowych)
   Skala jak w [tr_spacer]. !important – świadomie nadpisują domyślny
   margines danego elementu. Uwaga: sąsiadujące marginesy „zlewają się"
   (margin collapsing) – gdy chcesz gwarantowaną przerwę, użyj [tr_spacer].
============================================================ */
.tre-mt-none { margin-top: 0 !important; }
.tre-mt-xs   { margin-top: 8px !important; }
.tre-mt-sm   { margin-top: 16px !important; }
.tre-mt-md   { margin-top: 32px !important; }
.tre-mt-lg   { margin-top: 56px !important; }
.tre-mt-xl   { margin-top: 88px !important; }
.tre-mt-xxl  { margin-top: 128px !important; }
.tre-mb-none { margin-bottom: 0 !important; }
.tre-mb-xs   { margin-bottom: 8px !important; }
.tre-mb-sm   { margin-bottom: 16px !important; }
.tre-mb-md   { margin-bottom: 32px !important; }
.tre-mb-lg   { margin-bottom: 56px !important; }
.tre-mb-xl   { margin-bottom: 88px !important; }
.tre-mb-xxl  { margin-bottom: 128px !important; }

/* Duże odstępy zmniejszamy na mobile (spójnie ze spacerem). */
@media (max-width: 600px) {
	.tre-mt-md  { margin-top: 24px !important; }
	.tre-mt-lg  { margin-top: 40px !important; }
	.tre-mt-xl  { margin-top: 56px !important; }
	.tre-mt-xxl { margin-top: 80px !important; }
	.tre-mb-md  { margin-bottom: 24px !important; }
	.tre-mb-lg  { margin-bottom: 40px !important; }
	.tre-mb-xl  { margin-bottom: 56px !important; }
	.tre-mb-xxl { margin-bottom: 80px !important; }
}

/* ============================================================
   EFEKTY HOVER  (przełącznik: klasa .tre-fx-hover na <body>; siła:
   dodatkowa klasa .tre-fx-strong). Cień z koloru akcentu, więc pasuje
   do każdej strony. Efekt także na :focus-within (klawiatura).
   Wyłączenie na konkretnym elemencie: atrybut hover="off" → .tre-nohover.
============================================================ */
/* Karty – pełne podniesienie + cień */
.tre-fx-hover .tre-card {
	transition: transform .18s ease, box-shadow .18s ease;
}
.tre-fx-hover .tre-cards:not(.tre-nohover) .tre-card:hover,
.tre-fx-hover .tre-cards:not(.tre-nohover) .tre-card:focus-within {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px color-mix(in srgb, var(--tre-accent, #bc0000) 16%, transparent);
}

/* Boksy (callout / CTA) – łagodniejszy wariant (mniej „klikalny") */
.tre-fx-hover .tre-note,
.tre-fx-hover .tre-cta {
	transition: transform .18s ease, box-shadow .18s ease;
}
.tre-fx-hover .tre-note:not(.tre-nohover):hover,
.tre-fx-hover .tre-note:not(.tre-nohover):focus-within,
.tre-fx-hover .tre-cta:not(.tre-nohover):hover,
.tre-fx-hover .tre-cta:not(.tre-nohover):focus-within {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px color-mix(in srgb, var(--tre-accent, #bc0000) 13%, transparent);
}

/* Lista odnośników – podświetlenie wiersza (bez unoszenia) */
.tre-fx-hover .tre-linkitem {
	transition: background-color .15s ease;
	border-radius: 8px;
}
.tre-fx-hover .tre-links:not(.tre-nohover) .tre-linkitem:hover,
.tre-fx-hover .tre-links:not(.tre-nohover) .tre-linkitem:focus-within {
	background: color-mix(in srgb, var(--tre-accent, #bc0000) 6%, transparent);
}

/* --- Wariant „mocniejszy" (Ustawienia → siła: mocniejsza) --- */
.tre-fx-hover.tre-fx-strong .tre-cards:not(.tre-nohover) .tre-card:hover,
.tre-fx-hover.tre-fx-strong .tre-cards:not(.tre-nohover) .tre-card:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 14px 32px color-mix(in srgb, var(--tre-accent, #bc0000) 24%, transparent);
}
.tre-fx-hover.tre-fx-strong .tre-note:not(.tre-nohover):hover,
.tre-fx-hover.tre-fx-strong .tre-note:not(.tre-nohover):focus-within,
.tre-fx-hover.tre-fx-strong .tre-cta:not(.tre-nohover):hover,
.tre-fx-hover.tre-fx-strong .tre-cta:not(.tre-nohover):focus-within {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px color-mix(in srgb, var(--tre-accent, #bc0000) 20%, transparent);
}
.tre-fx-hover.tre-fx-strong .tre-links:not(.tre-nohover) .tre-linkitem:hover,
.tre-fx-hover.tre-fx-strong .tre-links:not(.tre-nohover) .tre-linkitem:focus-within {
	background: color-mix(in srgb, var(--tre-accent, #bc0000) 11%, transparent);
}

/* Szacunek dla „ograniczenia ruchu" – bez przesunięć, zostaje sam cień */
@media (prefers-reduced-motion: reduce) {
	.tre-fx-hover .tre-card,
	.tre-fx-hover .tre-note,
	.tre-fx-hover .tre-cta { transition: box-shadow .18s ease; }
	.tre-fx-hover .tre-cards .tre-card:hover,
	.tre-fx-hover .tre-cards .tre-card:focus-within,
	.tre-fx-hover .tre-note:hover,
	.tre-fx-hover .tre-note:focus-within,
	.tre-fx-hover .tre-cta:hover,
	.tre-fx-hover .tre-cta:focus-within { transform: none !important; }
}
