/*
 * 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).
 */

/* 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: 100%;
	--padding-left: max(var(--ct-gutter), calc((100% - var(--ct-max)) / 2));
	--padding-right: max(var(--ct-gutter), calc((100% - var(--ct-max)) / 2));
	--gap: 0px;
	--row-gap: 0px;
	--kit-widget-spacing: 0px;
}

.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;
}

/* 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;
}

/* ---------------------------------------------------------- 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-ads-intro.e-con {
		--padding-bottom: 62px;
	}

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

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

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