/* Rezydencja Klonowa — katalog atrakcji (1.3.0). Kolory z motywu: oliwka #53624e, złoto #B99D75, tło #f5f5f2. */
.rkf {
	--rkf-olive: #53624e;
	--rkf-olive-dark: #3f4c3b;
	--rkf-forest: #17251d;
	--rkf-green: #2f4234;
	--rkf-gold: #b99d75;
	--rkf-gold-soft: rgba(185, 157, 117, 0.35);
	--rkf-bg: #f5f5f2;
	--rkf-warm: #faf8f4;
	--rkf-card: #ffffff;
	--rkf-text: #1f2a22;
	--rkf-muted: #5f675f;
	--rkf-line: #e6e1d6;
	--rkf-radius: 2px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 20px 70px;
	color: var(--rkf-text);
	scroll-margin-top: 110px; /* przyklejony nagłówek motywu */
}

.rkf *,
.rkf *::before,
.rkf *::after {
	box-sizing: border-box;
}

/* Nagłówek „linia – tekst – linia” (bez zmian względem poprzedniej wersji) */
.rkf__header {
	text-align: center;
	margin-bottom: 32px;
}

.rkf__title {
	display: flex;
	align-items: center;
	gap: 40px;
	margin: 0 0 16px;
	font-size: 26px;
	line-height: 1.3;
	letter-spacing: 0.04em;
	color: var(--rkf-gold);
	font-weight: inherit;
}

.rkf__title::before,
.rkf__title::after {
	content: "";
	flex: 1 1 0;
	min-width: 20px;
	border-top: 1px solid var(--rkf-gold);
}

.rkf__title:focus {
	outline: none;
}

.rkf__subtitle {
	max-width: 640px;
	margin: 0 auto;
	color: var(--rkf-muted);
	font-size: 17px;
	line-height: 1.6;
}

/* ---------- Panel filtrów ---------- */
.rkf__form {
	background: var(--rkf-warm);
	border: 1px solid var(--rkf-line);
	border-radius: var(--rkf-radius);
	padding: 24px 26px 6px;
	margin: 0 0 22px;
}

.rkf__row {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 18px;
	margin-bottom: 16px;
}

.rkf__field label,
.rkf__group legend,
.rkf__sort label {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--rkf-olive);
}

.rkf__field input[type="search"],
.rkf__field select,
.rkf__sort select {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--rkf-line);
	border-radius: var(--rkf-radius);
	background-color: #fff;
	color: var(--rkf-text);
	font: inherit;
	font-size: 16px; /* bez powiększania na iOS */
	line-height: 1.4;
	box-shadow: none;
}

.rkf__field select,
.rkf__sort select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2353624e' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.rkf__field input:focus,
.rkf__field select:focus,
.rkf__sort select:focus {
	border-color: var(--rkf-olive);
	outline: 2px solid var(--rkf-gold-soft);
	outline-offset: 0;
}

/* „Więcej filtrów” */
.rkf__more-filters {
	border-top: 1px solid var(--rkf-line);
	margin: 0;
}

.rkf__more-filters > summary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 4px 0;
	color: var(--rkf-green);
	font-size: 15px;
	letter-spacing: 0.03em;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.rkf__more-filters > summary::-webkit-details-marker {
	display: none;
}

.rkf__more-filters > summary::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-left: 2px;
	border-right: 1.5px solid var(--rkf-gold);
	border-bottom: 1.5px solid var(--rkf-gold);
	transform: rotate(45deg) translateY(-3px);
	transition: transform 0.2s;
}

.rkf__more-filters[open] > summary::after {
	transform: rotate(-135deg) translateY(-2px);
}

.rkf__more-filters > summary:focus-visible {
	outline: 2px solid var(--rkf-gold);
	outline-offset: 2px;
}

.rkf__more-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--rkf-olive);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.rkf__more-count[hidden] {
	display: none;
}

.rkf__more-body {
	padding: 6px 0 14px;
}

.rkf__group {
	border: 0;
	margin: 0 0 14px;
	padding: 0;
	min-width: 0;
}

.rkf__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rkf__pill {
	position: relative;
	display: inline-flex;
	margin: 0;
	cursor: pointer;
}

.rkf__pill input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.rkf__pill span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 1px solid var(--rkf-line);
	border-radius: 999px;
	background: #fff;
	color: var(--rkf-green);
	font-size: 15px;
	line-height: 1.2;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.rkf__pill:hover span {
	border-color: var(--rkf-gold);
}

