/* ============================================================
   Homa — design tokens + main navigation
   Class prefix: hw-
   Owns the tokens, the webfont and .hw-wrap for the whole site;
   tools/homepage.css holds page-level components only.
   ============================================================ */

/* --- Vazirmatn, self-hosted (fonts.googleapis.com is unreliable in IR) --- */
@font-face {
	font-family: 'Vazirmatn';
	src: url('/wp-content/uploads/fonts/Vazirmatn.woff2') format('woff2-variations'),
	     url('/wp-content/uploads/fonts/Vazirmatn.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ============================================================
   Tokens — from the brand sheet in 01/new-color.jpg
     Deep Indigo Blue  #2D2A5E   primary
     Saturated Salmon  #E85D75   secondary
   ------------------------------------------------------------
   Salmon is a mid-tone, so one value cannot carry text in both
   directions. Hence the scale:

     --hw-accent        #E85D75  the brand colour. Decoration,
                                 borders, underlines, icon fills.
                                 Not for small text either way.
     --hw-accent-btn    #D23F5C  fills carrying white text (4.56:1)
     --hw-accent-deep   #B82F50  salmon text on light (5.90:1 on
                                 white, 5.23:1 on the tint); also
                                 the hover state of a fill
     --hw-accent-light  #F59AAB  salmon text on indigo. Sized against the
                                 LIGHT end of the hero gradient (#3C3878),
                                 which is the worst case — 4.97:1 there,
                                 6.29:1 on flat indigo. The brand #E85D75
                                 is only 3.90:1 there.
     --hw-accent-tint   #FDEEF1  tinted panel background

   The old palette's rule was "never white on gold". This one is
   its mirror: white belongs ON salmon; indigo does not, because
   indigo on #E85D75 is 3.90:1 and fails AA.
   ============================================================ */
:root {
	--hw-ink:          #2D2A5E;
	--hw-ink-70:       #4A4778;
	--hw-muted:        #686591;
	--hw-line:         #E6E3EF;
	--hw-accent:       #E85D75;
	--hw-accent-btn:   #D23F5C;
	--hw-accent-deep:  #B82F50;
	--hw-accent-light: #F59AAB;
	--hw-accent-tint:  #FDEEF1;

	--hw-canvas:       #FAF5F7;
	--hw-hover:        #FBF0F3;

	--hw-hero-bg:      linear-gradient(200deg, #3C3878, #2D2A5E 60%);
	--hw-hero-lede:    #C6C3E0;
	--hw-hero-eyebrow: #F8AEBC;
	--hw-topbar-txt:   #CFCCE6;
	--hw-navy-soft:    #B5B1D6;

	--hw-wrap:         1200px;
	--hw-gutter:       40px;

	--hw-r-item:       10px;
	--hw-r-cta:        12px;
	--hw-r-promo:      16px;
	--hw-r-panel:      20px;

	--hw-sh-cta:       0 6px 16px rgba(232, 93, 117, .35);
	--hw-sh-panel:     0 24px 60px rgba(45, 42, 94, .14);
	--hw-sh-sticky:    0 6px 24px rgba(45, 42, 94, .10);

	--hw-ease:         cubic-bezier(.2, .8, .2, 1);

	/* hand the font to Blocksy's own stack variable */
	--theme-font-stack-default: 'Vazirmatn', system-ui, sans-serif;
}

body {
	font-family: 'Vazirmatn', system-ui, sans-serif;
	line-height: 1.8;
	/* letter-spacing breaks Persian joined script — never set it */
	letter-spacing: normal;
}

.hw-wrap {
	max-width: var(--hw-wrap);
	margin-inline: auto;
	padding-inline: var(--hw-gutter);
}

/* ============================================================
   Header shell
   ============================================================ */

#header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
}

.hw-topbar {
	background: var(--hw-ink);
	color: var(--hw-topbar-txt);
	font-size: 12.5px;
	overflow: hidden;
	transition: height .2s var(--hw-ease);
}

.hw-topbar__in {
	display: flex;
	align-items: center;
	height: 36px;
	gap: 10px;
}

.hw-topbar__item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hw-topbar__item a { color: inherit; text-decoration: none; }
.hw-topbar__item em { font-style: normal; color: var(--hw-navy-soft); }
.hw-topbar__item--muted { color: var(--hw-navy-soft); }
.hw-topbar__sp { flex: 1; }
.hw-tb__ico { width: 15px; height: 15px; stroke: var(--hw-accent); }

.hw-hd__main {
	position: relative;
	background: #fff;
	border-bottom: 1px solid var(--hw-line);
	transition: height .2s var(--hw-ease), box-shadow .2s var(--hw-ease);
}

.hw-hd__in {
	display: flex;
	align-items: center;
	height: 76px;
	gap: 26px;
	transition: height .2s var(--hw-ease);
}

.hw-brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.hw-brand__img { display: block; height: 50px; width: auto; object-fit: contain; transition: height .2s var(--hw-ease); }
.hw-brand--text { font-size: 20px; font-weight: 800; color: var(--hw-ink); white-space: nowrap; }

/* --- sticky state ---------------------------------------- */
#header.is-sticky .hw-topbar { height: 0; }

#header.is-sticky .hw-hd__main {
	background: rgba(255, 255, 255, .92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom-color: transparent;
	box-shadow: var(--hw-sh-sticky);
}

#header.is-sticky .hw-hd__in { height: 62px; }
#header.is-sticky .hw-brand__img { height: 42px; }

/* ============================================================
   Nav
   ============================================================ */

.hw-nav { flex: 1; min-width: 0; }

.hw-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-nav__item { position: relative; }
/* the countries mega is anchored to the header row, not to its own item */
.hw-nav__item--static { position: static; }

.hw-nav__link {
	display: flex;
	align-items: center;
	gap: 6px;
	position: relative;
	white-space: nowrap;
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--hw-ink-70);
	background: none;
	border: 0;
	padding: 10px 14px;
	border-radius: var(--hw-r-item);
	cursor: pointer;
	text-decoration: none;
	transition: background .16s var(--hw-ease), color .16s var(--hw-ease);
}

.hw-nav__link:hover { background: var(--hw-hover); color: var(--hw-ink); }

.hw-nav__link:focus-visible,
.hw-iconbtn:focus-visible,
.hw-cta:focus-visible,
.hw-crow:focus-visible,
.hw-prow:focus-visible,
.hw-mega__all:focus-visible,
.hw-burger:focus-visible,
.hw-mitem:focus-visible,
.hw-acc__hd:focus-visible,
.hw-msub:focus-visible {
	outline: 2px solid var(--hw-accent);
	outline-offset: 2px;
}

.hw-chev { width: 15px; height: 15px; color: #9A96BE; transition: transform .16s var(--hw-ease); }

.hw-nav__link[aria-expanded="true"] {
	background: var(--hw-accent-tint);
	color: var(--hw-accent-deep);
	font-weight: 600;
}

.hw-nav__link[aria-expanded="true"] .hw-chev { color: var(--hw-accent); transform: rotate(180deg); }

.hw-nav__link.is-active { color: var(--hw-ink); font-weight: 600; }

.hw-nav__link.is-active::after {
	content: "";
	position: absolute;
	inset-inline: 14px;
	bottom: 2px;
	height: 2px;
	background: var(--hw-accent);
	border-radius: 2px;
}

/* --- header actions --------------------------------------- */
.hw-hd__act { display: flex; align-items: center; gap: 10px; flex: none; }

.hw-iconbtn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--hw-r-item);
	color: var(--hw-ink-70);
	border: 1px solid var(--hw-line);
	text-decoration: none;
}

