/*
Theme Name: Auto Dadman
Theme URI: https://www.autodadman.com
Author: Auto Dadman
Description: قالب تک‌صفحه‌ای نمایشگاه اتومبیل «اتو دادمان» با اسلایدر تمام‌صفحه، فوتر تماس و طراحی ریسپانسیو راست‌چین (RTL). فونت: وزیرمتن.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autodadman
Tags: rtl-language-support, one-column, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--bg: #090a0e;
	--bg-2: #101219;
	--ink: #f3efe6;
	--muted: #a9a69d;
	--gold: #e2b24c;
	--gold-d: #b8862a;
	--line: rgba(255, 255, 255, .1);
	--font: 'Vazirmatn', 'Vazir', Tahoma, 'Segoe UI', system-ui, -apple-system, sans-serif;
	--hdr: 76px;
	--ease: cubic-bezier(.22, .8, .24, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; right: 8px; z-index: 100;
	margin: 0; padding: 10px 16px;
	background: var(--gold); color: #111; border-radius: 8px;
}

:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}

svg.i {
	width: 1.25em; height: 1.25em;
	flex: none;
	stroke: currentColor; fill: none;
	stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.ltr {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 30;
	height: var(--hdr);
	display: flex;
	align-items: center;
}

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

.site-header__in {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
	min-width: 0;
}

.brand img { max-height: 46px; width: auto; }

.brand__fa {
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.brand__en {
	direction: ltr;
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .32em;
	color: var(--gold);
	white-space: nowrap;
}

.hdr-call {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	background: rgba(9, 10, 14, .35);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-size: .92rem;
	font-weight: 500;
	transition: background .3s, border-color .3s, color .3s;
}

.hdr-call:hover {
	background: var(--gold);
	border-color: var(--gold);
	color: #14110a;
}

/* ==========================================================================
   Hero + slider
   Desktop: photo on top, brand + actions in a bar at the bottom.
   Mobile: brand on top, photo band in the middle, actions at the bottom.
   ========================================================================== */
.hero {
	--bar: 200px;
	--gut: max(clamp(16px, 4vw, 40px), calc((100vw - 1320px) / 2 + 40px));
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: 1fr var(--bar);
	overflow: hidden;
	isolation: isolate;
	background: #07080b;
	touch-action: pan-y;
}

/* darkens the photo behind the header */
.hero::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 160px;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(7, 8, 11, .78), rgba(7, 8, 11, 0));
}

.slides {
	position: absolute;
	inset: 0 0 var(--bar) 0;
	z-index: -2;
	-webkit-mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
}

.slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.1s var(--ease), visibility 0s linear 1.1s;
}

.slide.is-active {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s, 0s;
}

.slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
}

.slide.is-active img { animation: kenburns 10s ease-out both; }

@keyframes kenburns {
	from { transform: scale(1); }
	to   { transform: scale(1.05); }
}

/* brand (right side in RTL) */
.hero__top {
	grid-row: 2;
	grid-column: 1;
	align-self: end;
	padding-inline-start: var(--gut);
	padding-block-end: clamp(22px, 4vh, 40px);
	text-align: right;
}

.hero__kicker {
	margin: 0 0 .1rem;
	color: var(--gold);
	font-size: clamp(.85rem, 1.4vw, 1.02rem);
	font-weight: 500;
	letter-spacing: .03em;
}

.hero__fa {
	margin: 0;
	font-size: clamp(2.6rem, 5vw, 4.5rem);
	font-weight: 900;
	line-height: 1.15;
	text-shadow: 0 6px 40px rgba(0, 0, 0, .55);
}

.hero__en {
	margin: 0;
	margin-right: -.42em; /* cancels trailing letter-spacing */
	direction: ltr;
	text-align: right;
	text-transform: uppercase;
	font-size: clamp(.85rem, 1.5vw, 1.25rem);
	font-weight: 300;
	letter-spacing: .42em;
}

/* actions (left side in RTL) */
.hero__bottom {
	grid-row: 2;
	grid-column: 2;
	align-self: end;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	padding-inline-end: var(--gut);
	padding-block-end: clamp(22px, 4vh, 40px);
}

.hero__caption {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: .88rem;
	color: var(--muted);
}

.hero__caption::before {
	content: "";
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--gold);
}

.hero__caption span {
	direction: ltr;
	color: var(--ink);
	font-weight: 500;
	transition: opacity .35s;
}

