/* ==========================================================================
   ebg process - ebg h02: Layout H02 working process (.working-process-area,
   .process-item), Greek copy from legacy ("Η Διαδικασία Συνεργασίας").
   Light band; split head (intro left, pill button right; stacked on phones,
   where legacy squeezes the heading beside the button). Three white
   cards; the step number is accent fading to white (gradient text). A white
   disc with a 7px rim in the band colour joins each card to the next: disc on
   ::after, the arrow on ::before (Lucide arrow-right mask, not ebg's icon
   font), both turned to point down when the cards stack. Cards slide in from
   the start one after another (.ebg-reveal-children, ebg fadeInLeft 0.2s).
   ========================================================================== */

@layer components {

	.ebg-pcs {
		--ebg-pcs-band: var(--ebg-surface-3);
		--ebg-pcs-disc: 62px;
		--ebg-pcs-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");

		inline-size: 100%;
		margin-block: 0;
		padding-block: var(--section-py);
		background-color: var(--ebg-pcs-band);

		& > .ebg-shell {
			margin-block: 0; /* Blocksy flow spacing */
		}
		& :where(p, h2, h3) { margin: 0; }
	}

	/* Paler band, for pages where the section above already uses surface-3. */
	.ebg-pcs.ebg-pcs--base { --ebg-pcs-band: var(--ebg-surface-0); }

	.ebg-pcs__head {
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		gap: 30px;
		margin-block-end: 52px;

		& > * { margin-block: 0; }
	}

	.ebg-pcs__intro {
		max-inline-size: 679px;

		& > * { margin-block: 0; }
	}

	.ebg-pcs .ebg-pcs__sub {
		--ebg-glyph: "\e90d"; /* ebg tji-box */
		--ebg-chip-line: #C9D1D1;

		margin-block-end: 20px;
		padding: 2px 10px;
		color: var(--ebg-heading-ink);
	}

	.ebg-pcs .ebg-pcs__title {
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: 3rem;
		font-weight: 500;
		line-height: 1.125;
	}

	.ebg-pcs .ebg-pcs__lead {
		color: var(--ebg-ink-2);
		font-size: var(--text-base);
		line-height: var(--lh-body);
	}

	.ebg-pcs__actions {
		flex-shrink: 0;
		margin: 0;

		& .wp-block-button { margin: 0; }
	}

	.ebg-pcs__steps {
		--ebg-reveal-from: -40px 0;
		--ebg-reveal-step: 200ms;

		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 15px;

		& > * { margin-block: 0; }
	}

	.ebg-pcs__step {
		box-sizing: border-box;
		position: relative;
		z-index: 3;
		padding: 25px 28px 40px;
		border-radius: 10px;
		background-color: #FFFFFF;

		&:nth-child(2) { z-index: 2; }
		&:last-child { z-index: 1; }
		& > * { margin-block: 0; }

		&:not(:last-child)::before,
		&:not(:last-child)::after {
			content: "";
			box-sizing: border-box;
			position: absolute;
			top: 50%;
			translate: 0 -50%;
		}

		/* the disc, straddling the gap */
		&:not(:last-child)::after {
			z-index: 5;
			inset-inline-end: calc(var(--ebg-pcs-disc) * -0.55);
			inline-size: var(--ebg-pcs-disc);
			block-size: var(--ebg-pcs-disc);
			border: 7px solid var(--ebg-pcs-band);
			border-radius: 50%;
			background-color: #FFFFFF;
		}

		/* the arrow, centred on the disc */
		&:not(:last-child)::before {
			z-index: 6;
			inset-inline-end: calc(var(--ebg-pcs-disc) * -0.55 + var(--ebg-pcs-disc) / 2 - 12px);
			inline-size: 24px;
			block-size: 24px;
			background-color: var(--ebg-accent);
			mask: var(--ebg-pcs-arrow) center / contain no-repeat;
		}
	}

	.ebg-pcs .ebg-pcs__num {
		display: inline-flex;
		margin-block-end: 16px;
		background: linear-gradient(180deg, var(--ebg-accent) 0%, #FFFFFF 90%);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		font-family: var(--font-display);
		font-size: 7.5rem;
		font-weight: 600;
		line-height: 1;
		-webkit-text-fill-color: transparent;
	}

	.ebg-pcs .ebg-pcs__step-title {
		margin-block-end: 20px;
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: 1.5rem;
		font-weight: 600;
		line-height: 1.333;
	}

	.ebg-pcs .ebg-pcs__desc {
		color: var(--ebg-ink-2);
		font-size: var(--text-base);
		line-height: var(--lh-body);
	}

	@media (max-width: 1200px) {
		.ebg-pcs { --ebg-pcs-disc: 50px; }
		.ebg-pcs__step { padding: 35px 20px; }
		.ebg-pcs .ebg-pcs__num { font-size: 6.25rem; }
		.ebg-pcs .ebg-pcs__title { font-size: 2.5rem; }
		.ebg-pcs__head { margin-block-end: 35px; }
		.ebg-pcs .ebg-pcs__sub { margin-block-end: 15px; font-size: var(--fs-13, 0.8125rem); }
	}

	/* Stacked: one card per row, the disc moves under each card and turns down. */
	@media (max-width: 1024px) {
		.ebg-pcs { --ebg-pcs-disc: 62px; }

		.ebg-pcs__steps {
			--ebg-reveal-from: 0 20px;

			grid-template-columns: minmax(0, 1fr);
		}

		.ebg-pcs__step {
			padding: 35px 15px 30px;

			&:not(:last-child)::before,
			&:not(:last-child)::after {
				top: auto;
				inset-inline-end: auto;
				inset-inline-start: 50%;
				translate: -50% 0;
			}

			&:not(:last-child)::after { bottom: -40px; }

			&:not(:last-child)::before {
				bottom: calc(-40px + var(--ebg-pcs-disc) / 2 - 12px);
				rotate: 90deg;
			}
		}

		.ebg-pcs .ebg-pcs__num { margin-block-end: 20px; font-size: 5rem; }
		.ebg-pcs .ebg-pcs__step-title { margin-block-end: 10px; font-size: 1.375rem; }
	}

	@media (max-width: 767px) {
		.ebg-pcs__head {
			flex-direction: column;
			align-items: flex-start;
		}

		.ebg-pcs .ebg-pcs__title { font-size: 1.875rem; }
		.ebg-pcs .ebg-pcs__step-title { font-size: 1.25rem; }
	}
}
