/* BP Hero widget styles
 *
 * One full-width scene. The scenic background spans the entire Hero.
 * Content and media sit on top of that scene as a single composition.
 * Logical properties only. No Bootstrap, no jQuery, no GSAP.
 *
 * Animation runs from bp-hero.js via IntersectionObserver.
 * When JS is off, content is fully visible (no hidden state).
 */

.bp-hero {
	--bp-hero-bg:        #F4ECDD;
	--bp-hero-fg:        var(--bp-fg);
	--bp-hero-title:     var(--bp-primary);
	--bp-hero-eyebrow:   var(--bp-primary);
	--bp-hero-divider:   var(--bp-accent);
	--bp-hero-cta-bg:    var(--bp-primary);
	--bp-hero-cta-fg:    #FFFFFF;
	--bp-hero-cta2-bg:   transparent;
	--bp-hero-cta2-fg:   var(--bp-primary);
	--bp-hero-cta2-bd:   var(--bp-primary);
	--bp-hero-badge-bg:  rgba(255, 255, 255, 0.65);
	--bp-hero-badge-bd:  rgba(55, 79, 55, 0.18);
	--bp-hero-inner-max: 1200px;

	/* Where the visible tabletop sits in the Hero background, measured
	   from the bottom of the Hero. The product rests on this line. */
	--bp-table-plane:    5%;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--bp-hero-bg);
	color: var(--bp-hero-fg);
	min-block-size: clamp( 600px, 56vw, 680px );
	font-family: var(--bp-font-body);
	inline-size: 100%;
	max-inline-size: none;
}

/* Force the surrounding Elementor column/section to be
   unconstrained so the hero is truly full width. */
.elementor .elementor-section > .elementor-column > .elementor-widget-wrap,
.elementor .elementor-section > .elementor-column > .elementor-widget-wrap > .elementor-widget,
.elementor .elementor-section > .elementor-column > .elementor-widget-wrap > .elementor-widget > .bp-hero,
.elementor-section .elementor-container {
	width: 100% !important;
	max-width: 100% !important;
}

/* The Elementor section wrapping the BP Hero widget. */
.elementor-element.bp-hero,
.elementor .bp-hero,
.elementor .e-parent,
.elementor .e-con,
.elementor .elementor-widget-wrap,
.elementor .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
}

/* Any e-con that contains the hero widget. */
.elementor-inner section.elementor-section,
.elementor-inner section.elementor-section > .elementor-container,
.elementor-inner section.elementor-section > .elementor-row,
.elementor-inner section.elementor-section > .elementor-row > .elementor-column,
.elementor-inner section.elementor-section > .elementor-row > .elementor-column > .elementor-widget-wrap {
	width: 100% !important;
	max-width: 100% !important;
	padding-inline: 0 !important;
}

/* Kill Elementor's default .e-con padding on the hero wrapper
   so the cream background reaches the page edge. */
.elementor .elementor-element.bp-hero,
.e-con.bp-hero,
.bp-hero {
	padding: 0;
	margin: 0;
}

/* ---------------- Composite Hero Scene mode ---------------- */
/* When a desktop scene is provided, the section renders with
   data-bp-hero-mode="composite" and the scene image owns the visual. */
/* Default: only the desktop scene is shown. The mobile scene is
   activated at <= 768 (see the mobile media query below). */
.bp-hero__scene--mobile { display: none; }

/* In composite mode the same default applies. The mobile media
   query below explicitly shows the mobile scene and hides the
   desktop one. */
.bp-hero[data-bp-hero-mode="composite"] .bp-hero__scene--mobile { display: none; }

.bp-hero__scene {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Default: only the desktop scene is shown. The mobile scene is
   activated at <= 768 (see the mobile media query below). */
.bp-hero__scene--mobile { display: none; }

.bp-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.bp-hero__bg img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

/* Soft left-side readability veil over the scene (cream → transparent). */
.bp-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(
			90deg,
			rgba( 250, 246, 236, 0.88 ) 0%,
			rgba( 250, 246, 236, 0.58 ) 34%,
			rgba( 250, 246, 236, 0.10 ) 62%,
			rgba( 250, 246, 236, 0.00 ) 100%
		);
}

/* ---------------- Inner content layout ---------------- */
.bp-hero__inner {
	position: relative;
	z-index: 3;
	max-inline-size: var(--bp-hero-inner-max);
	margin-inline: auto;
	padding-inline: clamp(24px, 5vw, 64px);
	padding-block: clamp(40px, 6vw, 80px);
	display: grid;
	grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
	gap: clamp(20px, 3vw, 48px);
	align-items: stretch;
	min-block-size: inherit;
}

/* ---------------- Media stage (right column) ---------------- */
/* The right column is now a transparent slot. Kept as a layout
   helper so the inner grid still works. */
.bp-hero__media {
	position: relative;
	align-self: stretch;
	inline-size: 100%;
	background: transparent;
	overflow: visible;
	isolation: isolate;
}

