/**
 * Karmet Bulgaria — homepage sections.
 *
 * Layers on top of karmet.css. Loaded only on the front page.
 */

/* ========================================================================
   HERO SLIDER
   ==================================================================== */

.k-hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: var( --k-steel-900 );
}

.k-hero__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s var( --k-ease ), visibility 0.9s var( --k-ease );
}

.k-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.k-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale( 1.06 );
	transition: transform 7s linear;
}

.k-hero__slide.is-active .k-hero__bg {
	transform: scale( 1 );
}

.k-hero__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	/* Light scrim only — the source keeps the photography clearly visible. */
	background: linear-gradient(
		100deg,
		rgba( 18, 20, 24, 0.62 ) 0%,
		rgba( 18, 20, 24, 0.34 ) 45%,
		rgba( 18, 20, 24, 0.08 ) 100%
	);
}

.k-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	padding-top: calc( var( --k-header-h ) + var( --k-topbar-h ) );
}

.k-hero__content {
	max-width: 720px;
	color: #fff;
}

/*
 * Source hierarchy: the tagline is the big headline, and the series name sits
 * under it as a smaller orange + white line ("TORO - Хидравлични Абканти Преси").
 */
.k-hero__tag {
	display: block;
	margin: 0 0 14px;
	font-family: var( --k-f-disp );
	font-size: clamp( 30px, 3.9vw, 54px );
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: #fff;
	max-width: 16ch;
}

.k-hero__series {
	margin: 0;
}

.k-hero__title {
	display: inline;
	margin: 0;
	font-family: var( --k-f-head );
	font-size: clamp( 19px, 1.9vw, 26px );
	font-weight: 500;
	line-height: 1.35;
	color: var( --k-orange );
}

.k-hero__sub {
	display: inline;
	font-family: var( --k-f-head );
	font-size: clamp( 19px, 1.9vw, 26px );
	font-weight: 400;
	color: #fff;
}

.k-hero__text {
	max-width: 58ch;
	margin: 18px 0 32px;
	font-size: clamp( 15px, 1.15vw, 17px );
	font-weight: 300;
	line-height: 1.7;
	color: rgba( 255, 255, 255, 0.92 );
}

/* Animate slide copy in when it becomes active. */
.k-hero__slide.is-active .k-hero__tag,
.k-hero__slide.is-active .k-hero__title,
.k-hero__slide.is-active .k-hero__sub,
.k-hero__slide.is-active .k-hero__text,
.k-hero__slide.is-active .k-hero__cta {
	animation: k-hero-in 0.8s var( --k-ease ) both;
}

.k-hero__slide.is-active .k-hero__title { animation-delay: 0.08s; }
.k-hero__slide.is-active .k-hero__sub   { animation-delay: 0.16s; }
.k-hero__slide.is-active .k-hero__text  { animation-delay: 0.24s; }
.k-hero__slide.is-active .k-hero__cta   { animation-delay: 0.32s; }

@keyframes k-hero-in {
	from {
		opacity: 0;
		transform: translateY( 26px );
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* --- slider controls --- */

.k-hero__dots {
	position: absolute;
	left: 50%;
	bottom: 34px;
	z-index: 5;
	display: flex;
	gap: 10px;
	transform: translateX( -50% );
}

.k-hero__dots button {
	width: 34px;
	height: 4px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba( 255, 255, 255, 0.34 );
	cursor: pointer;
	transition: background 0.25s var( --k-ease ), width 0.25s var( --k-ease );
}

.k-hero__dots button[aria-current='true'] {
	width: 52px;
	background: var( --k-orange );
}

.k-hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	border: 1px solid rgba( 255, 255, 255, 0.28 );
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.22 );
	color: #fff;
	cursor: pointer;
	transition: background 0.22s var( --k-ease ), border-color 0.22s var( --k-ease );
}

.k-hero__arrow:hover,
.k-hero__arrow:focus-visible {
	background: var( --k-orange );
	border-color: var( --k-orange );
}

