/*
 * Blog of the company site (design-main T10/T11, 3.8): masonry cards,
 * pagination, single post and its "Newer / Back to list / Older" bar.
 * Values measured on live (Woodmart 7 blog "masonry" + "shadow" style).
 * Breakpoints as live: 1024 (tablet), 768.98 (2 columns, 10px gaps),
 * 576 (narrow card padding), 575 (1 column).
 */

/* Grid ------------------------------------------------------------------- */

.lvt-blog-grid {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	margin: 0 -10px -20px;
}

.lvt-post-card {
	flex: 0 0 33.3333%;
	width: 33.3333%;
	max-width: 33.3333%;
	min-height: 1px;
	margin-bottom: 20px;
	padding: 0 10px;
	color: var(--lvt-c-text);
}

/* blog.js places the cards into the shortest column (isotope masonry). */
.lvt-blog-grid.is-masonry {
	display: block;
}

.lvt-blog-grid.is-masonry > .lvt-post-card {
	position: absolute;
	top: 0;
	left: 0;
}

/* Card ------------------------------------------------------------------- */

.lvt-post-card__inner {
	box-shadow: var(--lvt-shadow-card);
	transition: box-shadow .35s ease;
}

.lvt-post-card:hover .lvt-post-card__inner {
	box-shadow: var(--lvt-shadow-card-hover);
}

.lvt-post-card__media {
	position: relative;
	text-align: center;
}

.lvt-post-card__thumb {
	display: block;
	margin: 0 0 1em;
	overflow: hidden;
}

.lvt-post-card__img {
	display: block;
	width: 100%;
	height: auto;
}

.lvt-post-card__body {
	position: relative;
	z-index: 1;
	padding: 25px;
	background: var(--lvt-c-white);
	text-align: center;
}

.lvt-post-card__cats {
	position: absolute;
	top: -13px;
	right: 15px;
	left: 15px;
	height: 25px;
	line-height: 25px;
	text-align: center;
}

/* Brown category badge (cards + single post). */
.lvt-post-cat {
	display: inline-block;
	height: 25px;
	padding: 0 10px;
	overflow: hidden;
	background: var(--lvt-c-primary);
	color: #FFFFFF;
	line-height: 25px;
	vertical-align: top;
}

.lvt-post-cat a {
	display: inline-block;
	color: #FFFFFF;
	font-family: var(--lvt-font-accent);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	vertical-align: top;
	transition: color .25s ease;
}

.lvt-post-cat a:hover {
	color: rgba(255, 255, 255, .8);
}

.lvt-post-card__title {
	/* 10px + the (invisible) share-icon line of live */
	margin: 0 0 calc(10px + var(--lvt-lh-body));
	color: var(--lvt-c-link);
	font-family: var(--lvt-font-heading);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.01px;
	text-align: center;
	overflow-wrap: break-word;
}

.lvt-post-card__title a {
	color: inherit;
	transition: color .25s ease;
}

.lvt-post-card__title a:hover {
	color: rgba(51, 51, 51, .65);
}

.lvt-post-card__excerpt {
	margin: 0;
	overflow-wrap: break-word;
}

.lvt-post-card__more {
	margin: 20px 0 0;
	line-height: 1;
}

/* Search results: 20-word text with the live 20px paragraph margin, no "Continue reading";
   live search cards put the text right under the photo and the date 10px from its corner. */
.lvt-post-card--search .lvt-post-card__excerpt {
	margin-bottom: 20px;
}

.lvt-post-card--search .lvt-post-card__thumb {
	position: relative;
	margin-bottom: 0;
}

/* Live search cards (Woodmart "blog-loop-base-old"): the photo is drawn 2px larger on every side
   than its frame (the frame is 4px lower than the photo; this also hides the white rounded corners
   baked into the live photos). On desktop the card hover zooms it to 103% under a 50% dark layer
   with three white dots sliding in (the dark layer and dots are left out at 1024px and below). */
