/* =============================================================
 * HalalEco — page-title hero fade
 *
 * Blends the black text column into the photo column of the first
 * Themify Builder row, so the hard vertical seam between them is
 * replaced by a soft left-to-right shadow.
 *
 * Scoped to the four title sections only:
 *   /our-products/  (page-id-253)
 *   /click-collect/ (page-id-223)
 *   /about/         (page-id-77)
 *   /contact/       (page-id-73)
 *
 * To add another page later, either append its page-id selector
 * below, or open the row in Themify Builder → Row Options →
 * Additional CSS Class and type:  hero-fade
 * ============================================================= */

:root {
	--hero-fade-width: 58%;   /* how far the shadow reaches across the photo */
	--hero-fade-color: 0, 0, 0;
}

/* ---- the two columns of the title row ---------------------- */
.page-id-253 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last,
.page-id-223 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last,
.page-id-77  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last,
.page-id-73  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last,
.module_row.hero-fade > .row_inner > .module_column.last {
	position: relative;
	overflow: hidden;   /* keeps the gradient inside the photo column */
}

/* ---- the shadow itself ------------------------------------- */
.page-id-253 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
.page-id-223 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
.page-id-77  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
.page-id-73  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
.module_row.hero-fade > .row_inner > .module_column.last::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--hero-fade-width);
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to right,
		rgba(var(--hero-fade-color), 1)    0%,
		rgba(var(--hero-fade-color), .97) 10%,
		rgba(var(--hero-fade-color), .78) 28%,
		rgba(var(--hero-fade-color), .42) 50%,
		rgba(var(--hero-fade-color), .15) 75%,
		rgba(var(--hero-fade-color), 0)  100%
	);
}

/* Anything the photo column actually contains stays above the shadow. */
.page-id-253 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last > *,
.page-id-223 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last > *,
.page-id-77  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last > *,
.page-id-73  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last > *,
.module_row.hero-fade > .row_inner > .module_column.last > * {
	position: relative;
	z-index: 2;
}

/* ---- stacked layout -----------------------------------------
 * Themify stacks this row at 600px (its own generated rule:
 * `@media (max-width:600px){ .tb_cno3t79 > .row_inner{--col:none} }`).
 * Below that the photo sits *under* the text, so the shadow has to
 * run top-to-bottom instead of left-to-right.
 * ----------------------------------------------------------- */
@media (max-width: 600px) {
	.page-id-253 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
	.page-id-223 .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
	.page-id-77  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
	.page-id-73  .themify_builder_content > .module_row.tb_first > .row_inner > .module_column.last::before,
	.module_row.hero-fade > .row_inner > .module_column.last::before {
		top: 0;
		bottom: auto;
		left: 0;
		right: 0;
		width: auto;
		height: 60%;
		background: linear-gradient(
			to bottom,
			rgba(var(--hero-fade-color), 1)    0%,
			rgba(var(--hero-fade-color), .9)  18%,
			rgba(var(--hero-fade-color), .45) 50%,
			rgba(var(--hero-fade-color), 0)  100%
		);
	}
}
