/*
 * EconClinic footer v5 — matches footer-econclinic_5.html
 * Server-rendered markup; this file is styles only.
 */

/* Legacy Elementor footer hidden via inline critical CSS in wp_head */

.ec-footer {
	--ec-navy-900: #0a0830;
	--ec-navy-800: #120e42;
	--ec-navy-700: #1b1552;
	--ec-gold-500: #cbaf72;
	--ec-gold-400: #dcc696;
	--ec-btn-gold: #CCB070;
	--ec-btn-gold-hover: #d9bc82;
	--ec-btn-text: #000;
	--ec-ink-100: #eef0f7;
	--ec-ink-300: #c3c9dd;
	--ec-ink-500: #8b93b8;
	--ec-line: rgba(255, 255, 255, 0.1);
	--ec-radius: 10px;
	--ec-gap: 28px;
	--ec-pad-top: 56px;
	--ec-pad-x: 56px;
	--ec-pad-bottom: 40px;
	--ec-container: 100%;
	--ec-field-h: var(--field-h, 48px);
	font-family: inherit;
}

.ec-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Honeypot — hidden from users, visible to naive bots */
.ec-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* ---------- Pre-footer CTA ---------- */
.ec-precta {
	--ec-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	background: linear-gradient(90deg, #cbaf72, #dcc696);
	color: #0a0830;
}
.ec-precta__inner {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	flex-wrap: wrap;
	text-align: center;
}
.ec-precta p.ec-precta__text,
.ec-precta__text {
	margin: 0 !important;
	padding: 0 !important;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.4;
	display: flex;
	align-items: center;
	align-self: center;
}
.ec-precta a.ec-precta__btn,
.ec-precta__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #0a0830;
	color: #fff !important;
	padding: 9px 20px;
	border: none;
	border-radius: 10px !important;
	overflow: hidden;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ec-precta a.ec-precta__btn:hover,
.ec-precta__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	color: #fff !important;
	text-decoration: none;
	border-radius: 10px !important;
}
.ec-precta__btn svg {
	transform: none;
}

/* ---------- Main footer ---------- */
.ec-footer {
	background: var(--brand-dark, #0A0830);
	color: var(--ec-ink-300);
	font-size: 14.5px;
	line-height: 1.9;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: clip;
}
.ec-footer a {
	color: inherit;
	text-decoration: none;
}
.ec-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ec-footer img {
	max-width: 100%;
	display: block;
}
.ec-footer button {
	font-family: inherit;
	cursor: pointer;
}

/* Brand column — centered */
.ec-col--brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ec-logo {
	display: inline-block;
	margin-bottom: 18px;
}
.ec-logo img {
	height: 38px;
	width: auto;
	max-width: none;
}

.ec-main__inner {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: var(--ec-pad-top) var(--ec-pad-x) var(--ec-pad-bottom);
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--ec-gap);
}

.ec-col__title {
	color: var(--ec-gold-400) !important;
	font-size: 15.5px;
	font-weight: 700;
	margin: 0 0 18px;
}

/* Footer titles — same gold as «مشاهده همه دوره‌ها» */
.ec-footer :is(h2, h3).ec-col__title,
.ec-footer .ec-newsletter__label,
.ec-footer .ec-cert__label {
	color: var(--ec-gold-400) !important;
}

.ec-list li {
	margin-bottom: 11px;
}
.ec-list a {
	color: var(--ec-ink-300);
	transition: color 0.15s ease;
}
.ec-list a:hover,
.ec-list a:focus-visible {
	color: var(--ec-gold-400);
}
.ec-list__more {
	color: var(--ec-gold-400) !important;
	font-weight: 700;
}
.ec-list__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ec-navy-900) !important;
	background: var(--ec-gold-500);
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	margin-top: 2px;
	transition: background 0.15s ease;
}
.ec-list__badge:hover {
	background: var(--ec-gold-400);
	color: var(--ec-navy-900) !important;
}
.ec-consult-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-sizing: border-box;
	margin: 2px 0 16px;
	background: var(--ec-btn-gold);
	color: var(--ec-btn-text) !important;
	border: none;
	border-radius: var(--ec-radius);
	padding: 10px 18px;
	font-weight: 700;
	font-size: 13.5px;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.15s ease;
}
.ec-consult-cta svg {
	color: var(--ec-btn-text);
}
.ec-consult-cta:hover,
.ec-consult-cta:focus-visible {
	background: var(--ec-btn-gold-hover);
	color: var(--ec-btn-text) !important;
	text-decoration: none;
}

