/*
 * Company site home page (templates/home-main.php), design-main T1.
 * Sizes measured on live at 1440 / 1200 / 1024 / 768 / 390.
 */

.lvt-home-hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 580px;
	padding: 0 10px;
	background-color: #C7A686;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.lvt-home-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 0;
}

.lvt-home-hero__title {
	margin: 0;
	color: #FFFFFF;
	font-size: 54px;
	line-height: 58px;
	text-align: center;
	text-transform: uppercase;
}

.lvt-home-hero__text {
	width: 33%;
	margin: 0;
	color: #FFFFFF;
	font-size: 20px;
	line-height: 26px;
	text-align: center;
}

.lvt-home-hero__btn {
	margin-top: 40px;
}

/* Three features under the photo ------------------------------------------ */

.lvt-home-features {
	display: flex;
	margin-top: 46px;
}

.lvt-home-feature {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.lvt-home-feature:nth-child(3n+1) {
	flex: 0 1 50%;
	border-right: 1px solid #DEDEDE;
}

.lvt-home-feature:nth-child(3n+2) {
	flex: 0 0 40%;
	align-items: center;
}

.lvt-home-feature:nth-child(3n) {
	flex: 0 1 57%;
	align-items: flex-end;
	border-left: 1px solid #DEDEDE;
}

.lvt-home-feature__box {
	display: flex;
	align-items: center;
}

.lvt-home-feature__icon {
	display: flex;
	flex: none;
	width: 50px;
	height: 50px;
	margin-right: 16px;
}

.lvt-home-feature__icon .lvt-icon {
	width: 50px;
	height: 50px;
}

.lvt-home-feature__title {
	margin: 0 0 8px;
	color: var(--lvt-c-secondary);
	font-size: 16px;
	line-height: 16px;
	text-transform: uppercase;
}

.lvt-home-feature__text {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

/* Our products: 4 photo tiles --------------------------------------------- */

.lvt-home-products {
	margin-top: var(--lvt-section-gap);
}

.lvt-home-products__title {
	margin: 0 0 20px;
}

.lvt-home-tiles {
	display: flex;
	gap: 20px;
}

.lvt-home-tile {
	position: relative;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 0;
	min-height: 300px;
	background-color: #E9E4E0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	color: var(--lvt-c-heading);
	transition: transform .4s ease;
}

.lvt-home-tile:hover,
.lvt-home-tile:focus-visible {
	color: var(--lvt-c-heading);
	transform: scale(1.05);
}

.lvt-home-tile__label {
	margin: 0;
	padding: 16px;
	border-radius: 0 0 5px 0;
	background: rgba(239, 239, 239, .75);
	color: var(--lvt-c-heading);
	font-size: 22px;
	line-height: 28px;
}

.lvt-home-tile__bar {
	margin-right: 12px;
	color: var(--lvt-c-primary);
}

/* "We buy saw logs" banner -------------------------------------------------- */

.lvt-home-banner {
	display: flex;
	min-height: 283px;
	margin-top: var(--lvt-section-gap);
	border-radius: 5px;
	background-color: #844F3E;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.lvt-home-banner__col {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	min-width: 0;
	padding-left: 40px;
}

.lvt-home-banner__title {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	color: #FFFFFF;
}

.lvt-home-banner__big {
	font-size: 70px;
	line-height: 70px;
}

.lvt-home-banner__small {
	margin-top: -10px;
	font-size: 50px;
	line-height: 40px;
	text-transform: uppercase;
}

/* Live button wrapper: one text line (24px, 20px on phones) with the 22px link
   centred on it (inline-flex, vertical-align middle): 24px row on desktop, 22px on phones. */
.lvt-home-banner__more .lvt-link-line {
	display: inline-flex;
	vertical-align: middle;
}

/* Latest posts ------------------------------------------------------------- */

.lvt-home-posts {
	margin-top: var(--lvt-section-gap);
}

.lvt-home-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.lvt-home-post {
	position: relative;
	padding-top: 15px;
}

.lvt-home-post__date {
	margin-bottom: 10px;
	color: #A5A5A5;
	font-size: 13px;
	line-height: 24px;
	text-transform: uppercase;
}

.lvt-home-post__title {
	margin: 0 0 10px;
	font-size: 26px;
	line-height: 32px;
}

.lvt-home-post__title a {
	color: var(--lvt-c-link);
}

/* The whole card opens the post (live: invisible full-cover link). */
.lvt-home-post__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

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

.lvt-home-post__more {
	position: relative;
	z-index: 1;
	margin: 15px 0 0;
	line-height: 24px;
}

.lvt-home-posts__all {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	min-height: 24px;
	margin-bottom: 20px;
}

.lvt-home-viewall,
.lvt-home-viewall:hover {
	display: inline-flex;
	align-items: center;
	color: #3E3E3E;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-transform: uppercase;
}

.lvt-home-viewall .lvt-icon {
	width: 5px;
	height: 9px;
	margin-left: 5px;
}

/* About band with the statistic boxes (touches the footer) ----------------- */

.lvt-home-about {
	margin-top: var(--lvt-section-gap);
	background-color: #F4EFEC;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.lvt-home-about__inner {
	display: flex;
	flex-wrap: wrap;
	max-width: 1200px;
	margin: 0 auto;
	padding-top: 96px;
}

.lvt-home-about__media {
	flex: 0 0 50%;
	min-width: 0;
	padding-right: 44px;
}

.lvt-home-about__media img {
	display: block;
	width: 100%;
	height: auto;
}

.lvt-home-about__body {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	min-width: 0;
	padding: 0 5% 5%;
}

.lvt-home-about__title {
	margin: 0;
}

.lvt-home-about__text p {
	margin: 0;
}

/* Live button wrapper: one text line (24px, 20px on phones) holding the 18px link
   (2px transparent underline) centred on it: the link sits 4px down on desktop,
   1.5px on phones. The chevron stands on the text baseline, 1px below the link top. */
.lvt-home-about__more {
	align-items: baseline;
	border-bottom: 2px solid transparent;
	vertical-align: middle;
}

/* Statistic boxes (shared markup: templates/parts/main-stats.php). */
.lvt-stats {
	display: flex;
}

.lvt-stat {
	flex: 1 1 0;
	min-width: 0;
	border-right: 1px solid #E5CFC7;
	text-align: center;
}

.lvt-stat:last-child {
	border-right: 0;
}

.lvt-stat__value {
	margin: 0;
	color: var(--lvt-c-primary);
	font-family: var(--lvt-font-heading);
	font-size: 40px;
	font-weight: 700;
	line-height: 40px;
	letter-spacing: -0.01px;
}

.lvt-stat__value sup {
	font-size: 20px;
	line-height: 20px;
	vertical-align: super;
}

.lvt-stat__label {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 24px;
}

.lvt-stats--home {
	flex: 0 0 100%;
	margin: 50px 0 99px;
}

/* Tablet (768-1024) --------------------------------------------------------- */

@media (max-width: 1024px) {
	.lvt-home-feature:nth-child(3n+1),
	.lvt-home-feature:nth-child(3n) {
		border-width: 0;
	}

	.lvt-home-tiles {
		flex-wrap: wrap;
	}

	.lvt-home-tile {
		flex: 0 0 48%;
	}

	/* Live LV home: the two tile columns sit at both edges (EN keeps the 20px gap and ends short). */
	.lvt-lang-lv .lvt-home-tiles {
		justify-content: space-between;
	}

	.lvt-home-about {
		background-position: bottom right;
	}

	.lvt-home-about__media {
		padding: 0 0 0 32px;
	}

	.lvt-stats--home {
		flex-wrap: wrap;
	}

	.lvt-stats--home .lvt-stat {
		flex: 0 0 49%;
	}

	.lvt-stats--home .lvt-stat:nth-child(2n) {
		border-right: 0;
	}

	.lvt-stats--home .lvt-stat:nth-child(n+3) {
		margin-top: 20px;
	}
}

@media (max-width: 768px) {
	.lvt-home-posts__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
}

/* Phone (<= 767) ------------------------------------------------------------- */

@media (max-width: 767px) {
	.lvt-home-hero__title {
		font-size: 36px;
		line-height: 42px;
		letter-spacing: 0;
	}

	.lvt-home-hero__text {
		width: 80%;
	}

	.lvt-home-features {
		flex-direction: column;
	}

	.lvt-home-feature:nth-child(n) {
		flex: 0 0 auto;
		align-items: center;
		border-width: 0;
	}

	.lvt-home-feature + .lvt-home-feature {
		margin-top: 20px;
	}

	.lvt-home-feature__box {
		flex-direction: column;
		text-align: center;
	}

	.lvt-home-feature__icon {
		height: 56px;
		margin: 0 0 16px;
	}

	.lvt-home-tile {
		flex: 0 0 100%;
	}

	.lvt-home-tile__label {
		font-size: 18px;
		line-height: 24px;
	}

	/* Live: the empty right half wraps under the text, so the text sits in the upper part. */
	.lvt-home-banner {
		flex-wrap: wrap;
		background-position: -372px 0;
	}

	.lvt-home-banner::after {
		content: "";
		flex: 0 0 100%;
		padding: 10px;
	}

	.lvt-home-banner__col {
		flex: 0 0 100%;
		padding-left: 20px;
	}

	.lvt-home-banner__big {
		font-size: 40px;
		line-height: 40px;
	}

	.lvt-home-banner__small {
		font-size: 32px;
		line-height: 40px;
	}

	.lvt-home-post__date {
		line-height: 20px;
	}

	.lvt-home-post__title {
		font-size: 22px;
		line-height: 32px;
	}

	.lvt-home-post__more {
		line-height: 20px;
	}

	/* Live phone layout keeps a 20px empty row under "View all". */
	.lvt-home-posts__all {
		min-height: 21px;
		padding-bottom: 20px;
	}

	.lvt-home-about__media {
		flex: 0 0 100%;
		padding: 0 16px;
	}

	.lvt-home-about__body {
		flex: 0 0 100%;
		margin-top: 20px;
	}

	.lvt-stats--home .lvt-stat {
		flex: 0 0 100%;
	}

	.lvt-stats--home .lvt-stat:nth-child(2n) {
		border-right: 0;
	}

	.lvt-stats--home .lvt-stat:nth-child(n+2) {
		margin-top: 20px;
	}
}

@media (max-width: 575px) {
	.lvt-home-posts__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