.hw-iconbtn:hover { background: var(--hw-hover); color: var(--hw-ink); }

/* White on salmon — 4.56:1. Indigo on salmon is only 3.90:1, so the text goes
   white and the fill uses --hw-accent-btn, a shade deeper than the brand tone. */
.hw-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--hw-accent-btn);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	padding: 12px 20px;
	border-radius: var(--hw-r-cta);
	box-shadow: var(--hw-sh-cta);
	text-decoration: none;
	white-space: nowrap;
	flex: none;
}

.hw-cta:hover { background: #B82F50; color: var(--hw-ink); }
.hw-cta__ico { width: 18px; height: 18px; stroke: currentColor; }
.hw-cta--block { width: 100%; padding-block: 14px; }
.hw-cta--sm { font-size: 13px; padding: 9px 14px; border-radius: var(--hw-r-item); }

.hw-hd__mobile { display: none; align-items: center; gap: 8px; margin-inline-start: auto; }

.hw-burger {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--hw-r-item);
	border: 1px solid var(--hw-line);
	background: #fff;
	color: var(--hw-ink);
	cursor: pointer;
	flex: none;
}

/* ============================================================
   Panels (mega + dropdown)
   ============================================================ */

.hw-mega {
	position: absolute;
	z-index: 20;
	top: calc(100% + 10px);
	inset-inline: var(--hw-gutter);
	background: #fff;
	border: 1px solid var(--hw-line);
	border-radius: var(--hw-r-panel);
	box-shadow: var(--hw-sh-panel);
	overflow: hidden;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .16s var(--hw-ease), transform .16s var(--hw-ease);
}

