/**
 * Boksiowo Portal Engine PRO — Articles module (frontend) styles.
 */

.bpe-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

.bpe-archive-header {
	margin: 32px 0 24px;
}

.bpe-archive-title {
	margin: 0 0 8px;
}

.bpe-articles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.bpe-article-card {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.bpe-article-card__thumb {
	display: block;
	width: 100%;
	align-self: stretch;
	flex-shrink: 0;
	/* A fixed height (not aspect-ratio) — the featured images across
	   articles have wildly different native proportions (landscape,
	   portrait, square), so a consistent crop height keeps the grid
	   looking uniform. aspect-ratio was tried first, but on a
	   flex-direction:column item aspect-ratio ties the cross-axis (width)
	   to the shrinkable main-axis (height): with the default flex-shrink,
	   the browser shrank the resolved *width* down to a fraction of the
	   card instead of the intended full-width, evenly-cropped thumbnail.
	   flex-shrink: 0 (this item never shrinks) plus a plain fixed height
	   sidesteps that interaction entirely. */
	height: 190px;
	overflow: hidden;
}

.bpe-article-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bpe-article-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bpe-article-card__title {
	margin: 0;
	font-size: 1.15rem;
}

.bpe-article-card__title a {
	text-decoration: none;
}

.bpe-article-card__meta {
	font-size: 0.85rem;
	color: #646970;
}

.bpe-article-card__excerpt {
	font-size: 0.95rem;
	color: #3c434a;
}

.bpe-article-card__link {
	margin-top: auto;
	font-weight: 600;
	text-decoration: none;
}

.bpe-article-card__badge {
	display: inline-block;
	align-self: flex-start;
	background: #d4351c;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 8px;
	border-radius: 3px;
}

.bpe-pagination {
	display: flex;
	justify-content: center;
	margin-bottom: 40px;
}

.bpe-no-articles {
	padding: 40px 0;
	text-align: center;
	color: #646970;
}

.bpe-article__header {
	margin: 32px 0 20px;
}

.bpe-article__title {
	margin: 8px 0 12px;
}

.bpe-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 0.9rem;
	color: #646970;
	margin-bottom: 20px;
}

.bpe-article__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	margin-bottom: 24px;
}

.bpe-article__content {
	max-width: 780px;
	line-height: 1.7;
	margin-bottom: 40px;
}

/* Images placed inside the article body itself (not the featured image
   above, which .bpe-article__thumb already styles) — e.g. a photo an
   editor drags into the WordPress editor mid-article. Previously
   completely unstyled: no width limit, no rounding, no centering, so an
   inserted photo could render at its full native pixel size and sit
   flush left instead of reading as a deliberate figure in the post. */
.bpe-article__content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 24px auto;
	border-radius: 8px;
}

/* Classic-editor/WP-core alignment classes (aligncenter/alignleft/
   alignright) and the caption wrapper WordPress generates around a
   captioned image — honoured here since the_content() can output any of
   these depending on how the editor inserted the image. */
.bpe-article__content .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.bpe-article__content .alignleft {
	float: left;
	margin: 4px 20px 16px 0;
	max-width: 45%;
}

.bpe-article__content .alignright {
	float: right;
	margin: 4px 0 16px 20px;
	max-width: 45%;
}

.bpe-article__content .wp-caption {
	max-width: 100%;
	margin: 24px auto;
}

.bpe-article__content .wp-caption img {
	margin: 0;
}

.bpe-article__content .wp-caption-text,
.bpe-article__content figcaption {
	margin-top: 8px;
	font-size: 0.85rem;
	color: #646970;
	text-align: center;
}