.hero__caption span.is-out { opacity: 0; }

.hero__loc {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
}

.hero__loc .i { color: var(--gold); }

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 12px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 11px 26px;
	border: 1px solid var(--gold);
	border-radius: 999px;
	background: var(--gold);
	color: #16120a;
	font-weight: 700;
	font-size: .98rem;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .25s var(--ease), background .25s, color .25s;
}

.btn:hover { transform: translateY(-2px); background: #f0c45e; }

.btn--ghost {
	background: rgba(9, 10, 14, .35);
	color: var(--ink);
	border-color: rgba(255, 255, 255, .35);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.btn--ghost:hover { background: rgba(255, 255, 255, .14); }

/* slider controls */
.dots {
	display: flex;
	align-items: center;
	gap: 6px;
}

.dots button {
	position: relative;
	width: 34px; height: 20px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.dots button::before,
.dots button::after {
	content: "";
	position: absolute;
	inset: 8px 0;
	border-radius: 3px;
}

.dots button::before { background: rgba(255, 255, 255, .28); }

.dots button::after {
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: right center;
}

.dots button.is-active::after { animation: fill var(--dur, 6s) linear forwards; }
.hero.is-paused .dots button.is-active::after { animation-play-state: paused; }
.hero.no-auto .dots button.is-active::after { animation: none; transform: scaleX(1); }

@keyframes fill { to { transform: scaleX(1); } }

.arrow {
	position: absolute;
	top: calc(50% - var(--bar) / 2);
	z-index: 5;
	display: grid;
	place-items: center;
	width: 52px; height: 52px;
	margin-top: -26px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: rgba(9, 10, 14, .35);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}

.arrow:hover { background: var(--gold); border-color: var(--gold); color: #14110a; }
.arrow--prev { right: clamp(12px, 2.5vw, 36px); }
.arrow--next { left: clamp(12px, 2.5vw, 36px); }

/* ==========================================================================
   Three boxes
   ========================================================================== */
.boxes {
	background: var(--bg);
	padding: clamp(48px, 8vw, 110px) 0;
}

.boxes__in {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(16px, 2.4vw, 32px);
}

.box {
	position: relative;
	padding: clamp(26px, 3vw, 40px);
	border: 1px solid var(--line);
	border-radius: 20px;
	background: linear-gradient(180deg, #14161f 0%, #0e1016 100%);
	overflow: hidden;
	transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}

.box::before {
	content: "";
	position: absolute;
	top: 0; right: 0;
	width: 64px; height: 3px;
	background: var(--gold);
	transition: width .4s var(--ease);
}

.box:hover {
	transform: translateY(-6px);
	border-color: rgba(226, 178, 76, .45);
	box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
}

.box:hover::before { width: 100%; }

.box__icon {
	display: grid;
	place-items: center;
	width: 56px; height: 56px;
	margin-bottom: 22px;
	border: 1px solid rgba(226, 178, 76, .45);
	border-radius: 16px;
	color: var(--gold);
}

.box__icon svg { width: 28px; height: 28px; }

.box__num {
	position: absolute;
	top: 18px; left: 24px;
	font-size: 2.6rem;
	font-weight: 900;
	line-height: 1;
	color: rgba(255, 255, 255, .06);
}

.box__title {
	margin: 0 0 10px;
	font-size: clamp(1.15rem, 1.8vw, 1.4rem);
	font-weight: 800;
	line-height: 1.5;
}

.box__text {
	margin: 0;
	color: var(--muted);
	font-size: .96rem;
	line-height: 2;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	position: relative;
	background: var(--bg-2);
	border-top: 1px solid var(--line);
}

.site-footer::before {
	content: "";
	position: absolute;
	top: -1px; right: 50%;
	width: min(240px, 40%); height: 2px;
	transform: translateX(50%);
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer__in {
	max-width: 1320px;
	margin: 0 auto;
	padding: clamp(40px, 7vw, 84px) clamp(16px, 4vw, 40px) clamp(28px, 4vw, 44px);
}

.footer__grid {
	display: grid;
	grid-template-columns: 1.25fr 1fr 1fr;
	gap: clamp(28px, 4vw, 64px);
}

.footer__brand-fa { margin: 0; font-size: 1.9rem; font-weight: 800; line-height: 1.2; }

.footer__brand-en {
	margin: 2px 0 14px;
	direction: ltr;
	text-align: right;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .4em;
	color: var(--gold);
}

.footer__about { margin: 0 0 6px; color: var(--muted); max-width: 36ch; }
.footer__owner { margin: 0; color: var(--ink); font-size: .95rem; }
.footer__owner b { font-weight: 600; color: var(--gold); }

.footer__title {
	margin: 0 0 16px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: .02em;
}

.footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 14px;
}

.footer__list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: var(--ink);
}

.footer__list .i { margin-top: .32em; color: var(--gold); }
.footer__list small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.tel {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
	font-size: 1.12rem;
	font-weight: 600;
	letter-spacing: .05em;
	transition: color .2s;
}

a.tel:hover, .footer__list a:hover { color: var(--gold); }

.footer__route {
	display: flex;
	width: fit-content;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	font-size: .88rem;
	color: var(--gold);
}

.footer__route:hover { text-decoration: underline; text-underline-offset: 4px; }

.social {
	display: flex;
	align-items: center;
	gap: 14px;
}

.social__link {
	display: inline-grid;
	place-items: center;
	width: 52px; height: 52px;
	border: 1px solid rgba(226, 178, 76, .55);
	border-radius: 50%;
	color: var(--gold);
	transition: background .25s, color .25s, transform .25s var(--ease);
}

.social__link svg { width: 24px; height: 24px; }
.social__link:hover { background: var(--gold); color: #14110a; transform: translateY(-3px); }

.social__handle { direction: ltr; font-size: .95rem; color: var(--muted); }
.social__note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }

.footer__bar {
	margin-top: clamp(28px, 5vw, 56px);
	padding-top: 20px;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	color: var(--muted);
	font-size: .82rem;
}

.footer__bar .ltr { color: var(--muted); }

/* ==========================================================================
   Fallback template (index.php)
   ========================================================================== */
.plain {
	max-width: 820px;
	margin: 0 auto;
	padding: calc(var(--hdr) + 48px) 20px 64px;
	min-height: 60vh;
}

.plain h1, .plain h2 { line-height: 1.4; }
.plain a { color: var(--gold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__col--brand { grid-column: 1 / -1; }
	.arrow { width: 44px; height: 44px; margin-top: -22px; }
	.boxes__in { grid-template-columns: 1fr; max-width: 640px; }
}

@media (max-width: 768px) {
	:root { --hdr: 64px; }

	.brand__fa { font-size: 1.2rem; }
	.brand__en { font-size: .6rem; letter-spacing: .22em; }
	.hdr-call { padding: 7px 14px; font-size: .85rem; }

	/* stacked hero: title, photo band, actions */
	.hero {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		background: radial-gradient(120% 60% at 50% 68%, #1b1e2c 0%, #07080b 70%);
	}

	.hero::before { height: 110px; }

	.slides {
		inset: auto 0 clamp(200px, 29svh, 250px) 0;
		aspect-ratio: 16 / 9;
		-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
		mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
	}

	.slide.is-active img { animation: none; }
	.arrow { display: none; }

	.hero__top {
		padding: calc(var(--hdr) + clamp(12px, 3vh, 32px)) 20px 0;
		text-align: center;
	}

	.admin-bar .hero__top { padding-top: calc(var(--hdr) + 46px + clamp(12px, 3vh, 32px)); }

	.hero__fa { font-size: clamp(3.2rem, 14vw, 5rem); line-height: 1.1; }

	.hero__en {
		margin-right: 0;
		padding-left: .38em;
		text-align: center;
		letter-spacing: .38em;
	}

	.hero__bottom {
		align-items: center;
		gap: 12px;
		padding: 0 16px 20px;
	}

	.hero__cta { width: 100%; flex-wrap: nowrap; justify-content: center; }
	.hero__cta .btn { flex: 1 1 0; gap: 7px; padding: 12px 8px; font-size: .9rem; }
	.hero__loc { font-size: .95rem; }

	.footer__grid { grid-template-columns: 1fr; }
	.footer__bar { justify-content: center; text-align: center; }
}

@media (max-width: 520px) {
	.slides { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.slide, .slide.is-active { transition-duration: .01s; }
	.slide.is-active img { animation: none; }
	.dots button.is-active::after { animation: none; transform: scaleX(1); }
	.btn, .social__link, .box { transition: none; }
}