.hw-mega[hidden] { display: none; }
.hw-mega.is-open { opacity: 1; transform: none; }

/* pathways panel is anchored to its own item, not the header row */
.hw-mega--sm {
	width: 700px;
	max-width: calc(100vw - var(--hw-gutter) * 2);
	inset-inline: auto;
	inset-inline-start: 0;
	top: calc(100% + 26px);
}

.hw-mega__cols {
	display: grid;
	grid-template-columns: 1fr 1fr 300px;
	gap: 26px;
	padding: 26px;
}

.hw-mcol--sep {
	border-inline: 1px solid var(--hw-line);
	padding-inline: 26px;
}

.hw-mcol__h {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--hw-muted);
	margin: 0 0 12px;
	padding-inline-start: 10px;
}

.hw-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hw-accent); flex: none; }
.hw-dot--ink { background: var(--hw-ink-70); }

/* --- country row ------------------------------------------ */
.hw-crow {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: var(--hw-r-item);
	min-height: 46px;
	text-decoration: none;
	transition: background .16s var(--hw-ease);
}

.hw-crow__flag { display: grid; place-items: center; width: 30px; height: 22px; flex: none; }
.hw-crow__txt { display: flex; flex-direction: column; line-height: 1.55; flex: 1; min-width: 0; }
.hw-crow__txt b { font-size: 14.5px; font-weight: 600; color: var(--hw-ink); line-height: 1.7; }
.hw-crow__txt i { font-style: normal; font-size: 12px; color: var(--hw-muted); line-height: 1.8; }

