.employee-portal-community {
	position: relative;
	overflow: hidden;
	padding: clamp(32px, 8vw, 88px);
	padding-top: 10rem;
	border-radius: 0 0 48px 48px;
	background: #ffffff;
	color: #0a2540;
	display: grid;
	gap: clamp(1.75rem, 5vw, 3rem);
	z-index: 4;
}

.employee-portal-community__header {
	position: relative;
	z-index: 1;
	text-align: center;
	display: grid;
	gap: 1rem;
	max-width: 930px;
	margin: 0 auto;
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.employee-portal-community__heading {
	margin: 0;
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	line-height: 1.15;
	letter-spacing: -2px;
	font-weight: 700;
	line-height: 100%;
	letter-spacing: -2%;
	text-align: center;
	color: #001c33;
}

.employee-portal-community__description {
	margin: 0;
	font-size: clamp(1rem, 2.4vw, 1.2rem);
	color: rgba(10, 37, 64, 0.7);
	line-height: 1.65;
}

.employee-portal-community__grid {
	position: relative;
	z-index: 1;
	max-width: 1280px;
	margin: 0 auto;
	columns: 3 280px; /* 3 column masonry-like flow */
	column-gap: 24px;
}

.employee-portal-community__item {
	break-inside: avoid;
	page-break-inside: avoid; /* legacy */
	margin: 0 0 24px;
	position: relative;
	width: 100%;
}

.employee-portal-community__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	overflow: hidden;
}

.employee-portal-community__item.is-visible {
	opacity: 1;
	transform: translateY(0);
}
@media (min-width: 721px) {
	.employee-portal-community__item--offset {
		padding-top: 2rem !important;
	}
}

.employee-portal-community__item.is-hidden {
	display: none;
}

.employee-portal-community__actions {
	display: none;
	justify-content: center;
	z-index: 1;
	position: relative;
}

.employee-portal-community__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	border-radius: 999px;
	border: 1px solid #001c33;
	color: #001c33;
	font-weight: 600;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
	background-color: #ffffff;
}

.employee-portal-community__more:hover {
	transform: translateY(-2px);
}

/* Dark theme variant */
.employee-portal-community--dark {
	background: #000000;
	padding-top: 2rem;
	color: #f8fbff;
	position: relative;
	padding-bottom: 10rem;
}

.employee-portal-community--dark .employee-portal-community__background {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.employee-portal-community--dark .employee-portal-community__circles {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.employee-portal-community--dark .employee-portal-community__circles .circle {
	position: absolute;
	border-radius: 50%;
	filter: blur(160px);
	transform: translate(-50%, -50%);
	opacity: 0.7;
}

.employee-portal-community--dark .employee-portal-community__circles .green {
	top: 35%;
	left: 30%;
	width: clamp(400px, 40vw, 600px);
	height: clamp(400px, 40vw, 600px);
	background: #007953;
}

.employee-portal-community--dark .employee-portal-community__circles .blue {
	top: 50%;
	left: 70%;
	width: clamp(350px, 35vw, 550px);
	height: clamp(350px, 35vw, 550px);
	background: #003c71;
}

.employee-portal-community--dark .employee-portal-community__circles .red {
	top: 70%;
	left: 55%;
	width: clamp(300px, 30vw, 450px);
	height: clamp(300px, 30vw, 450px);
	background: #e1261c;
}

.employee-portal-community--dark .employee-portal-community__heading {
	color: #ffffff;
	max-width: 980px;
}

.employee-portal-community--dark .employee-portal-community__description {
	color: rgba(248, 251, 255, 0.8);
}

.employee-portal-community--dark .employee-portal-community__more {
	background-color: transparent;
	border-color: #ffffff;
	color: #ffffff;
}

.employee-portal-community--dark .employee-portal-community__more:hover {
	background-color: #ffffff;
	color: #0a1628;
}

@media (max-width: 1024px) {
	/* Masonry still active; items adapt naturally */
}

@media (max-width: 720px) {
	.employee-portal-community {
		padding: 6rem 1rem;
		border-radius: 0 0 36px 36px;
		margin-top: 0;
	}

	.employee-portal-community--dark {
		padding-bottom: 3rem;
	}

	.employee-portal-community--dark .employee-portal-community__background {
		display: none;
	}
	.employee-portal-community__actions {
		display: flex;
	}
	.employee-portal-community__actions[hidden] {
		display: none;
	}
	.employee-portal-community__grid {
		columns: 1 100%;
	}
	.employee-portal-community__item {
		margin-top: 0 !important;
	}
}
