/* NLS Dynamic Content — Phase 4.2.1 UI hotfix
   Header gap on all managed surfaces, footer flush, contact/CF7, Welcome overlay,
   mandate card content padding. Enqueued after nls-phase42.css at version 1.4.1.
*/

/* --------------------------------------------------------------------------
   1. Remaining top gap. LawSight theme.css:3584 / 3690 at min-width 992px:
      #header-wrap.header-layout1|2 .header-main:not(.h-fixed) { margin-top: 29px }
      Phase 4.2 scoped the override to body.nls-dc.home only.
   -------------------------------------------------------------------------- */

body.nls-dc #header-wrap,
body.nls-dc #header-wrap.header-layout1,
body.nls-dc #header-wrap.header-layout2,
body.nls-dc #header-wrap.header-trans,
body.nls-dc #masthead,
body.nls-managed #header-wrap,
body.nls-managed #masthead {
	margin-top: 0;
	padding-top: 0;
}

body.nls-dc #header-wrap .header-top-bar,
body.nls-managed #header-wrap .header-top-bar {
	margin-top: 0;
	padding-top: 0;
}

body.nls-dc #header-wrap.header-layout1 .header-main:not(.h-fixed),
body.nls-dc #header-wrap.header-layout2 .header-main:not(.h-fixed),
body.nls-managed #header-wrap.header-layout1 .header-main:not(.h-fixed),
body.nls-managed #header-wrap.header-layout2 .header-main:not(.h-fixed) {
	margin-top: 0 !important; /* LawSight 29px public gap; all NLS-managed surfaces */
	padding-top: 0;
}

body.nls-dc #header-wrap .header-main.h-fixed,
body.nls-managed #header-wrap .header-main.h-fixed {
	margin-top: 0;
}

body.nls-dc:not(.admin-bar),
body.nls-dc:not(.admin-bar) #page,
body.nls-dc:not(.admin-bar) .site {
	margin-top: 0;
	padding-top: 0;
}

/* Homepage: keep the navbar absolutely over the hero. */
body.nls-dc.home #header-wrap.header-trans,
body.nls-home #header-wrap.header-trans,
body.nls-homepage #header-wrap.header-trans {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
}

body.nls-dc.home .nls-home-hero {
	margin-top: 0;
	padding-top: 0;
}

body.admin-bar.nls-dc.home #header-wrap.header-trans,
body.admin-bar.nls-home #header-wrap.header-trans,
body.admin-bar.nls-homepage #header-wrap.header-trans {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar.nls-dc.home #header-wrap.header-trans,
	body.admin-bar.nls-home #header-wrap.header-trans,
	body.admin-bar.nls-homepage #header-wrap.header-trans {
		top: 46px;
	}
}

body.nls-dc #wpadminbar,
body.nls-managed #wpadminbar {
	display: block;
}

/* Inner managed pages: header stays in document flow. */
body.nls-page-managed #header-wrap.header-trans,
body.nls-managed.nls-inner-hero #header-wrap.header-trans,
body.nls-page-service #header-wrap.header-trans,
body.nls-page-committee #header-wrap.header-trans {
	position: relative;
	top: auto;
	left: auto;
	right: auto;
	margin-bottom: 0;
	padding-bottom: 0;
}

body.nls-page-managed .header-main,
body.nls-managed.nls-inner-hero .header-main {
	margin-bottom: 0;
}

body.nls-page-managed .nls-inner-page-hero,
body.nls-page-service .nls-inner-page-hero,
body.nls-page-committee .nls-inner-page-hero,
body.nls-managed.nls-inner-hero .nls-inner-page-hero {
	margin-top: 0;
	padding-top: 0;
	width: 100%;
	max-width: none;
}

/* --------------------------------------------------------------------------
   2. Footer bottom/base flush with the page. Wrapper stays transparent.
   -------------------------------------------------------------------------- */

.nls-dc footer.nls-owned-footer {
	background-color: transparent;
	background-image: none;
}

.nls-dc .nls-owned-footer__bottom,
.nls-dc .nls-owned-footer__base {
	margin: 0;
	margin-top: 0;
	margin-block: 0;
}

/* --------------------------------------------------------------------------
   3. Contact background is owned by the section/background system.
   -------------------------------------------------------------------------- */

.nls-dc .nls-contact {
	background-color: transparent;
}

.nls-dc .nls-contact__overlay {
	background: transparent;
	background-image: none;
}

.nls-dc .nls-contact.nls-section-bg--light,
.nls-dc .nls-contact.nls-section-bg--light .nls-home-heading__title,
.nls-dc .nls-contact.nls-section-bg--light .nls-home-heading__intro,
.nls-dc .nls-contact.nls-section-bg--light .nls-home-heading__intro p,
.nls-dc .nls-contact.nls-section-bg--light .nls-section-title,
.nls-dc .nls-contact.nls-section-bg--light .nls-section-intro,
.nls-dc .nls-contact.nls-section-bg--light .nls-contact__details,
.nls-dc .nls-contact.nls-section-bg--light .nls-contact__row dd,
.nls-dc .nls-contact.nls-section-bg--light .nls-contact__email,
.nls-dc .nls-contact.nls-section-bg--light .nls-contact__form label {
	color: var(--nls-navy);
}