/* Certificate lookup — single input, redirects to verification page */
.ec-cert {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--ec-line);
	background: transparent;
}

/* Desktop: pin cert + newsletter to column bottom so inputs align */
@media (min-width: 981px) {
	.ec-main__inner > .ec-col:has(.ec-cert),
	.ec-main__inner > .ec-col--contact {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}
	.ec-main__inner > .ec-col:has(.ec-cert) .ec-cert,
	.ec-main__inner > .ec-col--contact .ec-newsletter {
		margin-top: auto;
	}
	.ec-newsletter__msg:empty {
		min-height: 0;
		margin: 0;
	}
}

.ec-cert__label {
	margin: 0 0 10px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
}
.ec-cert__form {
	margin: 0;
	padding: 0;
}

/* Shared field row — certificate + newsletter */
.ec-cert__row,
.ec-newsletter__row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.ec-cert__row input,
.ec-newsletter__row input {
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
	min-height: var(--ec-field-h);
	height: var(--ec-field-h);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--ec-line);
	border-radius: var(--ec-radius);
	color: #fff;
	padding: 0 14px;
	font-size: 13.5px;
	font-family: inherit;
	line-height: 1.4;
	box-shadow: none;
}

.ec-cert__row input::placeholder,
.ec-newsletter__row input::placeholder {
	color: var(--ec-ink-500);
	opacity: 1;
}

.ec-newsletter__row input::placeholder {
	direction: ltr;
	text-align: right;
}

.ec-cert__row input:focus-visible,
.ec-newsletter__row input:focus-visible {
	outline: 2px solid var(--ec-gold-500);
	outline-offset: 1px;
	border-color: var(--ec-gold-500);
}

.ec-cert__row button,
.ec-newsletter__row button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	min-height: var(--ec-field-h);
	height: var(--ec-field-h);
	background: var(--ec-btn-gold);
	color: var(--ec-btn-text) !important;
	border: none;
	border-radius: var(--ec-radius);
	padding: 0 18px;
	font-weight: 700;
	font-size: 13.5px;
	line-height: 1.4;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
	transition: background 0.15s ease;
}

.ec-cert__row button:hover,
.ec-newsletter__row button:hover {
	background: var(--ec-btn-gold-hover);
	color: var(--ec-btn-text) !important;
}

/* Brand column content */
.ec-tagline {
	margin: 0 0 22px;
	color: var(--ec-ink-300);
	max-width: 34ch;
}
.ec-col--brand .ec-tagline {
	margin-left: auto;
	margin-right: auto;
}
.ec-stats {
	display: flex;
	gap: 26px;
	margin-bottom: 22px;
}
.ec-col--brand .ec-stats {
	justify-content: center;
}
.ec-stat {
	display: flex;
	flex-direction: column;
}
.ec-col--brand .ec-stat {
	align-items: center;
}
.ec-stat__num {
	color: #fff;
	font-size: 20px;
	font-weight: 700;
}
.ec-stat__label {
	color: var(--ec-ink-500);
	font-size: 12.5px;
}

.ec-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ec-col--brand .ec-social {
	justify-content: center;
	margin-top: 14px;
}
.ec-social a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ec-line);
	color: var(--ec-ink-100);
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ec-social a:hover,
.ec-social a:focus-visible {
	background: var(--ec-gold-500);
	color: var(--ec-navy-900);
	transform: translateY(-2px);
}

.ec-social-personal {
	margin-top: 18px;
}
.ec-social-personal__label {
	margin: 0 0 10px;
	color: var(--ec-gold-400);
	font-size: 13.5px;
	font-weight: 500;
}

/* Contact + newsletter */
.ec-newsletter {
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
}
.ec-contact {
	margin-bottom: 22px;
}
.ec-contact li {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 12px;
}
.ec-contact svg {
	flex: none;
	color: var(--ec-gold-400);
}
.ec-contact a {
	color: var(--ec-ink-100);
}
.ec-contact a:hover {
	color: var(--ec-gold-400);
}

.ec-newsletter__label {
	font-size: 13.5px;
	font-weight: 500;
	margin: 0 0 10px;
}
.ec-newsletter__msg {
	min-height: 18px;
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--ec-gold-400);
}

