/* ============================================================
   BIODRY PROCESS TIMELINE — Biodry Core plugin
   Namespace: .biodry-process
   ============================================================ */

.biodry-process {
	--bd-red: #FF2D2D;
	--bd-red-dark: #df1010;
	--bd-ink: #101820;
	--bd-muted: #667085;
	--bd-soft: #f7f7f7;
	--bd-line: #e9eaec;
	--bd-card: #ffffff;
	--bd-shadow: 0 22px 55px rgba(16, 24, 32, 0.09);
	--bd-shadow-hover: 0 28px 70px rgba(255, 45, 45, 0.16);
	--bd-ease: cubic-bezier(.22, 1, .36, 1);

	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 15% 20%, rgba(255, 45, 45, 0.08), transparent 28%),
		radial-gradient(circle at 85% 10%, rgba(255, 45, 45, 0.06), transparent 26%),
		linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
	padding: clamp(20px, 8vw, 70px) 20px;
	isolation: isolate;
}

.biodry-process *,
.biodry-process *::before,
.biodry-process *::after {
	box-sizing: border-box;
}

.biodry-process::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(16, 24, 32, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(16, 24, 32, 0.035) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 72%);
	pointer-events: none;
	z-index: -2;
}

.biodry-process::after {
	content: "";
	position: absolute;
	width: 520px;
	height: 520px;
	right: -190px;
	bottom: -230px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 45, 45, 0.09), transparent 67%);
	pointer-events: none;
	z-index: -1;
}

.biodry-process__inner {
	width: min(1240px, 100%);
	margin: 0 auto;
}

/* HEADER */
.biodry-process__header {
	max-width: 850px;
	margin: 0 auto clamp(52px, 6vw, 86px);
	text-align: center;
}

.biodry-process__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-bottom: 18px;
	color: var(--bd-muted);
	font-size: 13px;
	font-weight: 900;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.biodry-process__eyebrow i {
	display: block;
	width: 32px;
	height: 2px;
	background: var(--bd-red);
	border-radius: 999px;
}

.biodry-process__title {
	margin: 0 0 18px;
	color: var(--bd-ink);
	font-size: clamp(34px, 4.8vw, 58px);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -0.035em;
}

.biodry-process__lead {
	max-width: 760px;
	margin: 0 auto;
	color: var(--bd-muted);
	font-size: 17px;
	line-height: 1.72;
}

/* TIMELINE DESKTOP */
.biodry-process__timeline {
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 22px;
	align-items: stretch;
}

/* Hlavná timeline čiara */
.biodry-process__line {
	position: absolute;
	top: 86px;
	left: 8%;
	right: 8%;
	height: 3px;
	background: var(--bd-line);
	border-radius: 999px;
	overflow: hidden;
	z-index: 0;
}

.biodry-process__line-fill {
	display: block;
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, var(--bd-red), #ff6a6a, var(--bd-red));
	border-radius: inherit;
	box-shadow: 0 0 20px rgba(255, 45, 45, 0.45);
	transition: width 900ms var(--bd-ease);
	position: relative;
	overflow: hidden;
}

.biodry-process__line-fill::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 45%;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255,255,255,0.7) 50%,
		transparent 100%
	);
	transform: translateX(-120%);
	animation: bdLineShine 1.7s ease-in-out infinite;
}

/* STEP */
.biodry-process__step {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-height: 100%;
	padding: 0 0 6px;
	opacity: .58;
	transform: translateY(18px);
	transition:
		opacity 520ms ease,
		transform 520ms var(--bd-ease);
}

.biodry-process__step.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.biodry-process__step.is-active {
	opacity: 1;
}

/* ICON */
.biodry-process__icon-wrap {
	position: relative;
	width: 172px;
	height: 172px;
	display: grid;
	place-items: center;
	margin-bottom: 24px;
}

