/* ============================================================
   YANPI — بازسازی صفحه اول (کدنویسی اختصاصی)
   ============================================================ */
/* ============================================================
   YANPI — بازسازی صفحه اول (کدنویسی اختصاصی)
   فونت‌ها: IRANYekanXVF (فارسی) + Oatmeal Sans Light (انگلیسی) — همان فونت‌های سایت اصلی
   ============================================================ */
@font-face {
  font-family: 'IRANSansX';
  src: url('assets/fonts/iransansx-vf.woff2') format('woff2-variations'),
       url('assets/fonts/iransansx-vf.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'OatmealSans';
  src: url('assets/fonts/oatmeal-sans-light.woff') format('woff');
  font-weight: 300;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --beige: #ece8e5;
  --header-bg: #f8fafc;
  --ink: #57534e;
  --ink-soft: #78716c;
  --line: #e3ded8;
  --peach: #edcfad;
  --pill: #57534e;
  --card: #ffffff;
  --radius: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IRANSansX', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-variation-settings: 'DOTS' 4;
    -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: var(--pad); }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; inset-inline: 14px; top: 12px; z-index: 60;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 10px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 4px rgba(60, 50, 40, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .38);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .38); border-color: rgba(255, 255, 255, .45); box-shadow: 0 6px 24px rgba(60, 50, 40, .08); }
.hdr { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; padding-inline: 18px; direction: ltr; }
.hdr-left { display: flex; align-items: center; gap: 6px; }
.hdr-left .acct { display: grid; }
.hdr-logo { flex: 1; display: flex; justify-content: center; }
.hdr-logo img { height: 24px; width: auto; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #4a4a4a;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.ring { border: 1px solid rgba(0, 0, 0, .18); }

/* Drawer */
.drawer {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: min(360px, 84vw);
  background: #fff; z-index: 90; padding: 26px 24px;
  transform: translateX(105%); transition: transform .5s var(--ease);
  box-shadow: -18px 0 40px rgba(0, 0, 0, .08);
  display: flex; flex-direction: column; gap: 6px;
}
html[dir='rtl'] .drawer { transform: translateX(105%); }
.drawer.is-open, html[dir='rtl'] .drawer.is-open { transform: none !important; }
.drawer .close { align-self: flex-start; margin-bottom: 18px; font-size: 22px; color: #6b6660; }
.drawer a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); transition: color .25s var(--ease), padding-inline-start .25s var(--ease); }
.drawer a:hover { color: #000; padding-inline-start: 10px; }
.scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(20, 18, 16, .32);
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
  backdrop-filter: blur(2px);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; background: var(--beige);
  padding-top: 0; min-height: min(860px, 100svh);
  display: flex; align-items: center; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: 0; width: 100%; direction: ltr; min-height: min(788px, calc(100svh - 72px)); padding-top: 72px;
}
.hero-copy {
  padding-inline-start: var(--pad);
  padding-inline-end: clamp(16px, 3vw, 40px);
  max-width: 660px;
}

