/* Just Appliance Services - Frontend */

.jar-services-grid {
	display: grid;
	grid-template-columns: repeat(var(--jar-columns, 3), minmax(0, 1fr));
	gap: var(--jar-gap, 24px);
	width: 100%;
}

@media (max-width: 1024px) {
	.jar-services-grid {
		grid-template-columns: repeat(var(--jar-columns-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.jar-services-grid {
		grid-template-columns: repeat(var(--jar-columns-mobile, 1), minmax(0, 1fr));
	}
}

.jar-no-services {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: #666;
}

/* Service Card — pixel-match reference design */
.jar-service-card {
	position: relative;
	border-radius: var(--jar-card-radius, 14px);
	overflow: hidden;
	min-height: 460px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.3s ease, transform 0.15s ease;
}

.jar-service-card.jar-open-form {
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
	user-select: none;
}

.jar-service-card.jar-open-form:active {
	transform: scale(0.985);
}

.jar-service-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.jar-service-card__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-color: #1c1c1c;
}

.jar-service-card__overlay {
	position: absolute;
	inset: 0;
}

/* Elementor widget — overlay gradient controlled from Style panel */
.jar-services-grid--elementor .jar-service-card__overlay {
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.12) 0%,
		rgba(0, 0, 0, 0.28) 30%,
		rgba(0, 0, 0, 0.58) 62%,
		rgba(0, 0, 0, 0.82) 100%
	);
}

/* Shortcode / non-Elementor — CSS variable driven */
.jar-services-grid:not(.jar-services-grid--elementor) .jar-service-card__overlay {
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.12) 0%,
		rgba(0, 0, 0, 0.28) 30%,
		rgba(0, 0, 0, 0.58) 62%,
		rgba(0, 0, 0, calc(var(--jar-overlay, 0.82))) 100%
	);
}

.jar-service-card__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	flex: 1;
	min-height: 100%;
	padding: 26px 26px 24px;
	color: var(--jar-text-color, #ffffff);
	text-align: left;
}

.jar-service-card__title {
	margin: 0 0 8px;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--jar-title-color, #ffffff);
}

.jar-service-card__desc {
	margin: 0 0 20px;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	color: var(--jar-text-color, #ffffff);
	opacity: 1;
}

.jar-service-card__issues {
	margin: 0 0 20px;
}

.jar-service-card__issues-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 8px;
	color: var(--jar-text-color, #ffffff);
	opacity: 1;
}

.jar-service-card__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 6px;
}

