/**
 * Osadkowski-Cebulski – Facebook Feed (front).
 * Styl dopasowany do sekcji „Aktualności i porady” na osadkowski-cebulski.pl (Breakdance):
 * Roboto, zieleń #264433, limonka #94C11E, białe karty z cienką ramką.
 * Kontrasty sprawdzone pod WCAG 2.2 AA. Wszystko w przestrzeni .ocff – brak wpływu na motyw.
 */
.ocff {
	--ocff-green: #264433;
	--ocff-green-2: #3f7358;
	--ocff-lime: #94c11e;
	--ocff-lime-2: #a0c347;
	--ocff-lime-ink: #10261a;
	--ocff-ink: #111827;
	--ocff-text: #384250;
	--ocff-muted: #5f6672;
	--ocff-border: #e5e7eb;
	--ocff-bg: #fff;
	--ocff-radius: 10px;
	--ocff-gap: 24px;
	--ocff-cols: 4;
	--ocff-ar: 16 / 9;
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto;
	padding: 8px 0 16px;
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	color: var(--ocff-text);
	line-height: 1.5;
	/* Układ zależy od szerokości kontenera (kolumna Breakdance, sidebar, blok), nie tylko ekranu. */
	container-type: inline-size;
	container-name: ocff;
}
.ocff *, .ocff *::before, .ocff *::after { box-sizing: border-box; }
.ocff--cols-3 { --ocff-cols: 3; }
.ocff--ar-4-3 { --ocff-ar: 4 / 3; }

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

