/* ==========================================================================
   JHR Posts — Elementor Pro "Posts" widget replica
   ========================================================================== */

.jhr-posts {
	width: 100%;
}

.jhr-posts__container {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 30px;
	row-gap: 35px;
	--jhr-columns: 3;
	--jhr-column-gap: 30px;
	--jhr-row-gap: 35px;
}

/* --------------------------------------------------------------------------
   Post box
   -------------------------------------------------------------------------- */

.jhr-posts .jhr-post {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-color: transparent;
	background-position: center;
	background-size: cover;
}

.jhr-posts .jhr-post__text {
	flex: 1 1 auto;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Thumbnail
   -------------------------------------------------------------------------- */

.jhr-posts .jhr-post__thumbnail-wrap {
	display: block;
	flex-shrink: 0;
	position: relative;
	text-decoration: none;
	overflow: hidden;
}

.jhr-posts .jhr-post__thumbnail {
	position: relative;
	overflow: hidden;
	line-height: 0;
}

.jhr-posts .jhr-post__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	transition: filter .3s, transform .3s;
}

/* Fixed aspect ratio */
.jhr-posts .jhr-post__thumbnail--ratio {
	height: 0;
	padding-bottom: 66%;
}

.jhr-posts .jhr-post__thumbnail--ratio img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* --------------------------------------------------------------------------
   Image position — Classic skin
   -------------------------------------------------------------------------- */

.jhr-posts-image-top .jhr-post {
	flex-direction: column;
}

.jhr-posts-image-top .jhr-post__thumbnail-wrap {
	margin-bottom: 20px;
}

.jhr-posts-image-left .jhr-post,
.jhr-posts-image-right .jhr-post {
	flex-direction: row;
	align-items: flex-start;
}

.jhr-posts-image-left .jhr-post__thumbnail-wrap {
	margin-right: 20px;
}

.jhr-posts-image-right .jhr-post {
	flex-direction: row-reverse;
}

.jhr-posts-image-right .jhr-post__thumbnail-wrap {
	margin-left: 20px;
}

.jhr-posts-image-left .jhr-post__text,
.jhr-posts-image-right .jhr-post__text {
	flex: 1 1 0;
}

/* --------------------------------------------------------------------------
   Typography defaults
   -------------------------------------------------------------------------- */

.jhr-posts .jhr-post__title {
	margin: 0 0 10px;
	font-size: 21px;
	line-height: 1.3;
}

.jhr-posts .jhr-post__title a {
	color: inherit;
	text-decoration: none;
	transition: color .2s;
}

.jhr-posts .jhr-post__meta {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.6;
	opacity: .85;
}

.jhr-posts .jhr-post__meta a {
	color: inherit;
	text-decoration: none;
}

.jhr-posts .jhr-post__meta-item {
	display: inline;
}

.jhr-posts .jhr-post__meta-separator {
	display: inline;
	margin: 0 .5em;
}

.jhr-posts .jhr-post__meta-separator:before {
	content: "///";
}

.jhr-posts .jhr-post__excerpt {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.6;
}

.jhr-posts .jhr-post__excerpt p:last-child {
	margin-bottom: 0;
}

.jhr-posts .jhr-post__read-more {
	display: inline-block;
	text-decoration: none;
	transition: color .2s;
}

/* Automatically align buttons */
.jhr-posts-align-buttons-yes .jhr-post__text {
	display: flex;
	flex-direction: column;
}

.jhr-posts-align-buttons-yes .jhr-post__read-more {
	margin-top: auto;
	display: block;
	text-align: inherit;
}

/* --------------------------------------------------------------------------
   Cards skin
   -------------------------------------------------------------------------- */

.jhr-posts--skin-cards .jhr-post {
	background-color: #fff;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1);
	border-radius: 3px;
	overflow: hidden;
}

.jhr-posts--skin-cards .jhr-post__thumbnail-wrap {
	margin-bottom: 0;
}

.jhr-posts--skin-cards .jhr-post__text {
	padding: 20px;
}

.jhr-posts--skin-cards .jhr-post__badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	margin: 20px;
	padding: 8px 12px;
	font-size: 12px;
	line-height: 1;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #fff;
	background-color: #61ce70;
	border-radius: 2px;
}

.jhr-posts--skin-cards {
	--jhr-avatar-size: 56px;
}

.jhr-posts--skin-cards .jhr-post__avatar {
	position: relative;
	z-index: 2;
	line-height: 0;
	margin-bottom: 12px;
}

/* Half of the avatar sits on top of the featured image. */
.jhr-posts--skin-cards .jhr-post--has-thumbnail .jhr-post__avatar {
	margin-top: calc( -1 * var( --jhr-avatar-size, 56px ) / 2 );
}

.jhr-posts--skin-cards .jhr-post__avatar img {
	width: var( --jhr-avatar-size, 56px );
	height: var( --jhr-avatar-size, 56px );
	border-radius: 50%;
	border: 0 solid #fff;
	box-sizing: content-box;
	background-color: #fff;
	vertical-align: top;
}

/* Keep the text block above the image while the avatar straddles the two. */
.jhr-posts--skin-cards .jhr-post__text {
	position: relative;
	z-index: 1;
}

.jhr-posts--skin-cards .jhr-post__card-footer {
	margin-top: auto;
	padding: 12px 20px;
	border-top: 1px solid rgba(0, 0, 0, .08);
	font-size: 13px;
}

.jhr-posts--skin-cards .jhr-post__card-footer .jhr-post__meta {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Masonry
   -------------------------------------------------------------------------- */

.jhr-posts--masonry .jhr-posts__container.jhr-masonry--ready {
	display: block;
	position: relative;
}

.jhr-posts--masonry .jhr-posts__container.jhr-masonry--ready > .jhr-post {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.jhr-posts__pagination {
	margin-top: 30px;
	text-align: center;
}

.jhr-posts__pagination .page-numbers {
	display: inline-block;
	margin: 0 5px;
	text-decoration: none;
	transition: color .2s;
}

.jhr-posts__pagination .page-numbers.current {
	font-weight: 700;
}

.jhr-posts__nothing-found {
	padding: 20px 0;
}

/* --------------------------------------------------------------------------
   Responsive fallbacks (used only before Elementor's own CSS kicks in)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.jhr-posts__container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.jhr-posts__container {
		grid-template-columns: minmax(0, 1fr);
	}

	.jhr-posts-image-left .jhr-post,
	.jhr-posts-image-right .jhr-post {
		flex-direction: column;
	}

	.jhr-posts-image-left .jhr-post__thumbnail-wrap,
	.jhr-posts-image-right .jhr-post__thumbnail-wrap {
		margin: 0 0 20px;
	}
}