.k-hero__arrow svg {
	width: 20px;
	height: 20px;
}

.k-hero__arrow--prev { left: 24px; }
.k-hero__arrow--next { right: 24px; }

/* ========================================================================
   STATS BAR
   ==================================================================== */

.k-stats {
	background: var( --k-steel-800 );
	color: #fff;
}

.k-stats__inner {
	display: grid;
	grid-template-columns: 1.5fr repeat( 3, 1fr );
	align-items: center;
	gap: 34px;
	padding: 46px 0;
}

.k-stats__intro .k-eyebrow {
	margin-bottom: 6px;
}

.k-stats__intro h2 {
	margin: 0;
	font-family: var( --k-f-disp );
	font-size: clamp( 22px, 2.4vw, 32px );
	text-transform: uppercase;
	color: #fff;
}

.k-stat {
	text-align: center;
	border-left: 1px solid rgba( 255, 255, 255, 0.14 );
}

.k-stat__num {
	display: block;
	font-family: var( --k-f-disp );
	font-size: clamp( 38px, 4.4vw, 58px );
	font-weight: 800;
	line-height: 1;
	color: var( --k-orange );
}

.k-stat__label {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.45;
	color: var( --k-steel-300 );
}

/* ========================================================================
   PRODUCT CATEGORY GRID

   Mirrors the source site's "content under image" post grid:
   image on top (10px radius), dark text underneath on a light band. On hover
   the image zooms to 1.1, the whole card lifts 4px, a 2px underline wipes in
   left→right under the title, and an orange "View" pill follows the cursor.
   ==================================================================== */

.k-cats {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 5px;
}

.k-cat {
	position: relative;
	display: block;
	color: inherit;
}

/* Image frame — clips the zoom; the lift is applied to this wrapper. */
.k-cat__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 10px;
	aspect-ratio: 411 / 501;
	background: var( --k-steel-200 );
	transition: transform 0.45s cubic-bezier( 0.15, 0.75, 0.5, 1 ),
		box-shadow 0.45s cubic-bezier( 0.15, 0.75, 0.5, 1 );
}

.k-cat img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s cubic-bezier( 0.15, 0.75, 0.5, 1 );
}

.k-cat:hover .k-cat__media,
.k-cat:focus-visible .k-cat__media {
	transform: translateY( -4px );
	box-shadow: 0 18px 40px rgba( 28, 31, 38, 0.18 );
}

.k-cat:hover img,
.k-cat:focus-visible img {
	transform: scale( 1.1 );
}

/* Text block sits under the image, not over it. */
.k-cat__body {
	display: block;
	padding: 25px 0;
}

.k-cat__title {
	display: inline;
	margin: 0;
	font-family: var( --k-f-head );
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3em;
	color: var( --k-ink );
	/* Underline wipe: a 2px gradient grown from 0 to full width on hover. */
	background-image: linear-gradient( to right, var( --k-ink ) 0, var( --k-ink ) 100% );
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0 2px;
	transition: background-size 0.55s cubic-bezier( 0.2, 0.75, 0.5, 1 );
}

.k-cat:hover .k-cat__title,
.k-cat:focus-visible .k-cat__title {
	background-size: 100% 2px;
}

.k-cat__link {
	display: block;
	margin-top: 10px;
	font-family: var( --k-f-body );
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: var( --k-steel-600 );
	transition: color 0.45s cubic-bezier( 0.15, 0.75, 0.5, 1 );
}

/* Cursor-following "View" pill, shown only while a card is hovered. */
.k-cat__cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 74px;
	height: 74px;
	border-radius: 50%;
	background: var( --k-orange );
	color: #fff;
	font-family: var( --k-f-head );
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	pointer-events: none;
	opacity: 0;
	/* JS owns `transform` (cursor position + scale); only opacity animates here. */
	transform: translate( -50%, -50% ) scale( 0.4 );
	transition: opacity 0.3s var( --k-ease ), transform 0.3s var( --k-ease );
}

.k-cat__cursor.is-visible {
	opacity: 1;
}

