/**
 * Page Title — full-bleed banner, clears floating navbar, sticky bg.
 * Arabic (RTL): car left / text + dark zone right, red dot on right of chip.
 * English (LTR): banner mirrored / text left, red dot on left of chip.
 */

.peng-page-title {
	--peng-pt-fg: #ffffff;
	--peng-pt-red: #ff0100;
	--peng-pt-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--peng-pt-radius: 0;
	--peng-pt-min-h: clamp(240px, 32vw, 340px);
	--peng-pt-nav-clear: calc(var(--peng-nav-top, 14px) + var(--peng-nav-height, 74px) + 16px);
	--peng-pt-sticky-top: calc(var(--peng-nav-top-scrolled, 8px) + var(--peng-nav-height-scrolled, 58px) + 10px);
	box-sizing: border-box;
	position: sticky;
	top: var(--peng-pt-sticky-top);
	z-index: 40;
	isolation: isolate;
	/* Full-bleed: stretch to viewport edges (overflow clipped on html) */
	width: 100vw;
	max-width: 100vw;
	margin-top: var(--peng-pt-nav-clear);
	margin-bottom: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0;
	font-family: var(--peng-font);
	color: var(--peng-pt-fg);
	background: transparent;
	overflow: visible;
}

/* Navbar spacer already clears the bar — don't double the gap */
.peng-navbar + .peng-page-title,
.peng-navbar ~ .peng-page-title,
.elementor-location-header ~ * .peng-page-title,
.peng-navbar + .elementor-element .peng-page-title {
	margin-top: 0;
}

.peng-page-title *,
.peng-page-title *::before,
.peng-page-title *::after {
	box-sizing: border-box;
}

.peng-page-title__surface {
	position: relative;
	isolation: isolate;
	display: flex;
	width: 100%;
	max-width: 100%;
	min-height: var(--peng-pt-min-h);
	overflow: hidden;
	border-radius: 0;
	background-color: #000000;
	background-repeat: no-repeat;
	background-position: left center;
	background-size: cover;
	box-shadow: none;
}

/* English: flip banner so car sits on the right */
.peng-page-title--ltr .peng-page-title__surface {
	background-position: right center;
	transform: scaleX(-1);
}

.peng-page-title--ltr .peng-page-title__wrap,
.peng-page-title--ltr .peng-page-title__band {
	transform: scaleX(-1); /* un-flip text + overlays so they read normally */
}

.peng-page-title--sm {
	--peng-pt-min-h: clamp(200px, 26vw, 280px);
}

.peng-page-title--md {
	--peng-pt-min-h: clamp(220px, 30vw, 310px);
}

.peng-page-title--lg {
	--peng-pt-min-h: clamp(240px, 32vw, 340px);
}

.peng-page-title__band {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.peng-page-title__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0) 48%,
		rgba(0, 0, 0, 0.28) 68%,
		rgba(0, 0, 0, 0.45) 100%
	);
}

/* English: dark zone on the left */
.peng-page-title--ltr .peng-page-title__shade {
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.45) 0%,
		rgba(0, 0, 0, 0.28) 32%,
		rgba(0, 0, 0, 0) 52%,
		rgba(0, 0, 0, 0) 100%
	);
}

.peng-page-title__stripe {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(
		90deg,
		#ff0100 0%,
		#ff0100 28%,
		rgba(255, 1, 0, 0.2) 55%,
		transparent 100%
	);
}

.peng-page-title--ltr .peng-page-title__stripe {
	background: linear-gradient(
		90deg,
		#ff0100 0%,
		#ff0100 28%,
		rgba(255, 1, 0, 0.2) 55%,
		transparent 100%
	);
}

.peng-page-title__wrap {
	position: relative;
	z-index: 1;
	direction: ltr !important;
	display: flex !important;
	align-items: flex-end;
	justify-content: flex-end !important;
	width: 100%;
	max-width: var(--peng-container, 1280px);
	min-height: inherit;
	margin-inline: auto;
	padding-block: clamp(1.1rem, 2.5vw, 1.65rem);
	padding-inline: clamp(16px, 4vw, 32px);
}

.peng-page-title--ltr .peng-page-title__wrap {
	justify-content: flex-start !important;
}

.peng-page-title__inner {
	direction: ltr !important;
	display: flex !important;
	flex-direction: column;
	align-items: flex-end !important;
	justify-content: center;
	gap: 0.85rem;
	width: auto;
	max-width: min(100%, 28rem);
	margin-left: auto !important;
	margin-right: 0 !important;
	text-align: right !important;
}

.peng-page-title--ltr .peng-page-title__inner {
	align-items: flex-start !important;
	margin-left: 0 !important;
	margin-right: auto !important;
	text-align: left !important;
}