.rkf__pill input:checked + span {
	background: var(--rkf-olive);
	border-color: var(--rkf-olive);
	color: #fff;
}

.rkf__pill input:focus-visible + span {
	outline: 2px solid var(--rkf-gold);
	outline-offset: 2px;
}

.rkf__pill--crown span::before {
	content: "♛";
	margin-right: 8px;
	color: var(--rkf-gold);
}

.rkf__pill--crown input:checked + span {
	background: var(--rkf-gold);
	border-color: var(--rkf-gold);
}

.rkf__pill--crown input:checked + span::before {
	color: #fff;
}

.rkf__noscript {
	margin: 0 0 16px;
}

.rkf__submit {
	min-height: 44px;
	padding: 8px 22px;
	border: 1px solid var(--rkf-olive);
	border-radius: var(--rkf-radius);
	background: var(--rkf-olive);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

/* ---------- Pasek nad wynikami: liczba + sortowanie ---------- */
.rkf__toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 10px;
}

.rkf__count {
	margin: 0 0 12px;
	color: var(--rkf-green);
	font-size: 16px;
	letter-spacing: 0.02em;
}

.rkf__sort {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.rkf__sort label {
	margin: 0;
	white-space: nowrap;
}

.rkf__sort select {
	width: auto;
	min-width: 210px;
}

/* Aktywne filtry */
.rkf__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
}

.rkf__chips:empty {
	display: none;
}

.rkf__chips-label {
	margin-right: 4px;
	color: var(--rkf-muted);
	font-size: 14px;
}

.rkf__chip,
.rkf__clear {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	margin: 0;
	padding: 4px 12px 4px 14px;
	border: 1px solid var(--rkf-gold);
	border-radius: 999px;
	background: #fff;
	color: var(--rkf-forest);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.rkf__chip-x {
	font-size: 17px;
	line-height: 1;
	color: var(--rkf-gold);
}

.rkf__chip:hover,
.rkf__chip:focus-visible {
	background: var(--rkf-warm);
}

.rkf__clear {
	border-color: transparent;
	background: transparent;
	color: var(--rkf-olive);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rkf__clear:hover,
.rkf__clear:focus-visible {
	color: var(--rkf-forest);
}

.rkf__chip:focus-visible,
.rkf__clear:focus-visible {
	outline: 2px solid var(--rkf-gold);
	outline-offset: 2px;
}

/* ---------- Wyniki ---------- */
.rkf__results {
	transition: opacity 0.2s;
}

.rkf.is-loading .rkf__results {
	opacity: 0.55;
}

.rkf .rkf__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 1fr; /* każdy rząd tej samej wysokości */
	align-items: stretch;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Motyw dodaje do list pusty ::before/::after (clearfix). W siatce stawał się
   dodatkową, niewidoczną „kartą” i tworzył pusty rząd pod ostatnimi atrakcjami. */
.rkf .rkf__grid::before,
.rkf .rkf__grid::after {
	content: none !important;
	display: none !important;
}

/* Karta: zdjęcie 4:3 + jednolity obszar tekstu; cała karta klikalna (link w tytule). */
.rkf .rkf__card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	padding: 0;
	background: var(--rkf-card);
	border: 1px solid var(--rkf-line);
	border-radius: var(--rkf-radius);
	overflow: hidden;
	transition: border-color 0.25s, box-shadow 0.25s;
}

.rkf .rkf__card::before {
	display: none; /* motyw dodaje znaczniki list */
}

.rkf .rkf__card:hover {
	border-color: var(--rkf-gold-soft);
	box-shadow: 0 6px 18px rgba(23, 37, 29, 0.07);
}

.rkf .rkf__card:focus-within {
	outline: 2px solid var(--rkf-gold);
	outline-offset: 2px;
}

.rkf .rkf__media {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #ece8df;
}

/* Starsze przeglądarki bez aspect-ratio */
@supports not (aspect-ratio: 4 / 3) {
	.rkf .rkf__media::before {
		content: "";
		display: block;
		padding-top: 75%;
	}
}

.rkf .rkf__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
	transition: transform 0.6s ease;
}

.rkf .rkf__card:hover .rkf__media img {
	transform: scale(1.025);
}

/* Brak zdjęcia: elegancki zastępnik o tych samych proporcjach */
.rkf__ph {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(185, 157, 117, 0.12) 100%),
		#f1ede4;
	color: var(--rkf-gold);
}

.rkf__ph span {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #9a8562;
}

