/* =========================================================================
   Ziban Clinic — main.css
   @layer reset → tokens → base → layout → utilities → header → footer
   ========================================================================= */

/* -------------------------------------------------------------------------
 * Fonts (IRANSansX — bundled, FaNum variants for Persian digits)
 * ---------------------------------------------------------------------- */
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-RegularD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-RegularD4.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-MediumD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-MediumD4.woff') format('woff');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-DemiBoldD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-DemiBoldD4.woff') format('woff');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-BoldD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-BoldD4.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-ExtraBoldD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-ExtraBoldD4.woff') format('woff');
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSansX';
	src: url('../fonts/iransans/woff2/IRANSansXFaNum-BlackD4.woff2') format('woff2'),
		url('../fonts/iransans/woff/IRANSansXFaNum-BlackD4.woff') format('woff');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

@layer reset, tokens, base, layout, utilities, header, footer;

/* =========================================================================
   @layer reset
   ========================================================================= */
@layer reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	* {
		margin: 0;
	}

	html {
		-webkit-text-size-adjust: 100%;
		scroll-behavior: smooth;
	}

	body {
		min-height: 100dvh;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-rendering: optimizeLegibility;
	}

	img,
	picture,
	svg,
	video {
		display: block;
		max-width: 100%;
	}

	input,
	button,
	textarea,
	select {
		font: inherit;
		color: inherit;
	}

	button {
		background: none;
		border: 0;
		cursor: pointer;
	}

	a {
		color: inherit;
		text-decoration: none;
	}

	p,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		overflow-wrap: break-word;
	}

	ul[class],
	ol[class] {
		list-style: none;
		padding: 0;
	}

	[hidden] {
		display: none !important;
	}
}

/* =========================================================================
   @layer tokens
   ========================================================================= */
@layer tokens {
	:root {
		/* brand blues */
		--z-primary: #4A6BB3;
		--z-primary-600: #4261a2;
		--z-primary-700: #3a5690;
		--z-primary-800: #2f4575;
		--z-brand: #4A6BB3;
		--z-sky: #38bdf8;

		/* ink & text */
		--z-ink: #101d3d;
		--z-heading: #12213f;
		--z-body: #46536b;
		--z-muted: #8a94a6;

		/* surfaces */
		--z-bg: #ffffff;
		--z-bg-soft: #f5f7fb;
		--z-line: #e4eaf3;
		--z-line-strong: #d3dcec;

		/* accents */
		--z-gold: #f5a623;
		--z-yellow-bg: #fdf3d7;
		--z-yellow-ink: #8a5f00;
		--z-yellow-cta: #f6c344;
		--z-green-bg: #e3f5ee;
		--z-green-ink: #0f7a55;
		--z-green-cta: #2fc48e;

		/* tints */
		--z-blue-50: #eef1f9;
		--z-blue-100: #dfe5f3;
		--z-blue-700-08: rgba(74, 107, 179, 0.08);

		/* geometry */
		--z-r-xl: 26px;
		--z-r-lg: 20px;
		--z-r-md: 14px;
		--z-r-sm: 10px;
		--z-pill: 999px;

		/* shadows */
		--z-shadow-sm: 0 4px 14px rgba(47, 69, 117, 0.06);
		--z-shadow-md: 0 10px 30px rgba(47, 69, 117, 0.09);
		--z-shadow-lg: 0 24px 60px rgba(47, 69, 117, 0.14);
		--z-shadow-btn: 0 10px 22px rgba(74, 107, 179, 0.28);

		/* rhythm */
		--z-container: 1247px;
		--z-gutter: 24px;
		--z-section-y: 84px;

		/* type */
		--z-font: 'IRANSansX', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;

		/* header */
		--z-header-h: 88px;
	}
}

/* =========================================================================
   @layer base
   ========================================================================= */
