/**
 * Site footer — main sage green + gold (matches homepage sections).
 */

#rs-footer.etqan-has-custom-footer {
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
}

#rs-footer.etqan-has-custom-footer .footer-top,
#rs-footer.etqan-has-custom-footer .footer-bottom {
	display: none !important;
}

.etqan-footer {
	--ef-sage: var(--etqan-color-sage, #3f5b2d);
	--ef-sage-dark: var(--etqan-color-sage-dark, #354d26);
	--ef-sage-deep: #2a3d20;
	--ef-gold: var(--etqan-color-accent, #c8a96e);
	--ef-gold-light: var(--etqan-color-accent-light, #d4b97e);
	--ef-text: rgba(255, 255, 255, 0.92);
	--ef-text-muted: rgba(255, 255, 255, 0.72);
	--ef-text-dim: rgba(255, 255, 255, 0.55);
	--ef-border: rgba(200, 169, 110, 0.35);

	display: block;
	width: 100%;
	direction: rtl;
	font-family: "Cairo", "Tajawal", sans-serif;
	background: transparent;
	overflow: hidden;
	position: relative;
}

.etqan-footer::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 4px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		var(--ef-gold) 20%,
		var(--ef-gold-light) 50%,
		var(--ef-gold) 80%,
		transparent 100%
	);
	pointer-events: none;
	z-index: 2;
}

/* Shared centered shell — matches navbar container rhythm */
.etqan-footer .ef-shell {
	width: 100%;
	max-width: var(--etqan-footer-grid-max, 1240px);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 3.5vw, 2rem);
	box-sizing: border-box;
}

/* CTA bar */
.etqan-footer .ef-cta-bar {
	background: var(--ef-sage);
	border-bottom: 1px solid var(--ef-border);
	padding-block: clamp(0.9rem, 2vw, 1.1rem);
	padding-inline: 0;
	width: 100%;
}

.etqan-footer .ef-cta-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 20px;
	direction: rtl;
}

.etqan-footer .ef-cta-bar__text {
	font-size: clamp(0.875rem, 1.35vw, 0.975rem);
	font-weight: 500;
	color: var(--ef-text);
	line-height: 1.65;
	margin: 0;
	flex: 1 1 240px;
}

.etqan-footer .ef-cta-bar__text-sep {
	display: inline-block;
	margin-inline: 0.45rem;
	color: var(--ef-gold-light);
	opacity: 0.85;
}

.etqan-footer .ef-cta-bar__text strong {
	color: var(--ef-gold-light);
	font-weight: 700;
}

.etqan-footer .ef-cta-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	padding: 0.65rem 1.5rem;
	background: var(--ef-gold);
	color: var(--ef-sage-dark);
	font-size: 0.9375rem;
	font-weight: 700;
	border-radius: 999px;
	text-decoration: none;
	border: 2px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
	transition:
		background var(--etqan-duration-fast, 0.28s) ease,
		transform var(--etqan-duration-fast, 0.28s) ease,
		box-shadow var(--etqan-duration-fast, 0.28s) ease;
	white-space: nowrap;
}

