/* ==========================================================================
   Page background — global off-white (--light-bg / --page-bg)
   Default: #FBFCFE. Crne sekcije ostaju netaknute.
   ========================================================================== */

/* Sve stranice osim kontakta (tamna full-page) */
body:not(.is-contact-page) {
	background-color: var(--light-bg);
}

/*
 * Glavne svijetle sekcije — samo root elementi s page-level bijelom pozadinom.
 * Namjerno ISKLJUČENO: crne sekcije, UI elementi, kartice, gumbi, navigacija.
 */
body:not(.is-contact-page) :is(
	.wm-hero,
	.wm-hero__atmosphere,
	.wm-portfolio-preview,
	.wm-results,
	.wm-clients,
	.wm-home-about,
	.wm-svc-editorial,
	.wm-home-blog,
	.wm-blog-page__hero,
	.wm-blog-page__list,
	.wm-blog-single,
	.wm-testimonials:not(.wm-testimonials--dark),
	.wm-testimonials-editorial,
	.wm-faq,
	.wm-sp-hero,
	.wm-sp-services,
	.wm-sp-faq,
	.wm-sp-ed-list,
	.wm-pt-hero,
	.wm-ab-intro__media,
	.wm-ab-stats,
	.wm-ab-clients,
	.wm-sp-clients,
	.wm-ab-reviews,
	.wm-home-services--partner-light,
	.wm-ptnr-projects,
	.wm-sp-featured,
	.wm-pt-intro,
	.wm-pt-grid,
	.process-section,
	.wm-proof,
	.partners-section,
	.reviews-section,
	.wm-home-cta,
	.wm-svc-approach,
	.wm-svc-included,
	.wm-svc-audience,
	.wm-home-cta--services-page,
	.about-ed,
	.portfolio-page-process,
	.portfolio-page-cta
) {
	background-color: var(--light-bg);
}

/*
 * Page wrappers must stay transparent so the last light section's
 * bottom radius reveals the black footer canvas (O nama / global system).
 * Do NOT paint light backgrounds on wrapping <article> elements —
 * except single blog article, which is itself the light content surface.
 */
body:not(.is-contact-page) .wm-main > article:not(.wm-blog-single) {
	background-color: transparent;
}

body:not(.is-contact-page) .wm-main > article.wm-blog-single,
body.is-blog-single .wm-blog-single {
	background-color: var(--light-bg, #fbfcfe);
	color: var(--color-ink-black, #000);
}

body.is-blog-single .wm-main {
	background: var(--light-bg, #fbfcfe);
}

/* Last light section — shared footer transition (beats page-specific overrides) */
body:not(.is-contact-page) .wm-main > section:last-child,
body:not(.is-contact-page) .wm-main > article:last-child > section:last-child,
body:not(.is-contact-page) .wm-main > .wm-prefooter-cta:last-child,
body:not(.is-contact-page) .wm-main > .wm-global-prefooter-cta:last-child {
	border-bottom-left-radius: var(--wm-footer-content-radius, clamp(28px, 3.5vw, 40px));
	border-bottom-right-radius: var(--wm-footer-content-radius, clamp(28px, 3.5vw, 40px));
	overflow: hidden;
	position: relative;
	z-index: 20;
}

@media (max-width: 768px) {
	body:not(.is-contact-page) .wm-main > section:last-child,
	body:not(.is-contact-page) .wm-main > article:last-child > section:last-child,
	body:not(.is-contact-page) .wm-main > .wm-prefooter-cta:last-child,
	body:not(.is-contact-page) .wm-main > .wm-global-prefooter-cta:last-child {
		border-bottom-left-radius: var(--wm-footer-content-radius-mobile, clamp(18px, 5vw, 24px));
		border-bottom-right-radius: var(--wm-footer-content-radius-mobile, clamp(18px, 5vw, 24px));
	}
}

/* O nama — čisto bijela podloga (bez svijetloplavog --light-bg / #FBFCFE) */
body.is-about-page {
	--light-bg: #ffffff;
	--page-bg: #ffffff;
	background-color: #ffffff;
}

body.is-about-page:not(.is-contact-page) .wm-main {
	background-color: #111111; /* footer reveal canvas — keep black */
}

body.is-about-page:not(.is-contact-page) :is(
	.wm-ab-intro,
	.wm-ab-clients,
	.wm-ab-reviews,
	.wm-ab-stats,
	.wmx-values-section
) {
	background-color: #ffffff;
}

/* O nama — Kako radimo (crna editorial sekcija) */
body.is-about-page .wm-ab-why {
	background-color: #111111;
}

body.is-about-page .wmx-values-section,
body.is-services-page .wmx-values-section,
body.is-services-page .wm-ab-clients {
	background-color: #ffffff;
}

/* B2B — crne sekcije (mora biti specifičnije od globalnog light-bg pravila) */
body.is-partner-page:not(.is-contact-page) :is(
	.wm-ptnr-hero,
	.wm-ptnr-intro
) {
	background-color: #111111;
}

/* Usluge — crni editorial proces */
body.is-services-page:not(.is-contact-page) .wm-sp-process--editorial {
	background-color: #111111;
}

/* B2B — svijetli editorial proces */
body.is-partner-page:not(.is-contact-page) .wm-sp-process--editorial {
	background-color: var(--light-bg);
}

/* B2B — usluge panel (light) */
body.is-partner-page:not(.is-contact-page) .wm-home-services--partner-light {
	background-color: var(--light-bg);
}
