/* Prevent scrolling while the loader is active. */
body.skeleton-loading {
	overflow: hidden;
}

/* Full-screen skeleton container. */
.site-skeleton-loader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	background: #ffffff;
	opacity: 1;
	visibility: visible;
	transition:
		opacity 0.35s ease,
		visibility 0.35s ease;
}

/* Hide loader after the page has loaded. */
.site-skeleton-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.site-skeleton-inner {
	width: 100%;
	max-width: 1200px;
}

/* Base skeleton style. */
.skeleton-item {
	position: relative;
	overflow: hidden;
	background: #e8e8e8;
	border-radius: 8px;
}

/* Shimmer animation. */
.skeleton-item::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.65),
		transparent
	);
	animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
	100% {
		transform: translateX(100%);
	}
}

.skeleton-header {
	height: 70px;
	margin-bottom: 30px;
}

.skeleton-hero {
	height: 380px;
	margin-bottom: 35px;
}

.skeleton-title {
	width: 55%;
	height: 34px;
	margin-bottom: 18px;
}

.skeleton-text {
	width: 100%;
	height: 16px;
	margin-bottom: 12px;
}

.skeleton-text.short {
	width: 70%;
}

.skeleton-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-top: 35px;
}

.skeleton-card {
	height: 280px;
}

@media (max-width: 767px) {
	.site-skeleton-loader {
		padding: 20px 15px;
	}

	.skeleton-header {
		height: 55px;
	}

	.skeleton-hero {
		height: 230px;
	}

	.skeleton-grid {
		grid-template-columns: 1fr;
	}

	.skeleton-card {
		height: 220px;
	}
}

/* Accessibility: disable animation when requested. */
@media (prefers-reduced-motion: reduce) {
	.skeleton-item::after {
		animation: none;
	}
}