.etqan-footer .ef-cta-bar__btn:hover,
.etqan-footer .ef-cta-bar__btn:focus-visible {
	background: var(--ef-gold-light);
	color: var(--ef-sage-dark);
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Main grid */
.etqan-footer .ef-main {
	background: var(--ef-sage);
	padding-block: clamp(2.5rem, 5vw, 3.25rem);
	padding-inline: 0;
	width: 100%;
}

/* Flex row: columns stay in shell; form grows outside max-width constraint. */
.etqan-footer .ef-main__layout {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: clamp(1.25rem, 2.2vw, 2rem);
	width: 100%;
	max-width: none;
	padding-inline: clamp(0.65rem, 1.5vw, 2rem);
	box-sizing: border-box;
}

/* Sidebar — brand + nav isolated from form flex sizing. */
.etqan-footer .ef-main__columns {
	flex: 0 0 auto;
	flex-shrink: 0;
	width: auto;
	max-width: none;
	min-width: 0;
}

.etqan-footer .ef-main__columns-inner {
	display: grid;
	grid-template-columns: minmax(17.5rem, 22.5rem) minmax(18rem, 22rem);
	gap: clamp(1.25rem, 2vw, 2rem);
	align-items: start;
	width: max-content;
	max-width: min(46rem, 100%);
	direction: rtl;
}

.etqan-footer .ef-main__brand-slot {
	min-width: 0;
	width: 100%;
}

.etqan-footer .ef-main__nav-slot {
	display: grid;
	grid-template-columns: repeat(2, minmax(8.5rem, 10.5rem));
	gap: clamp(1rem, 1.5vw, 1.5rem);
	min-width: 0;
	width: 100%;
}

.etqan-footer .ef-main__form-area {
	flex: 1 1 22rem;
	min-width: min(100%, 20rem);
	max-width: none;
	display: flex;
	flex-direction: column;
}

.etqan-footer .ef-main__form-area .ef-main__form,
.etqan-footer .ef-main__form-area .ef-contact-form-col {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	max-width: none;
}

.etqan-footer .ef-nav-col {
	min-width: 0;
}

.etqan-footer .ef-main__brand {
	min-width: 0;
}

.etqan-footer .ef-main__brand-slot .ef-brand__desc {
	max-width: none;
}

/* Brand */
.etqan-footer .ef-brand {
	position: relative;
	padding: clamp(1.15rem, 2vw, 1.45rem);
	padding-inline: clamp(1.15rem, 2vw, 1.45rem) clamp(1rem, 1.8vw, 1.25rem);
	padding-inline-start: clamp(1.35rem, 2.2vw, 1.65rem);
	border: 1px solid var(--ef-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
	height: 100%;
}

.etqan-footer .ef-brand::before {
	content: "";
	position: absolute;
	top: 18px;
	bottom: 18px;
	inset-inline-start: 0;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: linear-gradient(
		180deg,
		var(--ef-gold-light) 0%,
		var(--ef-gold) 55%,
		#b89655 100%
	);
}

.etqan-footer .ef-brand__title {
	display: block;
	font-size: clamp(1.65rem, 3.2vw, 2.15rem);
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	margin: 0;
}

.etqan-footer .ef-brand__eyebrow {
	display: block;
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(0.68rem, 1.1vw, 0.75rem);
	font-weight: 400;
	color: var(--ef-gold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 8px 0 0;
	line-height: 1.5;
}

.etqan-footer .ef-brand__divider {
	display: block;
	width: min(72px, 28%);
	height: 3px;
	background: linear-gradient(
		90deg,
		var(--ef-gold) 0%,
		var(--ef-gold-light) 100%
	);
	margin: 16px 0 14px;
	border: none;
	border-radius: 999px;
}

.etqan-footer .ef-brand__desc {
	font-size: 0.9375rem;
	line-height: 1.85;
	color: var(--ef-text-muted);
	max-width: 38rem;
	margin: 0;
}

.etqan-footer .ef-brand__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	margin-top: 1.35rem;
}

.etqan-footer .ef-brand__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ef-border);
	border-radius: 999px;
	padding: 0.45rem 0.95rem;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--ef-text);
	background: rgba(255, 255, 255, 0.08);
	line-height: 1.35;
	text-align: center;
	transition:
		border-color var(--etqan-duration-fast, 0.28s) ease,
		background var(--etqan-duration-fast, 0.28s) ease,
		color var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-brand__badge:hover {
	border-color: rgba(200, 169, 110, 0.75);
	background: rgba(200, 169, 110, 0.14);
	color: #ffffff;
}

/* Nav columns */
.etqan-footer .ef-nav__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--ef-gold);
	margin: 0 0 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--ef-border);
}