/* ---------------- Content column ---------------- */
.bp-hero__content {
	display: flex;
	flex-direction: column;
	gap: 18px;
	max-inline-size: 620px;
	justify-self: start;
	inline-size: 100%;
}

.bp-hero__eyebrow {
	margin: 0;
	font-family: var(--bp-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bp-hero-eyebrow);
}

.bp-hero__title {
	margin: 0;
	font-family: var(--bp-font-display);
	font-weight: 400;
	color: var(--bp-hero-title);
	line-height: 1;
	letter-spacing: -0.005em;
	font-size: 64px;
}

.bp-hero__title-line {
	display: block;
}

/* Decorative divider: thin lines + diamond. */
.bp-hero__divider {
	display: flex;
	align-items: center;
	gap: 10px;
	inline-size: 140px;
	opacity: 0.9;
}

.bp-hero__divider-line {
	flex: 1 1 auto;
	block-size: 1px;
	background: var(--bp-hero-divider);
}

.bp-hero__divider-diamond {
	inline-size: 8px;
	block-size: 8px;
	background: var(--bp-hero-divider);
	transform: rotate(45deg);
	flex: 0 0 auto;
}

.bp-hero__description {
	margin: 0;
	font-family: var(--bp-font-body);
	font-size: 17px;
	line-height: 1.55;
	color: var(--bp-hero-fg);
	max-inline-size: 460px;
}

/* ---------------- CTAs ---------------- */
.bp-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-block-start: 6px;
}

.bp-hero__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-block-size: 44px;
	padding: 12px 24px;
	border-radius: 999px;
	font-family: var(--bp-font-body);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: transform 200ms ease, background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
	white-space: nowrap;
}

.bp-hero__cta--primary {
	background: var(--bp-hero-cta-bg);
	color: var(--bp-hero-cta-fg);
	border-color: var(--bp-hero-cta-bg);
}

.bp-hero__cta--primary:hover,
.bp-hero__cta--primary:focus-visible {
	transform: translateY(-2px);
	background: #2C3F2C;
	box-shadow: 0 8px 20px rgba(55, 79, 55, 0.25);
}

.bp-hero__cta--secondary {
	background: var(--bp-hero-cta2-bg);
	color: var(--bp-hero-cta2-fg);
	border-color: var(--bp-hero-cta2-bd);
}

.bp-hero__cta--secondary:hover,
.bp-hero__cta--secondary:focus-visible {
	transform: translateY(-2px);
	background: rgba(55, 79, 55, 0.06);
	box-shadow: 0 4px 12px rgba(55, 79, 55, 0.1);
}

/* ---------------- Trust badges ---------------- */
.bp-hero__badges {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
}

.bp-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--bp-hero-badge-bg);
	border: 1px solid var(--bp-hero-badge-bd);
	font-family: var(--bp-font-body);
	font-size: 11px;
	font-weight: 500;
	color: var(--bp-primary);
	line-height: 1.2;
}

.bp-hero__badge-icon {
	display: inline-flex;
	inline-size: 14px;
	block-size: 14px;
	align-items: center;
	justify-content: center;
	color: var(--bp-primary);
}

.bp-hero__badge-icon i,
.bp-hero__badge-icon svg {
	inline-size: 12px;
	block-size: 12px;
}

/* ---------------- Animation: gentle one-time entrance via CSS keyframes ---------------- */
/* Content is always visible. The animation is a subtle slide-up
   only — opacity stays at 1 so the hero never appears empty. */
@keyframes bp-hero-rise {
	from { transform: translateY(12px); }
	to   { transform: translateY(0); }
}

.bp-hero [data-bp-stagger] {
	animation: bp-hero-rise 600ms ease both;
}

/* Stagger delays. */
.bp-hero [data-bp-stagger="0"] { animation-delay: 0ms; }
.bp-hero [data-bp-stagger="1"] { animation-delay: 120ms; }
.bp-hero [data-bp-stagger="2"] { animation-delay: 240ms; }
.bp-hero [data-bp-stagger="3"] { animation-delay: 360ms; }
.bp-hero [data-bp-stagger="4"] { animation-delay: 480ms; }
.bp-hero [data-bp-stagger="5"] { animation-delay: 600ms; }

/* ---------------- Responsive ---------------- */
/* ---------------- TABLET MAP (769 - 1024) ---------------- */
@media ( min-width: 769px ) and ( max-width: 1024px ) {
	.bp-hero { min-block-size: 560px; }
	.bp-hero__title { font-size: 52px; }
	.bp-hero__inner { gap: 20px; padding-block: 36px; }
}

