/* ==========================================================================
   Mazmotor Pro — design system
   Breakpoints: phone ≤640 · tablet ≤1024 · desktop · wide ≥1600 · TV/4K ≥1920
   ========================================================================== */

:root {
	--mz-primary: #2d6cb5;
	--mz-primary-2: #cfdbea;
	--mz-dark: #071529;
	--mz-dark-2: #0d2242;
	--mz-bg: #f3f6fa;
	--mz-surface: #ffffff;
	--mz-surface-2: #f6f8fb;
	--mz-ink: #101828;
	--mz-muted: #5d6878;
	--mz-line: #dfe5ee;
	--mz-success: #1f9d6b;
	--mz-danger: #d64545;
	--mz-on-primary: #ffffff;
	--mz-radius: 18px;
	--mz-radius-sm: 12px;
	--mz-shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 30px rgba(20, 20, 30, .06);
	--mz-shadow-lg: 0 30px 80px rgba(15, 16, 20, .18);
	--mz-container: 1320px;
	--mz-gutter: clamp(16px, 4vw, 32px);
	--mz-header-h: 76px;
	--mz-font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
	--mz-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--mz-font);
	font-size: 1rem;
	line-height: 1.85;
	color: var(--mz-ink);
	background: var(--mz-bg);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "ss01";
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--mz-primary); }
h1, h2, h3, h4, h5, h6 { line-height: 1.4; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--mz-primary); color: var(--mz-on-primary); }

:focus-visible {
	outline: 3px solid var(--mz-primary);
	outline-offset: 3px;
	border-radius: 6px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.mz-skip-link:focus {
	clip: auto; width: auto; height: auto;
	inset-inline-start: 12px; top: 12px;
	z-index: 1000; padding: 10px 16px;
	background: var(--mz-surface); border-radius: 10px;
}

.mz-container {
	width: 100%;
	max-width: calc(var(--mz-container) + var(--mz-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--mz-gutter);
}
.mz-main { padding-block: 24px 64px; }
.mz-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.mz-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 0 1.4em;
	border: 1.5px solid transparent; border-radius: 999px;
	font-weight: 700; font-size: .95rem; line-height: 1;
	cursor: pointer; white-space: nowrap;
	transition: transform .2s var(--mz-ease), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mz-btn:active { transform: scale(.97); }
.mz-btn--primary {
	background: linear-gradient(135deg, #4a8bd6, var(--mz-primary) 55%, #1d4f91);
	color: var(--mz-on-primary);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--mz-primary) 35%, transparent);
}
.mz-btn--primary:hover { color: var(--mz-on-primary); box-shadow: 0 12px 32px color-mix(in srgb, var(--mz-primary) 50%, transparent); transform: translateY(-1px); }
.mz-btn--dark { background: var(--mz-dark); color: #fff; }
.mz-btn--dark:hover { background: var(--mz-dark-2); color: var(--mz-primary-2); }
.mz-btn--ghost { background: transparent; border-color: currentColor; }
.mz-btn--ghost:hover { border-color: var(--mz-primary); color: var(--mz-primary); }
.mz-btn--sm { min-height: 40px; padding: 0 1.1em; font-size: .875rem; }
.mz-btn--lg { min-height: 56px; padding: 0 1.8em; font-size: 1.05rem; }
.mz-btn--block { width: 100%; }
.mz-icon-btn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .06); color: inherit;
	cursor: pointer; transition: background .2s, color .2s;
}
.mz-icon-btn:hover { background: rgba(255, 255, 255, .14); color: var(--mz-primary-2); }

.mz-badge {
	display: inline-flex; align-items: center; gap: .35em;
	padding: .2em .8em; border-radius: 999px;
	background: color-mix(in srgb, var(--mz-primary) 14%, transparent);
	color: color-mix(in srgb, var(--mz-primary) 70%, var(--mz-ink));
	font-size: .78rem; font-weight: 700;
}

/* ---------- Header ---------- */
.mz-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--mz-dark) 92%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	color: #f3f1ea;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
	transition: box-shadow .3s, transform .3s var(--mz-ease);
}
.admin-bar .mz-header { top: 32px; }
.mz-header.is-scrolled { box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.mz-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--mz-header-h); }
.mz-header__brand { flex: none; }
.mz-logo { display: inline-flex; align-items: center; }
.mz-logo img { display: block; width: auto; height: 46px; max-width: 220px; object-fit: contain; }
.mz-footer__logo .mz-logo img { height: 58px; max-width: 260px; }
.mz-drawer__head .mz-logo img { height: 40px; }
.mz-logo--emblem img { height: 56px; }
.mz-logo-text { display: grid; line-height: 1.3; }
.mz-logo-text__name { font-weight: 900; font-size: 1.2rem; color: var(--mz-primary-2); }
.mz-logo-text__tag { font-size: .72rem; opacity: .7; }

