/* ============================================================
   کامپوننت‌های مشترک صفحات داخلی یانپی (هم‌دیزاین با صفحه اول)
   ============================================================ */

/* ---------- هدر صفحه‌های داخلی ---------- */
.page-hero {
  padding: 128px 0 40px;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.2px;
}
.page-hero p {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.page-hero .crumb {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #8b857e;
}
.page-hero .crumb a { color: #7d766e; }
.page-hero .crumb a:hover { color: #57534e; }
.page-hero .crumb a:hover { color: var(--ink); }

.page-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 40px var(--pad) 64px; }
.page-wrap.tight { padding-top: 28px; }

/* ---------- کارت پایه ---------- */
.card {
  background: #fff;
  border: 1px solid #f0edea;
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .045);
  padding: 22px 24px;
}
.card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--ink); }
.card p, .muted { color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }

/* ---------- بلوک ارزش‌ها ---------- */
.values { padding: 56px 0 40px; background: #f8fafc; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.value-card {
  background: #fff; border: 1px solid #f0edea; border-radius: var(--radius);
  padding: 22px; box-shadow: 0 2px 14px rgba(0, 0, 0, .045);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.value-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .06); }
.value-card h3 { margin: 0 0 8px; font-size: 15.5px; color: var(--ink); }
.value-card p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-soft); }

/* ---------- نوار CTA ---------- */
.cta-band { padding: 52px 0; background: #edeae6; }
.cta-inner { max-width: 760px; margin: 0 auto; padding-inline: var(--pad); text-align: center; }
.cta-inner h2 { margin: 0 0 10px; font-size: 22px; color: var(--ink); }
.cta-inner p { margin: 0 0 20px; font-size: 14px; color: var(--ink-soft); line-height: 1.9; }
.cta-inner .pill { margin: 0 5px; }
.pill.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(87, 83, 78, .3); }
.pill.ghost:hover { background: rgba(87, 83, 78, .06); }

