/* Al Nour Hospital — site-wide fixes on top of Elementor. */

:root {
	--alnour-primary: #d96323;
	--alnour-heading: #4d4a4c;
	--alnour-text: #5c5f6b;
	--alnour-surface: #f5f6fa;
}

/* Visually hidden but available to screen readers / search engines. */
.screen-reader-text,
.elementor-widget.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Cards (Call to Action widgets replacing Themesflat image boxes) ---------- */
.alnour-card,
.alnour-card > .elementor-widget-container,
.alnour-card .elementor-cta {
	height: 100%;
}
.alnour-card .elementor-cta {
	display: flex;
	flex-direction: column;
	box-shadow: 0 6px 24px rgba(30, 30, 40, 0.06);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.alnour-card .elementor-cta:hover {
	box-shadow: 0 12px 32px rgba(30, 30, 40, 0.12);
	transform: translateY(-3px);
}
.alnour-card .elementor-cta__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.alnour-card .elementor-cta__button-wrapper {
	margin-top: auto;
}
.elementor-column:has(> .elementor-widget-wrap > .alnour-card) > .elementor-widget-wrap {
	height: 100%;
}

/* ---------- Single posts: readable body text ---------- */
.single-post .elementor-widget-theme-post-content {
	font-size: 17px;
	line-height: 1.9;
	color: var(--alnour-text);
}
.single-post .elementor-widget-theme-post-content img {
	height: auto;
	max-width: 100%;
}

/* ---------- Forms ---------- */
.elementor-form .elementor-field-group .elementor-field-textual {
	min-height: 46px;
}
.elementor-form .elementor-field-subgroup.elementor-subgroup-inline .elementor-field-option {
	margin-inline-end: 18px;
}

/* ---------- Header CTA on small screens ---------- */
@media (max-width: 767px) {
	.elementor-location-header .elementor-element-8de5e03 .elementor-button {
		width: 100%;
		padding: 12px 14px;
		font-size: 15px;
	}
}

/* ---------- Footer ---------- */
html[dir="ltr"] .elementor-location-footer .elementskit-info-box-icon,
html:not([dir="rtl"]) .elementor-location-footer .elementskit-info-box-icon {
	margin-left: 0 !important;
	margin-right: 14px !important;
}
.elementor-location-footer .elementor-widget-text-editor,
.elementor-location-footer .elementor-icon-list-text {
	line-height: 1.8;
}

/* ---------- Before / after image comparison ---------- */
.alnour-compare {
	position: relative;
	overflow: hidden;
	direction: ltr;
	user-select: none;
	border-radius: 4px;
}
.alnour-compare img {
	display: block;
	width: 100%;
	height: auto;
}
.alnour-compare__after {
	position: absolute;
	inset: 0;
	clip-path: inset(0 0 0 var(--pos));
}
.alnour-compare__after img {
	height: 100%;
	object-fit: cover;
}
.alnour-compare::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 3px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}
.alnour-compare input[type="range"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}
.alnour-compare__label {
	position: absolute;
	bottom: 12px;
	padding: 4px 12px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 14px;
	pointer-events: none;
}
.alnour-compare__label--before { left: 12px; }
.alnour-compare__label--after { right: 12px; }

/* ---------- Scroll to top ---------- */
.alnour-top {
	position: fixed;
	bottom: 24px;
	inset-inline-end: 24px;
	z-index: 99;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--alnour-primary);
	color: #fff;
	box-shadow: 0 6px 18px rgba(217, 99, 35, 0.35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.alnour-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.alnour-top:hover,
.alnour-top:focus-visible {
	background: var(--alnour-heading);
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.alnour-card .elementor-cta,
	.alnour-top {
		transition: none;
	}
}
