/**
 * simplydwell/community-incentive-banner
 * ─ .sd-cib--image : full-width promo image, optionally wrapped in a link
 * ─ .sd-cib--text  : title + description + CTA pill over a colour or background image
 *
 * Brand tokens match the rest of the theme: dark #1F242E, accent #EA6E24,
 * gold #E2BB61, muted #C8C8C8, Lexend throughout. Width and gutters follow the
 * site's 1440px content measure and --nc-content-gutter, so the banner lines up
 * with the community sections above and below it.
 */

.sd-cib {
	box-sizing: border-box;
	width: 100%;
}

.sd-cib__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding:0px;
}

/* =============================================================================
   Image banner
   ============================================================================= */

.sd-cib--image {
	padding: clamp(48px, 9vw, 70px) clamp(24px, 6vw, 120px);
	background-color: #f5f0e8;
}

.sd-cib__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* The whole image is the link target — a quiet lift so it reads as clickable. */
.sd-cib__link {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	transition: opacity 0.18s ease;
}

.sd-cib__link:hover,
.sd-cib__link:focus-visible {
	opacity: 0.92;
}

.sd-cib__link:focus-visible {
	outline: 2px solid #EA6E24;
	outline-offset: 3px;
}

/* Editor-only stand-in shown before an image is chosen. */
.sd-cib__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	border: 1px dashed #C8C8C8;
	border-radius: 8px;
	background: #FAF8F5;
	font-family: 'Lexend', sans-serif;
	font-size: 14px;
	color: #737A87;
	text-align: center;
}

/* =============================================================================
   Text banner
   ============================================================================= */

.sd-cib--text {
	padding: clamp(28px, 4vw, 48px) 0;
	background-color: var(--sd-cib-bg, #1F242E);
}

/* Background image sits over the colour, which stays as the loading fallback. */
.sd-cib--text.has-bg-image {
	background-image: var(--sd-cib-bg-image);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.sd-cib--text .sd-cib__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: clamp(20px, 3vw, 48px);
}

.sd-cib__copy {
	min-width: 0;
}

.sd-cib__title {
	margin: 0 0 10px;
	font-family: 'Lexend', sans-serif;
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.2;
	color: #FFFFFF;
}

.sd-cib__desc {
	margin: 0;
	font-family: 'Lexend', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #C8C8C8;
}

/* Same pill as the site's primary buttons. */
.sd-cib__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	/* border-box so the full-width mobile variant below stays inside the gutter —
	   without it, width:100% adds the 32px side padding and overflows. */
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 32px;
	border: 1.5px solid #EA6E24;
	border-radius: 31px;
	background: #EA6E24;
	font-family: 'Lexend', sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	color: #FFFFFF;
	transition: filter 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.sd-cib__cta:hover,
.sd-cib__cta:focus-visible {
	filter: brightness(0.92);
	color: #FFFFFF;
}

.sd-cib__cta:focus-visible {
	outline: 2px solid #E2BB61;
	outline-offset: 2px;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 860px) {
	.sd-cib__inner {
		padding: 0 var(--nc-content-gutter, 20px);
	}

	/* Stack the copy above the CTA and centre the band on narrow screens. */
	.sd-cib--text .sd-cib__inner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
		gap: 20px;
	}

	.sd-cib__cta {
		align-self: center;
	}
}

@media (max-width: 480px) {
	.sd-cib--image {
		padding: 16px 0;
	}

	.sd-cib__desc {
		font-size: 15px;
	}

	/* Full-width tap target rather than a cramped pill. */
	.sd-cib__cta {
		width: 100%;
	}
}

/* =============================================================================
   Popup modal
   ============================================================================= */

/* Disable body scrolling when Image + Form popup is open */
body.sd-cib-popup-open {
	overflow: hidden;
}

