/**
 * Boksiowo Portal Engine PRO — Homepage module styles.
 * Used by both the optional front-page template and the
 * [bpe_featured_articles] / [bpe_latest_articles] shortcodes.
 */

.bpe-homepage-section {
	margin: 32px 0;
}

.bpe-homepage-section__title {
	margin: 0 0 20px;
}

.bpe-homepage-grid {
	display: grid;
	grid-template-columns: repeat(var(--bpe-columns, 3), 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.bpe-homepage-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.bpe-homepage-grid {
		grid-template-columns: 1fr;
	}
}

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

.bpe-homepage-card--featured {
	border-color: #d4351c;
}

.bpe-homepage-card__thumb img {
	display: block;
	width: 100%;
	height: auto;
}

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

.bpe-homepage-card__title {
	margin: 0;
	font-size: 1.1rem;
}

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

.bpe-homepage-card__date {
	font-size: 0.85rem;
	color: #646970;
}

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

.bpe-homepage-empty {
	color: #646970;
	padding: 20px 0;
}

/**
 * Homepage Builder (v1.23.0) — section wrapper output by
 * Section_Renderer::wrap(). Class names below must stay in sync with
 * that method.
 */

.bpe-hb-section {
	--bpe-hb-color-primary: #d4351c;
	--bpe-hb-color-background: transparent;
	background: var(--bpe-hb-color-background);
}

.bpe-hb-section__heading {
	margin: 0 0 20px;
	color: var(--bpe-hb-color-primary);
}

.bpe-hb-section__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.bpe-hb-section--spacing-top-none { padding-top: 0; }
.bpe-hb-section--spacing-top-small { padding-top: 16px; }
.bpe-hb-section--spacing-top-default { padding-top: 32px; }
.bpe-hb-section--spacing-top-large { padding-top: 56px; }

.bpe-hb-section--spacing-bottom-none { padding-bottom: 0; }
.bpe-hb-section--spacing-bottom-small { padding-bottom: 16px; }
.bpe-hb-section--spacing-bottom-default { padding-bottom: 32px; }
.bpe-hb-section--spacing-bottom-large { padding-bottom: 56px; }

.bpe-hb-section--style-cards .bpe-hb-section__inner {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 24px 20px;
}

.bpe-hb-section--style-minimal .bpe-hb-section__heading {
	font-size: 1.15rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.bpe-hb-section--style-list .bpe-hb-section__inner {
	max-width: 760px;
}

/*
 * Scroll-reveal animations: only armed once homepage-builder-frontend.js
 * has confirmed IntersectionObserver support (it adds "bpe-hb-anim-ready"
 * to <html>) and toggles "is-visible" as each section enters the
 * viewport. Without JS, or before that class lands, sections stay fully
 * visible — so nothing ever gets stuck invisible.
 */

.bpe-hb-anim-ready .bpe-hb-section--anim-fade {
	opacity: 0;
	transition: opacity 0.6s ease;
}

.bpe-hb-anim-ready .bpe-hb-section--anim-fade.is-visible {
	opacity: 1;
}

.bpe-hb-anim-ready .bpe-hb-section--anim-slide-up {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.bpe-hb-anim-ready .bpe-hb-section--anim-slide-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.bpe-hb-anim-ready .bpe-hb-section--anim-fade,
	.bpe-hb-anim-ready .bpe-hb-section--anim-slide-up {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

.bpe-hb-hide-desktop,
.bpe-hb-hide-tablet,
.bpe-hb-hide-mobile {
	display: initial;
}

@media (min-width: 901px) {
	.bpe-hb-hide-desktop { display: none !important; }
}

@media (min-width: 601px) and (max-width: 900px) {
	.bpe-hb-hide-tablet { display: none !important; }
}

@media (max-width: 600px) {
	.bpe-hb-hide-mobile { display: none !important; }
}

/* Newsletter section */

.bpe-hb-newsletter {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.bpe-hb-newsletter__description {
	margin: 0 0 16px;
	color: #3c434a;
}

.bpe-hb-newsletter__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.bpe-hb-newsletter__input {
	flex: 1 1 260px;
	padding: 10px 14px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 1rem;
}

.bpe-hb-newsletter__submit {
	padding: 10px 22px;
	background: var(--bpe-hb-color-primary, #d4351c);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
}

.bpe-hb-newsletter__submit:hover {
	opacity: 0.9;
}

.bpe-hb-newsletter__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bpe-hb-newsletter__message {
	margin: 12px 0 0;
	font-size: 0.9rem;
}

.bpe-hb-newsletter__message--success {
	color: #1a7f37;
}

.bpe-hb-newsletter__message--error {
	color: #b32d2e;
}

/* Partners / Sponsors logo grid */

.bpe-hb-logo-grid {
	display: grid;
	grid-template-columns: repeat(var(--bpe-hb-logo-cols, 4), 1fr);
	gap: 24px;
	align-items: center;
}

.bpe-hb-logo-grid--cols-1 { --bpe-hb-logo-cols: 1; }
.bpe-hb-logo-grid--cols-2 { --bpe-hb-logo-cols: 2; }
.bpe-hb-logo-grid--cols-3 { --bpe-hb-logo-cols: 3; }
.bpe-hb-logo-grid--cols-4 { --bpe-hb-logo-cols: 4; }
.bpe-hb-logo-grid--cols-5 { --bpe-hb-logo-cols: 5; }
.bpe-hb-logo-grid--cols-6 { --bpe-hb-logo-cols: 6; }

@media (max-width: 900px) {
	.bpe-hb-logo-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.bpe-hb-logo-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.bpe-hb-logo-grid__item {
	display: flex;
	align-items: center;
	justify-content: center;
	filter: grayscale(100%);
	opacity: 0.75;
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.bpe-hb-logo-grid__item:hover {
	filter: grayscale(0%);
	opacity: 1;
}

.bpe-hb-logo-grid__img {
	max-width: 100%;
	height: auto;
}
