/* ===========================================================
   CAMPER BLOG GRID – style v1.1
   =========================================================== */

.cf-blog,
.cf-blog * { box-sizing: border-box; }

.cf-blog {
	--cf-radius: 8px;
	--cf-gap: 10px;
	--cf-ink: #ffffff;
	--cf-muted: rgba(255, 255, 255, .82);
	--cf-shadow: 0 10px 30px rgba(15, 23, 42, .12);
	--cf-accent: #f35120;

	font-family: inherit;
	color: #0f172a;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* ---------- Header ---------- */
.cf-blog__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 4px 18px;
}
.cf-blog__title {
	font-size: clamp(18px, 2vw, 26px);
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
	margin: 0;
	color: #0f172a;
}
.cf-blog__all {
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
	white-space: nowrap;
}
.cf-blog__all:hover { color: #0f172a; }

.cf-blog__empty {
	padding: 24px;
	text-align: center;
	color: #64748b;
}

/* ===========================================================
   DESKTOP GRID
   =========================================================== */
.cf-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 200px;
	gap: var(--cf-gap);
}

/* ---------- Karta ---------- */
.cf-card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--cf-radius);
	background-color: #1e293b;
	background-size: cover;
	background-position: center;
	color: var(--cf-ink);
	text-decoration: none;
	box-shadow: var(--cf-shadow);
	isolation: isolate;
	min-height: 200px;
	transition: box-shadow .3s ease;
}
.cf-card::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0,0,0,0) 30%,
		rgba(0,0,0,.35) 65%,
		rgba(0,0,0,.82) 100%
	);
	z-index: 1;
}
.cf-card:hover {
	box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}

/* ---------- Treść karty ---------- */
.cf-card__body {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 18px 20px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cf-card__title {
	font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 600;
	margin: 0;
	color: var(--cf-ink);
	text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.cf-card__excerpt {
	display: none;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cf-muted);
	margin: 0;
}
.cf-card__cta {
	display: none;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	padding: 11px 18px;
	background: var(--cf-accent);
	color: #ffffff;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

.cf-card__date {
	display: none !important;
}

/* ---------- Karta wyróżniona (duża) ---------- */
.cf-card--featured {
	grid-column: span 2;
	grid-row: span 2;
}
.cf-card--featured .cf-card__title {
	font-size: clamp(22px, 2.2vw, 32px);
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.01em;
	max-width: 80%;
}
.cf-card--featured .cf-card__excerpt {
	display: block;
	max-width: 80%;
}
/* Desktop: brak przycisku CTA na dużej karcie */
.cf-card--featured .cf-card__cta { display: none; }

.cf-card--featured .cf-card__body { padding: 24px 28px; gap: 14px; }
.cf-card--featured::after {
	background: linear-gradient(
		180deg,
		rgba(0,0,0,0) 20%,
		rgba(0,0,0,.45) 60%,
		rgba(0,0,0,.85) 100%
	);
}

/* ===========================================================
   MOBILE SLIDER
   =========================================================== */
.cf-slider {
	display: none;
	position: relative;
}

.cf-slider__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 4px 4px 8px;
	margin: 0 -4px;
	scrollbar-width: none;
}
.cf-slider__track::-webkit-scrollbar { display: none; }

.cf-slider__slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.cf-slider__slide .cf-card {
	min-height: 460px;
	border-radius: var(--cf-radius);
}
.cf-slider__slide .cf-card__title {
	font-size: clamp(22px, 6vw, 30px);
	line-height: 1.18;
	font-weight: 700;
	max-width: 92%;
}
.cf-slider__slide .cf-card__excerpt {
	display: block;
	max-width: 92%;
}
/* Mobile: CTA na dużej karcie w sliderze */
.cf-slider__slide .cf-card--featured .cf-card__cta { display: inline-flex; }
.cf-slider__slide .cf-card__body { padding: 22px 24px 56px; gap: 14px; }

/* ---------- Kontrolki mobile ---------- */
/* Strzałki ukryte */
.cf-slider__btn { display: none !important; }

/* Kropki jako overlay na zdjęciu (na dole karty) */
.cf-slider__controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 5;
}
.cf-slider__dots {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	pointer-events: auto;
}
.cf-slider__dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	border: 0;
	padding: 0;
	background: rgba(255, 255, 255, .45);
	cursor: pointer;
	transition: width .25s ease, background .25s ease;
}
.cf-slider__dot[aria-current="true"] {
	width: 26px;
	background: #ffffff;
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */

/* Tablet */
@media (max-width: 1024px) {
	.cf-grid {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 180px;
	}
	.cf-card--featured {
		grid-column: span 2;
		grid-row: span 2;
	}
}

/* Mobile */
@media (max-width: 720px) {
	.cf-grid { display: none; }
	.cf-slider { display: block; }
	.cf-blog__title { font-size: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.cf-card,
	.cf-slider__track,
	.cf-slider__dot { transition: none; }
	.cf-slider__track { scroll-behavior: auto; }
}

/* =========================================================
   v1.3 — Camper Blog Row [camper_blog_row]
   ========================================================= */
.cf-row,
.cf-row * { box-sizing: border-box; }

.cf-row {
	width: 100%;
	font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #0f172a;
}

/* Nagłówek */
.cf-row__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 4px 18px;
}
.cf-row__title {
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
	margin: 0;
}
.cf-row__all {
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
	white-space: nowrap;
}
.cf-row__all:hover { color: #0f172a; }

.cf-row__empty {
	padding: 30px;
	text-align: center;
	color: #64748b;
}

/* GRID ===================================================== */
.cf-row__inner {
	display: grid;
	gap: 24px;
	position: relative;
}
.cf-row__track {
	display: contents; /* na desktop slidy są dziećmi gridu */
}
.cf-row--cols-2 .cf-row__inner { grid-template-columns: repeat(2, 1fr); }
.cf-row--cols-3 .cf-row__inner { grid-template-columns: repeat(3, 1fr); }
.cf-row--cols-4 .cf-row__inner { grid-template-columns: repeat(4, 1fr); }

/* Karta wpisu */
.cf-row__item {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-decoration: none;
	color: inherit;
	transition: transform .3s ease;
}
.cf-row__item:hover { transform: translateY(-3px); }

.cf-row__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 11;
	border-radius: 12px;
	overflow: hidden;
	background-color: #e2e8f0;
	background-size: cover;
	background-position: center;
	transition: box-shadow .3s ease;
}
.cf-row__item:hover .cf-row__media {
	box-shadow: 0 18px 40px rgba(15, 23, 42, .15);
}

.cf-row__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: #fbbf24;
	color: #0f172a;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 8px;
	line-height: 1.2;
}

