/* Xyod Posts */

.xyod-posts {
	--xyod-posts-columns: 3;
	--xyod-posts-gap-x: 30px;
	--xyod-posts-gap-y: 40px;
	display: grid;
	grid-template-columns: repeat(var(--xyod-posts-columns), minmax(0, 1fr));
	column-gap: var(--xyod-posts-gap-x);
	row-gap: var(--xyod-posts-gap-y);
	width: 100%;
}

.xyod-posts--masonry {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	column-gap: var(--xyod-posts-gap-x);
	row-gap: 0;
	width: 100%;
}

.xyod-posts--masonry .xyod-posts__col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--xyod-posts-gap-y);
}

.xyod-posts--masonry .xyod-posts__item {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	min-width: 0;
	break-inside: auto;
}

.xyod-posts--masonry:not(.xyod-posts--img-mix) .xyod-posts__thumbnail img {
	aspect-ratio: auto;
	height: auto;
	object-fit: unset;
}

@media (max-width: 767px) {
	.xyod-posts--masonry {
		flex-direction: column;
	}

	.xyod-posts--masonry .xyod-posts__col {
		width: 100%;
	}
}

.xyod-posts-wrapper {
	width: 100%;
}

.xyod-posts--empty {
	padding: 1rem 0;
}

.xyod-posts__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.xyod-posts__item--enter {
	opacity: 0;
	transform: translateY(16px);
}

.xyod-posts__item--enter-active {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
	.xyod-posts__item--enter,
	.xyod-posts__item--enter-active {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

.xyod-posts__thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
}

.xyod-posts__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.xyod-posts__thumbnail--overlay:hover img,
.xyod-posts__thumbnail--overlay:focus-visible img {
	transform: scale(1.05);
}

.xyod-posts__thumb-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.35);
	opacity: 0;
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.xyod-posts__thumbnail--overlay:hover .xyod-posts__thumb-overlay,
.xyod-posts__thumbnail--overlay:focus-visible .xyod-posts__thumb-overlay {
	opacity: 1;
}

.xyod-posts__thumb-overlay-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0 1rem;
	color: #fff;
	transform: translateY(6px);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.xyod-posts__thumbnail--overlay:hover .xyod-posts__thumb-overlay-inner,
.xyod-posts__thumbnail--overlay:focus-visible .xyod-posts__thumb-overlay-inner {
	transform: translateY(0);
}

.xyod-posts__thumb-overlay-label {
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
}

.xyod-posts__thumb-overlay-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 0.875rem;
}

.xyod-posts__thumb-overlay-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.xyod-posts__thumbnail img,
	.xyod-posts__thumb-overlay,
	.xyod-posts__thumb-overlay-inner {
		transition: none;
	}

	.xyod-posts__thumbnail--overlay:hover img,
	.xyod-posts__thumbnail--overlay:focus-visible img {
		transform: none;
	}

	.xyod-posts__thumb-overlay-inner {
		transform: none;
	}
}

/* Force crop ratio even if WP still serves the full (un-regenerated) image */
.xyod-posts--img-xyod-post-card .xyod-posts__thumbnail img,
.xyod-posts__item--img-xyod-post-card .xyod-posts__thumbnail img {
	aspect-ratio: 8 / 5;
	object-fit: cover;
	height: auto;
}

.xyod-posts--img-xyod-post-landscape .xyod-posts__thumbnail img,
.xyod-posts__item--img-xyod-post-landscape .xyod-posts__thumbnail img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	height: auto;
}

.xyod-posts--img-xyod-post-compact .xyod-posts__thumbnail img,
.xyod-posts__item--img-xyod-post-compact .xyod-posts__thumbnail img {
	aspect-ratio: 21 / 13;
	object-fit: cover;
	height: auto;
}

.xyod-posts--img-xyod-post-vertical .xyod-posts__thumbnail img,
.xyod-posts--img-xyod-portrait .xyod-posts__thumbnail img,
.xyod-posts__item--img-xyod-post-vertical .xyod-posts__thumbnail img,
.xyod-posts__item--img-xyod-portrait .xyod-posts__thumbnail img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	height: auto;
}

