/*
 * YouthMonk clients: homepage logo strip (#3367, under the stats row) and the Work page "Current projects" cards (#3676).
 * Data: Site settings client_{1-6}_*. An empty name hides that slot; an empty logo shows the name as a text wordmark.
 * This file prints before Elementor's CSS: overrides of `.elementor .e-div-block-base` / `.elementor .ym-*` (0,2,0)
 * carry one extra class (.e-con) so they win.
 */

/* ---------- Shared: links, logo, wordmark fallback ---------- */
.elementor a.e-con:is(.ym-client-logo, .ym-client-card),
.elementor a.e-con:is(.ym-client-logo, .ym-client-card):visited { text-decoration: none; color: inherit; }
.elementor .ym-client-img:not([src]),
.elementor .ym-client-img[src=""] { display: none; }
/* Monochrome: every logo becomes a flat silhouette so it sits in the black / white / lime system. */
.elementor .ym-client-img { filter: brightness(0); object-fit: contain; }
.elementor .ym-client-wordmark { display: none; font-family: Archivo, sans-serif; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #0A0A0A; white-space: nowrap; }
.elementor :is(.ym-client-logo, .ym-client-mark):not(:has(.ym-client-img[src]:not([src=""]))) .ym-client-wordmark { display: block; }

/* Empty slots collapse; with no client at all the strip / section goes too. */
.ym-client-logo:has(.ym-client-wordmark:empty),
.ym-client-card:has(.ym-client-name:empty),
.ym-clients-strip:not(:has(.ym-client-wordmark:not(:empty))),
.ym-section.ym-clients:not(:has(.ym-client-name:not(:empty))) { display: none !important; }

/* ---------- Homepage strip ---------- */
.elementor .e-con.ym-clients-strip { margin-block-start: 64px; padding-block-start: 32px; border-top: 1px solid #E4E4DF; flex-direction: row; align-items: center; gap: 48px; }
.elementor .ym-clients-strip > .ym-eyebrow { flex: none; }
.elementor .e-con.ym-client-logos { flex: 1 1 auto; min-width: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 40px; }
/* One ~3:1 box with contain: stacked marks fill its height, wide ones its width, so they land at similar weight.
   No wrap: with up to six clients the boxes shrink together rather than orphaning one on a second line. */
.elementor .e-con.ym-client-logo { flex: 0 1 168px; height: 52px; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; opacity: 0.72; transition: opacity 200ms ease; }
.elementor .ym-client-logo .ym-client-img { width: 100%; height: 100%; }
.elementor .ym-client-logo .ym-client-wordmark { font-size: 22px; white-space: normal; text-align: center; }
.elementor a.e-con.ym-client-logo:is(:hover, :focus-visible) { opacity: 1; }

@media (max-width: 1024px) {
	.elementor .e-con.ym-clients-strip { flex-direction: column; align-items: stretch; gap: 24px; }
	.elementor .e-con.ym-client-logos { gap: 24px; }
}
@media (max-width: 767px) {
	.elementor .e-con.ym-clients-strip { margin-block-start: 48px; padding-block-start: 24px; }
	.elementor .e-con.ym-client-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; justify-items: center; }
	.elementor .e-con.ym-client-logo { width: 148px; height: 48px; }
	.elementor .ym-client-logo .ym-client-wordmark { font-size: 20px; }
}

/* ---------- Work page: Current projects ---------- */
.elementor .e-con.ym-clients-head { padding: 0; display: flex; flex-direction: column; gap: 20px; }
.elementor .e-con.ym-client-cards { padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
/* Cards are ym-quote-card (surface #F4F4F1, dark #161616, revealed per section) set to the case-card padding and rhythm.
   Not ym-case-card: that one is white for the grey Results band, and motion_test treats all case cards as one grid. */
.elementor .ym-quote-card.ym-client-card { padding: 32px; gap: 12px; min-width: 0; }
.elementor .ym-client-card .ym-client-visit { transition: color 200ms ease; }
.elementor a.ym-client-card:hover .ym-client-visit { color: #4F6F00; }
.elementor .e-con.ym-client-meta { padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.4em; }
.elementor .e-con.ym-client-mark { width: 100%; height: 56px; min-width: 0; padding: 0; margin-block: 12px 8px; display: flex; align-items: center; }
.elementor .ym-client-mark .ym-client-img { width: 176px; max-width: 100%; height: 100%; object-position: left center; }
.elementor .ym-client-mark .ym-client-wordmark { font-size: 26px; }
/* No logo: the wordmark already shows the name, so the h3 stays for screen readers only (the tile is aria-hidden). */
.elementor .ym-client-card:not(:has(.ym-client-img[src]:not([src=""]))) .ym-client-name { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.elementor .ym-h3.ym-client-name { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
.elementor .ym-body.ym-client-summary { font-size: 16px; line-height: 1.5; }
.elementor .ym-explore.ym-client-visit { margin-block-start: auto; padding-block-start: 12px; }

@media (max-width: 1024px) {
	.elementor .e-con.ym-client-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.elementor .e-con.ym-client-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.elementor .ym-quote-card.ym-client-card { padding: 24px; }
	.elementor .e-con.ym-client-mark { height: 48px; margin-block: 8px 4px; }
	.elementor .ym-h3.ym-client-name { font-size: 24px; }
}

/* ---------- Dark theme (html[data-theme="dark"]) ---------- */
html[data-theme="dark"] .elementor .ym-client-img { filter: brightness(0) invert(1); }
html[data-theme="dark"] .elementor .ym-client-wordmark { color: #FFFFFF; }
html[data-theme="dark"] .elementor .e-con.ym-clients-strip { border-top-color: #2A2A2A; }
html[data-theme="dark"] .elementor a.ym-client-card:hover .ym-client-visit { color: #D4F36B; }
