/*
 * Premium Camper Broker - strona glowna (front-page.php + template-parts/home/section-*.php).
 * Wymiary z plansz Main (1440 px), MainTab (768 px), MainTel + MainTel2 (390 px).
 * Breakpointy projektu: telefon do 767 px, tablet 768-1099 px, desktop od 1100 px.
 * Siatki zawsze minmax(0, 1fr), dzieci flexa z min-width: 0 - zero poziomego przewijania.
 */

/* Kontener: tresc 1320 px + marginesy boczne (plansza: logo i sekcje zaczynaja sie 60 px od krawedzi przy 1440 px).
   Obejscie do czasu poprawki w main.css, gdzie .pcb-wrap liczy 1320 px razem z marginesami (tresc 1200 px). */
body.home .pcb-wrap { max-width: calc(1320px + 2 * var(--gutter)); }

/* ---------- Hero ---------- */
.pcb-hero {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 820px; padding-top: calc(var(--header-h) + 32px); overflow: hidden;
	background: var(--atrament); color: var(--biel);
}
.pcb-hero__media { position: absolute; inset: 0; }
.pcb-hero__media::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(180deg, rgba(18, 20, 23, 0) 55%, rgba(18, 20, 23, .55) 100%),
		linear-gradient(90deg, rgba(18, 20, 23, .62) 0%, rgba(18, 20, 23, .28) 55%, rgba(18, 20, 23, 0) 100%);
}
/* Kadr od lewej krawedzi zdjecia: przy 1440 px wyglada jak na planszy, a na wezszych ekranach desktopu kamper nie wchodzi pod tekst. */
.pcb-hero__img { position: absolute; left: 0; top: 0; width: 110%; max-width: none; height: 100%; object-fit: cover; object-position: 0% 50%; }
/* Na planszy tekst hero stoi w kontenerze 1320 px liczonym razem z marginesami (60 px glebiej niz logo przy 1440 px). */
body.home .pcb-hero__in { position: relative; z-index: 2; max-width: 1320px; }
.pcb-hero__text { max-width: 840px; padding-bottom: 72px; }
.pcb-hero__eyebrow { margin-bottom: 24px; color: var(--mosiadz); }
.pcb-hero__title { font-family: var(--serif); font-weight: 500; font-size: 48px; line-height: 1.1; letter-spacing: -0.01em; color: var(--biel); }
.pcb-hero__lead { margin-top: 28px; max-width: 600px; color: rgba(255, 255, 255, .88); }
.pcb-hero__btns { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
ul.pcb-hero__trust {
	display: grid; grid-template-columns: repeat(var(--pcb-n, 3), minmax(0, 1fr)); gap: 32px;
	margin: 0; padding: 24px 0 32px; border-top: 1px solid rgba(255, 255, 255, .22);
	color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.5;
}
.pcb-hero__trust li { min-width: 0; }
@media (min-width: 1100px) {
	.pcb-hero__trust li { text-align: center; }
	.pcb-hero__trust li:first-child { text-align: left; }
	.pcb-hero__trust li:last-child:not(:first-child) { text-align: right; }
}

/* Tablet i telefon: zdjecie z kamperem u gory, tekst pod nim na ciemnym tle. */
@media (max-width: 1099px) {
	.pcb-hero { display: block; min-height: 0; padding-top: 0; }
	.pcb-hero__media { position: relative; inset: auto; height: 540px; }
	.pcb-hero__media::after { background: linear-gradient(180deg, rgba(18, 20, 23, .58) 0%, rgba(18, 20, 23, 0) 24%, rgba(18, 20, 23, 0) 52%, rgba(18, 20, 23, .8) 80%, #121417 96%); }
	.pcb-hero__img { width: 100%; object-position: 62% 50%; }
	body.home .pcb-hero__in { max-width: none; margin-top: -72px; }
	.pcb-hero__text { max-width: 600px; padding-bottom: 0; }
	.pcb-hero__eyebrow { margin-bottom: 20px; }
	.pcb-hero__lead { margin-top: 24px; max-width: 560px; }
	.pcb-hero__btns { margin-top: 36px; }
	ul.pcb-hero__trust { margin-top: 56px; }
}
@media (max-width: 767px) {
	.pcb-hero__media { height: min(540px, max(408px, 104.6vw)); }
	.pcb-hero__media::after { background: linear-gradient(180deg, rgba(18, 20, 23, .62) 0%, rgba(18, 20, 23, 0) 28%, rgba(18, 20, 23, 0) 46%, rgba(18, 20, 23, .78) 74%, #121417 94%); }
	.pcb-hero__img { object-position: 73% 50%; }
	body.home .pcb-hero__in { margin-top: -56px; padding-bottom: 8px; }
	.pcb-hero__text { max-width: none; }
	.pcb-hero__eyebrow { margin-bottom: 16px; }
	/* H1 zostaje w trzech wierszach: 30 px przy 390 px, skalowany z szerokoscia tresci (ekran minus marginesy).
	   Powyzej 414 px rosnie wolniej (Newsreader poszerza litery w wiekszych stopniach), do 48 px przy 640 px. */
	.pcb-hero__title { font-size: clamp(22px, min((100vw - 40px) * .0857, 5.65px + (100vw - 40px) * .0706), 48px); line-height: 1.14; letter-spacing: -0.015em; }
	.pcb-hero__lead { margin-top: 20px; max-width: none; }
	.pcb-hero__btns { flex-direction: column; flex-wrap: nowrap; gap: 12px; margin-top: 32px; }
	ul.pcb-hero__trust { display: flex; flex-direction: column; gap: 0; margin-top: 40px; padding: 0; border-top: 0; }
	.pcb-hero__trust li { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
}

/* ---------- Naglowek sekcji z linkiem po prawej (wyroznione kampery) ---------- */
.pcb-shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.pcb-shead__main { max-width: 640px; min-width: 0; }
.pcb-shead__main .pcb-eyebrow { margin-bottom: 16px; }
@media (max-width: 1099px) { .pcb-shead { margin-bottom: 32px; } }
@media (max-width: 767px) { .pcb-shead { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 20px; } }

/* ---------- Wyroznione kampery ---------- */
@media (min-width: 768px) and (max-width: 1099px) {
	/* Przewijany wiersz: karta 316 px jak na planszy; gorny i dolny zapas wiersza (na cien karty) nie wydluza sekcji. */
	.pcb-feat__cards { margin-top: -4px; margin-bottom: -12px; }
	.pcb-feat__cards > * { width: min(316px, calc(100vw - 2 * var(--gutter) - 48px)); }
}

/* ---------- Jak dzialamy ---------- */
.pcb-how { padding-top: 0; }
.pcb-hero + .pcb-how { padding-top: var(--sec); } /* gdy nie ma sekcji wyroznionych */
.pcb-how__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 96px; align-items: stretch; }
.pcb-how__intro { display: flex; flex-direction: column; min-width: 0; }
.pcb-how__head { min-width: 0; }
.pcb-how__head .pcb-eyebrow { margin-bottom: 16px; }
.pcb-how__side { min-width: 0; }
.pcb-how__side .pcb-lead-sm { margin-top: 24px; max-width: 440px; }
.pcb-how__side .pcb-link { margin-top: 32px; }
.pcb-how__media { position: relative; flex: 1; min-height: 320px; margin-top: 48px; border-radius: var(--r-md); overflow: hidden; background: var(--papier); }
.pcb-how__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcb-how__list { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.pcb-how__step { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--kamien); }
.pcb-how__step--last { border-bottom: 1px solid var(--kamien); }
.pcb-how__step--media { display: none; }
.pcb-how__no { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: 40px; line-height: 1; color: var(--mosiadz); }
.pcb-how__body { min-width: 0; }
.pcb-how__title { margin: 4px 0 8px; font-family: var(--sans); font-size: 22px; line-height: 1.3; font-weight: 600; }
.pcb-how__text { max-width: 560px; font-size: 16px; line-height: 1.6; color: var(--grafit); }

@media (max-width: 1099px) {
	.pcb-how__title { margin: 2px 0 8px; font-size: 20px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
	/* Tablet: naglowek w dwoch kolumnach, kroki w siatce 2 x 3, zdjecie w ostatniej komorce. */
	.pcb-how__grid { display: flex; flex-direction: column; gap: 40px; }
	.pcb-how__intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: end; }
	.pcb-how__side { display: flex; flex-direction: column; align-items: flex-start; }
	.pcb-how__side .pcb-lead-sm { margin-top: 0; max-width: none; }
	.pcb-how__side .pcb-link { margin-top: 8px; }
	.pcb-how__intro > .pcb-how__media { display: none; }
	.pcb-how__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
	.pcb-how__step { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; }
	.pcb-how__step--last { border-bottom: 0; }
	.pcb-how__step--media { display: flex; padding-bottom: 0; }
	.pcb-how__step--media .pcb-how__media { min-height: 168px; margin-top: 0; }
	/* Parzysta liczba krokow: zdjecie zajmuje caly dolny wiersz. */
	.pcb-how__list--even .pcb-how__step--media { grid-column: 1 / -1; }
	.pcb-how__list--even .pcb-how__step--media .pcb-how__media { min-height: 220px; }
	.pcb-how__no { font-size: 36px; }
}
@media (max-width: 767px) {
	.pcb-how__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.pcb-how__side .pcb-lead-sm { margin-top: 16px; max-width: none; }
	.pcb-how__side .pcb-link { margin-top: 12px; }
	.pcb-how__media { flex: none; aspect-ratio: 3 / 2; min-height: 0; margin-top: 20px; }
	.pcb-how__step { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 24px 0; }
	.pcb-how__no { font-size: 32px; }
}

/* ---------- Camper Match ---------- */
.pcb-match { background: var(--biel); border-top: 1px solid var(--kamien); border-bottom: 1px solid var(--kamien); }
.pcb-match__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 96px; align-items: center; }
.pcb-match__body { min-width: 0; }
.pcb-match__body > .pcb-eyebrow { margin-bottom: 16px; }
.pcb-match__lead { margin-top: 20px; max-width: 520px; }
.pcb-match__groups { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }
.pcb-match__group { min-width: 0; }
.pcb-match__label { margin-bottom: 12px; }
.pcb-match__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pcb-match__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--kamien); }
.pcb-match__summary { min-width: 0; font-size: 14px; line-height: 1.37; color: var(--grafit); }
.pcb-match__media { position: relative; min-width: 0; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--kamien); }
.pcb-match__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1099px) {
	.pcb-match__grid { gap: 40px; align-items: stretch; }
	.pcb-match__chips { gap: 8px; }
	.pcb-match__foot { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; margin-top: 32px; }
	.pcb-match__media { aspect-ratio: auto; min-height: 480px; }
}
@media (max-width: 767px) {
	.pcb-match__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.pcb-match__lead { margin-top: 16px; max-width: none; }
	.pcb-match__groups { margin-top: 32px; }
	.pcb-match__media { order: -1; aspect-ratio: 3 / 2; min-height: 0; }
}
@media (max-width: 359px) { .pcb-match .pcb-chip { white-space: normal; max-width: 100%; padding: 6px 14px; line-height: 1.3; text-align: center; } }