.lvt-post-card--search .lvt-post-card__img {
	width: calc(100% + 4px);
	max-width: none;
	margin: -2px;
	transform: scale(1);
	transition: transform .7s ease;
	backface-visibility: hidden;
}

.lvt-post-card--search .lvt-post-card__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, .5);
	opacity: 0;
	pointer-events: none;
	transition: opacity .7s ease;
}

.lvt-post-card--search:hover .lvt-post-card__img {
	transform: scale(1.03);
}

.lvt-post-card--search:hover .lvt-post-card__thumb::after {
	opacity: 1;
}

.lvt-post-card__mask {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -5px 0 0 -22px;
	font-size: 0;
	line-height: 24px;
	pointer-events: none;
}

.lvt-post-card__mask::before,
.lvt-post-card__mask::after {
	content: "";
}

.lvt-post-card__mask::before,
.lvt-post-card__mask::after,
.lvt-post-card__mask > span {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 7px;
	border-radius: 50%;
	background-color: #FFFFFF;
	vertical-align: middle;
	opacity: 0;
	transition: opacity .2s ease;
	animation: lvt-dot-out .3s ease;
}

.lvt-post-card__mask::after {
	margin-right: 0;
}

.lvt-post-card__mask > span {
	transition-delay: .1s;
	animation-delay: .1s;
}

.lvt-post-card__mask::before {
	transition-delay: .15s;
	animation-delay: .15s;
}

.lvt-post-card--search:hover .lvt-post-card__mask::before,
.lvt-post-card--search:hover .lvt-post-card__mask::after,
.lvt-post-card--search:hover .lvt-post-card__mask > span {
	opacity: 1;
	animation: lvt-dot-in .3s ease;
}

.lvt-post-card--search:hover .lvt-post-card__mask > span {
	transition-delay: .1s;
	animation-delay: .1s;
}

.lvt-post-card--search:hover .lvt-post-card__mask::before {
	transition-delay: .2s;
	animation-delay: .2s;
}

@keyframes lvt-dot-in {
	from { transform: translate3d(-50px, 0, 0); }
	to { transform: none; }
}

@keyframes lvt-dot-out {
	from { transform: none; }
	to { transform: translate3d(50px, 0, 0); }
}

.lvt-post-card--search .lvt-date-badge {
	top: 10px;
	left: 10px;
}

/* Category archives: live leaves 40px of page background above the title band (the blog listing does not). */
.lvt-site-main.category .lvt-page-title {
	margin-top: 0;
}

.lvt-post-card__more-link {
	position: relative;
	display: inline-block;
	color: var(--lvt-c-primary);
	font-family: var(--lvt-font-accent);
	font-size: 13px;
	font-weight: 800;
	line-height: 13px;
	text-transform: uppercase;
}

.lvt-post-card__more-link:hover {
	color: var(--lvt-c-primary);
}

/* Three dots after "Continue reading" on hover (live: glyph F109). */
.lvt-post-card__dots {
	position: absolute;
	bottom: 1px;
	left: 100%;
	width: 14px;
	height: 2.6px;
	margin-left: 5px;
	opacity: 0;
	transition: opacity .35s ease;
}

.lvt-post-card__more-link:hover .lvt-post-card__dots,
.lvt-post-card__more-link:focus-visible .lvt-post-card__dots {
	opacity: 1;
	animation: lvt-shake-next 1s infinite;
}

/* Date badge (only posts with a photo, as live). */
.lvt-date-badge {
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 2;
	display: inline-block;
	min-width: 53px;
	background: var(--lvt-c-white);
	box-shadow: 0 0 9px rgba(0, 0, 0, .1);
	color: var(--lvt-c-link);
	font-family: var(--lvt-font-accent);
	line-height: 1;
	text-align: center;
}

.lvt-date-badge__day {
	display: block;
	padding: 6px 0 4px;
	font-size: 24px;
	line-height: 24px;
}