.mz-nav { flex: 1; }
.mz-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mz-menu > li { position: relative; }
.mz-menu > li > a {
	display: block; padding: 10px 14px; border-radius: 999px;
	font-weight: 600; font-size: .95rem; color: rgba(243, 241, 234, .85);
}
.mz-menu > li > a:hover,
.mz-menu > .current-menu-item > a,
.mz-menu > .current-menu-ancestor > a { color: #fff; background: var(--mz-primary); }
.mz-menu .sub-menu {
	position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
	min-width: 220px; margin: 0; padding: 8px; list-style: none;
	background: var(--mz-dark-2); border: 1px solid rgba(255, 255, 255, .08);
	border-radius: var(--mz-radius-sm); box-shadow: var(--mz-shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: .2s var(--mz-ease);
}
.mz-menu li:hover > .sub-menu,
.mz-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mz-menu .sub-menu a { display: block; padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.mz-menu .sub-menu a:hover { background: rgba(255, 255, 255, .06); }

.mz-header__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.mz-header__cta { min-height: 44px; }
.mz-header__burger { display: none; }

.mz-rate-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 999px;
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
	font-size: .82rem; white-space: nowrap;
}
.mz-rate-chip strong { color: var(--mz-primary-2); font-weight: 800; }
.mz-rate-chip__sep { opacity: .4; margin-inline: 2px; }
.mz-rate-chip small { opacity: .6; font-size: .9em; }
.mz-rate-chip__dot {
	width: 8px; height: 8px; border-radius: 50%; background: var(--mz-success);
	box-shadow: 0 0 0 0 rgba(31, 157, 107, .6); animation: mz-pulse 2s infinite;
}
@keyframes mz-pulse { 70% { box-shadow: 0 0 0 8px rgba(31, 157, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 107, 0); } }

/* Drawer (mobile/tablet menu) */
.mz-drawer { position: fixed; inset: 0; z-index: 200; }
.mz-drawer[hidden] { display: none; }
.mz-drawer__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, .55); animation: mz-fade .25s; }
.mz-drawer__panel {
	position: absolute; inset-block: 0; inset-inline-end: 0;
	width: min(88vw, 380px); padding: 20px;
	background: var(--mz-dark); color: #f3f1ea;
	display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
	animation: mz-slide-in .3s var(--mz-ease);
	padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.mz-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.mz-drawer__menu, .mz-drawer__menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.mz-drawer__menu a { display: block; padding: 14px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-weight: 600; }
.mz-drawer__menu .sub-menu a { padding-inline-start: 20px; font-weight: 500; opacity: .85; }
.mz-drawer__contact { margin-top: auto; display: grid; gap: 10px; }
.mz-drawer__contact > a { display: flex; align-items: center; gap: 8px; }
@keyframes mz-slide-in { from { transform: translateX(-100%); } }
[dir="rtl"] .mz-drawer__panel { animation-name: mz-slide-in-rtl; }
@keyframes mz-slide-in-rtl { from { transform: translateX(-100%); } }
@keyframes mz-fade { from { opacity: 0; } }

/* Search modal */
.mz-search-modal { position: fixed; inset: 0; z-index: 210; display: grid; place-items: start center; padding: 12vh var(--mz-gutter) 0; }
.mz-search-modal[hidden] { display: none; }
.mz-search-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, .65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mz-search-modal__box { position: relative; width: min(720px, 100%); display: flex; gap: 10px; align-items: center; color: #fff; animation: mz-fade .2s; }
.mz-search-modal__box .mz-search-form { flex: 1; }

.mz-search-form { display: flex; align-items: center; background: var(--mz-surface); border: 1.5px solid var(--mz-line); border-radius: 999px; padding: 4px; color: var(--mz-ink); }
.mz-search-form:focus-within { border-color: var(--mz-primary); }
.mz-search-form input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; min-height: 48px; outline: none; }
.mz-search-form button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--mz-dark); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---------- Bottom navigation (phones/tablets) ---------- */
.mz-bottom-nav { display: none; }