/* ---------------- Tablet + mobile single column ---------------- */
@media ( max-width: 768px ) {

	/* Hero becomes a single column. Scene moved below text. */
	.bp-hero { 
		min-block-size: auto; 
		display: flex; 
		flex-direction: column; 
		position: relative;
		padding-block-end: 60vh; /* Reserve space at the bottom for the product in the scene. */
	}

	/* Composite mode: on mobile the scene also covers the full Hero
	   (just like desktop). Text overlays with the readability veil. */
	.bp-hero__bg {
		position: absolute;
		order: 0;
		inset: 0;
		inline-size: 100%;
		block-size: 100%;
		overflow: hidden;
		z-index: 0;
		margin-block-start: 0;
	}

	.bp-hero__bg img {
		inline-size: 100%;
		block-size: 100%;
		object-fit: cover;
		object-position: center 70%; /* Anchor the product at the bottom of the scene. */
	}

	/* In composite mode, switch to the dedicated mobile scene.
	   Use the data-attribute selector so this rule wins over the
	   default .bp-hero[data-bp-hero-mode="composite"] rule above. */
	.bp-hero[data-bp-hero-mode="composite"] .bp-hero__scene--desktop { display: none; }
	.bp-hero[data-bp-hero-mode="composite"] .bp-hero__scene--mobile { display: block; }
	/* Also handle the (rare) non-composite case where only the
	   mobile scene is set. */
	.bp-hero__scene--desktop { display: none; }
	.bp-hero__scene--mobile { display: block; }

	.bp-hero::before {
		background:
			linear-gradient(
				180deg,
				rgba( 250, 246, 236, 0.94 ) 0%,
				rgba( 250, 246, 236, 0.70 ) 40%,
				rgba( 250, 246, 236, 0.10 ) 100%
			);
	}

	.bp-hero__inner {
		order: 1;
		grid-template-columns: minmax(0, 1fr);
		padding-block: 40px 20px;
		padding-inline: 24px;
		gap: 20px;
		align-items: stretch;
	}

	.bp-hero__content {
		max-inline-size: 100%;
		min-inline-size: 0;
		gap: 16px;
		text-align: center; /* Center text on mobile. */
		justify-self: stretch;
		align-items: center;
	}

	.bp-hero__title {
		font-size: 44px;
		line-height: 1.04;
		text-align: center;
	}

	.bp-hero__description {
		max-inline-size: 100%;
		min-inline-size: 0;
		font-size: 16px;
		line-height: 1.6;
		text-align: center;
	}

	.bp-hero__divider { 
		inline-size: 120px; 
		margin-inline: auto;
	}

	.bp-hero__ctas {
		flex-direction: column;
		align-items: center;
		gap: 12px;
		margin-block-start: 8px;
		inline-size: 100%;
	}
	.bp-hero__ctas .bp-hero__cta {
		inline-size: 100%;
		max-inline-size: 280px;
		min-block-size: 48px;
	}

	.bp-hero__badges {
		justify-content: center;
		margin-block-start: 8px;
	}

	.bp-hero__media {
		display: none; /* Hide the media column helper in mobile flow. */
	}
}

/* 430px width */
@media ( max-width: 480px ) {
	.bp-hero__title { font-size: 42px; }
	.bp-hero__inner { padding-inline: 20px; }
}

/* 390px width */
@media ( max-width: 390px ) {
	.bp-hero__title { font-size: 36px; line-height: 1.02; max-inline-size: 100%; min-inline-size: 0; }
	.bp-hero__eyebrow {
		font-size: 9px;
		letter-spacing: 0.06em;
		line-height: 1.4;
		white-space: normal;
		word-break: break-word;
		max-inline-size: 100%;
		min-inline-size: 0;
	}
	.bp-hero__description {
		font-size: 13px;
		line-height: 1.55;
		max-inline-size: 100%;
		min-inline-size: 0;
		word-break: break-word;
	}
	.bp-hero__inner { padding-inline: 18px; gap: 16px; }
	.bp-hero__badges { gap: 6px; }
	.bp-hero__badges .bp-hero__badge { font-size: 10px; padding-inline: 8px; }
}

/* 360px width */
@media ( max-width: 360px ) {
	.bp-hero__title { font-size: 30px; line-height: 1.04; }
	.bp-hero__description { font-size: 12px; line-height: 1.5; }
	.bp-hero__inner { padding-inline: 16px; gap: 10px; }
	.bp-hero__cta { font-size: 11px; padding-block: 11px; padding-inline: 14px; }
	.bp-hero__eyebrow { font-size: 8px; letter-spacing: 0.04em; }
	.bp-hero__badges { grid-template-columns: minmax(0, 1fr); gap: 5px; }
	.bp-hero__badges .bp-hero__badge { font-size: 10px; padding-block: 7px; padding-inline: 8px; }
}

/* Arabic font: title falls back to Noto Sans Arabic. */
[lang="ar"] .bp-hero__title,
[dir="rtl"] .bp-hero__title {
	font-family: var(--bp-font-arabic);
	font-weight: 700;
	line-height: 1.15;
}

/* Reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.bp-hero [data-bp-stagger],
	.bp-hero__product-motion,
	.bp-hero__botanical-motion,
	.bp-hero__leaves-motion {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}
	.bp-hero__cta { transition: none !important; }
}