.lvt-date-badge__month {
	display: block;
	padding: 2px 0 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: 12px;
	text-transform: uppercase;
}

/* Pagination (3.8, errata #2) ---------------------------------------------- */

.lvt-pagination {
	margin-top: 35px;
	font-size: 0;
	text-align: center;
}

.lvt-pagination__list {
	display: inline-block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lvt-pagination__item {
	display: inline-block;
	margin: 0 2px 0 0;
	vertical-align: top;
}

/* Live: the gap sits between the squares only, so the centred row is not pushed 1px left. */
.lvt-pagination__item:last-child {
	margin-right: 0;
}

.lvt-pagination .page-numbers {
	display: inline-block;
	min-width: 34px;
	height: 34px;
	padding: 0 5px;
	color: var(--lvt-c-dark);
	font-family: var(--lvt-font-accent);
	font-size: 14px;
	font-weight: 600;
	line-height: 34px;
	text-align: center;
	transition: all .2s ease;
}

.lvt-pagination a.page-numbers:hover {
	background: var(--lvt-c-bg-hover);
	color: var(--lvt-c-dark);
}

.lvt-pagination .page-numbers.current {
	background: var(--lvt-c-primary);
	color: #FFFFFF;
}

/* Search without results (live Woodmart "Nothing Found" block) ------------- */

.lvt-search-empty {
	text-align: center;
}

/* Magnifier glyph 100px (#814D3B), 10px above the heading. */
.lvt-search-empty__icon {
	display: block;
	width: 100px;
	height: 100px;
	margin: 0 auto 10px;
	color: var(--lvt-c-primary);
}

/* Same size at every width as live (h2 here, the band holds the page h1). */
.lvt-search-empty__title {
	margin: 0 0 15px;
	color: var(--lvt-c-heading);
	font-family: var(--lvt-font-heading);
	font-size: 48px;
	font-weight: 900;
	line-height: 58px;
	text-align: center;
}

/* 16px text at every width; the line height follows the body (24px, 20px on phones). */
.lvt-search-empty__text {
	margin: 0 0 30px;
	font-size: 16px;
	line-height: var(--lvt-lh-body);
	text-align: center;
}

/* One centred 350x46 field with the magnifier button inside on the right. */
.lvt-search-empty__form {
	position: relative;
	max-width: 350px;
	margin: 0 auto 30px;
}

.lvt-search-empty__form .lvt-search-empty__input {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 105px 0 15px;
	font-size: 15px;
}

.lvt-search-empty__input::-webkit-search-cancel-button,
.lvt-search-empty__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.lvt-search-empty__submit {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: var(--lvt-radius);
	background: transparent;
	color: var(--lvt-c-secondary);
	cursor: pointer;
}

.lvt-search-empty__submit-icon {
	display: block;
	width: 20px;
	height: 20px;
	transition: opacity .2s ease;
}

/* Live dims the glyph to 70% on hover (its dark hover fill that hid the glyph is left out). */
.lvt-search-empty__submit:hover .lvt-search-empty__submit-icon {
	opacity: .7;
}

/* Single post ---------------------------------------------------------------- */

.lvt-post {
	text-align: center;
}

.lvt-post__cat {
	/* inline-block on the text baseline (live): the line box adds the strut below it */
	margin-bottom: 15px;
	vertical-align: baseline;
}

.lvt-post__title {
	margin: 0 0 10px;
	color: var(--lvt-c-link);
	font-family: var(--lvt-font-heading);
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01px;
	text-align: center;
	overflow-wrap: break-word;
}

.lvt-post__media {
	position: relative;
	margin: 0 0 30px;
	text-align: center;
}

.lvt-post__thumb {
	margin: 0;
}

.lvt-post__thumb img {
	vertical-align: middle;
}

.lvt-post__content.lvt-prose {
	margin-bottom: 60px;
	font-size: 17.6px;
	line-height: 24px;
	text-align: left;
}

/* Block content of the imported posts (core block styles live uses). */
.lvt-post__content > [class*="wp-block"] {
	margin-bottom: 20px;
}

.lvt-post__content > :last-child {
	margin-bottom: 0;
}

.lvt-post__content .wp-block-image img {
	box-sizing: border-box;
	height: auto;
	max-width: 100%;
	vertical-align: bottom;
}

.lvt-post__content .wp-block-image figure {
	margin: 0;
}

.lvt-post__content .wp-block-image.aligncenter {
	text-align: center;
}

.lvt-post__content .wp-block-image .aligncenter,
.lvt-post__content .wp-block-image.aligncenter {
	display: table;
}

.lvt-post__content .wp-block-image .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

.lvt-post__content .aligncenter {
	display: block;
	clear: both;
	margin: 0 auto 20px;
}

.lvt-post__content .is-layout-flex {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5em;
}

.lvt-post__content .is-layout-flex > * {
	margin: 0;
}

.lvt-post__content .is-nowrap {
	flex-wrap: nowrap;
}

.lvt-post__content .wp-block-gallery.has-nested-images {
	--lvt-gallery-gap: .5em;
	align-items: normal;
	gap: var(--lvt-gallery-gap);
}

.lvt-post__content .wp-block-gallery.has-nested-images figure.wp-block-image {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: center;
	box-sizing: border-box;
	width: calc(33.33% - var(--lvt-gallery-gap) * .66667);
	max-width: 100%;
	margin: 0;
}

.lvt-post__content .wp-block-gallery.has-nested-images figure.wp-block-image:first-child:nth-last-child(2),
.lvt-post__content .wp-block-gallery.has-nested-images figure.wp-block-image:first-child:nth-last-child(2) ~ figure.wp-block-image {
	width: calc(50% - var(--lvt-gallery-gap) * .5);
}

.lvt-post__content .wp-block-gallery.has-nested-images figure.wp-block-image:first-child:last-child {
	width: 100%;
}

.lvt-post__content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
}