/* arrow points inline-start — in RTL that reads as "forward" */
.hw-rowarr { width: 16px; height: 16px; color: #B3AFD0; opacity: 0; flex: none; transition: opacity .16s var(--hw-ease); }

.hw-crow:hover { background: var(--hw-hover); }
.hw-crow:hover .hw-crow__txt b { color: var(--hw-accent-deep); }
.hw-crow:hover .hw-rowarr { opacity: 1; color: var(--hw-accent); }

/* --- promo panel ------------------------------------------ */
.hw-mpromo {
	display: flex;
	flex-direction: column;
	background: linear-gradient(165deg, #3C3878, #2D2A5E);
	border-radius: var(--hw-r-promo);
	padding: 22px;
	color: #fff;
}

.hw-mpromo__tag { font-size: 12px; color: var(--hw-hero-eyebrow); }
.hw-mpromo__t { font-size: 19px; font-weight: 800; line-height: 1.55; margin: 6px 0 0; color: #fff; }
.hw-mpromo__d { font-size: 12.5px; color: var(--hw-hero-lede); margin: 10px 0 18px; flex: 1; line-height: 1.8; }
.hw-mpromo__note { font-size: 11.5px; color: var(--hw-navy-soft); text-align: center; margin-top: 10px; }

/* --- panel footer bar -------------------------------------- */
.hw-mega__all {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 26px;
	border-top: 1px solid var(--hw-line);
	background: #FBF9FC;
	text-decoration: none;
}

.hw-mega__all span { display: flex; flex-direction: column; flex: 1; line-height: 1.6; }
.hw-mega__all b { font-size: 14.5px; font-weight: 700; color: var(--hw-accent-deep); }
.hw-mega__all i { font-style: normal; font-size: 12px; color: var(--hw-muted); }
.hw-mega__all .hw-rowarr { opacity: 1; color: var(--hw-accent); }
.hw-mega__all:hover { background: var(--hw-hover); }

/* --- pathway row ------------------------------------------- */
.hw-prow__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	padding: 20px;
}

.hw-prow {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: var(--hw-r-cta);
	text-decoration: none;
	transition: background .16s var(--hw-ease);
}

.hw-prow__ico {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--hw-r-cta);
	background: var(--hw-accent-tint);
	color: var(--hw-accent-deep);
	flex: none;
	transition: background .16s var(--hw-ease), color .16s var(--hw-ease);
}

.hw-prow__txt { display: flex; flex-direction: column; line-height: 1.6; }
.hw-prow__txt b { font-size: 14.5px; font-weight: 600; color: var(--hw-ink); line-height: 1.7; }
.hw-prow__txt i { font-style: normal; font-size: 12px; color: var(--hw-muted); line-height: 1.8; }

.hw-prow:hover { background: var(--hw-hover); }
/* tile inverts to solid salmon with a white icon — an icon is a UI graphic,
   so 3:1 applies and white on #E85D75 is 3.36:1 */
.hw-prow:hover .hw-prow__ico { background: var(--hw-accent); color: #fff; }

/* --- scrim -------------------------------------------------- */
.hw-scrim {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(45, 42, 94, .45);
	opacity: 0;
	transition: opacity .16s var(--hw-ease);
}

.hw-scrim[hidden] { display: none; }
.hw-scrim.is-open { opacity: 1; }

/* ============================================================
   Mobile
   ============================================================ */

.hw-drawer { display: none; }
.hw-mobilebar { display: none; }

@media (max-width: 1023px) {
	:root { --hw-gutter: 16px; }

	.hw-topbar { display: none; }
	.hw-nav,
	.hw-hd__act { display: none; }
	.hw-hd__mobile { display: flex; }

	.hw-hd__in { height: 60px; gap: 10px; }
	.hw-brand__img { height: 42px; }
	#header.is-sticky .hw-hd__in { height: 60px; }

	/* --- drawer ------------------------------------------- */
	.hw-drawer {
		display: flex;
		flex-direction: column;
		position: fixed;
		inset: 0;
		z-index: 110;
		background: #fff;
		/* slides in from the inline-start edge — the right, in RTL */
		transform: translateX(100%);
		transition: transform .22s var(--hw-ease);
	}

	[dir="ltr"] .hw-drawer { transform: translateX(-100%); }
	.hw-drawer[hidden] { display: none; }
	.hw-drawer.is-open { transform: none; }

	.hw-drawer__hd {
		display: flex;
		align-items: center;
		gap: 10px;
		height: 60px;
		padding-inline: var(--hw-gutter);
		border-bottom: 1px solid var(--hw-line);
		flex: none;
	}

	.hw-drawer__body {
		display: flex;
		flex-direction: column;
		flex: 1;
		overflow-y: auto;
		padding: 8px var(--hw-gutter) 0;
	}

	.hw-mitem,
	.hw-acc__hd {
		display: flex;
		align-items: center;
		width: 100%;
		font-family: inherit;
		font-size: 15.5px;
		font-weight: 600;
		color: var(--hw-ink);
		padding: 12px 4px;
		border: 0;
		border-bottom: 1px solid var(--hw-line);
		background: none;
		text-align: start;
		text-decoration: none;
		cursor: pointer;
	}

	.hw-acc__hd { justify-content: space-between; }

	.hw-acc__i {
		display: grid;
		place-items: center;
		width: 28px;
		height: 28px;
		border-radius: 8px;
		background: var(--hw-canvas);
		color: var(--hw-ink-70);
		flex: none;
	}

	.hw-acc__i svg { width: 18px; height: 18px; }

	.hw-acc__hd[aria-expanded="true"] { color: var(--hw-accent-deep); border-bottom-color: transparent; }
	.hw-acc__hd[aria-expanded="true"] .hw-acc__i { background: var(--hw-accent-tint); color: var(--hw-accent-deep); }

	.hw-acc__body {
		background: var(--hw-canvas);
		border-radius: 14px;
		padding: 10px;
		margin-bottom: 10px;
	}

	.hw-acc__body[hidden] { display: none; }

	.hw-acc__g {
		display: block;
		font-size: 12px;
		font-weight: 700;
		color: var(--hw-muted);
		padding: 2px 6px 8px;
	}

	.hw-msub {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 10px 8px;
		border-radius: var(--hw-r-item);
		background: #fff;
		margin-bottom: 6px;
		text-decoration: none;
		min-height: 0;
	}

	.hw-msub .hw-crow__txt b { font-size: 14.5px; font-weight: 500; color: var(--hw-ink-70); }
	.hw-msub .hw-crow__txt i { display: none; }
	.hw-msub .hw-rowarr { opacity: 1; color: #B3AFD0; }
	.hw-msub .hw-prow__ico { width: 30px; height: 30px; border-radius: 8px; }
	.hw-msub .hw-prow__ico svg { width: 18px; height: 18px; }

	.hw-acc--nested { margin-top: 2px; }
	.hw-acc__hd--sub {
		font-size: 14.5px;
		background: #fff;
		border: 0;
		border-radius: var(--hw-r-item);
		padding: 11px 8px;
	}
	.hw-acc__body--sub { background: transparent; padding: 8px 0 0; margin-bottom: 0; }

	.hw-mall {
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 13.5px;
		font-weight: 700;
		color: var(--hw-accent-deep);
		padding: 12px 8px 4px;
		text-decoration: none;
	}

	.hw-mall .hw-rowarr { opacity: 1; color: var(--hw-accent); }

	.hw-drawer__foot {
		margin-top: auto;
		padding: 14px 0 18px;
		border-top: 1px solid var(--hw-line);
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.hw-mphone {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		font-size: 14.5px;
		font-weight: 600;
		color: var(--hw-ink-70);
		border: 1px solid var(--hw-line);
		border-radius: var(--hw-r-cta);
		padding: 12px;
		text-decoration: none;
	}

	.hw-gh__ico { width: 18px; height: 18px; }

	/* --- sticky bottom bar --------------------------------- */
	.hw-mobilebar {
		display: flex;
		align-items: center;
		gap: 10px;
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 95;
		background: rgba(255, 255, 255, .96);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		border-top: 1px solid var(--hw-line);
		padding: 12px var(--hw-gutter);
		padding-bottom: calc(12px + env(safe-area-inset-bottom));
		box-shadow: 0 -6px 20px rgba(45, 42, 94, .08);
	}

	.hw-mobilebar .hw-cta { flex: 1; }

	.hw-mobilebar__ph {
		display: grid;
		place-items: center;
		width: 46px;
		height: 46px;
		border-radius: var(--hw-r-cta);
		border: 1px solid var(--hw-line);
		color: var(--hw-ink-70);
		flex: none;
		text-decoration: none;
	}

	/* clearance for the fixed bar is on #footer, not body — see footer.css.
	   Padding on the body would leave a pale strip below the navy footer. */
}

/* ============================================================
   Motion preferences
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.hw-mega,
	.hw-scrim,
	.hw-drawer,
	.hw-chev,
	.hw-topbar,
	.hw-hd__main,
	.hw-hd__in,
	.hw-brand__img,
	.hw-nav__link,
	.hw-crow,
	.hw-prow,
	.hw-prow__ico,
	.hw-rowarr {
		transition: none !important;
	}
}