/* Subtitle chip */
.peng-page-title__subtitle.peng-subtitle {
	display: inline-flex !important;
	align-items: center;
	align-self: flex-end !important;
	gap: 0.55rem;
	margin: 0 0 0 auto !important;
	padding: 0.45rem 0.65rem 0.45rem 1rem;
	border: 1px solid rgba(255, 1, 0, 0.35);
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	font-size: clamp(0.72rem, 1.2vw, 0.84rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.35;
	color: #ffffff;
	direction: ltr !important;
	/* DOM is [dot][text] — reverse so dot sits on the RIGHT for Arabic */
	flex-direction: row-reverse !important;
	text-align: right !important;
	box-shadow:
		0 8px 24px rgba(0, 0, 0, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.peng-page-title--rtl .peng-page-title__subtitle.peng-subtitle {
	flex-direction: row-reverse !important;
	padding: 0.45rem 0.65rem 0.45rem 1rem;
}

.peng-page-title--ltr .peng-page-title__subtitle.peng-subtitle {
	flex-direction: row !important; /* dot LEFT for English */
	align-self: flex-start !important;
	margin: 0 auto 0 0 !important;
	padding: 0.45rem 1rem 0.45rem 0.65rem;
	text-align: left !important;
}

.peng-page-title__subtitle .peng-subtitle__icon {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	filter: drop-shadow(0 0 6px rgba(255, 1, 0, 0.55));
}

.peng-page-title__subtitle .peng-subtitle__dot {
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	background: #ff0100;
	box-shadow:
		0 0 0 3px rgba(255, 1, 0, 0.25),
		0 0 12px rgba(255, 1, 0, 0.55);
}

.peng-page-title__subtitle .peng-subtitle__text {
	color: #ffffff;
	direction: rtl;
	unicode-bidi: isolate;
	text-align: right !important;
}

.peng-page-title--ltr .peng-page-title__subtitle .peng-subtitle__text {
	direction: ltr;
	text-align: left !important;
}

.peng-page-title__heading {
	position: relative;
	align-self: flex-end !important;
	width: auto;
	max-width: 100%;
	margin: 0 0 0 auto !important;
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.04em;
	color: #ffffff;
	direction: rtl;
	unicode-bidi: isolate;
	text-align: right !important;
	text-wrap: balance;
	text-shadow:
		0 2px 0 rgba(0, 0, 0, 0.35),
		0 12px 36px rgba(0, 0, 0, 0.55);
}

.peng-page-title--ltr .peng-page-title__heading {
	align-self: flex-start !important;
	margin: 0 auto 0 0 !important;
	direction: ltr;
	text-align: left !important;
}

.peng-page-title--lg .peng-page-title__heading {
	font-size: clamp(2rem, 4.2vw, 3.15rem);
}

.peng-page-title--md .peng-page-title__heading {
	font-size: clamp(1.8rem, 3.6vw, 2.65rem);
}

.peng-page-title--sm .peng-page-title__heading {
	font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.peng-page-title__line {
	display: block !important;
	align-self: flex-end !important;
	width: 72px;
	max-width: 72px;
	height: 3px;
	margin: 0 0 0 auto !important;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(255, 1, 0, 0.15) 0%, #ff0100 45%, #ff0100 100%);
	box-shadow: 0 0 20px rgba(255, 1, 0, 0.55);
}

.peng-page-title--ltr .peng-page-title__line {
	align-self: flex-start !important;
	margin: 0 auto 0 0 !important;
	background: linear-gradient(90deg, #ff0100 0%, #ff0100 55%, rgba(255, 1, 0, 0.15) 100%);
}

.peng-page-title__surface::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 720px) {
	.peng-page-title {
		--peng-pt-min-h: clamp(220px, 58vw, 300px);
		--peng-pt-nav-clear: calc(var(--peng-nav-top, 10px) + var(--peng-nav-height, 64px) + 12px);
		--peng-pt-sticky-top: calc(var(--peng-nav-top-scrolled, 8px) + var(--peng-nav-height-scrolled, 48px) + 8px);
	}

	.peng-page-title__surface {
		background-position: 18% center;
	}

	.peng-page-title--ltr .peng-page-title__surface {
		background-position: 82% center;
	}

	.peng-page-title__shade {
		background: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.2) 0%,
			rgba(0, 0, 0, 0.5) 50%,
			rgba(0, 0, 0, 0.72) 100%
		);
	}

	.peng-page-title--ltr .peng-page-title__shade {
		background: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.2) 0%,
			rgba(0, 0, 0, 0.5) 50%,
			rgba(0, 0, 0, 0.72) 100%
		);
	}

	.peng-page-title__wrap {
		align-items: flex-end;
		padding-block: 1.15rem 0.85rem;
		padding-inline: clamp(16px, 4vw, 32px);
	}

	.peng-page-title__inner {
		max-width: 100%;
		gap: 0.65rem;
	}

	.peng-page-title--lg .peng-page-title__heading,
	.peng-page-title--md .peng-page-title__heading,
	.peng-page-title--sm .peng-page-title__heading {
		font-size: clamp(1.35rem, 5.5vw, 1.75rem);
		line-height: 1.2;
		letter-spacing: -0.02em;
	}

	.peng-page-title__subtitle.peng-subtitle {
		font-size: 0.7rem;
		letter-spacing: 0.04em;
	}

	.peng-page-title__line {
		width: 44px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.peng-page-title__subtitle,
	.peng-page-title__heading,
	.peng-page-title__line {
		animation: peng-pt-in 680ms var(--peng-pt-ease) both;
	}

	.peng-page-title__heading {
		animation-delay: 60ms;
	}

	.peng-page-title__line {
		animation-delay: 110ms;
	}
}

@keyframes peng-pt-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
