/* ==========================================================
   POYACITY — style.css (نسخه نهایی v15)
========================================================== */

@import url('./vendor/fonts/vazirmatn.css');

:root {
  --yellow:  #FFD600;
  --green:   #00C853;
  --purple:  #8E24AA;
  --orange:  #FF7043;
  --red:     #E53935;
  --primary: #1769aa;
  --secondary: #0f4c81;
  --text:    #222;
  --bg:      #F5F7FB;
  --white:   #ffffff;
  --border:  #E6EAF0;
  --shadow:       0 10px 30px rgba(0,0,0,.08);
  --shadow-hover: 0 18px 45px rgba(0,0,0,.15);
  --radius:  22px;
  --font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
}

/* ====== عناوین برجسته ====== */
h1 { font-size: 36px; font-weight: 800; line-height: 1.3; color: #222; }
h2 { font-size: 30px; font-weight: 700; line-height: 1.4; color: #222; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.5; color: #222; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.6; color: #333; }
h5 { font-size: 16px; font-weight: 600; line-height: 1.7; color: #444; }
h6 { font-size: 14px; font-weight: 600; line-height: 1.8; color: #555; }

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

.container { width: min(94%, 1200px); margin: auto; }

/* ====== هدر فرم ====== */
.form-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.form-header-inner {
  width: min(94%, 1200px);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.back-link {
  color: var(--green);
  font-weight: bold;
  font-size: 15px;
  transition: .25s;
}
.back-link:hover { color: var(--purple); }

.form-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 18px;
}
.logo-small {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #f4f4f4;
  padding: 4px;
}

.dash-switch-btn {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  transition: .25s;
  display: inline-block;
}
.dash-switch-btn:hover { background: var(--secondary); transform: translateY(-2px); }

.header-nav-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ====== هیرو ====== */
.hero {
  background: linear-gradient(135deg, var(--purple), var(--orange));
  color: #fff;
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
  overflow: hidden;
}
.hero-overlay { position: relative; z-index: 2; }
.logo-container { display: flex; justify-content: center; margin-bottom: 16px; }
.logo {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: #fff;
  padding: 10px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 6px; color: #fff; }
.hero-tagline { font-size: 18px; opacity: 0.9; color: #fff; }
.slogan { font-size: 18px; font-weight: 600; color: #FFD600; }
.hero-text {
  max-width: 600px;
  margin: 16px auto 24px;
  font-size: 16px;
  line-height: 2;
  color: #fff;
  opacity: 0.95;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  font-size: 30px;
  font-weight: 800;
  display: block;
  color: #fff;
}
.hero-stat-label { font-size: 14px; opacity: 0.85; color: #fff; }
.hero-stat-divider { width: 1px; background: rgba(255,255,255,0.3); }
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.hero-btn {
  display: inline-block;
  padding: 14px 32px;
  background: #fff;
  color: #222;
  border-radius: 18px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  transition: .35s;
}
.hero-btn:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.secondary-btn {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.secondary-btn:hover { background: rgba(255,255,255,.28); }

/* ====== بخش‌ها ====== */
section { padding: 60px 0; }
section h2 { font-size: 30px; font-weight: 700; text-align: center; margin-bottom: 30px; color: #222; }

.section-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px 40px;
  max-width: 960px;
  margin: auto;
  position: relative;
  overflow: hidden;
}
.section-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 100%; height: 6px;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--purple), var(--orange), var(--red));
}
.section-card h2 { text-align: right; margin-bottom: 20px; font-size: 28px; }
.section-card p { text-align: justify; margin-bottom: 16px; font-size: 16px; line-height: 1.9; }
.section-card p:last-child { margin-bottom: 0; }

/* ====== کارت‌ها ====== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.card {
  background: #fff;
  padding: 24px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: .35s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 100%; height: 6px;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--purple), var(--orange), var(--red));
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.card-icon { font-size: 48px; margin-bottom: 12px; }
.card h3 { font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 10px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.card p { text-align: center; flex-grow: 1; font-size: 15px; line-height: 1.8; }

/* ====== لیست مزایا ====== */
.benefits ul { list-style: none; max-width: 900px; margin: auto; }
.benefits li {
  background: #fff;
  margin-bottom: 12px;
  padding: 14px 20px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: .3s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}
.benefits li:hover { transform: translateX(-6px); }

/* ====== CTA ====== */
.cta-box {
  text-align: center;
  padding: 40px 30px;
  background: linear-gradient(135deg, #f0fff6, #fef9e7);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.cta-box h2 { margin-bottom: 12px; font-size: 28px; font-weight: 700; }
.cta-box p { margin-bottom: 24px; font-size: 16px; color: #555; }

/* ====== فرم ====== */
form {
  background: #fff;
  padding: 32px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
form label { display: block; font-weight: bold; margin-top: 24px; margin-bottom: 8px; color: #222; font-size: 16px; }
.req { color: var(--red); margin-right: 4px; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  font-family: var(--font-family);
  transition: .25s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0,200,83,.12);
}
textarea { resize: vertical; min-height: 120px; }

.options {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: normal;
  transition: .25s;
  border: 1px solid transparent;
  font-size: 15px;
}
.options label:hover {
  background: #eef7f2;
  border-color: #d4f1de;
  transform: translateY(-2px);
}
.options input { margin-top: 5px; flex-shrink: 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.help-text { margin-top: 6px; margin-bottom: 10px; font-size: 14px; color: #666; line-height: 1.8; }

.privacy-note {
  margin-top: 30px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9e6, #fff5d0);
  border-right: 6px solid var(--orange);
}
.privacy-note p { margin: 0 0 8px; font-size: 15px; }
.privacy-note p:last-child { margin-bottom: 0; }

.submit-btn {
  width: 100%;
  margin-top: 30px;
  padding: 16px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--purple), var(--orange), var(--red));
  background-size: 250%;
  transition: .35s;
  box-shadow: 0 15px 30px rgba(0,0,0,.15);
}
.submit-btn:hover { background-position: right center; transform: translateY(-4px); box-shadow: 0 20px 45px rgba(0,0,0,.20); }
.submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* ====== ریتینگ ====== */
.rating-box {
  background: #f8fafc;
  padding: 18px;
  border-radius: 18px;
  margin-top: 10px;
  border: 1px solid #edf1f5;
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 12px;
  color: #555;
}
.rating-value { margin-top: 12px; font-size: 18px; font-weight: bold; text-align: center; color: var(--purple); }
input[type=range] { width: 100%; accent-color: var(--orange); cursor: pointer; }

/* ====== فوتر ====== */
footer { background: #20232a; color: #fff; padding: 40px 20px; }
.footer-content { max-width: 900px; margin: auto; text-align: center; }
.footer-content p { margin-bottom: 12px; font-size: 15px; }
.footer-content a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.5);
  transition: .25s;
}
.footer-content a:hover { color: var(--green); border-bottom-color: var(--green); }
.copyright { margin-top: 24px; font-size: 14px; opacity: .75; }

/* ====== توست ====== */
#toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(100px);
  background: #222;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transition: .35s;
  z-index: 99999;
  max-width: 90%;
  text-align: center;
  font-family: var(--font-family);
}
#toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
#toast.success { background: #2e7d32; }
#toast.error { background: #d32f2f; }
#toast.warning { background: #f57c00; }
#toast.info { background: #1976d2; }

/* ====== KPI ====== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 5px solid var(--primary);
}
.kpi-card .kpi-number { font-size: 30px; font-weight: 800; color: var(--primary); }
.kpi-card .kpi-label { font-size: 15px; font-weight: 700; margin-top: 6px; color: #555; }
.kpi-card .kpi-icon { font-size: 24px; margin-bottom: 4px; }

/* ====== نمودارها ====== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.chart-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.chart-card h3 { margin-bottom: 14px; font-size: 18px; font-weight: 700; color: #37474f; }
.chart-card canvas { width: 100% !important; height: 260px !important; }
.chart-card--wide { grid-column: 1 / -1; }

/* ====== لودینگ و خطا ====== */
.dash-loading {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 14px;
  padding: 50px;
}
.loading-spinner {
  width: 44px; height: 44px;
  border: 5px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dash-error {
  display: none;
  text-align: center;
  padding: 30px;
  color: var(--danger);
  font-size: 17px;
}

/* ====== ابزارهای نقشه ====== */
.toolbar-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}
.toolbar-item { width: 100%; }
.toolbar-note { text-align: center; }

.map-btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  font-family: var(--font-family);
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: .25s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.map-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.map-btn:active { transform: translateY(0); }

.map-btn-gps { background: var(--primary); color: #fff; }
.map-btn-gps:hover { background: var(--secondary); }

.map-btn-camera { background: var(--green); color: #fff; }
.map-btn-camera:hover { background: var(--purple); }

.map-note {
  font-size: 14px;
  color: var(--muted);
  background: #f8fafc;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px dashed var(--border);
  display: inline-block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* ====== دکمه بازگشت به بالا (آبی با اولویت بالا) ====== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #1769aa !important; /* آبی با اولویت بالا */
  color: #fff !important;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: .3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: #0f4c81 !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {
  .scroll-top-btn { width: 44px; height: 44px; font-size: 20px; bottom: 20px; right: 20px; }
}

/* ====== وضعیت آنلاین ====== */
#onlineStatus {
  font-size: 14px;
  padding: 6px;
  opacity: 0.85;
}

/* ====== موبایل ====== */
@media (max-width: 768px) {
  .hero { padding: 40px 14px 30px; }
  .logo { width: 80px; height: 80px; padding: 8px; }
  .hero h1 { font-size: 30px; }
  .hero-tagline { font-size: 16px; }
  .slogan { font-size: 15px; }
  .hero-text { font-size: 14px; margin: 12px auto 18px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat-number { font-size: 24px; }
  .hero-stat-label { font-size: 12px; }
  .hero-stat-divider { display: none; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-btn { width: 100%; max-width: 280px; text-align: center; padding: 12px 24px; font-size: 15px; }
  section { padding: 40px 0; }
  section h2 { font-size: 24px; margin-bottom: 20px; }
  .section-card { padding: 20px; }
  .section-card h2 { font-size: 22px; }
  form { padding: 20px; }
  .category-grid { grid-template-columns: 1fr; }
  .options label { padding: 12px; font-size: 14px; }
  .submit-btn { font-size: 17px; padding: 14px; }
  .form-header-inner { flex-direction: row; gap: 8px; flex-wrap: wrap; }
  .header-nav-group { flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 20px; }
  .card h3 { font-size: 18px; min-height: 40px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi-card .kpi-number { font-size: 24px; }
  .charts-grid { grid-template-columns: 1fr; gap: 16px; }
  .chart-card canvas { height: 200px !important; }
  .kpi-card .kpi-label { font-size: 14px; }
}

@media (max-width: 600px) {
  .map-btn { padding: 10px 14px; font-size: 14px; }
  .map-note { font-size: 13px; padding: 6px 12px; }
}

/* POYACITY TYPOGRAPHY BASELINE v2.1.4 */
.section-title h2{font-size:var(--font-size-title)}

/* ====== Poyacity global typography contract ====== */
:root {
  --font-family-base: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.75;
  --font-size-small: 14px;
  --font-size-control: 16px;
}
html { font-size: var(--font-size-base); }
body, button, input, select, textarea, table { font-family: var(--font-family-base); line-height: var(--line-height-base); }
button, input, select, textarea { font-size: var(--font-size-control); }
small, .help-text, .hint, .muted { font-size: var(--font-size-small); }

/* Category Registry — متن راهنما داخل پرانتز بخش اجباری تجربه کاربری است. */
.category-grid label > span { display: flex; flex-direction: column; gap: 2px; }
.category-grid label strong { font-weight: 700; color: var(--text-color, #1f2937); }
.category-grid .category-description { display: block; font-size: 0.88em; line-height: 1.9; color: #52606d; font-weight: 400; }


/* POYACITY_URBAN_PARTICIPATION_V1 */
.urban-participation{padding:48px 0;background:linear-gradient(180deg,#f7fbff 0%,#eef7f5 100%)}
.participation-card{max-width:980px;margin:0 auto}.participation-form{margin-top:24px}.participation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.participation-form label,.participation-form fieldset{display:flex;flex-direction:column;gap:7px;font-weight:600}.participation-form input,.participation-form select{min-height:46px;border:1px solid #b9c8d4;border-radius:10px;padding:10px 12px;background:#fff;color:#17324d;font:inherit}.participation-form input:focus,.participation-form select:focus{outline:3px solid rgba(23,105,170,.22);border-color:#1769aa}.participation-form fieldset{margin:18px 0;border:1px solid #cbd8e2;border-radius:12px;padding:16px}.participation-interests{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.participation-interests label,.participation-consent{flex-direction:row;align-items:flex-start;font-weight:500}.participation-interests input,.participation-consent input{min-height:auto;margin-top:4px}.participation-status{min-height:28px;margin-top:12px;font-weight:700}.participation-status[data-state="success"]{color:#137333}.participation-status[data-state="error"]{color:#b3261e}.participation-status[data-state="queued"]{color:#8a5600}@media(max-width:700px){.participation-grid,.participation-interests{grid-template-columns:1fr}.urban-participation{padding:32px 0}}
