/* Centritek Sales — public-facing styles
 *
 * Owns the full /sales page body (hero → closing CTA) as one controlled
 * section, so the page never needs column-by-column styling in Elementor.
 * Selectors are prefixed `.ct-sales` to clear Elementor's heading/button
 * kit; loaded only when the Sales widget renders (wp_enqueue_style in
 * render(), same scoping mechanism as services.css and rentals.css).
 *
 * Tokens mirror services.css / rentals.css / contact-cta.css:
 *   orange #F56A22 (hover #d44a1c) · ink #1a1a1a · muted #74787c
 *   border #ededed · surface tint #f6f6f6 · heading font Space Grotesk
 */

.ct-sales {
	color: #1a1a1a;
}

.ct-sales *,
.ct-sales *::before,
.ct-sales *::after {
	box-sizing: border-box;
}

/* No horizontal padding — the page's container system (Vektor + Elementor)
 * owns the side gutter so it isn't doubled. max-width is kept as a safety
 * cap that re-centers content if the Elementor container is ever set to
 * Full Width. */
.ct-sales__inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* Scoped under .ct-sales (0,2,0) so the accent color beats Elementor's
 * text-kit color rules on headings, paragraphs, and spans. */
.ct-sales .ct-sales__accent {
	color: #F56A22;
}

/* ---------- Shared headings / copy ---------- */

.ct-sales .ct-sales__h1 {
	font-family: var(--heading-font, "Space Grotesk"), system-ui, sans-serif;
	font-weight: 900;
	font-size: 46px;
	line-height: 1;
	letter-spacing: normal;
	color: #333;
	margin: 0 0 18px;
	max-width: 1040px;
	text-transform: uppercase;
}

.ct-sales .ct-sales__h2 {
	font-family: var(--heading-font, "Space Grotesk"), system-ui, sans-serif;
	font-weight: 900;
	font-size: 46px; /* matches the site's heading size (same as H1) */
	line-height: 1;
	letter-spacing: normal;
	color: #333;
	margin: 0 0 18px;
	text-transform: uppercase;
}

/* Lead/body/tagline are scoped (0,2,0) so their margins beat theme/kit
 * paragraph rules, which otherwise inflate the vertical rhythm (same fix
 * as rentals.css). */
.ct-sales .ct-sales__lead {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 300;
	line-height: 36px;
	color: #333;
	margin: 0 0 16px;
	max-width: 1040px;
}

.ct-sales .ct-sales__body {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 300;
	line-height: 36px;
	color: #333;
	margin: 0 0 16px;
	max-width: 1040px;
}

/* Tagline displayed as a prominent bold callout — the spec says to display
 * it prominently (e.g. accented or as a sub-heading). Bold italic within
 * the body copy column gives it visual weight without a separate heading
 * level. */
.ct-sales .ct-sales__tagline {
	font-family: var(--heading-font, "Space Grotesk"), system-ui, sans-serif;
	font-size: 22px;
	font-weight: 700;
	font-style: italic;
	color: #1a1a1a;
	margin: 20px 0 0;
}

/* ---------- Image placeholder (no media set) ---------- */

.ct-sales__media--empty {
	display: block;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(
		135deg,
		#2a2f33 0,
		#2a2f33 12px,
		#202428 12px,
		#202428 24px
	);
}

/* ---------- Hero ---------- */

.ct-sales__hero {
	padding: 64px 0 40px;
}

/* ---------- Hiller / DECATec ---------- */

/* Tinted background to set the partnership section apart from the hero
 * and the tile row below. Band image has breathing room above; copy below. */
.ct-sales__hiller {
	background: #f6f6f6;
	padding: 48px 0 64px;
}

/* Centered image band — aspect ratio matches the actual asset (2172×724 = 3:1)
 * exactly, so object-fit:contain fills the frame with no letterboxing. */
.ct-sales__hiller-band {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto 48px;
	aspect-ratio: 3 / 1;
	overflow: hidden;
	background: #1a1a1a;
}

/* Contain the transparent-background cut-out so the full machine is always
 * visible — scoped (0,2,0) to beat Elementor's height:auto reset. */
.ct-sales .ct-sales__hiller-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ct-sales__hiller-copy {
	display: flex;
	flex-direction: column;
}

/* ---------- Offer tiles ---------- */

/* Mirror the Services cards pattern: 3-up image-forward grid, title
 * overlaid over a gradient scrim, description below each tile. */
.ct-sales__tiles-wrap {
	padding: 56px 0;
}

.ct-sales__tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.ct-sales__tile {
	display: flex;
	flex-direction: column;
}

.ct-sales__tile-media {
	position: relative;
	aspect-ratio: 4 / 3; /* tile images are exported at 4:3 to match */
	background: #202428;
	overflow: hidden;
}

/* Gradient scrim keeps the white title legible on any image, light or dark. */
.ct-sales__tile-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.78) 0%,
		rgba(0, 0, 0, 0.45) 28%,
		rgba(0, 0, 0, 0)    62%
	);
	pointer-events: none;
}