.jar-service-card__tag {
	display: inline-block;
	padding: 5px 11px;
	border-radius: 5px;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	white-space: nowrap;
	background: var(--jar-tag-bg, rgba(0, 0, 0, 0.52));
	color: var(--jar-tag-color, #ffffff);
	border: none;
}

.jar-service-card__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin-top: 0;
	padding: 13px 16px;
	border: none;
	border-radius: var(--jar-btn-radius, 8px);
	background: var(--jar-btn-bg, #2a4a68);
	color: var(--jar-btn-color, #ffffff);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease;
	text-decoration: none;
	text-align: left;
}

.jar-service-card__btn:hover,
.jar-service-card__btn:focus {
	background: var(--jar-btn-hover-bg, #1f3850);
	color: var(--jar-btn-hover-color, #ffffff);
}

.jar-service-card__btn-arrow {
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	flex-shrink: 0;
	opacity: 0.92;
}

/* Popup */
.jar-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jar-popup-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.jar-popup {
	position: relative;
	background: #ffffff;
	border-radius: 8px;
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 28px 24px 24px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	transform: translateY(12px);
	transition: transform 0.25s ease;
	color: #333333;
}

.jar-popup-overlay.is-open .jar-popup {
	transform: translateY(0);
}

#jar-popup-overlay .jar-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background: #f3f4f6;
	color: #374151;
	cursor: pointer;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	line-height: 1;
	transition: background 0.2s, color 0.2s;
}

#jar-popup-overlay .jar-popup-close__icon {
	display: block;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	font-family: Arial, Helvetica, sans-serif;
	pointer-events: none;
}

#jar-popup-overlay .jar-popup-close:hover,
#jar-popup-overlay .jar-popup-close:focus {
	background: #e5e7eb;
	color: #111827;
	outline: none;
}

.jar-popup-title {
	margin: 0 0 18px;
	padding-right: 44px;
	font-size: 1.25rem;
	font-weight: 600;
	color: #222222;
	line-height: 1.3;
}

/* Appointment Form - force readable colors (fix white text) */
.jar-appointment-form,
.jar-form-wrapper,
.jar-popup .jar-appointment-form {
	color: #333333 !important;
}

.jar-form-field label,
.jar-form-field legend,
.jar-radio span,
.jar-checkbox span,
.jar-form-hint {
	color: #444444 !important;
}

.jar-form-hint {
	font-size: 0.8rem;
	margin: 4px 0 0;
	opacity: 0.85;
}

.jar-form-field input[type="text"],
.jar-form-field input[type="email"],
.jar-form-field input[type="tel"],
.jar-form-field input[type="date"],
.jar-form-field input[type="time"],
.jar-form-field select,
.jar-form-field textarea {
	color: #222222 !important;
	background-color: #ffffff !important;
	-webkit-text-fill-color: #222222;
}

.jar-form-field select option {
	color: #222222;
	background: #ffffff;
}

.jar-form-message {
	display: none;
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 0.9rem;
}

.jar-form-message.is-success {
	display: block;
	background: #d4edda;
	color: #155724 !important;
	border: 1px solid #c3e6cb;
}

.jar-form-message.is-error {
	display: block;
	background: #f8d7da;
	color: #721c24 !important;
	border: 1px solid #f5c6cb;
}

/* Form wrapper */
.jar-form-wrapper {
	max-width: 720px;
	margin: 0 auto;
	padding: 24px;
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: #333333;
	--jar-form-accent: #2563eb;
	--jar-form-label-color: #333333;
	--jar-form-field-border: #ccc;
	--jar-form-radius: 4px;
}

.jar-popup {
	--jar-form-accent: #2563eb;
	--jar-form-label-color: #333333;
	--jar-form-field-border: #ccc;
	--jar-form-radius: 4px;
}

.jar-form-wrapper__title {
	margin: 0 0 20px;
	font-size: 1.25rem;
	font-weight: 600;
	color: #222222;
	padding-bottom: 12px;
	border-bottom: 1px solid #eee;
}

.jar-appointment-form {
	max-width: 100%;
}

.jar-form-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--jar-form-label-color, #333333) !important;
	margin-bottom: 0px;
	margin-top: 15px;
}

.jar-form-row--location {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 18px;
	border: none;
	padding: 0;
	background: none;
}

.jar-form-row--location .jar-radio {
	flex: 0 0 auto;
	min-width: 0;
	justify-content: flex-start;
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
}

.jar-form-row--location .jar-radio:has(input:checked) {
	border: none;
	background: none;
	box-shadow: none;
}

/* Date + Time same row */
.jar-form-datetime-row {
	margin-bottom: 0;
}

.jar-form-datetime-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: end;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
}

.jar-form-datetime-grid::before {
	display: none;
}

.jar-form-datetime-col {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jar-form-datetime-col--date input[type="date"],
.jar-time-slot-select {
	min-height: auto;
	font-size: 0.9375rem;
	border: 1px solid var(--jar-form-field-border, #ccc);
	border-radius: var(--jar-form-radius, 4px);
	padding: 10px 12px;
	background: #fff;
	appearance: auto;
	-webkit-appearance: auto;
	cursor: pointer;
}

.jar-form-datetime-col--date input[type="date"] {
	cursor: text;
}

.jar-time-slot-select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0 5 5 10 0z'/%3E%3C/svg%3E") no-repeat right 12px center;
	background-size: 10px;
	padding-right: 32px;
}

.jar-time-slot-select:focus,
.jar-form-datetime-col--date input[type="date"]:focus {
	border-color: var(--jar-form-accent, #2563eb);
	box-shadow: none;
	outline: none;
}

.jar-time-slot-notice {
	margin-top: 6px !important;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	color: #666666 !important;
	font-size: 0.8125rem;
	line-height: 1.45;
	font-style: italic;
}

.jar-time-slot-notice.is-active {
	background: none;
	border: none;
	color: #666666 !important;
}

@media (max-width: 640px) {
	.jar-form-wrapper {
		padding: 18px 16px;
	}

	.jar-form-datetime-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}

.jar-radio {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.95rem;
}

.jar-radio input[type="radio"] {
	width: 18px;
	height: 18px;
		accent-color: var(--jar-form-accent, #2563eb);
}

.jar-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.jar-form-grid {
		grid-template-columns: 1fr;
	}
}

.jar-form-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 0;
}

.jar-form-field--full {
	grid-column: 1 / -1;
}

.jar-form-field label,
.jar-form-field legend {
	font-size: 0.875rem;
	font-weight: 600;
	color: #333333 !important;
}

.jar-form-field input[type="text"],
.jar-form-field input[type="email"],
.jar-form-field input[type="tel"],
.jar-form-field input[type="date"],
.jar-form-field input[type="time"],
.jar-form-field select,
.jar-form-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9375rem;
	font-family: inherit;
	transition: border-color 0.15s;
	box-sizing: border-box;
	background: #fff;
}