/* ---------- Footer ---------- */
.mz-footer { background: var(--mz-dark); color: rgba(243, 241, 234, .78); margin-top: 0; }
.mz-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-block: 64px 40px; }
.mz-footer__title { font-size: 1rem; color: #fff; margin-bottom: 18px; }
.mz-footer__menu, .mz-footer__contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mz-footer__menu a:hover { color: var(--mz-primary-2); }
.mz-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.mz-footer__contact .mz-icon { color: var(--mz-primary); margin-top: .3em; }
.mz-footer__logo { margin-bottom: 16px; }
.mz-footer__trust { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.mz-footer__trust img { max-height: 96px; width: auto; background: #fff; border-radius: 12px; padding: 6px; }
.mz-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .07); padding-block: 18px; font-size: .85rem; }
.mz-footer__bottom .mz-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.mz-footer__bottom p { margin: 0; text-align: center; }
.mz-footer__credit { font-size: .8rem; opacity: .75; }
.mz-footer__credit a { color: var(--mz-primary-2); font-weight: 700; }
.mz-footer__credit a:hover { color: #fff; }
@media (max-width: 640px) { .mz-footer__bottom .mz-container { justify-content: center; } }
.mz-socials { display: flex; gap: 8px; }
.mz-social { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .07); color: #fff; }
.mz-social:hover { background: var(--mz-primary); color: var(--mz-on-primary); }

/* ---------- Page heads, breadcrumbs ---------- */
.mz-breadcrumbs { font-size: .85rem; color: var(--mz-muted); margin-bottom: 16px; }
.mz-breadcrumbs a { color: var(--mz-muted); }
.mz-breadcrumbs a:hover { color: var(--mz-primary); }
.mz-page-head { margin-bottom: 28px; }
.mz-page-title { margin-bottom: .3em; }
.mz-page-desc { color: var(--mz-muted); max-width: 760px; }

/* ---------- Layout with sidebar ---------- */
.mz-layout { display: grid; gap: 32px; }
.mz-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
.mz-layout__sidebar .widget { background: var(--mz-surface); border-radius: var(--mz-radius); padding: 22px; box-shadow: var(--mz-shadow); margin-bottom: 20px; }
.widget-title { font-size: 1.05rem; }

/* ---------- Cards ---------- */
.mz-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.mz-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--mz-surface); border-radius: var(--mz-radius);
	box-shadow: var(--mz-shadow); transition: transform .3s var(--mz-ease), box-shadow .3s;
}
.mz-card:hover { transform: translateY(-4px); box-shadow: var(--mz-shadow-lg); }
.mz-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mz-surface-2); }
.mz-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mz-ease); }
.mz-card:hover .mz-card__media img { transform: scale(1.05); }
.mz-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--mz-line); font-size: 3rem; }
.mz-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mz-card__title { font-size: 1.05rem; margin: 0; }
.mz-card__excerpt { color: var(--mz-muted); font-size: .9rem; margin: 0; }
.mz-card__meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--mz-muted); padding-top: 10px; border-top: 1px dashed var(--mz-line); }
.mz-card__more { display: inline-flex; align-items: center; gap: 4px; color: var(--mz-primary); font-weight: 700; }

/* ---------- Article ---------- */
.mz-article { background: var(--mz-surface); border-radius: var(--mz-radius); padding: clamp(20px, 4vw, 48px); box-shadow: var(--mz-shadow); }
.mz-article__meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--mz-muted); font-size: .88rem; margin-bottom: 20px; }
.mz-article__cover { margin: 0 0 28px; border-radius: var(--mz-radius-sm); overflow: hidden; }
.mz-content { font-size: 1.04rem; }
.mz-content > * + * { margin-top: 1.1em; }
.mz-content h2 { margin-top: 1.8em; }
.mz-content h3 { margin-top: 1.5em; }
.mz-content a { color: color-mix(in srgb, var(--mz-primary) 75%, var(--mz-ink)); text-decoration: underline; text-underline-offset: 4px; }
.mz-content img { border-radius: var(--mz-radius-sm); }
.mz-content blockquote { margin-inline: 0; padding: 16px 22px; border-inline-start: 4px solid var(--mz-primary); background: var(--mz-surface-2); border-radius: 0 12px 12px 0; }
.mz-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.mz-content th, .mz-content td { border: 1px solid var(--mz-line); padding: 10px 12px; text-align: start; }
.mz-content th { background: var(--mz-surface-2); }
.mz-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.mz-tags a { padding: 4px 12px; border: 1px solid var(--mz-line); border-radius: 999px; font-size: .82rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-navigation a { display: block; padding: 16px; border: 1px solid var(--mz-line); border-radius: var(--mz-radius-sm); font-weight: 700; }
.post-navigation a span { display: block; font-size: .78rem; color: var(--mz-muted); font-weight: 500; }

/* Pagination */
.pagination .nav-links, .woocommerce-pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 40px; padding: 0; list-style: none; }
.page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--mz-surface); box-shadow: var(--mz-shadow); font-weight: 700; }
.page-numbers.current { background: var(--mz-dark); color: var(--mz-primary-2); }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], input[type="password"], select, textarea {
	width: 100%; min-height: 50px; padding: 10px 16px;
	border: 1.5px solid var(--mz-line); border-radius: var(--mz-radius-sm);
	background: var(--mz-surface); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mz-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mz-primary) 18%, transparent); }

