/* Widget Posts — grilla de entradas */
.boll-posts__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.boll-posts__chip {
	padding: .5rem 1.05rem; border-radius: var(--boll-radius-pill);
	border: 1px solid var(--boll-color-border-strong); color: var(--boll-color-muted);
	font-size: var(--boll-fs-small); font-weight: 700;
	transition: color .25s, border-color .25s, background .25s;
}
.boll-posts__chip:hover { color: var(--boll-color-text); border-color: var(--boll-color-text); }
.boll-posts__chip.is-active { background: var(--boll-color-primary); border-color: var(--boll-color-primary); color: var(--boll-color-text); }
.boll-posts__chip:focus-visible { outline: 2px solid var(--boll-color-primary); outline-offset: 2px; }

/* Grilla: base de 6 columnas en escritorio para equilibrar la última fila */
.boll-posts__grid { display: grid; gap: var(--boll-space-gap); grid-template-columns: 1fr; }

.boll-posts__card {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	background: var(--boll-color-surface); border: 1px solid var(--boll-color-border);
	border-radius: var(--boll-radius);
	transition: transform .35s var(--boll-ease), border-color .35s var(--boll-ease), box-shadow .35s var(--boll-ease);
}
.boll-posts__card:hover, .boll-posts__card:focus-within {
	transform: translateY(-5px);
	border-color: color-mix(in srgb, var(--boll-color-primary) 70%, transparent);
	box-shadow: var(--boll-shadow);
}

.boll-posts__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--boll-color-surface-2); }
.boll-posts__media .boll-posts__img { /* especificidad: Elementor fija .elementor img{height:auto} */ width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .7s var(--boll-ease); }
.boll-posts__card:hover .boll-posts__img { transform: scale(1.06); }

.boll-posts__fallback {
	position: absolute; inset: 0; display: grid; place-items: center;
	background:
		radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--boll-color-primary) 38%, transparent), transparent 62%),
		radial-gradient(ellipse at 80% 90%, color-mix(in srgb, var(--boll-color-primary) 18%, transparent), transparent 60%),
		var(--boll-color-bg-alt);
}
.boll-posts__fallback img { width: 9rem; height: auto; max-width: 55%; opacity: .92; transition: transform .7s var(--boll-ease); }
.boll-posts__card:hover .boll-posts__fallback img { transform: scale(1.06); }

.boll-posts__pill {
	position: absolute; top: .9rem; left: .9rem; z-index: 1;
	padding: .3rem .8rem; border-radius: var(--boll-radius-pill);
	background: color-mix(in srgb, var(--boll-color-bg) 78%, transparent);
	border: 1px solid var(--boll-color-border-strong);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
	color: var(--boll-color-text);
}

.boll-posts__body { position: relative; flex: 1; display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1.4rem 3.6rem; }
.boll-posts__date { font-size: var(--boll-fs-small); color: var(--boll-color-faint); font-weight: 600; }
.boll-posts__title { font-family: var(--boll-font-sub); font-size: clamp(1.05rem, 1.6vw, 1.2rem); font-weight: var(--boll-fw-sub); line-height: var(--boll-lh-tight); padding-right: 2.5rem; }
.boll-posts__link { color: var(--boll-color-text); transition: color .25s; }
.boll-posts__link::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.boll-posts__link:focus-visible { outline: none; }
.boll-posts__card:focus-within { outline: 2px solid var(--boll-color-primary); outline-offset: 2px; }
.boll-posts__card:hover .boll-posts__link { color: var(--boll-color-primary); }
.boll-posts__excerpt { color: var(--boll-color-muted); line-height: var(--boll-lh-body); font-size: .95rem; }

.boll-posts__arrow {
	position: absolute; right: 1.2rem; bottom: 1.3rem;
	display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--boll-radius-pill);
	background: var(--boll-color-primary-soft); color: var(--boll-color-primary);
	transition: background .3s, color .3s, transform .3s var(--boll-ease);
}
.boll-posts__arrow svg { width: 1.05rem; height: 1.05rem; }
.boll-posts__card:hover .boll-posts__arrow { background: var(--boll-color-primary); color: var(--boll-color-text); transform: translate(2px, -2px); }

