@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --blue: #1565c0;
  --bg: #f2f7f3;
  --text: #1f2933;
  --muted: #6b7a6b;
  --line: #dbe7db;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 60, 30, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- هدر ---------- */
.site-header {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 55%, #1976d2 130%);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; }
.logo-icon { width: 40px; height: 40px; }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 4px 16px; border-radius: 20px; font-size: 15px; font-weight: 500;
  transition: background .15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .18); }
.main-nav a.active { background: #fff; color: var(--green-dark); font-weight: 700; }

/* ---------- محتوا ---------- */
main { padding-top: 8px; padding-bottom: 44px; min-height: 60vh; }

.page-title {
  color: var(--green-dark); font-size: 22px; font-weight: 800;
  margin: 26px 0 18px; padding-right: 12px;
  border-right: 5px solid var(--green);
}

/* بنر صفحه‌ی اول */
.hero {
  margin: 20px 0 8px; padding: 30px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, #e3f2e5 0%, #e1effa 100%);
  border: 1px solid var(--line); text-align: center;
}
.hero h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--green-dark); }
.hero p { margin: 0 0 16px; color: #455a64; }
.btn {
  display: inline-block; background: var(--green); color: #fff;
  padding: 6px 24px; border-radius: 24px; font-weight: 600;
  transition: background .15s;
}
.btn:hover { background: var(--green-dark); }

/* ---------- کارت‌های پیش‌بینی ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(20, 60, 30, .15); }
.card.no-img { border-top: 5px solid var(--green); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--green-dark); line-height: 1.7; }
.card-body p { margin: 0 0 10px; font-size: 15px; color: #3d4a3d; }
.date { font-size: 13.5px; color: var(--muted); }

/* ---------- صفحه‌بندی ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; padding: 4px 14px; text-align: center;
  background: #fff; border-radius: 10px; border: 1px solid var(--line);
}
.pager a:hover { background: #e3f1e3; }
.pager .current { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }

/* ---------- صفحه‌ی متن کامل ---------- */
.article {
  background: #fff; border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); margin-top: 22px;
}
.article h1 { margin: 0 0 6px; color: var(--green-dark); font-size: 26px; font-weight: 800; line-height: 1.7; }
.article-img { width: 100%; max-height: 440px; object-fit: cover; border-radius: 12px; margin: 16px 0; }
.article-body { font-size: 17px; }
.back-link { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- ایستگاه‌ها ---------- */
.st-tools { margin-bottom: 18px; }
.st-search {
  width: 100%; max-width: 360px; padding: 10px 14px; font-size: 16px;
  border: 1px solid #cfdccf; border-radius: 12px; background: #fff;
}
.st-search:focus { outline: 2px solid var(--green); border-color: var(--green); }
.st-source { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.st-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 8px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.st-card[hidden] { display: none; }
.st-card:hover { transform: translateY(-3px); border-color: var(--green); }
.st-name { font-weight: 700; color: var(--green-dark); font-size: 17px; }
.st-temp { font-size: 26px; font-weight: 800; color: var(--blue); }
.st-weather { font-size: 14px; color: var(--muted); }

.st-dialog {
  border: none; border-radius: 16px; padding: 0;
  width: min(92vw, 460px); max-height: 88vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  font-family: inherit; color: var(--text);
}
.st-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.st-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; padding: 10px 18px; position: sticky; top: 0;
}
.st-dialog-head h2 { margin: 0; font-size: 20px; }
.st-close {
  background: transparent; border: none; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
}
.st-dialog-body { padding: 6px 18px 14px; }
.st-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid #edf2ed;
}
.st-row:last-child { border-bottom: none; }
.st-row > span:first-child { color: var(--muted); }
.st-row a { color: var(--blue); }

/* ---------- آمار ---------- */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.chips-label { color: var(--muted); }
.chip {
  padding: 3px 16px; background: #fff; border: 1px solid #cfdccf;
  border-radius: 20px; font-size: 15px;
}
.chip:hover { background: #e3f1e3; }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.stat-item {
  margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-item img { display: block; width: 100%; height: auto; }
.stat-item figcaption { padding: 10px 14px 12px; display: flex; flex-direction: column; }
.stat-item strong { color: var(--green-dark); }

/* ---------- فوتر ---------- */
.site-footer { background: var(--green-dark); color: #dcedc8; margin-top: 20px; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; padding-top: 22px; padding-bottom: 18px;
}
.footer-about strong { color: #fff; font-size: 18px; }
.footer-about p { margin: 0; font-size: 14px; }
.tg-btn {
  background: #29a9eb; color: #fff; padding: 6px 22px;
  border-radius: 24px; font-weight: 600; transition: background .15s;
}
.tg-btn:hover { background: #1c8fcb; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-top: 10px; padding-bottom: 12px; font-size: 14px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}

/* ---------- موبایل ---------- */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .header-inner { justify-content: center; }
  .logo { font-size: 19px; }
  .logo-icon { width: 34px; height: 34px; }
  .hero { padding: 22px 14px; }
  .hero h1 { font-size: 21px; }
  .page-title { font-size: 19px; }
  .st-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: 1fr; }
  .article { padding: 16px; }
  .article h1 { font-size: 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-bottom { justify-content: center; }
}














/* دکمه‌ی مدیریت */
.hero-admin { margin-top: 10px; }
.btn-admin { background: #ef6c00; }
.btn-admin:hover { background: #e65100; }

/* آمار بازدید */
.visits {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  padding-top: 12px; padding-bottom: 12px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.visits-title { font-weight: 700; color: #fff; font-size: 15px; }
.visit-items { display: flex; flex-wrap: wrap; gap: 8px; }
.visit-items div {
  background: rgba(255, 255, 255, .1); border-radius: 10px;
  padding: 2px 14px; text-align: center; line-height: 1.5; min-width: 74px;
}
.visit-items b { display: block; color: #fff; font-size: 16px; }
.visit-items small { font-size: 12.5px; }

/* لینک ورود (کم‌رنگ) */
.staff-link { opacity: .1; font-size: 13px; }
.staff-link:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 600px) {
  .visits { justify-content: center; }
  .visit-items { justify-content: center; }
}