/* ==========================================================
   Publicaciones de Facebook – estilos
   Los colores llegan desde Ajustes > Publicaciones de Facebook
   mediante las variables --fbw-* (definidas en el style del <section>).
   ========================================================== */

.fbw {
	--fbw-accent: #1e3a8a;
	--fbw-bg: #f4f6fa;
	--fbw-text: #0f172a;
	--fbw-radius: 14px;
	--fbw-w: 560px;
	--fbw-h: 720px;
	--fbw-muted: color-mix(in srgb, var(--fbw-text) 55%, #fff);
	--fbw-line: color-mix(in srgb, var(--fbw-text) 9%, #fff);
	--fbw-tint: color-mix(in srgb, var(--fbw-accent) 10%, #fff);

	container-type: inline-size;
	width: 100%;
	max-width: min(var(--fbw-w), 100%);
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--fbw-text);
	background: var(--fbw-bg);
	border-radius: var(--fbw-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px rgba(15, 23, 42, .08);
}
.fbw *,
.fbw *::before,
.fbw *::after { box-sizing: border-box; }

/* ---------- Header (compacto) ---------- */
.fbw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: #fff;
	border-bottom: 1px solid var(--fbw-line);
}
.fbw-brand { min-width: 0; }
.fbw-eyebrow {
	display: block;
	margin-bottom: 1px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--fbw-accent);
}
.fbw .fbw-title {
	margin: 0;
	padding: 0;
	font-size: 17px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--fbw-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Botón moderno (píldora tintada, rellena al pasar el cursor) */
.fbw-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--fbw-tint);
	color: var(--fbw-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s, color .2s, transform .2s;
}
.fbw-btn:hover,
.fbw-btn:focus-visible {
	background: var(--fbw-accent);
	color: #fff;
	transform: translateY(-1px);
}

/* ---------- Lista ---------- */
.fbw-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	align-items: stretch;
	max-height: var(--fbw-h);
	overflow-y: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}
.fbw-list::-webkit-scrollbar { width: 8px; }
.fbw-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

/* ---------- Tarjeta ---------- */
.fbw-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	background: #fff;
	border: 1px solid var(--fbw-line);
	border-radius: max(calc(var(--fbw-radius) - 4px), 0px);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.fbw-card:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, .09);
	transform: translateY(-2px);
}

.fbw-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: #0f172a;
	overflow: hidden;
}
.fbw-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s;
}
.fbw-card:hover .fbw-media img { transform: scale(1.03); }

.fbw-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(15, 23, 42, .65);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	border: 2px solid rgba(255, 255, 255, .9);
}
.fbw-play::after {
	content: "";
	margin-left: 4px;
	border-left: 16px solid #fff;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

.fbw-body { flex: 1 1 auto; padding: 16px 18px 12px; }
.fbw-date {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 500;
	color: var(--fbw-muted);
}
.fbw-text {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14.5px;
	line-height: 1.65;
	color: color-mix(in srgb, var(--fbw-text) 85%, #fff);
	white-space: pre-line;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.fbw-text.open { display: block; -webkit-line-clamp: unset; }
.fbw-text a { color: var(--fbw-accent); text-decoration: underline; text-underline-offset: 2px; }

.fbw-more {
	padding: 8px 0 0;
	border: 0;
	background: none;
	color: var(--fbw-accent);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.fbw-more:hover { text-decoration: underline; }

.fbw-foot { border-top: 1px solid var(--fbw-line); }
.fbw-foot a {
	display: block;
	padding: 12px 18px;
	font-size: 13px;
	font-weight: 600;
	color: var(--fbw-accent);
	text-decoration: none;
	transition: background .2s;
}
.fbw-foot a:hover { background: var(--fbw-tint); }

.fbw-btn:focus-visible,
.fbw-more:focus-visible,
.fbw-foot a:focus-visible,
.fbw-text a:focus-visible { outline: 2px solid var(--fbw-accent); outline-offset: 2px; }

.fbw-msg {
	grid-column: 1 / -1;
	margin: 0;
	padding: 28px 12px;
	text-align: center;
	font-size: 14px;
	color: var(--fbw-muted);
}

/* ---------- Columnas según el ancho disponible ---------- */
@container (min-width: 560px) {
	.fbw-cols-2 .fbw-list,
	.fbw-cols-3 .fbw-list,
	.fbw-cols-4 .fbw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 840px) {
	.fbw-cols-3 .fbw-list,
	.fbw-cols-4 .fbw-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 1120px) {
	.fbw-cols-4 .fbw-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Móvil: header mucho más bajo ---------- */
@container (max-width: 420px) {
	.fbw-head { padding: 9px 12px; gap: 8px; }
	.fbw-eyebrow { display: none; }              /* fuera la línea extra */
	.fbw .fbw-title { font-size: 15px; }
	.fbw-btn { padding: 7px 12px; font-size: 12px; }
	.fbw-list { padding: 10px; gap: 10px; }
	.fbw-body { padding: 14px 14px 10px; }
	.fbw-text { font-size: 14px; }
	.fbw-foot a { padding: 11px 14px; }
}
@media (max-width: 480px) {
	.fbw { border-radius: min(var(--fbw-radius), 12px); }
	.fbw-list { max-height: min(var(--fbw-h), 75vh); }
}
@media (prefers-reduced-motion: reduce) {
	.fbw *, .fbw *::before, .fbw *::after { transition: none !important; }
}