.jar-form-field input:focus,
.jar-form-field select:focus,
.jar-form-field textarea:focus {
	outline: none;
	border-color: var(--jar-form-accent, #2563eb);
	box-shadow: none;
}

/* Form style presets (optional extras) */
.jar-form-theme--soft.jar-form-wrapper,
.jar-form-theme--soft.jar-appointment-form {
	border-radius: 8px;
}

.jar-form-theme--bold .jar-popup-title,
.jar-form-theme--bold.jar-form-wrapper .jar-form-wrapper__title {
	background: var(--jar-form-accent, #2563eb);
	color: #fff !important;
	margin: -24px -24px 20px;
	padding: 16px 24px;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
}

.jar-form-theme--minimal.jar-form-wrapper,
.jar-form-theme--minimal.jar-appointment-form {
	border: 1px solid #ddd;
}

.jar-form-field input.jar-form-field--readonly {
	background-color: #f5f5f5 !important;
	color: #333333 !important;
	-webkit-text-fill-color: #333333 !important;
	cursor: default;
}

.jar-form-field input[type="file"] {
	padding: 8px 0;
	font-size: 0.88rem;
	color: #444444 !important;
}

.jar-services-checkboxes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 6px 12px;
	margin-top: 6px;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
}

@media (max-width: 500px) {
	.jar-services-checkboxes {
		grid-template-columns: 1fr;
	}
}

.jar-form-services-field,
.jar-form-issue-field {
	margin-top: 16px;
	padding-top: 0;
	border-top: none;
}

.jar-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
	font-size: 0.9375rem;
	padding: 2px 0;
	border-radius: 0;
}

.jar-checkbox:hover {
	background: none;
}

.jar-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin-top: 3px;
	accent-color: var(--jar-form-accent, #2563eb);
	flex-shrink: 0;
}

.jar-checkbox--optin {
	margin-bottom: 16px;
	font-size: 0.875rem;
}

