/**
 * Performance helpers — keep design intact; fix image aspect regressions only.
 */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.wow {
		visibility: visible !important;
		animation: none !important;
	}
}

/* Preserve intrinsic ratio while CSS controls display size. */
a.d-block.chy-logo img,
.chy-trusted-2-slider-item .icon img,
.chy-services-1-item .icon img,
.chy-services-2-item .icon img,
.chy-about-2-brand li img,
.chy-about-2-feature li img,
.solutions-2-area .hand-img,
.solutions-2-area .all-icon,
.solutions-2-area .certi-img,
.chy-price-1-animation-line img {
	height: auto;
	object-fit: contain;
}

/* Hero: person above frame */
.chy-hero-2-item-img .main-img .il-frame {
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.chy-hero-2-item-img .main-img .person-img {
	z-index: 2;
	height: auto;
	object-fit: contain;
}

/* First slide before Swiper: show person fully (no hide clip-path) */
.chy_hero_2_active:not(.swiper-initialized) .swiper-slide:first-child .main-img .person-img {
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
	transition-delay: 0s;
}

/* Remaining stretched icons — fixed display box + contain */
.chy-services-2-item-wrap > img.icon,
.chy-services-2-item-wrap > .icon.chyroted {
	width: 64px;
	max-width: 64px;
	height: auto;
	object-fit: contain;
}

.chy-footer-2-content img.chyroted {
	width: 40px;
	max-width: 40px;
	height: auto;
	object-fit: contain;
}

/* Card / cover photos: cover (never fill). */
.img-cover img,
.chy-portfolio-2-item .main-img img,
.chy-blog-2-item .main-img img,
.chy-about-2-img .main-img img,
.chy-price-2-item .img-item img,
.chy-price-2-item .img-item-big img {
	object-fit: cover;
}

/* Client logos: fixed box + real HTML attrs + contain */
.chy-testimonial-2-logo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.chy-testimonial-2-logo img {
	width: 130px;
	height: 130px;
	object-fit: contain;
	opacity: 0.5;
	filter: brightness(0) invert(1);
}

.client-block {
	width: 130px;
	height: 130px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.client-block img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.single-f-num img {
	object-fit: contain;
}

/* First hero visible as plain HTML/CSS before Swiper initializes */
.chy_hero_2_active:not(.swiper-initialized) .swiper-wrapper {
	display: block;
}

.chy_hero_2_active:not(.swiper-initialized) .swiper-slide {
	display: none !important;
}

.chy_hero_2_active:not(.swiper-initialized) .swiper-slide:first-child {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Limit permanent will-change to active hero surfaces only. */
.chy-hero-2-item-img .main-img,
.swiper-slide-active .person-img,
.swiper-slide-active .il-frame {
	will-change: transform, opacity;
}

.chy-hero-2-area .swiper-slide:not(.swiper-slide-active) .person-img,
.chy-hero-2-area .swiper-slide:not(.swiper-slide-active) .il-frame {
	will-change: auto;
}