.etqan-footer .ef-nav__title::before {
	content: "";
	width: 24px;
	height: 2px;
	background: var(--ef-gold);
	flex-shrink: 0;
}

.etqan-footer .ef-nav__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-nav__list li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-nav__list li::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ef-gold);
	flex-shrink: 0;
	opacity: 0.85;
}

.etqan-footer .ef-nav__list a {
	display: inline-block;
	padding: 0.2rem 0;
	font-size: 0.9375rem;
	color: var(--ef-text-muted);
	text-decoration: none;
	line-height: 1.5;
	transition: color var(--etqan-duration-fast, 0.28s) ease, transform var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-nav__list a:hover,
.etqan-footer .ef-nav__list a:focus-visible {
	color: #ffffff;
	transform: translateX(-2px);
}

[dir="rtl"] .etqan-footer .ef-nav__list a:hover,
[dir="rtl"] .etqan-footer .ef-nav__list a:focus-visible {
	transform: translateX(2px);
}

/* Contact list */
.etqan-footer .ef-contact__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-contact__item {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.9375rem;
	color: var(--ef-text-muted);
	direction: rtl;
	margin: 0;
	padding: 0;
}

/* Contact & branch icons */
.etqan-footer .ef-contact__icon {
	font-size: 15px;
	flex-shrink: 0;
	line-height: 1;
}

.etqan-footer .ef-branch__detail-icon {
	font-size: 13px;
	flex-shrink: 0;
	margin-top: 2px;
	line-height: 1;
}

.etqan-footer .ef-contact__item a {
	color: var(--ef-text-muted);
	text-decoration: none;
	transition: color var(--etqan-duration-fast, 0.28s) ease;
	direction: ltr;
	unicode-bidi: embed;
}

.etqan-footer .ef-contact__item a:hover,
.etqan-footer .ef-contact__item a:focus-visible {
	color: var(--ef-gold-light);
}

/* Branches */
.etqan-footer .ef-branches {
	background: var(--ef-sage-dark);
	border-top: 1px solid var(--ef-border);
	padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
	padding-inline: 0;
	width: 100%;
}

.etqan-footer .ef-branches__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	direction: rtl;
}

.etqan-footer .ef-branch {
	padding: clamp(1.1rem, 2vw, 1.35rem);
	border: 1px solid var(--ef-border);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.04);
	transition:
		border-color var(--etqan-duration-fast, 0.28s) ease,
		transform var(--etqan-duration-fast, 0.28s) ease,
		box-shadow var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-branch:hover {
	border-color: rgba(200, 169, 110, 0.65);
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.etqan-footer .ef-branch__city {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 0.85rem;
	padding: 0;
}

.etqan-footer .ef-branch__city::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	background: var(--ef-gold);
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.22);
}

.etqan-footer .ef-branch__details {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-branch__detail {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-size: 0.875rem;
	color: var(--ef-text-muted);
	line-height: 1.65;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-branch__detail a {
	color: var(--ef-text-muted);
	text-decoration: none;
	direction: ltr;
	unicode-bidi: embed;
	transition: color var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-branch__detail a:hover,
.etqan-footer .ef-branch__detail a:focus-visible {
	color: var(--ef-gold-light);
}

/* Bottom bar */
.etqan-footer .ef-bottom {
	background: var(--ef-sage-deep);
	border-top: 1px solid rgba(200, 169, 110, 0.22);
	padding-block: clamp(0.95rem, 2vw, 1.15rem);
	padding-inline: 0;
	width: 100%;
}

.etqan-footer .ef-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px 20px;
	direction: rtl;
}

.etqan-footer .ef-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--ef-border);
	border-radius: 10px;
	color: var(--ef-text-muted);
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.04);
	transition:
		border-color var(--etqan-duration-fast, 0.28s) ease,
		color var(--etqan-duration-fast, 0.28s) ease,
		background var(--etqan-duration-fast, 0.28s) ease,
		transform var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-social__link:hover,