.ct-sales .ct-sales__tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Title overlaid, anchored bottom-left above the scrim. */
.ct-sales .ct-sales__tile-title {
	position: absolute;
	left: 22px;
	right: 22px;
	bottom: 20px;
	z-index: 2;
	font-family: var(--heading-font, "Space Grotesk"), system-ui, sans-serif;
	font-weight: 700;
	font-size: 23px;
	line-height: 1.15;
	letter-spacing: normal;
	color: #fff;
	margin: 0;
	text-transform: uppercase;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ct-sales .ct-sales__tile-body {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	color: #333;
	margin: 16px 0 0;
}

/* ---------- Browse band ---------- */

/* Tinted background sets the band apart from the white tile section and
 * the white CTA below it, matching the alternating tint convention used
 * for the OEM and Why-Rent sections in services.css / rentals.css. */
.ct-sales__browse {
	background: #f6f6f6;
	padding: 48px 0;
}

/* Left-heading / right-button row (spec §4 — the "before-CTA" variant).
 * The heading anchors left, the button floats right, both vertically
 * centered. gap handles spacing so neither element needs margin-top. */
.ct-sales__browse-layout {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

/* Zero out the default h2 bottom margin inside the flex row so the heading
 * aligns center without pushing the row taller. The BEM modifier class
 * gives us a cleaner override target than the double-class h2 rule. */
.ct-sales .ct-sales__browse-heading {
	margin: 0;
}

/* Browse button is a flex peer — remove the shared margin-top that was
 * designed for block-flow usage (copy → button stacked vertically). */
.ct-sales__browse .ct-sales__button {
	margin-top: 0;
	flex-shrink: 0;
}

/* ---------- Button ---------- */

.ct-sales .ct-sales__button {
	background: #F56A22;
	color: #fff;
	border: 1px solid #F56A22;
	border-radius: 0;
	padding: 16px 26px;
	margin-top: 32px;
	font-family: var(--heading-font, "Plus Jakarta Sans"), system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	min-height: 44px;
	text-decoration: none;
	transition: background 150ms ease, border-color 150ms ease;
	box-shadow: none;
	text-shadow: none;
}

.ct-sales .ct-sales__button:hover,
.ct-sales .ct-sales__button:focus-visible {
	background: #d44a1c;
	border-color: #d44a1c;
	color: #fff;
}

.ct-sales .ct-sales__button:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.ct-sales__arr {
	font-family: var(--e-global-typography-accent-font-family, "IBM Plex Mono"), monospace;
	font-weight: 500;
	font-size: 13px;
}

/* ---------- Bottom image band ---------- */

/* Centered band between Browse and the closing CTA — constrained to the
 * same 1200px inner width as the rest of the page content. */
.ct-sales__bottom-band {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	aspect-ratio: 16 / 5;
	overflow: hidden;
	background: #202428;
}

.ct-sales .ct-sales__bottom-band-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* ---------- Closing CTA ---------- */

.ct-sales__cta {
	padding: 64px 0 84px;
}

/* Cap the heading width so the long CTA line wraps to ~2 lines, not 4. */
.ct-sales .ct-sales__cta-title {
	max-width: 1040px;
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ct-sales .ct-sales__button { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.ct-sales .ct-sales__h1 { font-size: 34px; }
	.ct-sales .ct-sales__h2 { font-size: 34px; }
	.ct-sales__hero { padding: 44px 0 32px; }
	/* Tiles: 2-up at tablet width. */
	.ct-sales__tiles { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 640px) {
	/* Smaller body/lead type for narrow screens. Scoped to match the base
	 * rules' (0,2,0) specificity, or they'd lose the cascade. */
	.ct-sales .ct-sales__lead,
	.ct-sales .ct-sales__body { font-size: 18px; line-height: 1.55; }

	/* Bottom band: taller ratio on mobile so it has visual presence. */
	.ct-sales__bottom-band { aspect-ratio: 16 / 7; }

	/* Tighter vertical rhythm. */
	.ct-sales__hero { padding: 36px 0 28px; }
	.ct-sales__hiller { padding: 36px 0 40px; }
	.ct-sales__tiles-wrap { padding: 36px 0; }
	.ct-sales__browse { padding: 36px 0; }
	.ct-sales__cta { padding: 44px 0 56px; }

	/* Tiles: single column with a shorter 16:9 image so they don't tower. */
	.ct-sales__tiles { grid-template-columns: 1fr; }
	.ct-sales__tile-media { aspect-ratio: 16 / 9; }

	/* Browse band: stack heading above button; restore margin-top for spacing
	 * since gap still applies in column direction but the button rule zeroed it. */
	.ct-sales__browse-layout { flex-direction: column; align-items: flex-start; }
	.ct-sales__browse .ct-sales__button { margin-top: 16px; }
}