@media ( hover: none ) {
	.k-cat__cursor {
		display: none;
	}
}

/* ========================================================================
   SPLIT / ABOUT
   ==================================================================== */

.k-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp( 34px, 5vw, 72px );
}

.k-split--reverse .k-split__media {
	order: 2;
}

.k-split__media {
	position: relative;
	border-radius: var( --k-radius-lg );
	overflow: hidden;
	box-shadow: var( --k-shadow-lg );
}

.k-split__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Orange accent block behind the image. */
.k-split__media::before {
	content: '';
	position: absolute;
	left: -14px;
	bottom: -14px;
	z-index: -1;
	width: 55%;
	height: 55%;
	background: var( --k-orange );
	border-radius: var( --k-radius-lg );
}

.k-split__body h2 {
	font-family: var( --k-f-disp );
	font-size: clamp( 28px, 3.4vw, 44px );
	text-transform: uppercase;
	line-height: 1.05;
}

.k-checks {
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.k-checks li {
	position: relative;
	padding-left: 34px;
	margin-bottom: 13px;
	font-size: 16px;
	font-weight: 500;
	color: var( --k-steel-700 );
}

.k-checks li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var( --k-orange ) url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E" ) center / 13px no-repeat;
}

.k-section--dark .k-checks li {
	color: var( --k-steel-200 );
}

/* ========================================================================
   SERVICE / CTA BAND
   ==================================================================== */

.k-band {
	position: relative;
	overflow: hidden;
	background: var( --k-steel-900 );
	color: #fff;
}

.k-band__bg {
	position: absolute;
	inset: 0;
	object-fit: cover;
	width: 100%;
	height: 100%;
	opacity: 0.22;
}

.k-band__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: clamp( 44px, 5vw, 72px ) 0;
}

.k-band h2 {
	margin: 0;
	font-family: var( --k-f-disp );
	font-size: clamp( 26px, 3.2vw, 40px );
	text-transform: uppercase;
	color: #fff;
}

.k-band p {
	max-width: 62ch;
	margin: 10px 0 0;
	color: var( --k-steel-300 );
}

/* ========================================================================
   FAQ ACCORDION
   ==================================================================== */

.k-faq {
	max-width: 900px;
	margin-inline: auto;
}

.k-faq__item {
	border-bottom: 1px solid var( --k-steel-200 );
}

.k-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: 100%;
	padding: 22px 0;
	border: 0;
	background: none;
	font-family: var( --k-f-head );
	font-size: clamp( 16px, 1.7vw, 19px );
	font-weight: 600;
	color: var( --k-ink );
	text-align: left;
	cursor: pointer;
	transition: color 0.2s var( --k-ease );
}

.k-faq__q:hover,
.k-faq__q[aria-expanded='true'] {
	color: var( --k-orange );
}

.k-faq__icon {
	position: relative;
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var( --k-steel-100 );
	transition: background 0.25s var( --k-ease );
}

.k-faq__q[aria-expanded='true'] .k-faq__icon {
	background: var( --k-orange );
}

.k-faq__icon::before,
.k-faq__icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 2px;
	background: var( --k-steel-700 );
	transform: translate( -50%, -50% );
	transition: transform 0.28s var( --k-ease ), background 0.25s var( --k-ease );
}

.k-faq__icon::after {
	transform: translate( -50%, -50% ) rotate( 90deg );
}

.k-faq__q[aria-expanded='true'] .k-faq__icon::before,
.k-faq__q[aria-expanded='true'] .k-faq__icon::after {
	background: #fff;
}

.k-faq__q[aria-expanded='true'] .k-faq__icon::after {
	transform: translate( -50%, -50% ) rotate( 0deg );
}

.k-faq__a {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.32s var( --k-ease );
}

.k-faq__a.is-open {
	grid-template-rows: 1fr;
}

.k-faq__a > div {
	overflow: hidden;
}

.k-faq__a p {
	padding-bottom: 22px;
	margin: 0;
	color: var( --k-steel-600 );
}

.k-faq__a p + p {
	padding-top: 0;
}