.etqan-footer .ef-social__link:focus-visible {
	border-color: var(--ef-gold);
	color: var(--ef-gold-light);
	background: rgba(200, 169, 110, 0.12);
	transform: translateY(-2px);
	text-decoration: none;
}

.etqan-footer .ef-social__link--whatsapp:hover,
.etqan-footer .ef-social__link--whatsapp:focus-visible {
	border-color: #25d366;
	color: #25d366;
	background: rgba(37, 211, 102, 0.12);
}

.etqan-footer .ef-bottom__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.35rem;
	align-items: center;
	margin: 0;
	padding: 0;
}

.etqan-footer .ef-bottom__links a {
	font-size: 0.8125rem;
	color: var(--ef-text-dim);
	text-decoration: none;
	transition: color var(--etqan-duration-fast, 0.28s) ease;
}

.etqan-footer .ef-bottom__links a:hover,
.etqan-footer .ef-bottom__links a:focus-visible {
	color: var(--ef-gold-light);
}

.etqan-footer .ef-bottom__copyright {
	font-size: 0.8125rem;
	color: var(--ef-text-dim);
	margin: 0;
	text-align: end;
}

/* Accessibility */
.etqan-footer a:focus-visible,
.etqan-footer button:focus-visible {
	outline: 2px solid var(--ef-gold);
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	.etqan-footer .ef-main__layout {
		flex-direction: column;
	}

	.etqan-footer .ef-main__columns {
		width: 100%;
		max-width: 100%;
	}

	.etqan-footer .ef-main__columns-inner {
		grid-template-columns: 1fr;
		width: 100%;
		max-width: 100%;
	}

	.etqan-footer .ef-main__form-area {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}

	.etqan-footer .ef-main__nav-slot {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {
	.etqan-footer .ef-branches__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.etqan-footer .ef-cta-bar__inner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.etqan-footer .ef-cta-bar__text {
		flex-basis: auto;
	}

	.etqan-footer .ef-cta-bar__btn {
		width: 100%;
		max-width: 320px;
		margin-inline: auto;
	}

	.etqan-footer .ef-main__columns-inner {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.etqan-footer .ef-main__nav-slot {
		grid-template-columns: 1fr;
	}

	.etqan-footer .ef-main__form-area {
		width: 100%;
	}

	.etqan-footer .ef-brand__desc {
		max-width: none;
	}

	.etqan-footer .ef-bottom__inner {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.etqan-footer .ef-bottom__copyright {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.etqan-footer .ef-cta-bar__btn,
	.etqan-footer .ef-branch,
	.etqan-footer .ef-social__link,
	.etqan-footer .ef-nav__list a,
	.etqan-footer .ef-brand__badge {
		transition: none;
	}
}

/* English — LTR footer alignment */
html[lang^="en"] .etqan-footer,
html[lang^="en"] .etqan-footer .ef-main__layout,
html[lang^="en"] .etqan-footer .ef-main__columns-inner,
html[lang^="en"] .etqan-footer .ef-main__nav-slot,
html[lang^="en"] .etqan-footer .ef-cta-bar__inner,
html[lang^="en"] .etqan-footer .ef-bottom__inner,
html[lang^="en"] .etqan-footer .ef-branches__grid {
	direction: ltr;
}

html[lang^="en"] .etqan-footer .ef-brand__title,
html[lang^="en"] .etqan-footer .ef-brand__eyebrow,
html[lang^="en"] .etqan-footer .ef-brand__desc {
	text-align: start;
	direction: ltr;
	unicode-bidi: plaintext;
}

html[lang^="en"] .etqan-footer .ef-brand::before {
	border-radius: 4px 0 0 4px;
}

html[lang^="en"] .etqan-footer .ef-nav__list a:hover,
html[lang^="en"] .etqan-footer .ef-nav__list a:focus-visible {
	transform: translateX(2px);
}

html[lang^="en"] .etqan-footer .ef-bottom__copyright {
	text-align: end;
}
