/**
 * ISAIMED Election Landing — Glassmorphism frontend
 * Scoped to .iel-wrap; RTL-first; dark/light via .iel-scheme-*
 */

/* ----- Font (loaded via inline style @font-face; scoped to wrapper) ----- */
.iel-wrap {
	font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ----- Design tokens (dark default) ----- */
.iel-wrap {
	--iel-bg: #0B1220;
	--iel-glass: rgba(255, 255, 255, 0.08);
	--iel-glass-strong: rgba(255, 255, 255, 0.12);
	--iel-stroke: rgba(255, 255, 255, 0.16);
	--iel-text: rgba(255, 255, 255, 0.92);
	--iel-muted: rgba(255, 255, 255, 0.72);
	--iel-accent: #D4AF37;
	--iel-accent2: #2F6BFF;
	--iel-radius: 16px;
	--iel-blur: 18px;
	--iel-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
	--iel-max-width: 1200px;
	--iel-spacing: 24px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--iel-text);
	background: var(--iel-bg);
	min-height: 100vh;
	box-sizing: border-box;
}

/* Light scheme (explicit) */
.iel-wrap.iel-scheme-light {
	--iel-bg: #f0f2f5;
	--iel-glass: rgba(0, 0, 0, 0.06);
	--iel-glass-strong: rgba(0, 0, 0, 0.1);
	--iel-stroke: rgba(0, 0, 0, 0.12);
	--iel-text: rgba(0, 0, 0, 0.88);
	--iel-muted: rgba(0, 0, 0, 0.65);
	--iel-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
/* Auto: JS sets data-resolved-scheme; fallback to prefers-color-scheme */
.iel-wrap.iel-scheme-auto[data-resolved-scheme="light"] {
	--iel-bg: #f0f2f5;
	--iel-glass: rgba(0, 0, 0, 0.06);
	--iel-glass-strong: rgba(0, 0, 0, 0.1);
	--iel-stroke: rgba(0, 0, 0, 0.12);
	--iel-text: rgba(0, 0, 0, 0.88);
	--iel-muted: rgba(0, 0, 0, 0.65);
	--iel-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: light) {
	.iel-wrap.iel-scheme-auto:not([data-resolved-scheme]) {
		--iel-bg: #f0f2f5;
		--iel-glass: rgba(0, 0, 0, 0.06);
		--iel-glass-strong: rgba(0, 0, 0, 0.1);
		--iel-stroke: rgba(0, 0, 0, 0.12);
		--iel-text: rgba(0, 0, 0, 0.88);
		--iel-muted: rgba(0, 0, 0, 0.65);
		--iel-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	}
}

/* Container: full width, readable max-width, centered ----- */
.iel-wrap *,
.iel-wrap *::before,
.iel-wrap *::after {
	box-sizing: border-box;
}
.iel-container {
	width: 100%;
	max-width: var(--iel-max-width);
	margin-left: auto;
	margin-right: auto;
	padding: var(--iel-spacing) 20px;
	direction: rtl;
}

/* ----- Banner ----- */
.iel-banner {
	position: relative;
	border-radius: var(--iel-radius);
	overflow: hidden;
	min-height: 220px;
	background: linear-gradient(135deg, var(--iel-accent2) 0%, var(--iel-bg) 100%);
	background-size: cover;
	background-position: center;
	margin-bottom: var(--iel-spacing);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.iel-banner-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 18, 32, 0.75) 0%, rgba(11, 18, 32, 0.5) 100%);
	backdrop-filter: blur(var(--iel-blur));
	-webkit-backdrop-filter: blur(var(--iel-blur));
}
@supports not (backdrop-filter: blur(1px)) {
	.iel-banner-overlay {
		background: linear-gradient(180deg, rgba(11, 18, 32, 0.9) 0%, rgba(11, 18, 32, 0.75) 100%);
	}
}
.iel-banner-inner {
	position: relative;
	z-index: 1;
	padding: 32px 24px;
}
.iel-banner-title {
	font-size: clamp(22px, 4vw, 34px);
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--iel-text);
	letter-spacing: -0.02em;
}
.iel-banner-subtitle {
	font-size: clamp(14px, 2vw, 16px);
	color: var(--iel-muted);
	margin: 0 0 16px;
}
.iel-countdown {
	font-size: 15px;
	color: var(--iel-accent);
	font-weight: 600;
	margin-top: 12px;
}
.iel-countdown span {
	display: inline-block;
	min-width: 1.8em;
}

/* ----- Shortcuts grid ----- */
.iel-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--iel-spacing);
	margin-bottom: var(--iel-spacing);
}
@media (min-width: 600px) {
	.iel-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (min-width: 900px) {
	.iel-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ----- Card (glass) ----- */
.iel-card {
	border-radius: var(--iel-radius);
	background: var(--iel-glass);
	border: 1px solid var(--iel-stroke);
	box-shadow: var(--iel-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.iel-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	border-color: var(--iel-accent);
}
.iel-card-primary {
	background: var(--iel-glass-strong);
	border-color: var(--iel-accent);
	box-shadow: 0 0 0 1px var(--iel-accent), var(--iel-shadow);
}
.iel-card-primary:hover {
	border-color: var(--iel-accent);
	box-shadow: 0 0 20px rgba(212, 175, 55, 0.25), 0 12px 40px rgba(0, 0, 0, 0.2);
}
.iel-card-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px 20px;
	text-decoration: none;
	color: inherit;
	min-height: 100%;
}
.iel-card-link:focus {
	outline: 2px solid var(--iel-accent);
	outline-offset: 2px;
}
.iel-card-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	color: var(--iel-accent);
	font-size: 28px;
}
.iel-card-icon .iel-icon-svg {
	display: block;
	width: 40px;
	height: 40px;
}
.iel-card-icon .iel-icon-svg svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}
.iel-card-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 6px;
	color: var(--iel-text);
}
.iel-card-desc {
	font-size: 14px;
	color: var(--iel-muted);
	margin: 0 0 12px;
	flex: 1;
}
.iel-card-cta {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 8px;
	background: var(--iel-accent);
	color: #0B1220;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s, transform 0.2s;
}
.iel-card-link:hover .iel-card-cta {
	background: #e5c04a;
	transform: scale(1.02);
}
.iel-card-primary .iel-card-cta {
	background: var(--iel-accent2);
	color: #fff;
}
.iel-card-primary .iel-card-link:hover .iel-card-cta {
	background: #4a7dff;
}

/* Disabled state when no URL */
.iel-card-link.iel-card-link-disabled {
	pointer-events: none;
	cursor: default;
}
.iel-card-link.iel-card-link-disabled .iel-card-cta {
	opacity: 0.6;
}

/* ----- Footer ----- */
.iel-footer {
	text-align: center;
	padding: var(--iel-spacing) 0 0;
	border-top: 1px solid var(--iel-stroke);
}
.iel-footer-note {
	font-size: 14px;
	color: var(--iel-muted);
	margin: 0;
}