.lvt-post__content .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img {
	flex: 1 0 0%;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Newer | Back to list | Older ------------------------------------------------ */

.lvt-post-nav {
	display: flex;
	align-items: center;
	margin-bottom: 60px;
	padding: 25px 0;
	border-bottom: 2px solid var(--lvt-c-line-soft);
}

.lvt-post-nav__btn {
	flex: 0 1 50%;
	max-width: 50%;
}

.lvt-post-nav__btn a {
	position: relative;
	display: block;
	color: var(--lvt-c-link);
}

.lvt-post-nav__btn--prev a {
	padding-right: 20px;
	padding-left: 50px;
}

.lvt-post-nav__btn--next {
	text-align: right;
}

.lvt-post-nav__btn--next a {
	padding-right: 50px;
	padding-left: 20px;
}

.lvt-post-nav__label {
	display: block;
	margin-bottom: 5px;
	color: var(--lvt-c-grey-ui);
	font-size: 90%;
	font-weight: 600;
	text-transform: uppercase;
}

.lvt-post-nav__title {
	display: block;
	color: var(--lvt-c-link);
	font-family: var(--lvt-font-nav);
	font-size: 90%;
	font-weight: 400;
	line-height: 1.4;
	overflow-wrap: break-word;
}

.lvt-post-nav__icon {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	color: var(--lvt-c-link);
	transition: color .25s ease;
}

.lvt-post-nav__btn--prev .lvt-post-nav__icon {
	left: 0;
}

.lvt-post-nav__btn--next .lvt-post-nav__icon {
	right: 0;
}

.lvt-post-nav__icon .lvt-blog-icon {
	width: 34px;
	height: 34px;
}

.lvt-post-nav__btn a:hover .lvt-post-nav__icon {
	color: var(--lvt-c-primary);
}

.lvt-post-nav__btn--prev a:hover .lvt-post-nav__icon {
	animation: lvt-shake-prev 1s infinite;
}

.lvt-post-nav__btn--next a:hover .lvt-post-nav__icon {
	animation: lvt-shake-next 1s infinite;
}

.lvt-post-nav__back {
	position: relative;
	flex: none;
	display: block;
	width: 30px;
	height: 30px;
	color: var(--lvt-c-grey-ui);
	line-height: 30px;
	text-align: center;
}

.lvt-post-nav__back:hover {
	color: var(--lvt-c-dark);
}

.lvt-post-nav__back .lvt-blog-icon {
	width: 24px;
	height: 24px;
	vertical-align: middle;
}

/* "Back to list" tooltip (desktop only, as live: black 12px box, 7px 15px padding,
   touching the icon's top edge, no arrow). The link itself carries the name (aria-label). */
.lvt-post-nav__tip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	z-index: 5;
	margin-bottom: 1px;
	padding: 7px 15px;
	background: #000000;
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 400;
	line-height: 24px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity .3s ease, visibility .3s ease;
}