/* ========================================================================
   TESTIMONIALS
   ==================================================================== */

.k-quotes {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 24px;
}

.k-quote {
	display: flex;
	flex-direction: column;
	padding: 32px 28px;
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: var( --k-radius-lg );
	background: rgba( 255, 255, 255, 0.04 );
}

.k-quote__mark {
	margin-bottom: 14px;
	font-family: var( --k-f-disp );
	font-size: 52px;
	font-weight: 800;
	line-height: 0.6;
	color: var( --k-orange );
}

.k-quote__text {
	flex: 1;
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.72;
	color: var( --k-steel-200 );
}

.k-quote__by {
	font-family: var( --k-f-head );
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}

.k-quote__date {
	display: block;
	margin-top: 3px;
	font-family: var( --k-f-mono );
	font-size: 12px;
	color: var( --k-steel-400 );
}

/* ========================================================================
   PARTNER LOGO WALL
   ==================================================================== */

.k-logos {
	display: grid;
	grid-template-columns: repeat( 8, 1fr );
	align-items: center;
	gap: 22px;
}

.k-logos img {
	width: 100%;
	height: 54px;
	object-fit: contain;
	filter: grayscale( 1 );
	opacity: 0.55;
	transition: filter 0.3s var( --k-ease ), opacity 0.3s var( --k-ease );
}

.k-logos img:hover {
	filter: grayscale( 0 );
	opacity: 1;
}

/* ========================================================================
   CATALOG / MAGAZINE
   ==================================================================== */

.k-mag {
	display: grid;
	grid-template-columns: 340px 1fr;
	align-items: center;
	gap: clamp( 30px, 4vw, 60px );
}

.k-mag__cover img {
	width: 100%;
	border-radius: var( --k-radius );
	box-shadow: var( --k-shadow-lg );
}

.k-mag__issue {
	font-family: var( --k-f-mono );
	font-size: 13px;
	letter-spacing: 0.08em;
	color: var( --k-orange );
}

.k-mag h2 {
	margin: 6px 0 12px;
	font-family: var( --k-f-disp );
	font-size: clamp( 30px, 3.6vw, 46px );
	text-transform: uppercase;
	color: #fff;
}

/* ========================================================================
   REVEAL ON SCROLL
   ==================================================================== */

.js .k-reveal {
	opacity: 0;
	transform: translateY( 28px );
	transition: opacity 0.7s var( --k-ease ), transform 0.7s var( --k-ease );
}

.js .k-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ========================================================================
   RESPONSIVE
   ==================================================================== */

@media ( max-width: 1100px ) {
	.k-cats {
		grid-template-columns: repeat( 3, 1fr );
	}

	.k-logos {
		grid-template-columns: repeat( 4, 1fr );
	}

	.k-stats__inner {
		grid-template-columns: 1fr 1fr 1fr;
	}

	.k-stats__intro {
		grid-column: 1 / -1;
		text-align: center;
	}

	.k-stat:first-of-type {
		border-left: 0;
	}
}

@media ( max-width: 900px ) {
	.k-split,
	.k-mag {
		grid-template-columns: 1fr;
	}

	.k-split--reverse .k-split__media {
		order: 0;
	}

	.k-mag__cover {
		max-width: 280px;
	}

	.k-quotes {
		grid-template-columns: 1fr 1fr;
	}
}

@media ( max-width: 680px ) {
	.k-hero {
		min-height: 88vh;
	}

	.k-cats,
	.k-quotes {
		grid-template-columns: 1fr 1fr;
	}

	.k-hero__arrow {
		display: none;
	}

	.k-stats__inner {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.k-stat {
		border-left: 0;
		border-top: 1px solid rgba( 255, 255, 255, 0.14 );
		padding-top: 20px;
	}

	.k-band__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media ( max-width: 460px ) {
	.k-cats,
	.k-quotes,
	.k-logos {
		grid-template-columns: 1fr;
	}

	.k-logos {
		grid-template-columns: 1fr 1fr;
	}
}