.sd-cib-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sd-cib-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.sd-cib-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.sd-cib-modal__content {
	position: relative;
	z-index: 10000;
	max-width: 90vw;
	max-height: 90vh;
	width: 100%;
	background: #FFFFFF;
	border-radius: 8px;
	overflow: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Close button in top-right corner */
.sd-cib-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10001;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #1F242E;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.18s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sd-cib-modal__close:hover,
.sd-cib-modal__close:focus-visible {
	background: #FFFFFF;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sd-cib-modal__close:focus-visible {
	outline: 2px solid #EA6E24;
	outline-offset: 2px;
}

/* Popup banner content adjustments */
.sd-cib-modal .sd-cib--image {
	padding: clamp(32px, 6vw, 48px) clamp(20px, 4vw, 40px);
	background-color: #FFFFFF;
}

.sd-cib-modal .sd-cib--text {
	padding: clamp(32px, 6vw, 48px) clamp(20px, 4vw, 40px);
}

.sd-cib-modal .sd-cib--text .sd-cib__inner {
	flex-direction: column;
	align-items: stretch;
	text-align: center;
	gap: 20px;
}

.sd-cib-modal .sd-cib__cta {
	align-self: center;
	max-width: 280px;
}

/* Mobile popup adjustments */
@media (max-width: 480px) {
	.sd-cib-modal__content {
		max-width: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	.sd-cib-modal__close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 28px;
	}

	.sd-cib-modal .sd-cib--image {
		padding: 16px;
	}

	.sd-cib-modal .sd-cib--text {
		padding: 20px;
	}

	.sd-cib-modal .sd-cib__cta {
		width: 100%;
		max-width: 100%;
	}
}

/* =============================================================================
   Image + Form modal layout
   ============================================================================= */

.sd-cib-modal__content--form {
	max-width: 1350px;
	width: 100%;
	display: flex;
	flex-direction: row;
	max-height: 80vh;
	border-radius: 10px;
	overflow: hidden;
}

.sd-cib-form {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: auto;
	gap: 0;
}

.sd-cib-form__image {
	flex: 0 0 60%;
	min-width: 0;
	overflow: hidden;
	background: #f5f0e8;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 500px;
}

.sd-cib-form__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.sd-cib-form__content {
	flex: 1 1 40%;
	min-width: 0;
	padding: clamp(32px, 4vw, 48px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.sd-cib-form__description {
	margin: 0 0 clamp(16px, 2vw, 22px);
	font-size: clamp(0.95rem, 1.4vw, 1.05rem);
	font-weight: 500;
	line-height: 1.6;
	color: #5a6b76;
}

.sd-cib-form__description p {
	margin: 0 0 12px;
}

.sd-cib-form__description p:last-child {
	margin-bottom: 0;
}

.sd-cib-form__title {
	margin: 0 0 clamp(20px, 3vw, 28px);
	font-family: var( --sd-font-display, 'Lexend', sans-serif );
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	color: #1F242E;
}

.sd-cib-form__form {
	margin-top: 0;
	flex: 1;
}

/* Match Contact Band form styling exactly */
.sd-cib-form__form .gform_wrapper,
.sd-cib-form__form .gform_wrapper.gravity-theme,
.sd-cib-form__form .gform_wrapper form {
	margin: 0 !important;
}

.sd-cib-form__form .gform-body,
.sd-cib-form__form .gform_body {
	margin: 0 !important;
}

.sd-cib-form__form .gform_fields,
.sd-cib-form__form .gfields {
	gap: 30px 28px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.sd-cib-form__form .gfield {
	margin: 0 !important;
	padding: 0 !important;
}

.sd-cib-form__form .gfield--width-full {
	grid-column: 1 / -1 !important;
}

/* Field labels — Contact Band style (uppercase, small, gray) */
.sd-cib-form__form .gfield_label {
	display: block !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: #737A87 !important;
	margin: 0 0 6px !important;
}

/* Input container */
.sd-cib-form__form .ginput_container {
	margin: 0 !important;
}

/* Text / email / tel / number inputs — Contact Band minimalist style */
.sd-cib-form__form input[type="text"],
.sd-cib-form__form input[type="email"],
.sd-cib-form__form input[type="tel"],
.sd-cib-form__form input[type="number"] {
	background: transparent !important;
	border: none !important;
	border-bottom: 1.5px solid #C8C8C8 !important;
	border-radius: 0 !important;
	padding: 6px 0 !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	transition: border-color 0.2s !important;
}

/* Select dropdown */
.sd-cib-form__form select {
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 4px center !important;
	border: 1px solid #C8C8C8 !important;
	border-radius: 3px !important;
	padding: 9px 32px 9px 10px !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	transition: border-color 0.2s !important;
	line-height: 30px;
}

/* Textarea */
.sd-cib-form__form textarea {
	background: transparent !important;
	border: 1.5px solid #C8C8C8 !important;
	border-radius: 3px !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	min-height: 120px !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	resize: vertical !important;
	transition: border-color 0.2s !important;
}

/* Placeholders */
.sd-cib-form__form input::placeholder,
.sd-cib-form__form textarea::placeholder {
	color: #737A87 !important;
}

/* Focus states — orange highlight like Contact Band */
.sd-cib-form__form input[type="text"]:focus,
.sd-cib-form__form input[type="email"]:focus,
.sd-cib-form__form input[type="tel"]:focus,
.sd-cib-form__form input[type="number"]:focus,
.sd-cib-form__form select:focus,
.sd-cib-form__form textarea:focus {
	border-color: #ea6e24 !important;
}

/* Submit button — Contact Band style (white outline, orange text, fills on hover) */
.sd-cib-form__form .gform_wrapper input.gform_button,
.sd-cib-form__form input[type="submit"],
.sd-cib-form__form button[type="submit"] {
	display: block !important;
	width: 100% !important;
	padding: 16px !important;
	background: #fff !important;
	border: 2px solid #ea6e24 !important;
	border-radius: 30px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.18em !important;
	color: #ea6e24 !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	text-align: center !important;
	transition: background 0.2s, color 0.2s !important;
	margin-top: 8px !important;
	box-shadow: none !important;
}

.sd-cib-form__form .gform_button:hover,
.sd-cib-form__form input[type="submit"]:hover,
.sd-cib-form__form button[type="submit"]:hover {
	background: #ea6e24 !important;
	color: #fff !important;
}

/* GF footer */
.sd-cib-form__form .gform_footer,
.sd-cib-form__form .gform-footer,
.sd-cib-form__form .gform_page_footer {
	margin: 0 !important;
	padding: 0 !important;
}

/* GF validation / error messages */
.sd-cib-form__form .validation_message,
.sd-cib-form__form .gfield_description {
	font-size: 12px !important;
	padding: 4px 0 0 !important;
}

/* ── HubSpot form (hsfc- renderer) ────────────────────────────────────────────
 * The popup's form is HubSpot's, not Gravity's. The input / select / textarea /
 * submit rules above are element-based and already apply to it unchanged, so only
 * the structural pieces that were named after Gravity's markup are restated here
 * against HubSpot's own class names. Same values, so the popup keeps the Contact
 * Band look it had. */
.sd-cib-form__form .hs-form-html,
.sd-cib-form__form form {
	margin: 0 !important;
}

/* HubSpot pads its step wrapper; the panel already provides that padding. */
.sd-cib-form__form [data-hsfc-id="Renderer"] .hsfc-Step__Content {
	padding: 0 !important;
}

/* Row rhythm — mirrors the .gform_fields gap. */
.sd-cib-form__form .hsfc-Row {
	margin: 0 0 30px !important;
	padding: 0 !important;
}

.sd-cib-form__form .hsfc-Row:last-of-type {
	margin-bottom: 0 !important;
}

/* Field labels — same treatment the .gfield_label rule gave Gravity. */
.sd-cib-form__form .hsfc-FieldLabel {
	display: block !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: #737A87 !important;
	margin: 0 0 6px !important;
}

/* Footer / button row — mirrors .gform_footer. */
.sd-cib-form__form .hsfc-NavigationRow,
.sd-cib-form__form .hsfc-NavigationRow__Buttons {
	margin: 0 !important;
	padding: 0 !important;
}

/* Validation text — mirrors .validation_message. */
.sd-cib-form__form .hsfc-ErrorAlert,
.sd-cib-form__form .hsfc-FieldError,
.sd-cib-form__form .hsfc-NavigationRow__Alerts {
	font-size: 12px !important;
	padding: 4px 0 0 !important;
}

/* Tablet: adjust to vertical stack and spacing */
@media (max-width: 1024px) {
	.sd-cib-modal__content--form {
		flex-direction: column;
		max-height: none;
		min-height: auto;
	}

	.sd-cib-form {
		flex-direction: column;
	}

	.sd-cib-form__image {
		flex: 0 0 auto;
		width: 100%;
		min-height: 350px;
	}

	.sd-cib-form__content {
		flex: 0 0 auto;
		padding: clamp(28px, 4vw, 40px);
		max-height: none;
		overflow-y: auto;
	}
}

/* Mobile: full stack with adjusted sizing */
@media (max-width: 640px) {
	.sd-cib-modal__content {
		max-width: 100%;
		border-radius: 0;
	}

	.sd-cib-modal__content--form {
		max-width: 100%;
		flex-direction: column;
		max-height: 100%;
	}

	.sd-cib-form {
		flex-direction: column;
	}

	.sd-cib-form__image {
		flex: 0 0 auto;
		width: 100%;
		min-height: 280px;
	}

	.sd-cib-form__content {
		flex: 0 0 auto;
		padding: 20px;
		max-height: none;
		overflow-y: auto;
	}

	.sd-cib-form__title {
		font-size: clamp(1.25rem, 5vw, 1.5rem);
		margin-bottom: clamp(12px, 2vw, 16px);
	}

	.sd-cib-form__description {
		font-size: clamp(0.9rem, 4vw, 0.95rem);
		margin-bottom: clamp(12px, 2vw, 16px);
	}
}