.boll-posts__empty { color: var(--boll-color-muted); padding: 2.5rem; text-align: center; border: 1px dashed var(--boll-color-border-strong); border-radius: var(--boll-radius); }

/* Paginación */
.boll-posts__pagination { margin-top: clamp(2rem, 4vw, 3rem); }
.boll-posts__pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.boll-posts__pagination .page-numbers {
	display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding-inline: .5rem;
	border-radius: var(--boll-radius-pill); border: 1px solid var(--boll-color-border-strong);
	color: var(--boll-color-muted); font-weight: 700; transition: all .25s;
}
.boll-posts__pagination a.page-numbers:hover { color: var(--boll-color-text); border-color: var(--boll-color-text); }
.boll-posts__pagination .page-numbers.current { background: var(--boll-color-primary); border-color: var(--boll-color-primary); color: var(--boll-color-text); }
.boll-posts__pagination svg { width: 1.1rem; height: 1.1rem; }

@media (prefers-reduced-motion: reduce) {
	.boll-posts__card, .boll-posts__img, .boll-posts__arrow, .boll-posts__fallback img { transition: none; }
	.boll-posts__card:hover { transform: none; }
	.boll-posts__card:hover .boll-posts__img, .boll-posts__card:hover .boll-posts__fallback img { transform: none; }
}

@media (min-width: 768px) {
	.boll-posts__grid { grid-template-columns: repeat(2, 1fr); }
	/* Una última tarjeta suelta ocupa el ancho completo en 2 columnas */
	.boll-posts__grid--c2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.boll-posts__grid--c3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 1025px) {
	.boll-posts__grid--c2 { grid-template-columns: repeat(2, 1fr); }
	.boll-posts__grid--c3 { grid-template-columns: repeat(6, 1fr); }
	.boll-posts__grid--c3 > * { grid-column: span 2; }
	/* Resto 2: las dos últimas se reparten la fila; resto 1: la última se centra */
	.boll-posts__grid--c3 > :last-child:nth-child(3n + 2) { grid-column: span 3; }
	.boll-posts__grid--c3 > :nth-last-child(2):nth-child(3n + 1) { grid-column: span 3; }
	.boll-posts__grid--c3 > :last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
	.boll-posts__grid--c3 > :only-child { grid-column: 3 / span 2; }
}

/* Entrada destacada: ocupa toda la fila; en desktop, imagen a la izquierda y texto a la derecha */
.boll-posts__grid > .boll-posts__card--featured { grid-column: 1 / -1; }
.boll-posts__card--featured .boll-posts__title { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; }
.boll-posts__card--featured .boll-posts__excerpt { font-size: 1rem; }
@media (min-width: 900px) {
	.boll-posts__card--featured { flex-direction: row; }
	.boll-posts__card--featured .boll-posts__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 22rem; }
	.boll-posts__card--featured .boll-posts__body { justify-content: center; padding: clamp(1.75rem, 3vw, 2.75rem); padding-bottom: 4rem; }
}

/* Con destacada, el reparto de la última fila se cuenta desde la 2.ª tarjeta */
@media (min-width: 768px) and (max-width: 1024px) {
	.boll-posts__grid--c3.boll-posts__grid--feat > :last-child:nth-child(odd) { grid-column: auto; }
	.boll-posts__grid--c3.boll-posts__grid--feat > :last-child:nth-child(even) { grid-column: 1 / -1; }
}
@media (min-width: 1025px) {
	.boll-posts__grid--c3.boll-posts__grid--feat > :last-child:nth-child(3n + 1),
	.boll-posts__grid--c3.boll-posts__grid--feat > :nth-last-child(2):nth-child(3n + 1) { grid-column: span 2; }
	.boll-posts__grid--c3.boll-posts__grid--feat > :last-child:nth-child(3n + 2) { grid-column: 3 / span 2; }
	.boll-posts__grid--c3.boll-posts__grid--feat > :last-child:nth-child(3n),
	.boll-posts__grid--c3.boll-posts__grid--feat > :nth-last-child(2):nth-child(3n + 2) { grid-column: span 3; }
	.boll-posts__grid--c3.boll-posts__grid--feat > .boll-posts__card--featured { grid-column: 1 / -1; }
}