.xyod-posts__content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.xyod-posts__meta {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.4;
}

.xyod-posts__meta a {
	color: inherit;
	text-decoration: none;
}

.xyod-posts__meta a:hover {
	text-decoration: underline;
}

.xyod-posts__title {
	margin: 0 0 0.5rem;
	padding: 0;
}

/*
 * Site Settings Link typography targets every <a> (line-height 1.65em, etc.).
 * Force the title link to use the widget Title typography on the parent instead —
 * including Elementor editor preview and mobile breakpoints.
 */
.elementor-widget-xyod-posts .xyod-posts__title a,
.elementor-widget-xyod-posts .xyod-posts__title a:hover,
.elementor-widget-xyod-posts .xyod-posts__title a:focus,
.elementor-editor-active .elementor-widget-xyod-posts .xyod-posts__title a,
.elementor-editor-active .elementor-widget-xyod-posts .xyod-posts__title a:hover,
.elementor-editor-preview .elementor-widget-xyod-posts .xyod-posts__title a {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	font-style: inherit !important;
	line-height: inherit !important;
	letter-spacing: inherit !important;
	text-transform: inherit !important;
}

.xyod-posts__title a {
	color: inherit;
	text-decoration: none;
}

.xyod-posts__excerpt {
	margin: 0 0 0.75rem;
	line-height: 1.6;
}

.xyod-posts__read-more {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	align-self: flex-start;
	margin-top: auto;
	text-decoration: none;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.xyod-posts__read-more:hover {
	text-decoration: none;
}

.xyod-posts__read-more-text {
	display: inline-block;
	line-height: 1;
	order: 1;
}

.xyod-posts__read-more--icon-before .xyod-posts__read-more-icon {
	order: 0;
}

.xyod-posts__read-more--icon-after .xyod-posts__read-more-icon {
	order: 2;
}

.xyod-posts__read-more-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	flex-shrink: 0;
	line-height: 0;
	transition: color 0.2s ease, fill 0.2s ease;
}

.xyod-posts__read-more-icon i {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	margin: 0;
	padding: 0;
	line-height: 0 !important;
	font-style: normal;
	transform: none;
}

.xyod-posts__read-more-icon i:before {
	display: block;
	line-height: 1 !important;
	width: 1em;
	text-align: center;
}

.xyod-posts__read-more-icon svg,
.xyod-posts__read-more-icon .e-font-icon-svg {
	display: block;
	width: 1em !important;
	height: 1em !important;
	max-height: none;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
	fill: currentColor;
	transform: none;
	position: static;
	top: auto;
	vertical-align: middle;
}

/* Pagination */
.xyod-posts-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2rem;
	list-style: none;
	padding: 0;
}

.xyod-posts-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0.4rem 0.65rem;
	text-decoration: none;
	line-height: 1;
	color: inherit;
	border: 1px solid currentColor;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.xyod-posts-pagination .page-numbers.current {
	font-weight: 600;
	pointer-events: none;
}

.xyod-posts-pagination .page-numbers.dots {
	border: 0;
	min-width: 0;
	opacity: 0.5;
}

.xyod-posts-load-more {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 2rem;
	width: 100%;
}

.xyod-posts-load-align-justify .xyod-posts-load-more__btn,
.xyod-posts-load-pos-stretch .xyod-posts-load-more__btn {
	width: 100%;
}

