/* Advanced Machining & Tooling page (Figma 33535-16949 desktop, 33535-17192 + 33535-17193 mobile) */
@media (max-width: 781px) {
	/* Hero section 60px/20px, card 24px, logo 265px wide (33535:17163/17168/17175) */
	.cmp-amt-hero {
		padding: 60px var(--wp--preset--spacing--40) !important;
	}

	.cmp-amt-hero-card {
		padding: 24px !important;
	}

	.cmp-amt-hero-card .cmp-amt-hero-logo img {
		width: 265px !important;
	}

	/* Mobile feature cards: 24px/16px padding, content-driven height (33535:17202) */
	.cmp-amt-feature-grid .cmp-fgc-card {
		padding: 24px 16px !important;
		min-height: 0 !important;
	}

	/* Card headings run a single line on the mobile artboard (33535:17207) */
	.cmp-amt-feature-grid .cmp-fgc-card h3 br {
		display: none;
	}

	/* Row inset is a desktop-only alignment device (cards x=96 vs content x=80) */
	.cmp-amt-feature-grid .cmp-fgc-row {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Column groups (not bare <p>s like the industry pages) must stack on mobile */
@media (max-width: 781px) {
	.cmp-amt-twocol .cmp-atc-cols > .wp-block-group {
		flex-basis: 100% !important;
	}
}

/* External markup round pins 42, 43, 53, 54 and 64 (2026-09-10) — the
 * logo-only facility hero card (patterns/amt-hero-logo-only.php).
 *
 * "way smaller, please" (42, accu-tool), "too large" (53 douglas, 54
 * bergeron), "this is huge" (64, tri-tec) and "contrast legibility?" (43).
 *
 * Every facility forced its logo to 604px wide whatever the source measured,
 * so the card's height swung from 153px to 278px across the eleven pages and
 * the smaller marks were being upscaled badly — Accu-Tool 1.6x from a 382px
 * original, Tri-Tec 2.6x from 228px, Quality Products 2.8x from 214px.
 *
 * Capping both axes and letting the intrinsic size win below the cap fixes
 * all three complaints at once: the marks land at a consistent visual weight,
 * nothing is enlarged past its own pixels, and the caps still hold when the
 * client's replacement logos arrive (pins 12 / 79).
 */
.cmp-amt-hero-card .cmp-amt-hero-logo img {
	width: auto !important;
	height: auto !important;
	max-width: min(320px, 100%);
	max-height: 96px;
	object-fit: contain;
}

/* Internal pins 61 / 62 (2026-09-11): the aligncenter figure is a
 * shrink-to-fit table, and its intrinsic width comes from the img's 96px
 * height cap alone (1200x293 Quality Products -> 393px, Trutron -> 374px),
 * while the img itself then stops at the 320px cap. That left the image
 * flush-left inside a wider figure on the two widest marks. Cap the figure
 * the same way so it always hugs the image. */
.cmp-amt-hero-card .cmp-amt-hero-logo {
	max-width: min(320px, 100%);
}

/* Pin 43 — the location line sat in theme-05 on the #112241 card, which is
 * the palette's quietest tone against one of its darkest surfaces. White
 * clears it; the uppercase treatment still separates it from the description
 * underneath. */
.cmp-amt-hero-card p.has-theme-05-color {
	color: var(--wp--preset--color--theme-01) !important;
}

/* External markup round pins 44 and 51 (2026-09-10) — "can we make these
 * boxes a little shorter?" (accu-tool) and, on bergeron, "there are pretty big
 * variances in the quantity of copy vs. other facilities ... we aren't left
 * with these long empty boxes."
 *
 * The block markup pins every capability box to min-height:534px inline, so a
 * 79-character box carried roughly 450px of dead space while a 208-character
 * one only just filled its frame. cmp-amt.css already released that on mobile;
 * this releases it everywhere and lets the row equalise instead, so each row
 * is as tall as its own tallest card and no taller. A floor keeps a single
 * short box from collapsing into a strip.
 *
 * The copy-length variance itself is pin 51's other half and stays with the
 * client — this only stops the layout amplifying it.
 */
.cmp-amt-feature-grid .cmp-fgc-row {
	align-items: stretch !important;
}

.cmp-amt-feature-grid .cmp-fgc-card {
	display: flex;
	flex-direction: column;
}

/* The 280px floor is a desktop-row concern; on the single-column mobile grid
 * it only left dead space under short copy (mobile review 2026-09-11, M5). */
@media (min-width: 782px) {
	.cmp-amt-feature-grid .cmp-fgc-card {
		min-height: 280px !important;
	}
}

/* Mobile review 2026-09-11 (M6): the desktop <br> in the testimonial quote
 * orphaned "manufacture," on its own line at 390. */
@media (max-width: 781px) {
	/* The block copy carries "manufacture, <br>but" (space before the br, added
	 * 2026-09-11 so the hidden break still leaves a word space). */
	.cmp-amt-testimonial p br {
		display: none;
	}
}