.biodry-process__icon-wrap::before {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 45%, #ffffff 0%, #ffffff 52%, rgba(255, 45, 45, 0.06) 100%);
	border: 3px solid rgba(255, 45, 45, .16);
	box-shadow: 0 14px 36px rgba(16, 24, 32, 0.08);
	transition:
		border-color 320ms ease,
		box-shadow 320ms ease,
		transform 320ms ease;
}

.biodry-process__icon-wrap::after {
	content: "";
	position: absolute;
	inset: -8px;
	border-radius: 50%;
	border: 2px solid rgba(255, 45, 45, 0);
	transform: scale(.86);
	opacity: 0;
	transition:
		opacity 360ms ease,
		transform 520ms var(--bd-ease),
		border-color 360ms ease;
}

.biodry-process__step.is-active .biodry-process__icon-wrap::before,
.biodry-process__step:hover .biodry-process__icon-wrap::before {
	border-color: var(--bd-red);
	box-shadow:
		0 18px 48px rgba(255, 45, 45, 0.18),
		0 0 0 8px rgba(255, 45, 45, 0.045);
	transform: translateY(-3px);
}

.biodry-process__step.is-active .biodry-process__icon-wrap::after,
.biodry-process__step:hover .biodry-process__icon-wrap::after {
	opacity: 1;
	transform: scale(1);
	border-color: rgba(255, 45, 45, 0.22);
}

.biodry-process__icon {
	position: relative;
	z-index: 2;
	width: 122px;
	height: 122px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff7f7;
	overflow: hidden;
	transition:
		transform 380ms var(--bd-ease),
		filter 320ms ease;
}

.biodry-process__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	display: block;
	padding: 8px;
	transform: translateX(4px);
}

.biodry-process__step.is-active .biodry-process__icon,
.biodry-process__step:hover .biodry-process__icon {
	transform: scale(1.055) rotate(-1.2deg);
	filter: saturate(1.08) contrast(1.04);
}

/* Číslo kroku */
.biodry-process__number {
	position: absolute;
	top: 0;
	right: 8px;
	z-index: 4;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: var(--bd-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 12px 24px rgba(16, 24, 32, 0.18);
	transition:
		background 260ms ease,
		transform 260ms var(--bd-ease),
		box-shadow 260ms ease;
}

.biodry-process__step.is-active .biodry-process__number,
.biodry-process__step:hover .biodry-process__number {
	background: var(--bd-red);
	transform: scale(1.08);
	box-shadow: 0 14px 28px rgba(255, 45, 45, 0.32);
}

/* CONTENT CARD */
.biodry-process__content {
	position: relative;
	width: 100%;
	min-height: 188px;
	padding: 28px 22px 26px;
	background: rgba(255,255,255,.78);
	border: 1px solid rgba(16, 24, 32, 0.07);
	box-shadow: 0 16px 45px rgba(16, 24, 32, 0.055);
	backdrop-filter: blur(10px);
	transition:
		transform 320ms var(--bd-ease),
		border-color 320ms ease,
		box-shadow 320ms ease,
		background 320ms ease;
}

.biodry-process__content::before {
	content: "";
	position: absolute;
	left: 24px;
	right: 24px;
	top: 0;
	height: 3px;
	background: var(--bd-red);
	border-radius: 0 0 999px 999px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 380ms var(--bd-ease);
}

.biodry-process__step.is-active .biodry-process__content,
.biodry-process__step:hover .biodry-process__content {
	transform: translateY(-6px);
	background: #ffffff;
	border-color: rgba(255, 45, 45, 0.18);
	box-shadow: var(--bd-shadow-hover);
}

.biodry-process__step.is-active .biodry-process__content::before,
.biodry-process__step:hover .biodry-process__content::before {
	transform: scaleX(1);
}

.biodry-process__content h3 {
	margin: 0 0 12px;
	color: var(--bd-ink);
	font-size: 20px;
	line-height: 1.22;
	font-weight: 900;
	letter-spacing: -0.015em;
}

.biodry-process__content p {
	margin: 0;
	color: var(--bd-muted);
	font-size: 15px;
	line-height: 1.62;
}

/* LOOP ACTIVE STATES */
.biodry-process__step.is-loop-active {
	opacity: 1;
	transform: translateY(0);
}

.biodry-process__step.is-loop-active .biodry-process__icon-wrap::after {
	opacity: 1;
	border-color: rgba(255, 45, 45, 0.32);
	animation: bdPulseRing 1.8s ease-out infinite;
}

.biodry-process__step.is-loop-active .biodry-process__icon-wrap::before {
	border-color: var(--bd-red);
	box-shadow:
		0 18px 48px rgba(255, 45, 45, 0.22),
		0 0 0 8px rgba(255, 45, 45, 0.05),
		0 0 42px rgba(255, 45, 45, 0.18);
}

.biodry-process__step.is-loop-active .biodry-process__icon {
	animation: bdIconBreath 2.4s ease-in-out infinite;
	filter: saturate(1.12) contrast(1.05);
}

.biodry-process__step.is-loop-active .biodry-process__number {
	background: var(--bd-red);
	transform: scale(1.08);
	box-shadow: 0 14px 28px rgba(255, 45, 45, 0.32);
}

.biodry-process__step.is-loop-active .biodry-process__content {
	transform: translateY(-6px);
	background: #ffffff;
	border-color: rgba(255, 45, 45, 0.2);
	box-shadow:
		0 28px 70px rgba(255, 45, 45, 0.14),
		0 16px 45px rgba(16, 24, 32, 0.06);
}

.biodry-process__step.is-loop-active .biodry-process__content::before {
	transform: scaleX(1);
}

/* GLOW EFFECT */
.biodry-process__timeline::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 65px;
	width: min(900px, 90%);
	height: 180px;
	transform: translateX(-50%);
	background:
		radial-gradient(circle, rgba(255,45,45,.08) 0%, transparent 62%);
	filter: blur(18px);
	opacity: .75;
	pointer-events: none;
	z-index: 0;
	animation: bdSoftGlowMove 5.5s ease-in-out infinite alternate;
}

