/* Homepage Builder — frontend layouts (v1.9.0) */
.ucp-section { margin-bottom: 40px; }

/* grid columns chosen in the builder */
.posts-grid.ucp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid.ucp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid.ucp-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .posts-grid.ucp-cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px)  { .posts-grid.ucp-cols-3, .posts-grid.ucp-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .posts-grid.ucp-cols-2, .posts-grid.ucp-cols-3, .posts-grid.ucp-cols-4 { grid-template-columns: 1fr; } }

/* "one big + N small": the big card spans however many small cards there are */
.ucp-bigsmall .cat-card-feature { grid-row: span var(--ucp-small-count, 3); }
@media (max-width: 768px) { .ucp-bigsmall { grid-template-columns: 1fr; } .ucp-bigsmall .cat-card-feature { grid-row: auto; } }

/* compact list */
.ucp-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ucp-list-item + .ucp-list-item { border-top: 1px solid #eee; }
.ucp-list-item a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; color: inherit; text-decoration: none; }
.ucp-list-item a:hover .ucp-list-title { color: var(--ucp-primary, #b5001f); }
.ucp-list-thumb { flex: 0 0 84px; height: 58px; overflow: hidden; border-radius: 4px; }
.ucp-list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ucp-list-body { display: flex; flex-direction: column; min-width: 0; }
.ucp-list-title { font-weight: 600; line-height: 1.8; }
.ucp-list-date { font-size: 14px; color: #777; }

/* ---- Fix: "big + small" cards (RTL spacing & stacked feature card) ---- */
.cat-card-feature .cat-card-link { flex-direction: column; height: 100%; }
.cat-card-feature .cat-card-body { flex: 1; }
.cat-card-small .cat-card-link { gap: 12px; align-items: center; }
html[dir="rtl"] .cat-card-small .cat-card-thumb { margin: 0; }
.cat-card-small .cat-card-body { min-width: 0; }