/* ---------- Nagłówek ---------- */
.ocff__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ocff__eyebrow {
	display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
	font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
	color: var(--ocff-green-2);
}
.ocff__eyebrow svg { width: 26px; height: 26px; color: var(--ocff-lime); flex-shrink: 0; }
.ocff .ocff__title {
	margin: 0; padding: 0; border: 0;
	font-family: inherit; font-size: clamp(24px, 2.2vw + 10px, 32px); font-weight: 700; line-height: 1.25;
	color: var(--ocff-ink); text-transform: none; letter-spacing: 0;
}
.ocff__subtitle { margin: 8px 0 0; max-width: 760px; font-size: 16px; color: var(--ocff-text); }
.ocff__nav { display: flex; gap: 8px; flex-shrink: 0; }
.ocff__arrow {
	width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid #c9d0c4; border-radius: 50%; background: #fff; color: var(--ocff-green); cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.ocff__arrow[hidden] { display: none; }
.ocff__arrow:hover:not(:disabled) { background: var(--ocff-green); border-color: var(--ocff-green); color: #fff; }
.ocff__arrow:disabled { opacity: .4; cursor: default; }
.ocff__arrow svg { width: 18px; height: 18px; }

/* ---------- Lista ---------- */
.ocff .ocff__track {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(var(--ocff-cols), minmax(0, 1fr)); gap: var(--ocff-gap);
}
.ocff .ocff__item { display: flex; min-width: 0; margin: 0; padding: 0; }
.ocff .ocff__item::before, .ocff .ocff__item::marker { content: none; }

/* ---------- Karta ---------- */
.ocff-card {
	position: relative; display: flex; flex-direction: column; width: 100%;
	background: var(--ocff-bg); border: 1px solid var(--ocff-border); border-radius: var(--ocff-radius);
	box-shadow: 0 1px 3px rgba(17, 24, 39, .06); overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ocff-card:hover, .ocff-card:focus-within {
	transform: translateY(-4px); border-color: #cfe0a8; box-shadow: 0 14px 30px rgba(38, 68, 51, .14);
}
.ocff .ocff-card__media {
	position: relative; display: block; aspect-ratio: var(--ocff-ar); overflow: hidden;
	background: #eef3e6; text-decoration: none !important; color: inherit;
}
.ocff-card__media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; border-radius: 0; }
.ocff-card:hover .ocff-card__img { transform: scale(1.04); }

/* Całe zdjęcie jak na Facebooku – bez przycinania, z rozmytym tłem z tego samego zdjęcia */
.ocff--fit-contain .ocff-card__img { position: relative; z-index: 1; object-fit: contain; }
.ocff--fit-contain .ocff-card:hover .ocff-card__img { transform: none; }
.ocff .ocff-card__backdrop {
	position: absolute; inset: 0; z-index: 0; object-fit: cover;
	filter: blur(18px) saturate(1.1); transform: scale(1.2); opacity: .55;
}

.ocff-card__play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ocff-card__play > span {
	width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: rgba(38, 68, 51, .85); border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	transition: transform .25s ease;
}
.ocff-card:hover .ocff-card__play > span { transform: scale(1.08); }
.ocff-card__play svg { width: 22px; height: 22px; margin-left: 3px; fill: #fff; }
.ocff-card__badge {
	position: absolute; left: 12px; top: 12px; z-index: 2; padding: 3px 10px; border-radius: 4px;
	background: var(--ocff-green); color: #fff; font-size: 12px; font-weight: 500; line-height: 18px;
}

/* Post bez zdjęcia */
.ocff-card__quote {
	position: relative; display: flex; align-items: center; height: 100%; padding: 22px 24px;
	background: radial-gradient(120% 90% at 100% 0%, rgba(148, 193, 30, .30) 0%, rgba(148, 193, 30, 0) 60%), linear-gradient(135deg, #2f5440 0%, var(--ocff-green) 100%);
	color: #fff;
}
.ocff-card__quote::before {
	content: "\201C"; position: absolute; right: 16px; top: -10px;
	font-family: Georgia, "Times New Roman", serif; font-size: 110px; line-height: 1; color: rgba(160, 195, 71, .55);
}
.ocff-card__quote > span {
	position: relative; font-size: 15px; font-weight: 500; line-height: 1.55;
	display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

.ocff-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 16px 18px; }
.ocff-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-bottom: 10px; font-size: 13px; line-height: 1.3; }
.ocff-card__profile { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ocff-ink); }
.ocff .ocff-fb { width: 18px; height: 18px; flex-shrink: 0; }
.ocff-card__date { margin-left: auto; white-space: nowrap; color: var(--ocff-muted); }
.ocff .ocff-card__text {
	margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ocff-text); word-break: break-word;
	display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.ocff .ocff-card__btn {
	margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px; border-radius: 6px; background: var(--ocff-green); color: #fff !important;
	font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none !important;
	transition: background-color .2s ease;
}
.ocff .ocff-card__btn:hover { background: var(--ocff-green-2); }
.ocff-card__btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Kropki (mobile) ---------- */
.ocff__dots { display: none; justify-content: center; gap: 6px; margin-top: 16px; }
.ocff__dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ocff__dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #b9c2b3; transition: width .2s ease, background-color .2s ease; }
.ocff__dot[aria-current="true"]::before { width: 22px; background: var(--ocff-green); }

/* ---------- Obserwuj ---------- */
.ocff__follow { display: flex; justify-content: center; margin-top: 28px; }
.ocff .ocff__follow-btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 6px;
	background: var(--ocff-lime); color: var(--ocff-lime-ink) !important;
	font-size: 15px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-decoration: none !important;
	transition: background-color .2s ease, color .2s ease;
}
.ocff .ocff__follow-btn:hover { background: var(--ocff-green); color: #fff !important; }
.ocff__follow-btn .ocff-fb { width: 22px; height: 22px; }

.ocff a:focus-visible, .ocff button:focus-visible { outline: 3px solid var(--ocff-lime); outline-offset: 2px; }
.ocff-admin-note { padding: 12px 16px; border: 1px dashed #c9d0c4; border-radius: 6px; color: #384250; font-size: 14px; }

/* ---------- Karuzela na komputerze ---------- */
.ocff--carousel .ocff__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
	padding: 6px 2px 12px; margin: -6px -2px -12px;
}
.ocff--carousel .ocff__track::-webkit-scrollbar { display: none; }
.ocff--carousel .ocff__item { flex: 0 0 calc((100% - 2 * var(--ocff-gap)) / 3); scroll-snap-align: start; }

/* ---------- Tablet / węższy kontener: 2 w rzędzie ---------- */
@container ocff (max-width: 999.98px) {
	.ocff__track { --ocff-cols: 2; --ocff-gap: 18px; }
	.ocff--carousel .ocff__item { flex-basis: calc((100% - 18px) / 2); }
}

/* ---------- Smartfon / wąski kontener: karuzela dotykowa ---------- */
@container ocff (max-width: 599.98px) {
	.ocff__nav { display: none; }
	.ocff .ocff__track, .ocff--carousel .ocff__track {
		--ocff-gap: 12px;
		display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
		padding: 6px 2px 12px; margin: -6px -2px -12px;
	}
	.ocff .ocff__track::-webkit-scrollbar { display: none; }
	.ocff .ocff__item, .ocff--carousel .ocff__item { flex: 0 0 86%; scroll-snap-align: center; }
	.ocff__dots { display: flex; }
	.ocff-card:hover { transform: none; }
	.ocff .ocff__follow-btn { width: 100%; justify-content: center; }
}

/* Starsze przeglądarki bez container queries – progi wg szerokości ekranu. */
@supports not (container-type: inline-size) {
	@media (max-width: 1023.98px) { .ocff__track { --ocff-cols: 2; } }
	@media (max-width: 639.98px) {
		.ocff .ocff__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
		.ocff .ocff__item { flex: 0 0 86%; scroll-snap-align: center; }
		.ocff__dots { display: flex; }
	}
}

@media (prefers-reduced-motion: reduce) {
	.ocff-card, .ocff-card__media img, .ocff-card__play > span { transition: none; }
	.ocff-card:hover, .ocff-card:hover .ocff-card__img { transform: none; }
	.ocff__track { scroll-behavior: auto; }
}