.rkf__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	background: rgba(23, 37, 29, 0.8);
	color: #fff;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rkf .rkf__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 20px 22px 22px;
}

.rkf__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	min-height: 20px;
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rkf__cat {
	color: var(--rkf-olive);
	font-weight: 600;
}

.rkf__cat + .rkf__dist::before {
	content: "·";
	margin-right: 10px;
	color: var(--rkf-gold);
}

.rkf__dist {
	color: #9a8562;
}

.rkf__dist--none {
	font-style: italic;
	text-transform: none;
	letter-spacing: 0.02em;
}

.rkf .rkf__name {
	margin: 0 0 10px;
	font-size: 21px;
	line-height: 1.3;
	/* stała wysokość: 2 linie tytułu */
	min-height: calc(1.3em * 2);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rkf .rkf__link {
	color: var(--rkf-green);
	text-decoration: none;
}

/* Cały obszar karty jako link (jeden przystanek klawiatury) */
.rkf .rkf__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.rkf .rkf__link:focus {
	outline: none;
}

.rkf .rkf__card:hover .rkf__link {
	color: var(--rkf-olive);
}

.rkf .rkf__excerpt {
	margin: 0 0 18px;
	color: var(--rkf-muted);
	font-size: 15px;
	line-height: 1.6;
	/* stała wysokość: 3 linie opisu */
	min-height: calc(1.6em * 3);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rkf .rkf__more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto; /* zawsze na dole karty */
	padding-top: 14px;
	border-top: 1px solid var(--rkf-line);
	color: var(--rkf-olive);
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rkf .rkf__more::after {
	content: "";
	width: 18px;
	height: 1px;
	background: var(--rkf-gold);
	transition: width 0.25s;
}

.rkf .rkf__card:hover .rkf__more::after {
	width: 28px;
}

/* Brak wyników */
.rkf__empty {
	padding: 40px 20px;
	text-align: center;
	background: var(--rkf-warm);
	border: 1px dashed var(--rkf-gold);
	border-radius: var(--rkf-radius);
}

.rkf__empty[hidden],
.rkf__pager[hidden] {
	display: none;
}

.rkf__empty p {
	margin: 0 0 6px;
	color: var(--rkf-muted);
}

.rkf__empty-title {
	color: var(--rkf-forest) !important;
	font-size: 18px;
}

.rkf__reset-link {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--rkf-olive);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* „Pokaż więcej atrakcji” */
.rkf__pager {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 36px;
}

.rkf__shown {
	margin: 0;
	color: var(--rkf-muted);
	font-size: 14px;
}

.rkf .rkf__load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 30px;
	border: 1px solid var(--rkf-olive);
	border-radius: var(--rkf-radius);
	background: transparent;
	color: var(--rkf-olive) !important;
	font: inherit;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.rkf .rkf__load-more:hover,
.rkf .rkf__load-more:focus-visible {
	background: var(--rkf-olive);
	color: #fff !important;
}

.rkf .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Tablet: 2 kolumny ---------- */
@media (max-width: 1199px) {
	.rkf .rkf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 1024px) {
	.rkf__title {
		font-size: 22px;
		gap: 24px;
	}
	.rkf__row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.rkf__field--search {
		grid-column: 1 / -1;
	}
}

/* ---------- Telefon: 1 kolumna ---------- */
@media (max-width: 767px) {
	.rkf {
		padding: 10px 16px 50px;
	}
	.rkf__title {
		font-size: 20px;
		gap: 15px;
	}
	.rkf__subtitle {
		font-size: 16px;
	}
	.rkf__form {
		padding: 18px 16px 4px;
	}
	.rkf__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}
	.rkf__pill span {
		padding: 8px 14px;
		font-size: 14px;
	}
	.rkf__toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}
	.rkf__count {
		margin-bottom: 6px;
	}
	.rkf__sort {
		justify-content: space-between;
	}
	.rkf__sort select {
		min-width: 0;
		flex: 1 1 auto;
	}
	.rkf .rkf__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: auto;
		gap: 20px;
	}
	.rkf .rkf__body {
		padding: 18px 18px 20px;
	}
	.rkf .rkf__name {
		font-size: 20px;
	}
	.rkf .rkf__load-more {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rkf .rkf__card,
	.rkf .rkf__media img,
	.rkf__results,
	.rkf .rkf__more::after {
		transition: none;
	}
	.rkf .rkf__card:hover .rkf__media img {
		transform: none;
	}
}