/* ANIMATIONS */
@keyframes bdLineShine {
	0% { transform: translateX(-120%); }
	70%, 100% { transform: translateX(240%); }
}

@keyframes bdPulseRing {
	0% { transform: scale(.88); opacity: .45; }
	70% { transform: scale(1.12); opacity: 0; }
	100% { transform: scale(1.12); opacity: 0; }
}

@keyframes bdIconBreath {
	0%, 100% { transform: scale(1.04) rotate(-1deg); }
	50% { transform: scale(1.1) rotate(1deg); }
}

@keyframes bdSoftGlowMove {
	from { transform: translateX(-52%) scale(.96); opacity: .55; }
	to { transform: translateX(-48%) scale(1.04); opacity: .9; }
}

/* TABLET */
@media (max-width: 1199px) {
	.biodry-process__timeline {
		gap: 16px;
	}

	.biodry-process__icon-wrap {
		width: 150px;
		height: 150px;
	}

	.biodry-process__icon {
		width: 108px;
		height: 108px;
	}

	.biodry-process__content {
		padding: 26px 18px 24px;
		min-height: 220px;
	}

	.biodry-process__content h3 {
		font-size: 18px;
	}

	.biodry-process__content p {
		font-size: 14px;
	}
}

/* MOBILE */
@media (max-width: 991px) {
	.biodry-process {
		padding: 78px 18px;
	}

	.biodry-process__header {
		text-align: left;
		margin-bottom: 42px;
	}

	.biodry-process__header p {
		margin-left: 0;
	}

	.biodry-process__timeline {
		display: flex;
		flex-direction: column;
		gap: 22px;
		padding-left: 28px;
	}

	.biodry-process__line {
		top: 0;
		bottom: 0;
		left: 8px;
		right: auto;
		width: 3px;
		height: auto;
	}

	.biodry-process__line-fill {
		width: 100%;
		height: 0%;
		transition: height 900ms var(--bd-ease);
	}

	.biodry-process__line-fill::after {
		width: 100%;
		height: 90px;
		transform: translateY(-120%);
		animation: bdLineShineMobile 1.7s ease-in-out infinite;
	}

	.biodry-process__step {
		display: grid;
		grid-template-columns: 132px 1fr;
		gap: 20px;
		align-items: center;
		text-align: left;
		min-height: auto;
	}

	.biodry-process__step::before {
		content: "";
		position: absolute;
		left: -26px;
		top: 64px;
		width: 17px;
		height: 17px;
		border-radius: 999px;
		background: #fff;
		border: 3px solid var(--bd-line);
		z-index: 4;
		transition:
			border-color 260ms ease,
			background 260ms ease,
			box-shadow 260ms ease;
	}

	.biodry-process__step.is-active::before,
	.biodry-process__step:hover::before {
		background: var(--bd-red);
		border-color: var(--bd-red);
		box-shadow: 0 0 0 8px rgba(255, 45, 45, 0.12);
	}

	.biodry-process__icon-wrap {
		width: 132px;
		height: 132px;
		margin-bottom: 0;
	}

	.biodry-process__icon {
		width: 96px;
		height: 96px;
	}

	.biodry-process__number {
		width: 38px;
		height: 38px;
		font-size: 11px;
	}

	.biodry-process__content {
		min-height: auto;
		padding: 24px 24px;
		height: auto;
	}

	.biodry-process__timeline::before {
		display: none;
	}

	@keyframes bdLineShineMobile {
		0% { transform: translateY(-120%); }
		70%, 100% { transform: translateY(240%); }
	}
}