/* ---------- Broker, nie dealer ---------- */
.pcb-broker__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 96px; align-items: center; }
.pcb-broker__grid--noimg { grid-template-columns: minmax(0, 1fr); }
.pcb-broker__media { position: relative; min-width: 0; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--kamien); }
.pcb-broker__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 46% 50%; }
.pcb-broker__body { min-width: 0; }
.pcb-broker__body > .pcb-eyebrow { margin-bottom: 16px; }
.pcb-broker__text { margin-top: 24px; max-width: 600px; }
.pcb-broker__quote { margin-top: 40px; }
.pcb-broker__quote .pcb-rule { margin-bottom: 20px; }
.pcb-broker__words { max-width: 600px; font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; font-size: 28px; line-height: 1.35; }
.pcb-broker__author { margin-top: 16px; font-size: 14px; line-height: 1.37; color: var(--grafit); }
.pcb-broker__link { margin-top: 32px; }
@media (max-width: 1099px) {
	.pcb-broker__grid { gap: 40px; align-items: start; }
	.pcb-broker__text { margin-top: 20px; max-width: none; }
	.pcb-broker__quote { margin-top: 32px; }
	.pcb-broker__words { max-width: none; font-size: 24px; }
	.pcb-broker__link { margin-top: 16px; }
}
@media (max-width: 767px) {
	.pcb-broker__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.pcb-broker__text { margin-top: 16px; }
	.pcb-broker__words { font-size: 22px; line-height: 1.4; }
}