.hero-copy { display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; direction: ltr; padding-block: clamp(60px, 10vh, 110px); }
.hero-copy h1 {
  margin: 0 0 34px;
  font-family: 'OatmealSans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300; font-size: clamp(40px, 5vw, 68px); line-height: 1.12;
  letter-spacing: -.01em; color: #57534e; text-align: left;
}
.hero-copy h1 span { display: block; }
.pill {
  direction: rtl;
  align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 128px; padding: 13px 30px; border-radius: 999px;
  background: var(--pill); color: #f6f4f1; font-size: 15px;
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.pill:hover { background: #444; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .14); }

.hero-media { position: relative; height: 100%; min-height: 520px; align-self: stretch; }
.hero-media .slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.1s var(--ease);
  -webkit-mask-image: linear-gradient(to left, #000 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to left, #000 80%, rgba(0,0,0,0) 100%);
}
.hero-media .slide.is-active { opacity: 1; }
.hero-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .28); transition: background .3s var(--ease), width .3s var(--ease); }
.hero-dots button.is-active { background: #6b6660; width: 18px; border-radius: 4px; }


/* ---------------- About (FA) ---------------- */
.about { background: var(--peach); }
/* عکس تمام‌قد در سمت چپ، بدون حاشیه؛ متن در ستون راست */
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0;
  max-width: none; padding-inline: 0; padding-block: 0;
}
.about-media { order: 1; position: relative; min-height: 540px; height: 100%; overflow: hidden; }
/* فید نرم پایین عکس به رنگ بخش (بدون برش تیز) */
.about-media::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 42%;
  background: linear-gradient(to bottom,
    rgba(237, 207, 173, 0) 0%,
    rgba(237, 207, 173, .22) 34%,
    rgba(237, 207, 173, .62) 62%,
    rgba(237, 207, 173, .92) 84%,
    #edcfad 94%,
    #edcfad 100%);
  pointer-events: none;
}
/* فید ملایم بالای عکس */
.about-media::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 14%;
  background: linear-gradient(to bottom, rgba(237, 207, 173, .45) 0%, rgba(237, 207, 173, 0) 100%);
  pointer-events: none; z-index: 1;
}
.about-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; border-radius: 0; display: block;
  -webkit-mask-image: none; mask-image: none;
}
.about-copy {
  order: 2; display: flex; flex-direction: column; justify-content: center;
  max-width: 660px; margin-inline-start: 0;
  padding-block: clamp(56px, 8vw, 104px);
  padding-inline: clamp(22px, 5vw, 80px);
}
.about-copy h2 { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; color: #45413c; }
.about-copy h3 { margin: 0 0 22px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 400; color: #5b564f; }
.about-copy p { margin: 0 0 14px; font-size: clamp(14.5px, 1.15vw, 16.5px); line-height: 2; color: #5e5952; }


/* ---------------- English split ---------------- */
.split-en { display: grid; grid-template-columns: 33% 67%; background: var(--peach); direction: ltr; }
.en-panel {
  direction: ltr; padding: clamp(28px, 3.4vw, 44px);
  display: flex; flex-direction: column; justify-content: center; gap: 30px;
}
.en-panel h2 {
  margin: 0; font-family: 'OatmealSans', Arial, sans-serif; font-weight: 300;
  font-size: clamp(20px, 2.1vw, 30px); line-height: 1.35; letter-spacing: .03em;
  color: #57534e; text-transform: uppercase;
}
.en-panel p {
  margin: 0; font-family: 'OatmealSans', Arial, sans-serif; font-weight: 300;
  font-size: clamp(13px, 1.1vw, 16px); line-height: 1.75; color: #57534e;
}
.en-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- Dealers ---------------- */
.dealers { padding-block: clamp(56px, 7vw, 92px); background: var(--bg); }
.sec-title { margin: 0 0 40px; text-align: center; font-size: clamp(21px, 2.2vw, 27px); font-weight: 700; color: #3a3631; }
.dealer-viewport { overflow: hidden; touch-action: pan-y; }
.dealer-grid {
  display: flex; gap: 18px; will-change: transform;
  transition: transform .75s var(--ease);
}
.dealer-card { flex: 0 0 calc((100% - 36px) / 3); }
.dealer-card {
  background: var(--card); border: 1px solid #f0edea; border-radius: var(--radius);
  padding: 20px 22px; box-shadow: 0 2px 14px rgba(0, 0, 0, .045);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.dealer-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, .07); }
.dealer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.dealer-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #4d4842; min-width: 0; }
.dealer-item svg { width: 17px; height: 17px; flex: 0 0 auto; color: #8b857e; }
.dealer-item b { font-weight: 600; }
.dealer-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dealer-phone { color: #6f6a64; font-family: 'OatmealSans', Arial, sans-serif; letter-spacing: .02em; }

/* ---------------- Products ---------------- */
.products { padding-block: clamp(56px, 7vw, 92px); background: #f2efe9; position: relative; }
.carousel { position: relative; overflow: hidden; touch-action: pan-y; }
.track {
  display: flex; gap: 20px; transition: transform .65s var(--ease);
  will-change: transform;
}
.pcard { flex: 0 0 calc(50% - 10px); }
.pcard img { width: 100%; aspect-ratio: 1000 / 706; object-fit: cover; border-radius: 10px; background: #eee9e3; }
.pcard figcaption { margin-top: 12px; font-size: 15px; color: #4d4842; }
.car-ctrl { position: absolute; inset-inline: 0; top: calc(50% - 26px); display: flex; justify-content: space-between; pointer-events: none; }
.car-ctrl button {
  pointer-events: auto; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 3px 14px rgba(0, 0, 0, .1);
  display: grid; place-items: center; transition: background .3s var(--ease), transform .3s var(--ease);
}
.car-ctrl button:hover { background: #fff; transform: scale(1.05); }
.car-ctrl svg { width: 18px; height: 18px; }

/* ---------------- Contact ---------------- */
.contact { padding-block: clamp(52px, 6vw, 84px); background: #fafafa; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.map { border-radius: 14px; overflow: hidden; min-height: 430px; background: #eee; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.form-card { display: flex; flex-direction: column; gap: 12px; }
.form-card h2 { margin: 0 0 6px; font-size: 20px; color: #3a3631; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: #6b6660; }
.field input, .field textarea {
  font: inherit; font-size: 14.5px; color: #33302c; padding: 11px 14px;
  border: 1px solid #e4e0da; border-radius: 10px; background: #fbfaf9;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: #b9b2a9; background: #fff; }
.hcaptcha-mock {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid #e4e0da; border-radius: 10px; background: #fbfaf9; font-size: 13.5px; color: #6b6660;
}
.hcaptcha-mock .box { width: 20px; height: 20px; border: 2px solid #cfc9c1; border-radius: 4px; }
.submit {
  margin-top: 6px; align-self: flex-start; padding: 13px 46px; border-radius: 999px;
  background: #4a433b; color: #fff; font-size: 15px;
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.submit:hover { background: #3a342d; transform: translateY(-2px); }

/* ---------------- Footer ---------------- */
.site-footer { background: #f5f5f5; padding-top: clamp(40px, 5vw, 66px); border-top: 1px solid #eee; }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.2fr; gap: clamp(20px, 3vw, 48px); }
.foot-col h4 { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: #3a3631; }
.foot-col a, .foot-col p { display: block; margin: 0 0 10px; font-size: 13.5px; color: #7a746d; transition: color .25s var(--ease); }
.foot-col a:hover { color: #1f1c19; }
.socials { display: flex; gap: 10px; margin-bottom: 18px; }
.socials a {
  width: 34px; height: 34px; border-radius: 50%; background: #6f6a64; color: #fff;
  display: grid; place-items: center; margin: 0;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.socials a:hover { background: #3a3631; transform: translateY(-2px); }
.socials svg { width: 16px; height: 16px; }
.seal { display: flex; align-items: center; gap: 8px; }
.seal-badge {
  width: 62px; height: 62px; border-radius: 12px; border: 1px solid #e3d9c2;
  background: linear-gradient(145deg, #fdf6e3, #efe0bd); display: grid; place-items: center;
  font-size: 9px; color: #9a7c39; text-align: center; line-height: 1.3;
}
.foot-bottom { color: #7d766e; margin-top: 34px; border-top: 1px solid #e8e8e8; padding-block: 16px; text-align: center; font-size: 12.5px; color: #8b857e; }
.foot-bottom a { color: #6b6660; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .dealer-card { flex-basis: calc((100% - 18px) / 2); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .pcard { flex-basis: calc(66% - 10px); }
}

@media (max-width: 820px) {
  /* موبایل: عکس تمام‌عرض با متن روی آن (مثل سایت اصلی) */
  .hero { min-height: 100svh; padding-top: 0; display: block; background: var(--beige); }
  .hero-inner { display: block; position: relative; min-height: 100svh; direction: rtl; }
  .hero-media {
    position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; z-index: 1;
  }
  .hero-media .slide {
    background-size: cover; background-position: center top;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero-copy {
    position: relative; z-index: 3; max-width: none;
    padding: 167px 0 40px 48px;
  }
  .hero-copy h1 {
    text-align: left; font-size: 36px; line-height: 63.5px;
    margin: 0 0 8px; letter-spacing: 0;
  }
  .hero-copy .pill { font-size: 16px; padding: 8px 20px; min-width: 0; height: 40px; }
  .hdr-left .acct { display: grid; }
  .hdr-left .ring { display: none; }
  .wrap { padding-inline: 32px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-media { order: 1; min-height: 0; height: 46vh; }
  .about-copy { order: 2; max-width: none; padding-inline: clamp(18px, 5vw, 32px); }
  .split-en { grid-template-columns: 1fr; }
  .en-media { order: -1; }
  .en-panel { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
  .map { min-height: 300px; }
  .pcard { flex-basis: calc(100% - 10px); }
  .dealer-card { flex-basis: 100%; }
}

@media (max-width: 560px) {
  .dealer-item span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.5; }
  .dealer-item .dealer-phone { white-space: nowrap; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .hdr-logo img { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- نقشه نمایندگی‌ها: تم قهوه‌ای تیره + تولتیپ ---------- */
#map { background: #221c17; direction: ltr; }
/* تم قهوه‌ای تیره برای تایل‌های OSM (بدون نیاز به کلید API) */
.leaflet-tile-pane { filter: invert(1) hue-rotate(188deg) sepia(.48) saturate(1.25) brightness(.9) contrast(1.0); }
.leaflet-container { background: #221c17; font-family: 'IRANSansX', Tahoma, sans-serif; }
.yp-tip.leaflet-tooltip {
  background: rgba(36, 30, 25, .96);
  color: #f3e6d2;
  border: 1px solid rgba(217, 165, 92, .45);
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  direction: rtl;
  text-align: right;
  font-family: 'IRANSansX', Tahoma, sans-serif;
  font-variation-settings: 'DOTS' 4;
  max-width: 240px;
  backdrop-filter: blur(8px);
}
.yp-tip .lt-name { display: block; font-weight: 700; font-size: 13px; color: #e9c48a; margin-bottom: 4px; }
.yp-tip .lt-row  { display: block; font-size: 11.5px; line-height: 1.9; color: #e6dbca; }
.yp-tip .lt-phone{ display: block; font-size: 11.5px; line-height: 1.9; color: #f7f1e6; direction: ltr; text-align: right; letter-spacing: .3px; }
.yp-tip.leaflet-tooltip-right::before { border-right-color: rgba(36, 30, 25, .96); }
.yp-tip.leaflet-tooltip-left::before  { border-left-color: rgba(36, 30, 25, .96); }
.yp-tip .lt-wrap { display: flex; gap: 9px; align-items: center; direction: rtl; }
.yp-tip .lt-pic { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 9px; overflow: hidden;
  border: 1px solid rgba(217,165,92,.45); background: #191410; }
.yp-tip .lt-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yp-tip .lt-txt { display: flex; flex-direction: column; min-width: 0; }
.yp-tip.leaflet-tooltip { max-width: 290px; }