/* ---------- تماس ---------- */
.contact-wrap { max-width: 1100px; margin: 0 auto; padding: 28px var(--pad) 64px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.contact-card { background: #fff; border: 1px solid #f0edea; border-radius: var(--radius); box-shadow: 0 2px 14px rgba(0, 0, 0, .045); padding: 24px; }
.contact-card h2 { margin: 0 0 16px; font-size: 17px; color: var(--ink); }
.info-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f2efeb; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.info-row:last-of-type { border-bottom: 0; }
.info-row svg { width: 18px; height: 18px; flex: 0 0 auto; color: #a09890; margin-top: 3px; }
.info-row b { display: block; margin-bottom: 2px; font-size: 13px; color: var(--ink); }
.map-box { margin-top: 16px; border-radius: 12px; overflow: hidden; height: 230px; background: #f2efeb; }
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }

.form-card form { display: flex; flex-direction: column; gap: 10px; }
.form-card input, .form-card textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  padding: 11px 14px; border: 1px solid #e6e2dc; border-radius: 10px; background: #fbfaf9;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: #c3bbb2; background: #fff; }
.form-card button {
  align-self: flex-start; padding: 12px 34px; border-radius: 999px; border: 0;
  background: var(--pill); color: #fff; font: inherit; font-size: 14px; cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.form-card button:hover { background: #46423e; transform: translateY(-1px); }
.msg { margin-top: 10px; font-size: 13px; }
.msg.ok { color: #1e7e34; }
.msg.err { color: #b02a37; }
.hidden { display: none !important; }

/* ---------- نمایندگی‌ها (نقشه) ---------- */
.dist-wrap { max-width: 1200px; margin: 0 auto; padding: 32px var(--pad) 64px; }
.dist-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.dist-grid #map { height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid #f0edea; box-shadow: 0 2px 14px rgba(0, 0, 0, .045); }
.dist-list {
  max-height: 480px; overflow: auto; background: #fff; border: 1px solid #f0edea;
  border-radius: var(--radius); box-shadow: 0 2px 14px rgba(0, 0, 0, .045); padding: 6px;
}
.dist-item { padding: 10px 12px; border-bottom: 1px solid #f4f1ee; cursor: pointer; border-radius: 10px;
  transition: background .25s var(--ease), transform .25s var(--ease);
  display: flex; align-items: center; gap: 12px; }
.dist-item:hover { transform: translateX(-2px); }
.dist-ava {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, #f3e6cf, #d9bd92);
  border: 1px solid #e6d5ba;
  color: #6b5334; font-family: 'IRANSansX', Tahoma, sans-serif;
  font-variation-settings: 'DOTS' 4; font-weight: 700; font-size: 17px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.dist-ava.has-photo { padding: 0; background: #efe9e0; }
.dist-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dist-body { display: block; min-width: 0; flex: 1; }
.dist-item:last-child { border-bottom: 0; }
.dist-item:hover { background: #f8f6f3; }
.dist-item b { display: block; margin-bottom: 3px; font-size: 14px; color: var(--ink); }
.dist-item small { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

/* ---------- ورود / پنل کاربری ---------- */
.login-shell {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  padding: 90px 20px 40px; background: var(--bg);
}
.login-card {
  width: min(420px, 100%); background: #fff; border: 1px solid #f0edea; border-radius: 18px;
  box-shadow: 0 10px 40px rgba(60, 50, 40, .07); padding: 34px 30px; text-align: center;
}
.login-card img { height: 40px; margin: 0 auto 18px; }
.login-card h1 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.login-card p { margin: 0 0 22px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.login-card input {
  width: 100%; font: inherit; font-size: 14.5px; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid #e6e2dc; border-radius: 10px; background: #fbfaf9; color: var(--ink);
}
.login-card input:focus { outline: none; border-color: #c3bbb2; background: #fff; }
.login-card button {
  width: 100%; padding: 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pill); color: #fff; font: inherit; font-size: 14.5px;
  transition: background .3s var(--ease), opacity .3s var(--ease);
}
.login-card button:hover { background: #46423e; }
.login-card button:disabled { opacity: .6; cursor: not-allowed; }
.login-back { display: inline-block; margin-top: 16px; font-size: 12.5px; color: #a09890; }
.login-back:hover { color: var(--ink); }

/* پنل کاربری */
.acct-shell { padding: 110px 0 70px; background: var(--bg); min-height: 100svh; }
.acct-wrap { max-width: 940px; margin: 0 auto; padding-inline: var(--pad); }
.acct-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.acct-head h1 { margin: 0; font-size: 21px; color: var(--ink); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border-radius: 999px; background: #efece8; cursor: pointer;
  font-size: 13px; color: var(--ink); transition: background .25s var(--ease), color .25s var(--ease);
}
.tab.active { background: var(--pill); color: #fff; }
.panel { display: none; }
.panel.active { display: block; }

/* ---------- پنل مدیریت ---------- */
.admin-body { background: #f6f5f3; min-height: 100svh; }
.admin-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 20px; background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px); border-bottom: 1px solid #eeeae5;
}
.admin-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 14px; }
.admin-top .brand img { height: 26px; }
.admin-grid { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.admin-nav { background: #fff; border: 1px solid #f0edea; border-radius: 14px; padding: 10px; position: sticky; top: 76px; }
.admin-nav button {
  display: block; width: 100%; text-align: right; padding: 10px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-soft); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.admin-nav button:hover { background: #f7f5f2; color: var(--ink); }
.admin-nav button.active { background: var(--pill); color: #fff; }
.admin-panel { background: #fff; border: 1px solid #f0edea; border-radius: 14px; padding: 20px; }
.admin-panel h2 { margin: 0 0 14px; font-size: 16px; color: var(--ink); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 9px 10px; text-align: right; border-bottom: 1px solid #f2efeb; }
.admin-table th { color: #8f8880; font-weight: 500; background: #faf9f7; }
.admin-table tr:hover td { background: #fcfbfa; }

@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .dist-grid { grid-template-columns: 1fr; }
  .dist-grid #map { height: 340px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .admin-nav button { white-space: nowrap; width: auto; }
}
@media (max-width: 560px) {
  .page-hero { padding: 100px 0 30px; }

}

/* ---------- ریزکامپوننت‌ها ---------- */
.empty { padding: 24px; text-align: center; font-size: 13px; color: #a09890; line-height: 2; }
.linkcard {
  display: block; padding: 13px 15px; border: 1px solid #f0edea; border-radius: 12px;
  margin-bottom: 8px; color: var(--ink); transition: background .25s var(--ease), border-color .25s var(--ease);
}
.linkcard:hover { background: #faf9f7; border-color: #e6e1db; }
.linkcard b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.linkcard small { color: var(--ink-soft); font-size: 12.5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eaf4ec; color: #1e7e34; font-size: 11.5px; font-weight: 600; }

/* ---------- اصلاحات ---------- */
.page-about .about-copy h2, .page-about .about-copy h3 { text-align: right; }
.page-about .about-copy p { text-align: right; }
.acct-shell.centered { display: flex; align-items: center; justify-content: center; padding: 110px 0 60px; }
.acct-shell.centered .acct-wrap { width: 100%; }
.acct-shell.centered .login-card { margin: 0 auto; }
@media (max-width: 640px) {
  .acct-shell.centered { align-items: flex-start; padding-top: 104px; }
}

/* تصویر درباره ما: برش بهتر روی موبایل */
.page-about .about-media img { border-radius: var(--radius); }
@media (max-width: 700px) {
  .page-about .about-media img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 38% 50%; }
}

.cta-inner .pill { min-width: 150px; text-align: center; }
.page-about .en-media img { border-radius: var(--radius); }
@media (max-width: 700px) {
  .page-about .en-media { padding-inline: var(--pad); }
  .page-about .en-media img { width: 100%; height: auto; }
}