/* Trust strip */
.ec-trust {
	border-top: 1px solid var(--ec-line);
	border-bottom: 1px solid var(--ec-line);
	background: rgba(0, 0, 0, 0.12);
}
.ec-trust__inner {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 18px var(--ec-pad-x);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 32px;
	flex-wrap: wrap;
}
.ec-trust__item a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	line-height: 0;
	cursor: pointer;
}
.ec-trust__item img {
	width: 64px;
	height: 64px;
	display: block;
	object-fit: contain;
}
.ec-enamad__logo {
	filter: none;
}
.ec-trust__badge {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ec-ink-100);
	font-size: 13px;
	font-weight: 500;
}
.ec-trust__badge svg {
	color: var(--ec-gold-400);
}

/* Legal bar — content aligned to site shell */
.ec-legal__inner {
	max-width: var(--site-max-width, 1200px);
	width: 100%;
	margin: 0 auto;
	padding: 18px 24px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 12.5px;
	color: var(--ec-ink-500);
}
.ec-legal__inner p {
	margin: 0;
}
.ec-legal__inner nav {
	display: flex;
	gap: 18px;
}
.ec-legal__inner nav a:hover {
	color: var(--ec-ink-100);
}

/* Responsive */
@media (max-width: 980px) {
	.ec-main__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ec-col--brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 620px) {
	.ec-footer {
		--ec-pad-top: 40px;
		--ec-pad-x: 16px;
		--ec-pad-bottom: 28px;
	}
	.ec-main__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}
	.ec-col {
		border-bottom: 1px solid var(--ec-line);
		padding-bottom: 14px;
		margin-bottom: 6px;
	}
	.ec-col--brand {
		border-bottom: 1px solid var(--ec-line);
	}
	.ec-col--brand > * {
		display: block !important;
	}
	.ec-col--brand .ec-stats,
	.ec-col--brand .ec-social,
	.ec-col--brand .ec-social-personal .ec-social {
		display: flex !important;
	}
	.ec-col--contact {
		border-bottom: none;
	}
	.ec-col__title {
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 0;
		padding: 14px 0;
	}
	.ec-col__title::after {
		content: "+";
		font-size: 18px;
		color: var(--ec-ink-500);
	}
	.ec-col.is-open .ec-col__title::after {
		content: "−";
	}
	.ec-col > *:not(.ec-col__title) {
		display: none;
		padding-bottom: 14px;
	}
	.ec-col.is-open > *:not(.ec-col__title) {
		display: block;
	}
	.ec-col.is-open .ec-stats,
	.ec-col.is-open .ec-social {
		display: flex;
	}
	.ec-col.is-open .ec-consult-cta {
		display: inline-flex;
		width: 100%;
	}
	.ec-col.is-open .ec-newsletter {
		display: block;
	}
	.ec-col.is-open .ec-newsletter__row {
		display: flex;
	}

	/* Popular courses stay expanded — not an accordion on mobile */
	.ec-col--courses.ec-col--always-open .ec-col__title,
	.ec-col--courses .ec-col__title {
		cursor: default;
	}
	.ec-col--courses .ec-col__title::after,
	.ec-col--courses.is-open .ec-col__title::after {
		content: none;
	}
	.ec-col--courses > *:not(.ec-col__title) {
		display: block;
		padding-bottom: 14px;
	}

	.ec-legal__inner {
		flex-direction: column;
		text-align: center;
	}
	.ec-cert__row,
	.ec-newsletter__row {
		flex-direction: column;
	}
	.ec-cert__row button,
	.ec-newsletter__row button,
	.ec-consult-cta {
		width: 100%;
	}
	.ec-precta__inner {
		flex-direction: column;
		padding: 14px var(--ec-pad-x, 40px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-precta__btn,
	.ec-social a {
		transition: none;
	}
}


/* ─────────────────────────────────────────────────────────────
   حالت‌های فرمِ خبرنامه

   پیام‌ها پیش از این همه یک‌رنگ بودند؛ کاربر باید متن را
   می‌خواند تا بفهمد ثبت شد یا نه. رنگ و نشانه فقط مکمل‌اند —
   متنِ پیام خودش گویاست — ولی برای نگاهِ سریع لازم است.
   ───────────────────────────────────────────────────────────── */

.ec-newsletter__msg { min-height: 20px; font-size: 13px; line-height: 1.7; }
.ec-newsletter__msg.is-ok   { color: #7de3a8; }
.ec-newsletter__msg.is-err  { color: #ffb4b4; }
.ec-newsletter__msg.is-busy { opacity: .8; }

.ec-newsletter input[aria-invalid="true"] {
	outline: 2px solid #ffb4b4;
	outline-offset: 1px;
}

.ec-newsletter button[disabled] { opacity: .65; cursor: progress; }