.lvt-post-nav__back:hover .lvt-post-nav__tip,
.lvt-post-nav__back:focus-visible .lvt-post-nav__tip {
	opacity: 1;
	visibility: visible;
}

@keyframes lvt-shake-prev {
	25% { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(3px, 0, 0); }
	75% { transform: translate3d(-3px, 0, 0); }
}

@keyframes lvt-shake-next {
	25% { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(-3px, 0, 0); }
	75% { transform: translate3d(3px, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.lvt-post-card__more-link:hover .lvt-post-card__dots,
	.lvt-post-nav__btn a:hover .lvt-post-nav__icon,
	.lvt-post-card__mask::before,
	.lvt-post-card__mask::after,
	.lvt-post-card__mask > span,
	.lvt-post-card--search:hover .lvt-post-card__mask::before,
	.lvt-post-card--search:hover .lvt-post-card__mask::after,
	.lvt-post-card--search:hover .lvt-post-card__mask > span {
		animation: none;
	}

	.lvt-post-card--search:hover .lvt-post-card__img {
		transform: none;
	}
}

/* Tablet ------------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.lvt-post-card__title {
		font-size: 20px;
	}

	.lvt-post__title {
		font-size: 28px;
	}

	.lvt-post__content.lvt-prose {
		margin-bottom: 40px;
		font-size: var(--lvt-fs-body);
		line-height: var(--lvt-lh-body);
	}

	.lvt-post-nav__tip {
		display: none;
	}

	/* Search cards: no zoom, dark layer or dots on tablets and phones (live). */
	.lvt-post-card--search:hover .lvt-post-card__img {
		transform: none;
	}

	.lvt-post-card--search .lvt-post-card__thumb::after,
	.lvt-post-card__mask {
		display: none;
	}
}

@media (max-width: 768.98px) {
	.lvt-blog-grid {
		margin: 0 -5px -10px;
	}

	.lvt-post-card {
		flex-basis: 50%;
		width: 50%;
		max-width: 50%;
		margin-bottom: 10px;
		padding: 0 5px;
	}

	.lvt-post__title {
		font-size: 24px;
		line-height: 1.4;
	}

	.lvt-post-nav {
		margin-bottom: 40px;
		padding: 15px 0;
	}

	.lvt-post-nav__label {
		margin-bottom: 0;
		color: var(--lvt-c-dark);
	}

	.lvt-post-nav__title {
		display: none;
	}
}

/* Mobile --------------------------------------------------------------------------- */

@media (max-width: 576px) {
	.lvt-post-card__body {
		padding-right: 15px;
		padding-left: 15px;
	}

	.lvt-post-card__title {
		margin-bottom: 10px;
	}

	.lvt-post__title {
		font-size: 20px;
	}
}

@media (max-width: 575px) {
	.lvt-post-card {
		flex-basis: 100%;
		width: 100%;
		max-width: 100%;
	}
}
