/**
 * Post Navigation (hash c5a9e2).
 *
 * Layers (back to front): link background colour, image, overlay, content.
 * Control values arrive as custom properties on the root or as direct rules; every property here
 * has a fallback so the widget looks right before any control CSS loads.
 */

/* Hide the widget wrapper too when the widget prints nothing (oldest post), so it adds no gap. */
.elementor-widget-post_navigation_c5a9e2:not(:has(.pn-c5a9e2)) {
	display: none;
}

.pn-c5a9e2 {
	--pn-dur: 600ms;
	--pn-ease: ease-in-out;

	position: relative;
	display: block;
	width: 100%;
	box-sizing: border-box;
}

.pn-c5a9e2 *,
.pn-c5a9e2 *::before,
.pn-c5a9e2 *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------
 * The whole card is one link.
 * ------------------------------------------------------------------ */
.pn-c5a9e2 a.pn-c5a9e2__link {
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 380px;
	overflow: hidden;
	/* clip keeps the rounded corners clean while the image scales. */
	overflow: clip;
	/* Separate stacking context so the zoom never paints outside the rounded box (Safari). */
	isolation: isolate;
	border-radius: 10px;
	background-color: #252322;
	color: inherit;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.pn-c5a9e2 a.pn-c5a9e2__link:hover,
.pn-c5a9e2 a.pn-c5a9e2__link:focus {
	color: inherit;
	text-decoration: none;
}

.pn-c5a9e2 a.pn-c5a9e2__link:focus-visible {
	outline: 2px solid #c4a667;
	outline-offset: 3px;
}

/* ------------------------------------------------------------------
 * Image and overlay
 * ------------------------------------------------------------------ */
.pn-c5a9e2__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	overflow: clip;
}

/* Elementor and TheGem both ship "img { height: auto }". The image is pinned to the media box with
 * a higher specificity and !important on the sizes, so it always covers the full card height. */
.pn-c5a9e2 .pn-c5a9e2__media img.pn-c5a9e2__img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0;
	object-fit: cover;
	object-position: var(--pn-img-pos, center center);
	filter: grayscale(var(--pn-gray, 0%));
	transform: scale(1);
	transform-origin: center center;
	transition: transform var(--pn-dur) var(--pn-ease);
	-webkit-user-drag: none;
	user-select: none;
}

/* Zoom only runs when the Zoom control is on (it is what defines --pn-zoom). */
.pn-c5a9e2 a.pn-c5a9e2__link:hover img.pn-c5a9e2__img,
.pn-c5a9e2 a.pn-c5a9e2__link:focus-visible img.pn-c5a9e2__img {
	transform: scale(var(--pn-zoom, 1));
}

.pn-c5a9e2__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: rgba(0, 0, 0, 0.6);
	pointer-events: none;
}

/* ------------------------------------------------------------------
 * Content
 * ------------------------------------------------------------------ */
.pn-c5a9e2__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 800px;
	padding: 48px 24px;
}

.pn-c5a9e2 .pn-c5a9e2__label {
	margin: 0 0 14px;
	padding: 0;
	color: #c4a667;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.pn-c5a9e2 .pn-c5a9e2__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: 'Bellefair', serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

/* ------------------------------------------------------------------
 * Editor notice (never printed on the front end)
 * ------------------------------------------------------------------ */
.pn-c5a9e2--notice p {
	margin: 0;
	padding: 24px;
	border: 1px dashed #999;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
}

/* ------------------------------------------------------------------
 * Reduced motion: no zoom, no colour fades.
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.pn-c5a9e2 .pn-c5a9e2__media img.pn-c5a9e2__img,
	.pn-c5a9e2 .pn-c5a9e2__label,
	.pn-c5a9e2 .pn-c5a9e2__title {
		transition: none;
	}

	.pn-c5a9e2 a.pn-c5a9e2__link:hover img.pn-c5a9e2__img,
	.pn-c5a9e2 a.pn-c5a9e2__link:focus-visible img.pn-c5a9e2__img {
		transform: none;
	}
}