@media (max-width: 640px) {
	.biodry-process {
		padding: 66px 16px;
	}

	.biodry-process__eyebrow {
		font-size: 11px;
		letter-spacing: .1em;
	}

	.biodry-process__eyebrow i {
		width: 24px;
	}

	.biodry-process__title {
		font-size: 34px;
	}

	.biodry-process__lead {
		font-size: 15px;
		line-height: 1.65;
	}

	.biodry-process__timeline {
		padding-left: 20px;
	}

	.biodry-process__line {
		left: 4px;
	}

	.biodry-process__step {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.biodry-process__step::before {
		left: -24px;
		top: 52px;
	}

	.biodry-process__icon-wrap {
		width: 116px;
		height: 116px;
	}

	.biodry-process__icon {
		width: 86px;
		height: 86px;
	}

	.biodry-process__number {
		right: 0;
	}

	.biodry-process__content {
		padding: 24px 22px;
	}

	.biodry-process__content h3 {
		font-size: 20px;
	}

	.biodry-process__content p {
		font-size: 15px;
	}
}

/* Rovnaká výška textových boxov na desktope */
@media (min-width: 992px) {
	.biodry-process__content {
		min-height: 220px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
}

/* NO ANIMATIONS - via class */
.biodry-process--no-anim .biodry-process *,
.biodry-process--no-anim .biodry-process *::before,
.biodry-process--no-anim .biodry-process *::after {
	animation: none !important;
	transition-duration: .01ms !important;
	scroll-behavior: auto !important;
}

.biodry-process--no-anim .biodry-process__step {
	opacity: 1 !important;
	transform: none !important;
}

.biodry-process--no-anim .biodry-process__line-fill {
	width: 100% !important;
	height: 100% !important;
}

.biodry-process--no-anim .biodry-process__line-fill::after {
	display: none !important;
}

/* NO ANIMATIONS - via prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.biodry-process *,
	.biodry-process *::before,
	.biodry-process *::after {
		animation: none !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}

	.biodry-process__step {
		opacity: 1 !important;
		transform: none !important;
	}

	.biodry-process__line-fill {
		width: 100% !important;
		height: 100% !important;
	}

	.biodry-process__line-fill::after {
		display: none !important;
	}
}