/* ---------- Zasieg: zdjecie od krawedzi do krawedzi z karta ---------- */
.pcb-reach { position: relative; overflow: hidden; background: var(--atrament); }
.pcb-reach__media { position: absolute; inset: 0; }
.pcb-reach__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.home .pcb-reach__in { position: relative; z-index: 2; display: flex; align-items: center; max-width: 1320px; min-height: 760px; padding-top: 60px; padding-bottom: 60px; }
.pcb-reach__card { width: 100%; max-width: 712px; min-width: 0; padding: 56px; border-radius: var(--r-md); background: var(--papier); color: var(--atrament); }
.pcb-reach__card > .pcb-eyebrow { margin-bottom: 16px; }
.pcb-reach__text { margin-top: 20px; font-size: 16px; line-height: 1.6; color: var(--grafit); }
.pcb-reach__list { display: flex; flex-direction: column; margin: 28px 0 0; }
.pcb-reach__list li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--kamien); font-size: 15px; line-height: 1.5; }
.pcb-reach__list li:last-child { border-bottom: 1px solid var(--kamien); }
.pcb-reach__list li::before { content: ""; flex: none; width: 20px; height: 1px; margin-top: 11px; background: var(--mosiadz); }
@media (min-width: 1100px) { .pcb-reach__title { font-size: 36px; } }
@media (max-width: 1099px) {
	body.home .pcb-reach__in { display: block; max-width: none; min-height: 0; padding-top: 300px; padding-bottom: 40px; }
	.pcb-reach__card { max-width: none; padding: 48px; }
	.pcb-reach__list { max-width: 560px; }
}
@media (max-width: 767px) {
	.pcb-reach { overflow: visible; background: var(--biel); }
	.pcb-reach__media { inset: 0 0 auto 0; height: 340px; }
	body.home .pcb-reach__in { padding-top: 248px; padding-bottom: 0; }
	.pcb-reach__card { padding: 32px 24px; }
	.pcb-reach__list { max-width: none; }
}

