:root {
  --primary: #1e3a8a;
  --secondary: #3b82f6;
  --accent: #38bdf8;
  --bg: #f8fafc;
  --surface: #fff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 12px rgba(0, 0, 0, .06)
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent
}

body {
  margin: 0;
  font-family: tahoma, system-ui, sans-serif;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  color: var(--text);
  display: flex;
  justify-content: center
}

a {
  text-decoration: none;
  color: inherit
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column
}

.topbar {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: #fff;
  padding: 16px 18px;
  margin: 10px 10px 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
  position: sticky;
  top: 0;
  z-index: 20
}

.brand {
  font-weight: 700;
  font-size: 1.05rem
}

.icon-btn {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.content {
  padding: 14px 14px 90px;
  overflow: auto;
  flex: 1
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px
}

.card-header {
  background: #f1f5f9;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border)
}

.card-body {
  padding: 14px;
  color: var(--muted);
  line-height: 1.8
}

.btn-small,
.btn {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit
}

.btn-small {
  background: var(--secondary);
  color: #fff;
  padding: 7px 12px;
  font-size: .82rem
}

.btn {
  padding: 12px 14px
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700
}

.btn-secondary {
  background: rgba(255, 255, 255, .12);
  color: #fff
}

.test-install-btn {
  width: 100%;
  margin: 0 0 10px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: #f87171;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(248, 113, 113, .28)
}

.install-test-wrap {
  padding: 0 14px
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem
}

.price-table th,
.price-table td {
  border: 1px solid var(--border);
  padding: 11px;
  text-align: center
}

.price-table th {
  background: #f8fafc;
  color: var(--primary)
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 30
}

.bottom-item {
  width: 33.33%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: .76rem
}

.bottom-item.active {
  color: var(--primary);
  font-weight: 700
}

.bottom-item i {
  font-style: normal;
  font-size: 1.25rem
}

.side-menu {
  position: fixed;
  top: 0;
  right: -270px;
  width: 270px;
  height: 100%;
  background: #fff;
  z-index: 40;
  box-shadow: -6px 0 24px rgba(0, 0, 0, .2);
  transition: .3s;
  padding: 18px
}

.side-menu.active {
  right: 0
}

.side-menu__header {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px
}

.menu-item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text)
}

.menu-item.active {
  color: var(--primary);
  font-weight: 700
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 35
}

#overlay.show {
  opacity: 1;
  pointer-events: auto
}

.install-banner {
  position: fixed;
  left: 50%;
  bottom: -220px;
  transform: translateX(-50%);
  width: 86%;
  max-width: 380px;
  background: rgba(15, 23, 42, .97);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 24px;
  padding: 18px;
  z-index: 60;
  box-shadow: 0 -10px 40px rgba(56, 189, 248, .25);
  transition: bottom .4s cubic-bezier(.175, .885, .32, 1.275)
}

.install-banner.show {
  bottom: 22px
}

.close-banner {
  position: absolute;
  top: 10px;
  left: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer
}

.install-header {
  display: flex;
  align-items: center;
  gap: 12px
}

.install-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000
}

.install-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px
}

.muted {
  color: #94a3b8;
  font-size: .82rem
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px
}

.quick-link {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  background: #f8fafc;
  color: var(--text)
}

.calc-form {
  display: grid;
  gap: 10px
}

.calc-form label {
  display: grid;
  gap: 6px;
  color: var(--text)
}

.calc-form input {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit
}

.result-box {
  padding: 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
  text-align: center
}

.w-100 {
  width: 100%
}

.article-preview,
.product-card {
  display: block
}

.post-meta {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 6px
}

.archive-title {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 8px 0
}

.list-card {
  margin-bottom: 14px
}

/* ===== پایه‌ها ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", sans-serif;
}

body {
  background: #f5f7fa;
  color: #222;
  line-height: 1.6;
}

/* ===== هدر و منو ===== */
header {
  background: #0d47a1;
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.side-menu {
  background: #1a237e;
  color: #fff;
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100%;
  transition: right 0.3s ease;
  z-index: 999;
  padding: 20px;
}

.side-menu.active {
  right: 0;
}

.side-menu__header {
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: 18px;
}

.menu-item {
  display: block;
  padding: 8px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item.active {
  color: #ffe;
  font-weight: bold;
}

/* ===== کارت‌ها ===== */
.card {
  background: #fff;
  border-radius: 12px;
  margin: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 12px 16px;
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  color: #0d47a1;
  margin-bottom: 8px;
}

.card-date {
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

.card-excerpt {
  font-size: 14px;
  color: #333;
  margin-top: 6px;
  line-height: 1.7;
}

.card-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #0d47a1;
  font-weight: 600;
}

/* ===== پایین صفحه / نوار ناوبری ===== */
footer,
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
}

footer img,
.bottom-nav img {
  width: 28px;
  height: 28px;
}

.bottom-nav a {
  color: #333;
  text-decoration: none;
  font-size: 13px;
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
  .card {
    margin: 10px;
  }

  .card img {
    height: 150px;
  }

  header {
    font-size: 16px;
    padding: 10px;
  }
}