@layer base {
	body {
		font-family: var(--z-font);
		font-size: 15px;
		line-height: 1.9;
		color: var(--z-body);
		background: #e5e5e5;
	}

	/* page shell: white main column with gray side gutters */
	main.z-home {
		background: var(--z-bg);
		overflow-x: clip;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-family: var(--z-font);
		color: var(--z-heading);
		line-height: 1.5;
		font-weight: 800;
	}

	/* global content reset: plain links, text blocks without default spacing */
	a {
		text-decoration: none;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	span {
		margin: 0;
		padding: 0;
	}

	::selection {
		background: var(--z-primary);
		color: #fff;
	}

	:focus-visible {
		outline: 3px solid rgba(56, 189, 248, 0.55);
		outline-offset: 2px;
		border-radius: 6px;
	}

	.zi {
		flex: none;
	}

	@media (prefers-reduced-motion: reduce) {
		*,
		*::before,
		*::after {
			animation-duration: 0.01ms !important;
			transition-duration: 0.01ms !important;
			scroll-behavior: auto !important;
		}
	}
}

/* =========================================================================
   @layer layout
   ========================================================================= */
@layer layout {
	.z-container {
		width: 100%;
		max-width: var(--z-container);
		margin-inline: auto;
		padding-inline: var(--z-gutter);
	}

	.z-section {
		padding-block: var(--z-section-y);
	}

	.z-section--soft {
		background: var(--z-bg-soft);
	}
}

/* =========================================================================
   @layer utilities
   ========================================================================= */
@layer utilities {
	.z-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 9px;
		padding: 13px 24px;
		border-radius: var(--z-pill);
		font-size: 14.5px;
		font-weight: 600;
		line-height: 1.6;
		white-space: nowrap;
		transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
			border-color 0.18s ease, color 0.18s ease;
	}

	.z-btn:hover {
		transform: translateY(-2px);
	}

	.z-btn:active {
		transform: translateY(0);
	}

	.z-btn--primary {
		background: linear-gradient(135deg, var(--z-primary), var(--z-primary-600) 60%, var(--z-primary-700));
		color: #fff;
		box-shadow: var(--z-shadow-btn);
	}

	.z-btn--primary:hover {
		background: linear-gradient(135deg, var(--z-primary-600), var(--z-primary-700) 60%, var(--z-primary-800));
	}

	.z-btn--ghost {
		background: #fff;
		color: var(--z-primary);
		border: 1.5px solid var(--z-line-strong);
	}

	.z-btn--ghost:hover {
		border-color: var(--z-primary);
		background: #fbfdff;
	}

	.z-btn--white {
		background: #fff;
		color: var(--z-primary-700);
		box-shadow: 0 10px 24px rgba(6, 22, 66, 0.18);
	}

	.z-btn--outline-white {
		color: #fff;
		border: 1.5px solid rgba(255, 255, 255, 0.65);
		background: rgba(255, 255, 255, 0.08);
	}

	.z-btn--outline-white:hover {
		background: rgba(255, 255, 255, 0.16);
		border-color: #fff;
	}

	.z-btn--sm {
		padding: 9px 18px;
		font-size: 13px;
	}

	.z-link-arrow {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		font-size: 14px;
		font-weight: 600;
		color: var(--z-primary);
		transition: gap 0.18s ease;
	}

	.z-link-arrow:hover {
		gap: 11px;
	}

	/* visually hidden but accessible */
	.z-sr {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}
}

/* =========================================================================
   @layer header
   ========================================================================= */