.nls-dc .nls-contact.nls-section-bg--dark,
.nls-dc .nls-contact.nls-section-bg--dark .nls-home-heading__title,
.nls-dc .nls-contact.nls-section-bg--dark .nls-home-heading__intro,
.nls-dc .nls-contact.nls-section-bg--dark .nls-section-title,
.nls-dc .nls-contact.nls-section-bg--dark .nls-section-intro,
.nls-dc .nls-contact.nls-section-bg--dark .nls-contact__row dd,
.nls-dc .nls-contact.nls-section-bg--dark .nls-contact__email,
.nls-dc .nls-contact.nls-section-bg--dark .nls-contact__form label {
	color: var(--nls-ivory);
}

/* --------------------------------------------------------------------------
   4. CF7 fields fill the NLS contact column. Scope: .nls-contact only.
      CF7 core inputs default to width: 24em; p wrappers may inherit a
      half-width LawSight contact-form layout.
   -------------------------------------------------------------------------- */

.nls-dc .nls-contact .wpcf7,
.nls-dc .nls-contact .wpcf7-form,
.nls-dc .nls-contact .wpcf7-form > p,
.nls-dc .nls-contact .wpcf7-form p,
.nls-dc .nls-contact .wpcf7-form-control-wrap,
.nls-dc .nls-contact .wpcf7 input[type="text"],
.nls-dc .nls-contact .wpcf7 input[type="email"],
.nls-dc .nls-contact .wpcf7 input[type="tel"],
.nls-dc .nls-contact .wpcf7 input[type="url"],
.nls-dc .nls-contact .wpcf7 select,
.nls-dc .nls-contact .wpcf7 textarea {
	display: block;
	float: none;
	width: 100% !important; /* LawSight/CF7 24em and half-width p wrappers */
	max-width: none !important;
	box-sizing: border-box;
}

.nls-dc .nls-contact .wpcf7 textarea {
	min-height: 8rem;
	height: auto;
}

.nls-dc .nls-contact .wpcf7 .wpcf7-submit,
.nls-dc .nls-contact .wpcf7 input[type="submit"] {
	display: inline-block;
	width: auto;
	min-width: 8rem;
	min-height: 44px;
	max-width: 100%;
}

.nls-dc .nls-contact .wpcf7-not-valid-tip {
	display: block;
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   5. Hide empty CF7 response chrome until a genuine result state.
   -------------------------------------------------------------------------- */

.nls-dc .nls-contact .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.init .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.resetting .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.submitting .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7-response-output:empty {
	display: none;
	border: 0;
	margin: 0;
	padding: 0;
}

.nls-dc .nls-contact .wpcf7 form.sent .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.invalid .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.failed .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.aborted .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.spam .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.unaccepted .wpcf7-response-output,
.nls-dc .nls-contact .wpcf7 form.payment-required .wpcf7-response-output {
	display: block;
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
}

/* --------------------------------------------------------------------------
   6. Mandate / service card content padding. Image is unpadded.
   -------------------------------------------------------------------------- */

.nls-dc .nls-service-card,
.nls-dc .nls-service-card .nls-card-inner,
.nls-dc .nls-service-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
}

.nls-dc .nls-service-card__media {
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
}

.nls-dc .nls-service-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.35rem;
	gap: 0.65rem;
}

.nls-dc .nls-service-card__body .nls-card-title,
.nls-dc .nls-service-card__body .nls-card-text,
.nls-dc .nls-service-card__body .nls-card-cta {
	padding: 0;
	margin-left: 0;
	margin-right: 0;
}

.nls-dc .nls-service-card__body .nls-card-cta {
	margin-top: auto;
	padding-top: 0.5rem;
}

body.home .nls-service-card__body {
	padding: 1.25rem 1.35rem 1.35rem;
}

/* --------------------------------------------------------------------------
   7–8. Shared Welcome visual + bounded overlay (homepage and About Us).
   -------------------------------------------------------------------------- */

.nls-dc .nls-home-about__visual {
	position: relative;
	overflow: hidden;
	height: 100%;
	min-height: 560px;
	background-color: transparent;
}

.nls-dc .nls-home-about__image,
.nls-dc .nls-home-about__image.wpa-alt {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-width: none;
	object-fit: cover;
	position: absolute;
	inset: 0;
}

.nls-dc .nls-home-about__overlay,
.nls-dc .nls-home-about__logo,
.nls-dc .nls-home-about__logo.nls-home-about__overlay {
	position: absolute;
	left: 1.5rem;
	top: 1.5rem;
	bottom: auto;
	width: clamp(110px, 18%, 190px);
	max-width: 190px;
	height: auto;
	max-height: calc(100% - 3rem);
	object-fit: contain;
	object-position: left top;
	z-index: 2;
	pointer-events: none;
}

@media (min-width: 1024px) {
	.nls-dc .nls-home-about__visual {
		min-height: 620px;
		height: 100%;
	}
}

@media (max-width: 767px) {
	.nls-dc .nls-home-about__visual {
		min-height: 0;
		aspect-ratio: 4 / 3;
		height: auto;
	}

	.nls-dc .nls-home-about__overlay,
	.nls-dc .nls-home-about__logo,
	.nls-dc .nls-home-about__logo.nls-home-about__overlay {
		width: clamp(110px, 22%, 160px);
		left: 1.25rem;
		top: 1.25rem;
		bottom: auto;
	}
}
