/* Even, tight gap above the x = any Provider photo band on inner pages
   (1.7.9.39). Switch: xl_inner_band_gap_enabled (default off).
   Scope: body.xl-ibg-on, every page except the homepage (the homepage
   keeps its own even-gap switch).
   Target: 24px from the last visible content to the top of the photo
   band, on desktop and on phone. That is a little more breath than the
   16px already used under the From the blog strip, and tighter than the
   48px to 107px leftover padding on the blog index, referral, recruiters,
   featured-jobs, listings, login, and location archive pages.
   The band heading stays upright (font-style: normal), not italic.
   CSS only. No Elementor data, theme templates, JobBank or CF7 settings
   are edited. Do not use the less-than or greater-than characters in
   comments. */

/* Keep the band flush to the content shell. The visual gap comes from
   the last block's trailing padding, not from a margin on the band. */
body.xl-ibg-on:not(.home) .xl-footer-band.xl-footer-band--ready {
	margin-top: -1px !important;
}

/* Band heading stays upright. */
body.xl-ibg-on .xl-footer-band__heading {
	font-style: normal !important;
}

/* ----- Zero leftover bottom space on the content shell ----- */
body.xl-ibg-on:not(.home) #content,
body.xl-ibg-on:not(.home) #content > .ast-container,
body.xl-ibg-on:not(.home) #primary,
body.xl-ibg-on:not(.home) #content .site-main,
body.xl-ibg-on:not(.home) #content article.page,
body.xl-ibg-on:not(.home) #content article.post,
body.xl-ibg-on:not(.home) #content .entry-content {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* ----- Last blocks: one 24px trailing space ----- */

/* From the blog strip (About, FAQ, Licensing, profession and specialty
   pages, Find Locums Jobs, Submit Your CV, and others). Was 16px. */
body.xl-ibg-on:not(.home) #content .xl-il-strip {
	padding-bottom: 24px !important;
	margin-bottom: 0 !important;
}

/* Blog index newsletter bar. Was 48px margin under the bar. */
body.xl-ibg-on:not(.home) #content .xl-blog-nl-bar,
body.xl-ibg-on:not(.home) #xl-blog-nl-bar {
	margin-bottom: 24px !important;
}

/* Refer a Clinician: the article and the body each added 40px (80px total). */
body.xl-ibg-on:not(.home) article.xl-ref {
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}
body.xl-ibg-on:not(.home) .xl-ref__body {
	padding-bottom: 24px !important;
}

/* For Recruiters: 48px body padding plus a 60px theme margin on #primary. */
body.xl-ibg-on:not(.home) .xl-rp__body {
	padding-bottom: 24px !important;
}

/* Featured Jobs (inner page only, not the homepage block). Was 80px. */
body.xl-ibg-on:not(.home) #content .xl-fj {
	padding-bottom: 24px !important;
}

/* Single blog post: sidebar / related cards left 40-45px. */
body.xl-ibg-on:not(.home).single-post #content {
	padding-bottom: 24px !important;
}
body.xl-ibg-on:not(.home) #secondary {
	margin-bottom: 0 !important;
}
body.xl-ibg-on:not(.home) #secondary .widget:last-child {
	margin-bottom: 0 !important;
}

/* JobBank profession, specialty and location archives: Bootstrap py-5
   left about 48-54px under the pagination. */
body.xl-ibg-on:not(.home) #content section.py-5 {
	padding-bottom: 24px !important;
}

/* Single job ad: the side card sat almost on the band (about 7-16px). */
body.xl-ibg-on:not(.home) #content .xl-jl {
	padding-bottom: 24px !important;
	margin-bottom: 0 !important;
}

/* Elementor pages whose last content is the Elementor section itself
   (Contact, All Listings, Login, and similar). Skipped when a plugin
   block already supplies the 24px trailing space, so those paddings
   do not stack. */
body.xl-ibg-on:not(.home) #content:not(:has(.xl-il-strip)):not(:has(.xl-blog-nl-bar)):not(:has(.xl-fj)):not(:has(.xl-rp)):not(:has(.xl-ref)):not(:has(.xl-jl)):not(:has(section.py-5)) .elementor > .elementor-top-section:last-of-type {
	padding-bottom: 24px !important;
}
body.xl-ibg-on:not(.home) #content:not(:has(.xl-il-strip)):not(:has(.xl-blog-nl-bar)):not(:has(.xl-fj)):not(:has(.xl-rp)):not(:has(.xl-ref)):not(:has(.xl-jl)):not(:has(section.py-5)) .elementor > .elementor-top-section:last-of-type > .elementor-container > .elementor-column > .elementor-widget-wrap {
	padding-bottom: 0 !important;
}

@media (max-width: 767px) {
	/* Same 24px target on phones. The rules above already apply;
	   this block is only here so a future phone-only tweak has a home. */
	body.xl-ibg-on:not(.home) #content .xl-il-strip,
	body.xl-ibg-on:not(.home) .xl-ref__body,
	body.xl-ibg-on:not(.home) .xl-rp__body,
	body.xl-ibg-on:not(.home) #content .xl-fj,
	body.xl-ibg-on:not(.home) #content .xl-jl,
	body.xl-ibg-on:not(.home) #content section.py-5,
	body.xl-ibg-on:not(.home) #content:not(:has(.xl-il-strip)):not(:has(.xl-blog-nl-bar)):not(:has(.xl-fj)):not(:has(.xl-rp)):not(:has(.xl-ref)):not(:has(.xl-jl)):not(:has(section.py-5)) .elementor > .elementor-top-section:last-of-type {
		padding-bottom: 24px !important;
	}
	body.xl-ibg-on:not(.home) #content .xl-blog-nl-bar,
	body.xl-ibg-on:not(.home) #xl-blog-nl-bar {
		margin-bottom: 24px !important;
	}
}