/* ---------- Marki: zapetlona karuzela logotypow ---------- */
.pcb-brands { padding: 56px 0; border-bottom: 1px solid var(--kamien); }
.pcb-brands__title { margin-bottom: 24px; text-align: center; }
.pcb-brands__marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}
.pcb-brands__track { display: flex; width: max-content; animation: pcb-marquee 56s linear infinite; }
.pcb-brands__marquee:hover .pcb-brands__track { animation-play-state: paused; }
.pcb-brands__group { display: flex; flex: none; margin: 0; }
.pcb-brands__item { display: flex; align-items: center; justify-content: center; flex: none; width: 220px; height: 72px; padding: 12px 25px; }
.pcb-brands__logo { width: auto; max-width: 100%; height: var(--h, 26px); transform: translateY(var(--y, 0px)); } /* od razu w kolorach marek (bez szarosci i przygaszenia) */
.pcb-brands__name { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: 22px; line-height: 1.2; color: var(--grafit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pcb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 1099px) {
	.pcb-brands { padding: 48px 0; }
	.pcb-brands__title { line-height: 1.5; }
	.pcb-brands__track { animation-duration: 48s; }
	.pcb-brands__item { width: 200px; padding: 12px 24px; }
}
@media (max-width: 767px) {
	.pcb-brands { padding: 40px 0; }
	.pcb-brands__title { margin-bottom: 16px; }
	.pcb-brands__marquee { margin: 0 calc(-1 * var(--gutter)); }
	.pcb-brands__track { animation-duration: 40s; }
	.pcb-brands__item { width: 172px; padding: 12px 20px; }
}
/* Ograniczenie ruchu: bez animacji i bez kopii, logotypy stoja w zawijanych, wysrodkowanych wierszach. */
@media (prefers-reduced-motion: reduce) {
	.pcb-brands__marquee { -webkit-mask-image: none; mask-image: none; }
	.pcb-brands__track { width: auto; animation: none; }
	.pcb-brands__group { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; min-width: 0; }
	.pcb-brands__group[aria-hidden], .pcb-brands__item[aria-hidden] { display: none; }
	.pcb-brands__logo { transition: none; }
}

/* ---------- Skrot FAQ ---------- */
.pcb-faqs__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "head list" "more list"; column-gap: 96px; align-items: start; }
.pcb-faqs__head { grid-area: head; min-width: 0; }
.pcb-faqs__head .pcb-eyebrow { margin-bottom: 16px; }
.pcb-faqs__more { grid-area: more; margin-top: 32px; }
.pcb-faqs__list { grid-area: list; min-width: 0; }
/* Wiersz pytania jak na planszy: 68 px na desktopie i 64 px na tablecie (interlinia 1,3 z main.css zostaje dla pytan dwuwierszowych). */
@media (min-width: 1100px) { .pcb-faqs .pcb-acc__q { padding: 21px 0; } }
@media (min-width: 768px) and (max-width: 1099px) { .pcb-faqs .pcb-acc__q { padding: 19px 0; } }
@media (max-width: 1099px) {
	.pcb-faqs__grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; grid-template-areas: "head more" "list list"; gap: 32px; }
	.pcb-faqs__head { max-width: 460px; }
	.pcb-faqs__more { margin-top: 0; align-self: end; }
}
@media (max-width: 767px) {
	.pcb-faqs__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list" "more"; gap: 20px; }
	.pcb-faqs__head { max-width: none; }
	.pcb-faqs__more { justify-self: start; }
}