.cf-row__item-title {
	font-size: 16px;
	line-height: 1.4;
	font-weight: 600;
	color: #0f172a;
	margin: 0;
	padding: 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Kropki (mobile carousel) */
.cf-row__dots { display: none; }

/* RESPONSIVE =============================================== */
@media (max-width: 1024px) {
	.cf-row--cols-4 .cf-row__inner { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
	.cf-row--cols-3 .cf-row__inner,
	.cf-row--cols-4 .cf-row__inner { grid-template-columns: repeat(2, 1fr); }
}

/* MOBILE: GRID (2 kolumny – zachowuje 2x2 dla 4 wpisów) */
@media (max-width: 560px) {
	.cf-row--mobile-grid .cf-row__inner {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 14px;
	}
	.cf-row--mobile-grid .cf-row__item-title {
		font-size: 14px;
	}
	.cf-row--mobile-grid .cf-row__badge {
		font-size: 10px;
		padding: 4px 9px;
		top: 8px;
		left: 8px;
	}
}

/* MOBILE: CAROUSEL */
@media (max-width: 720px) {
	.cf-row--mobile-carousel .cf-row__inner {
		display: block;
	}
	.cf-row--mobile-carousel .cf-row__track {
		display: flex;
		gap: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		padding: 4px 4px 12px;
		margin: 0 -4px;
		scrollbar-width: none;
	}
	.cf-row--mobile-carousel .cf-row__track::-webkit-scrollbar { display: none; }
	.cf-row--mobile-carousel .cf-row__item {
		flex: 0 0 80%;
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}
	.cf-row--mobile-carousel .cf-row__dots {
		display: flex;
		justify-content: center;
		gap: 6px;
		margin-top: 10px;
	}
	.cf-row__dot {
		width: 6px;
		height: 6px;
		border: 0;
		border-radius: 999px;
		background: rgba(15, 23, 42, .22);
		cursor: pointer;
		padding: 0;
		transition: width .25s ease, background .25s ease;
	}
	.cf-row__dot.is-active {
		width: 22px;
		background: #0f172a;
	}
}

/* =========================================================
   v1.4 — Camper Tags [camper_tags]
   ========================================================= */
.cf-tags,
.cf-tags * { box-sizing: border-box; }

.cf-tags {
	width: 100%;
	font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #0f172a;
}

.cf-tags__heading {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin: 0 0 16px;
	color: #0f172a;
}

.cf-tags__list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cf-tags--align-center .cf-tags__list { justify-content: center; }
.cf-tags--align-right  .cf-tags__list { justify-content: flex-end; }

.cf-tags__empty,
.cf-tags__error {
	padding: 16px;
	text-align: center;
	color: #64748b;
}
.cf-tags__error { color: #b91c1c; }

/* Pigułka */
.cf-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;

	padding: 14px 28px;
	border: 1px solid #d4d8e0;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 1px 0 rgba(15, 23, 42, .03);

	font-size: 16px;
	font-weight: 500;
	color: #0f172a;
	text-decoration: none;
	line-height: 1.2;
	white-space: nowrap;

	transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.cf-tag:hover {
	border-color: #0f172a;
	box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
	transform: translateY(-1px);
}
.cf-tag:active {
	transform: translateY(0);
}
.cf-tag--static { cursor: default; }
.cf-tag--static:hover {
	border-color: #d4d8e0;
	box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
	transform: none;
}

.cf-tag__count {
	font-weight: 600;
	color: #94a3b8;
	font-size: .9em;
}

/* Rozmiary */
.cf-tags--size-sm .cf-tag {
	padding: 9px 18px;
	border-radius: 10px;
	font-size: 14px;
}
.cf-tags--size-lg .cf-tag {
	padding: 18px 34px;
	border-radius: 16px;
	font-size: 18px;
}

/* Responsywność */
@media (max-width: 560px) {
	.cf-tags__list { gap: 8px; }
	.cf-tag {
		padding: 11px 20px;
		font-size: 15px;
	}
	.cf-tags--size-lg .cf-tag {
		padding: 14px 24px;
		font-size: 16px;
	}
}