.xyod-posts-load-more__btn {
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	padding: 0.65rem 1.25rem;
	font: inherit;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.xyod-posts-load-more__btn:disabled:not(.is-loading) {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Loading: spinner only — kill Elementor button bg/border/shadow/opacity. */
.elementor-widget-xyod-posts .xyod-posts-load-more__btn.is-loading,
.elementor-widget-xyod-posts .xyod-posts-load-more__btn.is-loading:hover,
.elementor-widget-xyod-posts .xyod-posts-load-more__btn.is-loading:focus,
.elementor-widget-xyod-posts .xyod-posts-load-more__btn.is-loading:active,
.elementor-widget-xyod-posts .xyod-posts-load-more__btn.is-loading:disabled,
.xyod-posts-load-more__btn.is-loading,
.xyod-posts-load-more__btn.is-loading:hover,
.xyod-posts-load-more__btn.is-loading:focus,
.xyod-posts-load-more__btn.is-loading:active,
.xyod-posts-load-more__btn.is-loading:disabled {
	opacity: 1 !important;
	cursor: wait;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 none transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: none !important;
	filter: none !important;
	color: #c4c4c4 !important;
	padding: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border-radius: 0 !important;
}

.xyod-posts-load-more__spinner,
.xyod-posts-load-more__icon {
	display: none;
	align-items: center;
	justify-content: center;
	line-height: 1;
	background: transparent !important;
	box-shadow: none !important;
}

.xyod-posts-load-more__icon {
	display: inline-flex;
}

.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__spinner {
	display: inline-flex;
	color: inherit;
	fill: currentColor;
}

.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__icon,
.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__text {
	display: none;
}

.xyod-posts-load-more__spinner svg,
.xyod-posts-load-more__icon svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Built-in CSS spinner when no Icon Library spinner is set */
.xyod-posts-load-more__spinner--css,
.xyod-posts-infinite__spinner--css {
	box-sizing: border-box;
	width: 1.25em;
	height: 1.25em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	background: transparent !important;
}

.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__spinner i,
.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__spinner svg,
.xyod-posts-load-more__btn.is-loading .xyod-posts-load-more__spinner--css {
	animation: xyod-posts-spin 0.8s linear infinite;
}

@keyframes xyod-posts-spin {
	to {
		transform: rotate(360deg);
	}
}

.xyod-posts-load-more__message {
	width: 100%;
	text-align: center;
	margin-top: 0.75rem;
}

.xyod-posts-load-more.is-hidden,
.xyod-posts-load-more__message.is-hidden,
.xyod-posts-infinite__message.is-hidden,
.xyod-posts-sentinel.is-hidden {
	display: none;
}

.xyod-posts-load-more.is-finished .xyod-posts-load-more__btn {
	display: none;
}

.xyod-posts-infinite {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin-top: 2rem;
	width: 100%;
	min-height: 1.5rem;
}

.xyod-posts-infinite__spinner {
	display: none;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 1.25rem;
	color: #c4c4c4;
	background: transparent !important;
	box-shadow: none !important;
}

.xyod-posts-infinite.is-loading .xyod-posts-infinite__spinner {
	display: inline-flex;
}

.xyod-posts-infinite__spinner i,
.xyod-posts-infinite__spinner svg {
	display: block;
	line-height: 1;
}

.xyod-posts-infinite.is-loading .xyod-posts-infinite__spinner i,
.xyod-posts-infinite.is-loading .xyod-posts-infinite__spinner svg,
.xyod-posts-infinite.is-loading .xyod-posts-infinite__spinner--css {
	animation: xyod-posts-spin 0.8s linear infinite;
}

.xyod-posts-infinite__spinner svg {
	width: 1em;
	height: 1em;
}

.xyod-posts-infinite__message {
	width: 100%;
	text-align: center;
}

.xyod-posts-load-align-left .xyod-posts-load-more__message,
.xyod-posts-load-align-left .xyod-posts-infinite__message {
	text-align: left;
}

.xyod-posts-load-align-center .xyod-posts-load-more__message,
.xyod-posts-load-align-center .xyod-posts-infinite__message {
	text-align: center;
}

.xyod-posts-load-align-right .xyod-posts-load-more__message,
.xyod-posts-load-align-right .xyod-posts-infinite__message {
	text-align: right;
}

.xyod-posts-load-align-justify .xyod-posts-load-more__message,
.xyod-posts-load-align-justify .xyod-posts-infinite__message {
	text-align: center;
}

.xyod-posts-sentinel {
	height: 1px;
	width: 100%;
	pointer-events: none;
}