@layer header {
	.z-header {
		position: sticky;
		top: 0;
		z-index: 90;
		background: #FFFFFF;
		backdrop-filter: blur(14px);
		border-bottom: 1px solid #EEEEEE;
		transition: border-color 0.2s ease, box-shadow 0.2s ease;
	}

	.z-header.is-scrolled {
		border-bottom-color: #EEEEEE;
		box-shadow: 0 6px 24px rgba(47, 69, 117, 0.07);
	}

	.z-header__inner {
		height: var(--z-header-h);
		display: flex;
		align-items: center;
		gap: 32px;
	}

	/* logo — bare dotted mark + name (Figma v4) */
	.z-logo {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		flex: none;
	}

	.z-logo__mark {
		display: inline-flex;
		color: var(--z-primary);
	}

	.z-logo__mark svg {
		width: 38px;
		height: 25px;
	}

	.z-logo__text {
		display: flex;
		flex-direction: column;
		line-height: 1.35;
	}

	.z-logo__name {
		font-size: 18px;
		font-weight: 700;
		color: var(--z-primary);
		letter-spacing: -0.2px;
	}

	.z-logo__tag {
		font-size: 10.5px;
		font-weight: 500;
		color: var(--z-muted);
	}

	/* nav */
	.z-nav {
		display: flex;
		align-items: center;
		gap: 26px;
		margin-inline-start: 12px;
	}

	.z-nav a {
		position: relative;
		font-size: 16px;
		font-weight: 500;
		color: #616161 !important;
		padding-block: 6px;
		transition: color 0.18s ease;
	}

	/* dropdown indicator (خدمات) — chevron points down */
	.z-nav a.has-dropdown {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.z-nav a.has-dropdown .zi {
		transform: rotate(-90deg);
		margin-top: 2px;
		color: #616161;
	}

	.z-nav a::after {
		content: '';
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		height: 2.5px;
		border-radius: 3px;
		background: var(--z-primary);
		transform: scaleX(0);
		transition: transform 0.2s ease;
	}

	.z-nav a:hover {
		color: var(--z-primary);
	}

	.z-nav a:hover::after,
	.z-nav a.is-active::after {
		transform: scaleX(1);
	}

	/* actions */
	.z-header__actions {
		display: flex;
		align-items: center;
		gap: 18px;
		margin-inline-start: auto;
	}

	.z-header__phone {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		font-size: 15px;
		font-weight: 700;
		color: var(--z-heading);
		transition: color 0.18s ease;
	}

	.z-header__phone .zi {
		width: 17px;
		height: 17px;
		color: var(--z-primary);
	}

	.z-header__phone span {
		direction: ltr;
		unicode-bidi: embed;
	}

	.z-header__phone:hover {
		color: var(--z-primary);
	}

	/* outlined pill (Figma v4) — border stays light blue like the site */
	.z-login-btn{
	display: inline-flex;
	align-items: center;
	border: 1px solid #91B0F2;
	border-radius: 100px;
	padding: 6.5px 26px;
	font-size: 16px;
	font-weight: 500;
	color: var(--z-primary) !important;
	background: #fff;
	transition: background-color 0.18s ease, color 0.18s ease;
   }

	.z-login-btn:hover {
		background: var(--z-blue-50);
	}

	/* plain text link beside the login pill — currently removed from the
	   header markup like the site (v-if="false" in SiteHeader); the CSS
	   stays for when the physicians signup form ships */
	.z-signup-link {
		font-size: 16px;
		font-weight: 500;
		color: #2E2E2E !important;
		transition: color 0.18s ease;
	}

	.z-signup-link:hover {
		color: var(--z-primary) !important;
	}

	/* logged-in state: the light-blue account chip of the site header —
	   user icon + display name, links to the WP profile */
	.z-login-btn.is-user {
		gap: 8px;
		border: 0;
		padding: 7px 14px;
		font-size: 14px;
		color: var(--z-text-strong) !important;
		background: #eef2fb;
	}

	.z-login-btn.is-user .zi {
		color: var(--z-primary);
	}

	.z-portal-btn {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		padding: 11px 22px;
		border-radius: var(--z-pill);
		font-size: 14px;
		font-weight: 600;
		color: #fff;
		background: linear-gradient(135deg, var(--z-primary), var(--z-primary-600) 55%, var(--z-primary-700));
		box-shadow: 0 8px 18px rgba(74, 107, 179, 0.26);
		transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
	}

	.z-portal-btn:hover {
		transform: translateY(-2px);
		filter: brightness(1.05);
	}

	.z-burger {
		display: none;
		width: 44px;
		height: 44px;
		border-radius: 13px;
		border: 1.5px solid var(--z-line-strong);
		color: var(--z-heading);
		place-items: center;
	}

	/* ------- mobile drawer ------- */
	.z-drawer-overlay {
		position: fixed;
		inset: 0;
		z-index: 95;
		background: rgba(13, 26, 61, 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s ease;
	}

	.z-drawer {
		position: fixed;
		z-index: 96;
		top: 0;
		bottom: 0;
		/* Figma mobile: the menu opens from the RIGHT edge */
		inset-inline-start: 0;
		width: min(88vw, 340px);
		background: #fff;
		padding: 22px;
		display: flex;
		flex-direction: column;
		gap: 8px;
		/* hidden past the right edge (RTL); no shadow while hidden or it
		   bleeds into the viewport edge */
		transform: translateX(105%);
		transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.3s ease;
	}

	[dir='ltr'] .z-drawer {
		transform: translateX(-105%);
	}

	body.z-drawer-open .z-drawer-overlay {
		opacity: 1;
		visibility: visible;
	}

	body.z-drawer-open .z-drawer {
		transform: translateX(0);
		/* drawer hugs the right edge: shadow falls to its left */
		box-shadow: -18px 0 50px rgba(13, 26, 61, 0.18);
	}

	[dir='ltr'] body.z-drawer-open .z-drawer {
		box-shadow: 18px 0 50px rgba(13, 26, 61, 0.18);
	}

	body.z-drawer-open {
		overflow: hidden;
	}

	.z-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 14px;
		border-bottom: 1px solid var(--z-line);
	}

	.z-drawer__close {
		width: 40px;
		height: 40px;
		border-radius: 12px;
		border: 1.5px solid var(--z-line-strong);
		color: var(--z-heading);
		display: grid;
		place-items: center;
	}

	.z-drawer__nav {
		display: flex;
		flex-direction: column;
	}

	.z-drawer__nav a {
		padding: 13px 12px;
		border-radius: 12px;
		font-size: 15px;
		font-weight: 600;
		color: var(--z-heading);
	}

	.z-drawer__nav a:hover {
		background: var(--z-blue-50);
		color: var(--z-primary);
	}

	.z-drawer__actions {
		margin-top: auto;
		display: grid;
		gap: 10px;
	}

	.z-drawer__actions .z-btn {
		width: 100%;
	}

	@media (max-width: 1120px) {
		.z-header__phone {
			display: none;
		}
	}

	@media (max-width: 1024px) {
		.z-nav {
			display: none;
		}

		.z-burger {
			display: grid;
		}
	}

	@media (max-width: 560px) {
		.z-header__inner {
			height: 88px;
			gap: 10px;
		}

		.z-logo__tag {
			display: none;
		}

		.z-portal-btn span {
			display: none;
		}

		.z-portal-btn {
			padding: 10px 13px;
		}
	}

	/* mobile header (Figma v4): logo far right, login pill + burger at the
	   left edge (RTL: ascending flex order lays out right → left) */
	@media (max-width: 767px) {
		.z-header__inner {
			gap: 12px;
		}

		/* actions children join the header row so they can sit on both ends */
		.z-header__actions {
			display: contents;
		}

		.z-logo {
			order: -3;
		}

		.z-login-btn {
			order: -2;
			margin-inline-start: auto;
			padding: 6.5px 20px;
			font-size: 14px;
		}

		.z-signup-link {
			display: none;
		}

		.z-burger {
			order: -1;
			border: 0; /* Figma mobile shows a bare hamburger */
			background: none;
		}

		.z-logo__mark svg {
			width: 32px;
			height: 21px;
		}

		.z-logo__name {
			font-size: 18px;
		}
	}
}

@layer footer {
	.zft-footer {
		background: #f4f5f7;
		padding-block: clamp(28px, 4vw, 40px) clamp(32px, 5vw, 50px);
	}

	.zft-wrap {
		width: 100%;
		max-width: 1192px; /* 1152px content + 2×20px gutters */
		margin-inline: auto;
		padding-inline: 20px;
	}

	/* ---- Block 1: brand row ---- */
	.zft-brand__lockup {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.zft-brand__logo {
		display: inline-flex;
		color: var(--z-primary);
	}

	.zft-brand__logo svg {
		width: 28px;
		height: 19px;
	}

	.zft-brand__name {
		font-size: clamp(16px, 1.6vw, 22px);
		font-weight: 700;
		color: var(--z-primary);
		line-height: 1.7;
	}

	.zft-brand__desc {
		font-size: clamp(13px, 1.4vw, 18px);
		font-weight: 500;
		color: #616161 !important;
		line-height: 1.9;
		margin-top: 12px;
		text-align: start;
	}

	/* ---- Block 2: link columns + info + the trust seal (4 columns,
	 * identical to the site footer's grid) ---- */
	.zft-grid {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 200px));
		justify-content: start; /* RTL start = right; left half stays empty */
		column-gap: clamp(48px, 8vw, 110px);
		row-gap: 32px;
		margin-top: 38px;
	}

	.zft-col__title {
		font-size: clamp(14px, 1.4vw, 18px);
		font-weight: 700;
		color: #1D1D1D;
		text-align: start;
		margin-bottom: 12px;
		line-height: 1.7;
	}

	.zft-col__list {
		display: flex;
		flex-direction: column;
		gap: 8px;
		list-style-type: none;
	}

	.zft-col__list a {
		font-size: clamp(12px, 1.2vw, 16px);
		font-weight: 500;
		color: #616161 !important;
		line-height: 1.7;
		transition: color 0.16s ease;
	}

	.zft-col__list a:hover {
		color: var(--z-primary);
	}

	/* column 3: hours + contact groups */
	.zft-contact {
		margin-top: 28px;
	}

	.zft-hours__text {
		font-size: clamp(12px, 1.2vw, 13px);
		font-weight: 400;
		color: #666;
		line-height: 1.7;
	}

	.zft-contact__list {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.zft-contact__row {
		display: flex;
		align-items: center;
		gap: 10px;
		color: #666;
	}

	.zft-contact__row .zi {
		width: 18px;
		height: 18px;
		flex: none;
		stroke-width: 1.5;
		color: #666;
	}

	.zft-contact__row a,
	.zft-contact__row span {
		font-size: clamp(12px, 1.2vw, 13px);
		font-weight: 400;
		color: #666;
		line-height: 1.6;
		transition: color 0.16s ease;
	}

	.zft-contact__row a:hover {
		color: var(--z-primary);
	}

	.zft-contact__row a.is-ltr {
		direction: ltr;
		unicode-bidi: isolate;
	}

	/* column 4: the Enamad trust seal in its own column — the white
	 * rounded box of the site footer (h-24/p-2/rounded-2xl, sm: 112px) */
	.zft-trust__seal {
		display: grid;
		place-items: center;
		width: 96px;
		height: 96px;
		padding: 8px;
		border: 1px solid #e6e8ec;
		border-radius: 16px;
		background: #fff;
		transition: border-color 0.2s ease;
	}

	.zft-trust__seal:hover {
		border-color: color-mix(in srgb, var(--z-primary) 40%, transparent);
	}

	.zft-trust__seal img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	@media (min-width: 640px) {
		.zft-trust__seal {
			width: 112px;
			height: 112px;
		}
	}

	/* ---- breakpoints ---- */
	@media (max-width: 1023px) {
		/* the grid folds into a 2×2: link / link, then hours+contact beside
		 * the trust seal — like the site footer, no full-width span */
		.zft-grid {
			grid-template-columns: repeat(2, minmax(0, 200px));
		}
	}

	@media (max-width: 639px) {
		/* mobile keeps the same 2×2 side by side, tighter gutters */
		.zft-grid {
			grid-template-columns: repeat(2, minmax(0, 1fr));
			column-gap: 14px;
			row-gap: 28px;
		}
	}
}