.jar-form-submit {
	display: block;
	width: 100%;
	padding: 12px 20px;
	margin-top: 20px;
	border: none;
	border-radius: 4px;
	background: var(--jar-form-btn-bg, #2563eb);
	color: var(--jar-form-btn-color, #ffffff) !important;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.jar-form-submit:hover:not(:disabled) {
	background: var(--jar-form-btn-hover-bg, #1d4ed8);
}

.jar-form-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.jar-appointment-form--popup .jar-form-submit {
	width: 100%;
	text-align: center;
}

@media (max-width: 480px) {
	.jar-service-card {
		min-height: 420px;
	}

	.jar-service-card__content {
		padding: 22px 20px 20px;
	}

	.jar-service-card__title {
		font-size: 1.25rem;
	}
}

/* Force black form text — overrides Elementor / theme */
.jar-form-scope,
.jar-form-wrapper.jar-form-scope,
#jar-popup-overlay .jar-popup,
.elementor-widget-jar_appointment_form .jar-form-wrapper {
	color: #111111 !important;
	width: 100%;
	box-sizing: border-box;
}

.jar-form-label,
.jar-form-scope label,
.jar-form-scope legend,
.jar-form-scope .jar-radio > span,
.jar-form-scope .jar-checkbox > span,
.jar-form-scope .jar-form-hint,
#jar-popup-overlay .jar-popup label,
#jar-popup-overlay .jar-popup legend,
#jar-popup-overlay .jar-popup .jar-radio > span,
#jar-popup-overlay .jar-popup .jar-checkbox > span,
#jar-popup-overlay .jar-popup .jar-form-hint,
.elementor-widget-jar_appointment_form label,
.elementor-widget-jar_appointment_form legend,
.elementor-widget-jar_appointment_form .jar-radio > span,
.elementor-widget-jar_appointment_form .jar-checkbox > span {
	color: #1a1a1a !important;
	-webkit-text-fill-color: #1a1a1a !important;
	opacity: 1 !important;
	visibility: visible !important;
	text-shadow: none !important;
	background: none !important;
	-webkit-background-clip: border-box !important;
	background-clip: border-box !important;
}

.jar-form-scope input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.jar-form-scope select,
.jar-form-scope textarea,
#jar-popup-overlay .jar-popup input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#jar-popup-overlay .jar-popup select,
#jar-popup-overlay .jar-popup textarea,
.elementor-widget-jar_appointment_form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.elementor-widget-jar_appointment_form select,
.elementor-widget-jar_appointment_form textarea {
	color: #000000 !important;
	-webkit-text-fill-color: #000000 !important;
	background-color: #ffffff !important;
	caret-color: #000000 !important;
}

.jar-form-scope input::placeholder,
.jar-form-scope textarea::placeholder {
	color: #666666 !important;
	opacity: 1 !important;
}

.jar-form-scope input:-webkit-autofill,
.jar-form-scope input:-webkit-autofill:hover,
.jar-form-scope input:-webkit-autofill:focus {
	-webkit-text-fill-color: #000000 !important;
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
	box-shadow: 0 0 0 1000px #ffffff inset !important;
}

/* ---- Services Slider ---- */
.jar-services-slider-wrap {
	position: relative;
	width: 100%;
	padding: 48px 0 56px;
	overflow: hidden;
}

.jar-services-slider__scene {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.jar-services-slider__scene-top {
	height: 52%;
	background-color: #0f172a;
}

.jar-services-slider__scene-bottom {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 48%;
	background-color: #ffffff;
	background-image:
		linear-gradient(var(--jar-slider-grid-color, rgba(15, 23, 42, 0.06)) 1px, transparent 1px),
		linear-gradient(90deg, var(--jar-slider-grid-color, rgba(15, 23, 42, 0.06)) 1px, transparent 1px);
	background-size: 28px 28px;
}

.jar-services-slider__inner {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.jar-services-slider__viewport {
	overflow: hidden;
}

.jar-services-slider__track {
	display: flex;
	will-change: transform;
}

.jar-services-slider__slide {
	flex: 0 0 auto;
}

.jar-slide-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 4px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
	overflow: hidden;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(15, 23, 42, 0.08);
	user-select: none;
	transition: box-shadow 0.25s ease, transform 0.15s ease;
	height: 100%;
	text-align: center;
}

.jar-slide-card:active {
	transform: scale(0.98);
}

.jar-slide-card:hover,
.jar-slide-card:focus {
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
	transform: translateY(-4px);
	outline: none;
}

.jar-slide-card__media {
	height: 200px;
	overflow: hidden;
	background: #e2e8f0;
}

.jar-slide-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jar-slide-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #cbd5e1 0%, #e2e8f0 100%);
}

.jar-slide-card__body {
	padding: 28px 24px 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
}

.jar-slide-card__title {
	margin: 0 0 12px;
	font-size: 1.125rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

.jar-slide-card__desc {
	margin: 0 0 20px;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #64748b;
	max-width: 280px;
}

.jar-slide-card__accent {
	display: block;
	width: 48px;
	height: 4px;
	border-radius: 2px;
	background: #dc2626;
	margin-top: auto;
}

.jar-services-slider__nav {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
}

.jar-slider-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid #94a3b8;
	border-radius: 50%;
	background: transparent;
	color: #94a3b8;
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.jar-slider-nav:hover,
.jar-slider-nav:focus {
	color: #0f172a;
	border-color: #0f172a;
	background: rgba(15, 23, 42, 0.04);
	outline: none;
}

/* ---- Services List ---- */
.jar-services-list-wrap {
	width: 100%;
}

.jar-services-list {
	background: #0f172a;
	padding: 32px 28px;
}

.jar-services-list__heading {
	margin: 0 0 20px;
	font-size: 1.125rem;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
}

.jar-services-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jar-services-list__items .jar-services-list__item + .jar-services-list__item {
	margin-top: 12px;
}

.jar-services-list__item {
	display: block;
	width: 100%;
	padding: 6px 0;
	margin: 0;
	border: 0;
	background: none;
	text-align: left;
	font: inherit;
	color: #94a3b8;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
	user-select: none;
	transition: color 0.2s ease;
	position: relative;
	z-index: 1;
}

.jar-services-list__label {
	display: block;
	width: 100%;
	color: inherit;
	line-height: 1.5;
	pointer-events: none;
}

.jar-services-list__item:active {
	opacity: 0.75;
}

.jar-open-form[data-jar-open-form],
a.jar-open-form,
button.jar-open-form {
	cursor: pointer;
	touch-action: manipulation;
}

.jar-services-list__item:hover,
.jar-services-list__item:focus {
	color: #ffffff;
	outline: none;
}

.jar-services-list__empty {
	margin: 0;
	color: #94a3b8;
	font-size: 0.9375rem;
}
