:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-light: #eef0fd;
  --ink: #1e1b3a;
  --muted: #6b7089;
}

html, body {
  font-family: 'Vazirmatn', sans-serif;
  color: var(--ink);
  background: #fafafe;
}

a {
  text-decoration: none;
}

/* Topbar */
.topbar {
  background: var(--brand-dark);
  color: #fff;
  font-size: .85rem;
  padding: .4rem 0;
}
.topbar a { color: #dcdcf9; margin-inline-start: 1rem; }
.topbar a:first-child { margin-inline-start: 0; }
.topbar-social a { margin-inline-start: .75rem; }

/* Header */
.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(30, 27, 58, .06);
}
.site-header .navbar-brand {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--brand);
}
.site-header .navbar-brand i { color: var(--brand); }
.site-header .nav-link {
  font-weight: 500;
  color: var(--ink);
  padding: .5rem 1rem;
}
.site-header .nav-link:hover { color: var(--brand); }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-primary:hover {
  background: var(--brand);
  border-color: var(--brand);
}

/* Hero / Slider */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff;
  padding: 3.5rem 0;
}
.hero h1 { font-weight: 800; }
.hero-carousel .carousel-item img {
  height: 380px;
  object-fit: cover;
  border-radius: 1rem;
}
.hero-carousel .carousel-caption {
  background: rgba(30, 27, 58, .55);
  border-radius: .75rem;
  bottom: 1.5rem;
}

/* Modern hero (code mockup) */
.hero-modern {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
  background: linear-gradient(180deg, #f5f5ff 0%, #fafafe 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  z-index: 0;
}
.hero-blob-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -120px; inset-inline-start: -100px;
}
.hero-blob-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #4f46e5, transparent 70%);
  bottom: -140px; inset-inline-end: -80px;
}
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#c7ccf0 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  opacity: .5;
  z-index: 0;
}
.hero-modern .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  color: var(--brand);
  font-size: .82rem;
  font-weight: 600;
  padding: .45rem 1rem;
  border-radius: 50rem;
  box-shadow: 0 4px 14px rgba(30, 27, 58, .08);
  margin-bottom: 1.25rem;
}
.hero-title {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.35;
}
.text-gradient {
  background: linear-gradient(90deg, var(--brand), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40rem;
  margin-top: 1rem;
}
.hero-stats {
  display: flex;
  gap: 2.25rem;
  margin-top: 2.5rem;
}
.hero-stat-number {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
}
.hero-stat-label {
  font-size: .82rem;
  color: var(--muted);
}

/* Code editor mockup */
.code-mockup {
  background: #1e1b3a;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(30, 27, 58, .25);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
.code-mockup-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1rem;
  background: #2a2650;
}
.code-mockup-bar .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-mockup-tab {
  margin-inline-start: .75rem;
  color: #a9a6d6;
  font-size: .8rem;
  font-family: monospace;
}
.code-mockup-body {
  margin: 0;
  padding: 1.25rem 1.4rem;
  font-family: 'Consolas', 'Vazirmatn', monospace;
  font-size: .82rem;
  line-height: 1.9;
  color: #d8d6f5;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
}
.code-mockup-body .c-key { color: #ff79c6; }
.code-mockup-body .c-type { color: #8be9fd; }
.code-mockup-body .c-str { color: #f1fa8c; }
.code-mockup-body .c-fn { color: #50fa7b; }
.code-mockup-body .c-cm { color: #7a7799; font-style: italic; }

.floating-card {
  position: absolute;
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 10px 30px rgba(30, 27, 58, .12);
  padding: .6rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.floating-card i { color: var(--brand); }
.floating-card-1 { top: -18px; inset-inline-start: 10%; }
.floating-card-2 { bottom: -18px; inset-inline-end: 8%; }

@media (max-width: 991px) {
  .code-mockup { transform: none; margin-top: 2rem; }
  .floating-card { display: none; }
}

/* Feature boxes */
.feature-box {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 4px 18px rgba(30, 27, 58, .06);
  height: 100%;
  transition: transform .2s ease;
}
.feature-box:hover { transform: translateY(-4px); }
.icon-circle {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: .85rem;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 1.6rem;
}

.feature-box .icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: .85rem;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.section-title {
  font-weight: 800;
  margin-bottom: .25rem;
}
.section-sub {
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Product / News cards */
.card-hinaso {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(30, 27, 58, .06);
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-hinaso:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(30, 27, 58, .12);
}
.card-hinaso .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--brand-light);
}
.thumb-wrap { position: relative; }
.thumb-wrap .thumb { display: block; }
.thumb-badge {
  position: absolute;
  top: .6rem;
  inset-inline-start: .6rem;
  background: rgba(30, 27, 58, .75);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 50rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.card-hinaso .body { padding: 1.1rem; }
.card-hinaso .title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-hinaso .desc {
  color: var(--muted);
  font-size: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-hinaso .meta {
  font-size: .78rem;
  color: var(--muted);
}

.cart-badge {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.price-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .82rem; }
.price-new { color: var(--brand); font-weight: 700; }

.badge-brand {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.tag-badge {
  padding: .4rem .85rem;
  border-radius: 50rem;
  font-size: .82rem;
}

/* CTA */
.cta-section {
  background: var(--ink);
  color: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.enamad-badge {
  display: inline-block;
  background: #fff;
  border-radius: .6rem;
  padding: .5rem;
  margin-top: 1rem;
}
.enamad-badge img { display: block; max-width: 100px; }

.footer-title { font-weight: 700; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #cfd0e6; }
.footer-links a:hover { color: #fff; }

section.page-section { padding: 3rem 0; }

.sidebar-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 18px rgba(30, 27, 58, .06);
}

/* Sidebar widgets (news categories / latest articles) */
.footer-title-sm {
  font-weight: 700;
  color: var(--ink);
}
.sidebar-list li {
  border-bottom: 1px solid #eef0f6;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  display: block;
  padding: .6rem 0;
  color: var(--ink);
  font-weight: 500;
}
.sidebar-list a:hover { color: var(--brand); }
.sidebar-list a i { color: var(--brand); font-size: .8rem; }

.sidebar-latest li {
  padding: .6rem 0;
  border-bottom: 1px solid #eef0f6;
}
.sidebar-latest li:last-child { border-bottom: none; }
.sidebar-latest img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: .6rem;
  flex-shrink: 0;
  background: var(--brand-light);
}
.sidebar-latest-title {
  font-weight: 600;
  font-size: .88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-latest-date {
  font-size: .75rem;
  color: var(--muted);
}
