/*
 * CaryTamura Ads & Social Media page (/ads/, Page 5620).
 *
 * SCOPE. Loaded on the ads page only (functions.php, is_page()), after
 * page-hero.css. It tunes that page's CT Page Hero band to the live ads hero,
 * lays out the intro (.ct-ads-intro) and the creative showcase
 * (.ct-ads-showcase: the images stacked and centred, each at the display
 * size set on its own Image widget) and places the global Work With Cary
 * template (.ct-ads-work-with). The template itself is untouched.
 *
 * VALUES. Measured from carytamura.com/ads at 1440, 1024, 768 and 375 wide
 * (FACT) unless marked. Sections framed in the 12px body padding down to 768,
 * edge to edge from 767.
 *
 * IMAGES. As live: each image has a fixed width AND height (set on its own
 * Image widget), and only the width is capped at the column, so a narrow
 * column squeezes the image rather than shortening it. The Instagram profile
 * alone has no dimensions live and scales with its own ratio.
 *
 * MOTION. Live has no entrance or hover animation (its images carry
 * Elementor's grow class, but no rule for it is loaded).
 */

/* ------------------------------------------------------------------ hero --
 * Live: a 600px band at every width, framed 12px on desktop, one flat 30%
 * black scrim over the photo (no top gradient), title centred and lifted by
 * its 30px bottom margin. */
.ct-page-hero.e-con {
	--width: calc(100% - 2 * var(--ct-body-padding));
	margin: var(--ct-body-padding) var(--ct-body-padding) 0;
	min-height: 0;
	height: 600px;
	padding: 0 20px;
}

.ct-page-hero::before {
	background-color: rgba(0, 0, 0, 0.3);
}

.ct-page-hero::after {
	content: none;
}

.ct-page-hero .ct-page-hero__title .elementor-heading-title {
	margin: 0 0 30px;
	font-size: var(--ct-size-h1);
	line-height: 1.1;
	letter-spacing: normal;
	text-transform: capitalize;
}

/* The page body's own padding is dropped: each section carries the live
 * spacing itself. */
.ct-page-body:has(.ct-ads-intro) {
	padding-block: 0;
}

/* --------------------------------------------------------- the sections --
 * Both framed 12px, content in a 1300px box (live: 1400px with 50px sides).
 * Intro: 96px above, then 48px below the copy's own 50px bottom margin.
 * Showcase: straight on, a 26px spacer, then the images, 50px + 96px below. */
.ct-ads-intro.e-con,
.ct-ads-showcase.e-con {
	--width: calc(100% - 2 * var(--ct-body-padding));
	--padding-left: max(50px, calc((100% - 2 * var(--ct-body-padding) - 1300px) / 2));
	--padding-right: max(50px, calc((100% - 2 * var(--ct-body-padding) - 1300px) / 2));
	--gap: 0px;
	--row-gap: 0px;
	--kit-widget-spacing: 0px;
	margin-inline: var(--ct-body-padding);
}

.ct-ads-intro.e-con {
	--padding-top: 96px;
	--padding-bottom: 98px;
}

.ct-ads-showcase.e-con {
	--padding-top: 26px;
	--padding-bottom: 146px;
	align-items: center;
}

.ct-ads-intro__title .elementor-heading-title {
	margin: 0 0 25px;
	font-family: var(--ct-font-display);
	font-size: 29px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	color: var(--ct-ink);
}

.ct-ads-intro__text,
.ct-ads-intro__text p {
	font-family: var(--ct-font-body);
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: 1px;
	text-align: center;
	color: var(--ct-ink);
}

.ct-ads-intro__text p {
	margin: 0;
}

.ct-ads-intro__text a {
	color: var(--ct-ink);
	text-decoration: none;
}

/* Each image at its own widget's width and height, never wider than the
 * column; no inline gap under it, so the stack runs edge to edge as live. */
.ct-ads-showcase .ct-ads-showcase__img.elementor-widget {
	width: 100%;
	text-align: center;
	line-height: 0;
}

.ct-ads-showcase .ct-ads-showcase__img img {
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
}

/* Live leaves one empty 26px line before the Instagram profile. */
.ct-ads-showcase .ct-ads-showcase__img--after-gap.elementor-widget {
	margin-top: 26px;
}

/* ------------------------------------------------------ work with cary -- */
.ct-ads-work-with.elementor-widget {
	--kit-widget-spacing: 0px;
	margin-block: 0;
	margin-inline: var(--ct-body-padding);
}

@media (min-width: 901px) and (max-width: 1024px) {
	.ct-ads-work-with .ct-work-with.e-con {
		min-height: 689px;
	}
}

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 1024px) {
	.ct-ads-intro.e-con {
		--padding-top: 64px;
	}

	.ct-ads-showcase.e-con {
		--padding-bottom: 114px;
	}
}

@media (max-width: 768px) {
	.ct-page-hero .ct-page-hero__title .elementor-heading-title {
		font-size: 48px;
	}

	.ct-ads-intro.e-con {
		--padding-bottom: 62px;
	}

	.ct-ads-showcase.e-con {
		--padding-bottom: 94px;
	}
}

@media (max-width: 767px) {
	.ct-page-hero.e-con {
		--width: 100%;
		margin: 0;
	}

	.ct-ads-intro.e-con,
	.ct-ads-showcase.e-con {
		--width: 100%;
		--padding-left: 25px;
		--padding-right: 25px;
		margin-inline: 0;
	}

	.ct-ads-intro__title .elementor-heading-title {
		font-size: 21px;
		line-height: 1.6;
		letter-spacing: 0.5px;
	}

	.ct-ads-work-with.elementor-widget {
		margin-inline: 0;
	}
}