/* 404 / empty */
.mz-404 { text-align: center; max-width: 640px; padding-block: 80px; }
.mz-404__code { font-size: clamp(5rem, 20vw, 10rem); font-weight: 900; line-height: 1; margin: 0; background: linear-gradient(135deg, var(--mz-primary), var(--mz-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mz-404 .mz-search-form { margin: 24px 0; }
.mz-404__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mz-empty { padding: 40px; text-align: center; background: var(--mz-surface); border-radius: var(--mz-radius); }

/* Elementor canvas */
.mz-elementor-page { min-height: 40vh; }
.elementor-page .mz-site { overflow-x: clip; }

/* Reveal-on-scroll (progressive: without JS everything is visible) */
.mz-js [data-mz-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--mz-ease), transform .7s var(--mz-ease); }
.mz-js [data-mz-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
	.mz-header__cta span { display: none; }
	.mz-header__cta { width: 44px; padding: 0; }
}

@media (max-width: 1024px) {
	:root { --mz-header-h: 64px; }
	.mz-header .mz-logo img { height: 38px; }
	.mz-nav, .mz-header__actions > .mz-rate-chip { display: none; }
	.mz-header__burger { display: inline-grid; }
	.mz-layout.has-sidebar { grid-template-columns: 1fr; }
	.mz-footer__grid { grid-template-columns: 1fr 1fr; }
	body.has-bottom-nav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

	.mz-bottom-nav {
		position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
		display: grid; grid-template-columns: repeat(5, 1fr);
		padding: 6px 6px max(6px, env(safe-area-inset-bottom));
		background: color-mix(in srgb, var(--mz-dark) 94%, transparent);
		-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
		border-top: 1px solid rgba(255, 255, 255, .06);
	}
	.mz-bottom-nav a, .mz-bottom-nav button {
		display: grid; justify-items: center; gap: 2px; padding: 6px 2px;
		background: none; border: 0; color: rgba(243, 241, 234, .75);
		font-size: .7rem; font-weight: 600; cursor: pointer; border-radius: 12px;
	}
	.mz-bottom-nav [aria-current="page"] { color: var(--mz-primary-2); }
	.mz-bottom-nav .is-primary { color: var(--mz-on-primary); background: linear-gradient(135deg, #4a8bd6, var(--mz-primary)); margin-top: -18px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); border-radius: 18px; }
}

@media (max-width: 782px) {
	.admin-bar .mz-header { top: 46px; }
}

@media (max-width: 640px) {
	.mz-header__actions .mz-header__cta { display: none; }
	.mz-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-block: 40px 24px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.mz-btn--lg { width: 100%; }
}

/* Wide desktops & TVs: scale the whole UI with rem so 1080p/4K screens read from a sofa. */
@media (min-width: 1600px) { :root { --mz-container: 1480px; } }
@media (min-width: 1920px) { html { font-size: 112.5%; } :root { --mz-container: 1640px; } }
@media (min-width: 2560px) { html { font-size: 150%; } }
@media (min-width: 3840px) { html { font-size: 225%; } }

/* Touch devices: no hover lift (prevents sticky hover on tablets). */
@media (hover: none) {
	.mz-card:hover, .mz-btn--primary:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.mz-js [data-mz-reveal] { opacity: 1; transform: none; }
}

@media print {
	.mz-header, .mz-footer, .mz-bottom-nav, .mz-drawer { display: none !important; }
	body { background: #fff; padding: 0; }
}
