/*
Theme Name: Impreza Child
Template: Impreza
Version: 1.0
Author:	UpSolution
Theme URI: http://impreza.us-themes.com/
Author URI: http://us-themes.com/
*/

/*Add your own styles here:*/

/* Center rating cards when 3 testimonials remain in a 4-column grid */
.w-grid.type_grid.cols_4:has(article.type-us_testimonial):has(.w-grid-item:nth-child(3):last-child) {
	--columns: 3 !important;
}

/* Equal-size rating cards (Avito logo has a different aspect ratio) */
.w-grid-item.type-us_testimonial .w-grid-item-h,
.w-grid-item.type-us_testimonial .w-vwrapper {
	height: 100%;
}
.w-grid-item.type-us_testimonial .post_image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 54px;
	max-width: 130px;
	margin-inline: auto;
}
.w-grid-item.type-us_testimonial .post_image img {
	width: auto !important;
	height: auto !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Rating cards are fully clickable */
.w-grid-item.type-us_testimonial {
	cursor: pointer;
}
.w-grid-item.type-us_testimonial .w-grid-item-anchor {
	position: absolute;
	z-index: 10;
	inset: 0;
}

/* Header: Max + VK — branded app icons */
.l-header .w-socials {
	display: inline-flex !important;
	align-items: center;
	align-self: center;
	vertical-align: middle;
	line-height: 1;
}
.l-header .w-socials-list {
	display: inline-flex !important;
	align-items: center;
	margin: 0 !important;
	gap: 0.5em;
}
.l-header .w-socials-item {
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	vertical-align: middle;
	line-height: 1;
}
.l-header .w-socials-item-link {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 1.55em !important;
	height: 1.55em !important;
	line-height: 1 !important;
	padding: 0 !important;
	color: inherit;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.l-header .w-socials-item-link:hover {
	opacity: 0.85;
	transform: scale(1.06);
}
/* Hide font icons — show image badges instead */
.l-header .w-socials-item.custom a[aria-label="Max"] i,
.l-header .w-socials-item.custom a[aria-label="Max"] .w-icon-link,
.l-header .w-socials-item.vk .w-socials-item-link i {
	display: none !important;
}
.l-header .w-socials-item.custom a[aria-label="Max"]::before,
.l-header .w-socials-item.vk .w-socials-item-link::before {
	content: "";
	display: block;
	width: 1.55em;
	height: 1.55em;
	flex-shrink: 0;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}
.l-header .w-socials-item.custom a[aria-label="Max"]::before {
	background-image: url("img/icon-max.png");
}
.l-header .w-socials-item.vk .w-socials-item-link::before {
	background-image: url("img/icon-vk.png");
}
/* Keep socials and phone block on one vertical center */
.l-header .l-subheader-cell.at_right {
	align-items: center;
}

/* Narrow phones: hide Max + VK, keep phone */
@media (max-width: 459px) {
	.l-header .w-socials {
		display: none !important;
	}
}

/* Very narrow: hide logo too (burger + phone remain) */
@media (max-width: 340px) {
	.l-header .w-image {
		display: none !important;
	}
}

/* -------------------------------------------------------------------------
   Hero (home): left-aligned content, full usable width on tablets
   ------------------------------------------------------------------------- */

.home .l-section.full_height.with_img {
	overflow-x: clip;
}

.home .l-section.full_height.with_img .us_custom_7bfe781c {
	margin-left: 0 !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

.home .l-section.full_height.with_img .l-section.width_full > .l-section-h {
	margin-left: 0 !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/*
 * Tablets / iPad (portrait especially):
 * — do not shrink the text column (that made a skinny left strip)
 * — drop forced full viewport height (empty blue under a tall screen)
 * — keep text + form left-aligned with normal padding
 */
@media (min-width: 601px) and (max-width: 1024px) {
	.home .l-section.full_height.with_img {
		--padding-inline: 2rem;
		min-height: 0 !important;
		height: auto !important;
		padding-top: 2.5rem !important;
		padding-bottom: 2.5rem !important;
	}

	.home .l-section.full_height.with_img > .l-section-h {
		max-width: none;
		width: 100%;
		margin: 0;
		padding-left: 2rem;
		padding-right: 2rem;
		box-sizing: border-box;
	}

	.home .l-section.full_height.with_img .us_custom_d5d51ac3,
	.home .l-section.full_height.with_img .us_custom_d5d51ac3 > .vc_column-inner {
		max-width: 100% !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		text-align: left;
	}

	.home .l-section.full_height.with_img .us_custom_5470c1e9,
	.home .l-section.full_height.with_img .us_custom_c8fc5e16,
	.home .l-section.full_height.with_img .us_custom_af99d3c9,
	.home .l-section.full_height.with_img .us_custom_af99d3c9 .w-text {
		text-align: left !important;
	}

	.home .l-section.full_height.with_img .us_custom_af99d3c9 {
		width: 100%;
		max-width: 36rem; /* readable line length, not a tiny strip */
	}

	.home .l-section.full_height.with_img .us_custom_7bfe781c {
		width: 100%;
		max-width: 26rem !important;
	}

	/* Show more of the sofa on portrait tablets */
	.home .l-section.full_height.with_img > .l-section-img {
		background-position: 70% center !important;
	}
}

/*
 * ~1025–1280: keep the same balance as 1024 —
 * centered page shell, text left inside it (not stuck to viewport edges).
 */
@media (min-width: 1025px) and (max-width: 1280px) {
	.home .l-section.full_height.with_img {
		--padding-inline: 2rem;
	}

	.home .l-section.full_height.with_img > .l-section-h {
		max-width: var(--site-content-width, 1200px);
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		padding-left: 2rem;
		padding-right: 2rem;
		box-sizing: border-box;
	}

	.home .l-section.full_height.with_img .us_custom_d5d51ac3,
	.home .l-section.full_height.with_img .us_custom_d5d51ac3 > .vc_column-inner {
		max-width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
		text-align: left;
	}

	.home .l-section.full_height.with_img .us_custom_5470c1e9,
	.home .l-section.full_height.with_img .us_custom_c8fc5e16,
	.home .l-section.full_height.with_img .us_custom_af99d3c9,
	.home .l-section.full_height.with_img .us_custom_af99d3c9 .w-text {
		text-align: left !important;
	}

	.home .l-section.full_height.with_img .us_custom_af99d3c9 {
		width: 100%;
		max-width: 36rem;
	}

	.home .l-section.full_height.with_img .us_custom_7bfe781c {
		width: 100%;
		max-width: 26rem !important;
	}
}

/* Header safety below desktop: burger layout, no squeezed/overlapping bar */
@media (max-width: 1279px) {
	.l-header .l-subheader-h {
		max-width: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		padding-left: 1.25rem;
		padding-right: 1.25rem;
		box-sizing: border-box;
	}

	.l-header .l-subheader-cell.at_left {
		display: flex !important;
		align-items: center;
		gap: 0.75rem;
		flex: 0 1 auto;
		min-width: 0;
	}

	.l-header .l-subheader-cell.at_right {
		display: flex !important;
		align-items: center;
		gap: 0.75rem;
		flex: 0 0 auto;
		margin-left: auto;
	}

	.l-header .w-image {
		position: relative;
		z-index: 2;
		flex-shrink: 0;
	}

	.l-header .w-nav-control {
		flex-shrink: 0;
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
	}

	/* Hide horizontal desktop links until JS flips type — prevents overlap flash */
	.l-header .w-nav.type_desktop > .w-nav-list.level_1 {
		position: absolute !important;
		left: -9999px !important;
		width: 1px !important;
		height: 1px !important;
		overflow: hidden !important;
	}
}

@media (max-width: 600px) {
	.home .l-section.full_height.with_img {
		min-height: 0 !important;
		height: auto !important;
		padding-top: 1.5rem !important;
		padding-bottom: 1.5rem !important;
	}

	.home .l-section.full_height.with_img > .l-section-h {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.home .l-section.full_height.with_img .us_custom_d5d51ac3,
	.home .l-section.full_height.with_img .us_custom_d5d51ac3 > .vc_column-inner {
		max-width: 100%;
	}

	.home .l-section.full_height.with_img .us_custom_7bfe781c {
		max-width: 100% !important;
	}
}
