* {
  box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue-dark:   #1E3A6E;
  --blue-main:   #2B5BA8;
  --blue-mid:    #3D6EC0;
  --blue-light:  #5B8DD4;
  --blue-pale:   #E8F0FB;
  --blue-ultra:  #F0F5FF;
  --accent:      #f16819;
  --accent-dark: #f06204;
  --dark:        #0F1923;
  --dark-2:      #1C2A38;
  --mid:         #4A5568;
  --steel:       #718096;
  --border:      #CBD5E0;
  --border-light:#E2E8F0;
  --light:       #F7FAFC;
  --white:       #FFFFFF;
  --font: 'Vazirmatn', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 4px 16px rgba(43,91,168,0.12), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(43,91,168,0.18), 0 4px 12px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--white); color: var(--dark); direction: rtl; overflow-x: hidden; }

/* ========== NAV ========== */
#topbar {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-inner a { color: rgba(255,255,255,0.75); text-decoration: none; }
.topbar-inner a:hover { color: var(--accent); }
.topbar-contacts { display: flex; gap: 1.5rem; }

nav {
  position: sticky; top: 0; z-index: 999;
  background: var(--white);
  border-bottom: 2px solid var(--blue-pale);
  box-shadow: 0 2px 12px rgba(43,91,168,0.08);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 60px; display: block; }
.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links li a {
  display: block; padding: 0 18px; line-height: 68px;
  text-decoration: none; color: var(--mid); font-size: 14px; font-weight: 600;
  border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.nav-links li a:hover, .nav-links li a.active {
  color: var(--blue-main); border-bottom-color: var(--blue-main);
  background: var(--blue-ultra);
}
.nav-cta {
  background: var(--blue-main); color: var(--white) !important;
  padding: 0 22px !important; border-radius: 0 !important;
  border-bottom: 3px solid var(--blue-dark) !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; }

/* ========== FOOTER ========== */
footer {
  background: var(--dark-2);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 0;
  margin-top: 80px;
}
.footer-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo img { height: 38px; filter: brightness(0) invert(1) opacity(0.9); margin-bottom: 1rem; }
.footer-about { font-size: 13px; line-height: 1.8; margin-bottom: 1.5rem; }
.footer-title { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 1rem; letter-spacing: 0.05em; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-contact-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 13px; }
.footer-contact-item .ic { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 18px 2rem;
  display: flex; align-items: center; justify-content: space-between; font-size: 12px;
}

/* ========== BUTTONS ========== */
.btn { display: inline-block; padding: 12px 28px; font-size: 14px; font-weight: 700; text-decoration: none; font-family: var(--font); cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--blue-main); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue-main); border: 2px solid var(--blue-main); }
.btn-outline:hover { background: var(--blue-main); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue-main); }
.btn-white:hover { background: var(--blue-pale); }

/* ========== SECTION HEADERS ========== */
.section-header { margin-bottom: 3rem; }
.section-header.center { text-align: center; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--blue-main); text-transform: uppercase; margin-bottom: 10px; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; color: var(--dark); line-height: 1.2; }
.section-title span { color: var(--blue-main); }
.section-desc { font-size: 15px; color: var(--mid); line-height: 1.8; margin-top: 10px; font-weight: 300; max-width: 600px; }
.section-header.center .section-desc { margin: 10px auto 0; }

/* ========== CONTAINER ========== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
section { padding: 80px 0; }

/* ========== BADGES ========== */
.badge { display: inline-block; padding: 5px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.badge-blue { background: var(--blue-pale); color: var(--blue-main); }
.badge-accent { background: #FEF3DC; color: var(--accent-dark); }
.badge-green { background: #E6F9F0; color: #1A7A4A; }

/* ========== PRODUCT CARD ========== */
.product-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--blue-light); }
.product-card-img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--blue-ultra);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .placeholder-icon { font-size: 3rem; opacity: 0.3; }
.product-card-badge { position: absolute; top: 12px; right: 12px; }
.product-card-body { padding: 1.25rem; }
.product-card-cat { font-size: 11px; font-weight: 700; color: var(--blue-mid); letter-spacing: 0.08em; margin-bottom: 6px; }
.product-card-name { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 6px; line-height: 1.3; }
.product-card-desc { font-size: 12px; color: var(--steel); line-height: 1.6; margin-bottom: 1rem; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border-light); }
.product-price { font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.btn-sm { padding: 7px 16px; font-size: 12px; font-weight: 700; text-decoration: none; font-family: var(--font); background: var(--blue-main); color: var(--white); border: none; cursor: pointer; transition: background 0.2s; }
.btn-sm:hover { background: var(--blue-dark); }

/* ========== BLOG CARD ========== */
.blog-card { background: var(--white); border: 1px solid var(--border-light); transition: all 0.25s; overflow: hidden; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-card-img { width: 100%; aspect-ratio: 16/9; background: var(--blue-ultra); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-cat { font-size: 11px; font-weight: 700; color: var(--blue-main); letter-spacing: 0.08em; margin-bottom: 8px; }
.blog-card-title { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 8px; line-height: 1.4; }
.blog-card-excerpt { font-size: 13px; color: var(--steel); line-height: 1.7; margin-bottom: 1.25rem; font-weight: 300; }
.blog-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--steel); }
.read-more { color: var(--blue-main); text-decoration: none; font-weight: 700; font-size: 13px; }
.read-more:hover { color: var(--blue-dark); }

/* ========== PRICE CARD ========== */
.price-download-card {
  background: var(--white); border: 1px solid var(--border-light);
  padding: 2rem; text-align: center;
  transition: all 0.25s; position: relative; overflow: hidden;
}
.price-download-card::before { content:''; position:absolute; top:0; right:0; left:0; height:4px; background: var(--blue-main); }
.price-download-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.price-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.price-card-title { font-size: 17px; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.price-card-desc { font-size: 13px; color: var(--steel); margin-bottom: 1.5rem; line-height: 1.6; }
.price-card-date { font-size: 11px; color: var(--steel); margin-top: 1rem; }

/* ========== CONTACT FORM ========== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--dark); }
.form-input, .form-textarea, .form-select {
  background: var(--white); border: 1.5px solid var(--border);
  padding: 11px 16px; font-size: 14px; font-family: var(--font); color: var(--dark);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; direction: rtl; width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--blue-main); box-shadow: 0 0 0 3px rgba(43,91,168,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ========== FADE ANIMATIONS ========== */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ========== BREADCRUMB ========== */
.breadcrumb { background: var(--blue-ultra); border-bottom: 1px solid var(--blue-pale); padding: 12px 0; }
.breadcrumb-inner { max-width: 1280px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb a { color: var(--blue-main); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-dark); }
.breadcrumb-sep { color: var(--steel); }
.breadcrumb-current { color: var(--mid); font-weight: 600; }

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 60%, var(--blue-mid) 100%);
  padding: 60px 0;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg,transparent,transparent 39px,rgba(255,255,255,0.03) 39px,rgba(255,255,255,0.03) 40px),
                    repeating-linear-gradient(90deg,transparent,transparent 39px,rgba(255,255,255,0.03) 39px,rgba(255,255,255,0.03) 40px);
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.8rem,3vw,2.8rem); font-weight: 900; color: var(--white); margin-bottom: 8px; }
.page-hero p { font-size: 15px; color: rgba(255,255,255,0.75); font-weight: 300; }

/* ========== SIDEBAR ========== */
.sidebar-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
.sidebar-box { background: var(--white); border: 1px solid var(--border-light); position: sticky; top: 88px; }
.sidebar-title { background: var(--blue-main); color: var(--white); padding: 14px 18px; font-size: 14px; font-weight: 700; }
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; text-decoration: none; color: var(--mid); font-size: 14px; font-weight: 500;
  border-bottom: 1px solid var(--border-light); transition: all 0.2s;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background: var(--blue-ultra); color: var(--blue-main); padding-right: 24px;
}
.sidebar-nav li a .count { margin-right: auto; background: var(--blue-pale); color: var(--blue-main); font-size: 11px; padding: 2px 8px; font-weight: 700; }

/* ========== STATS STRIP ========== */
.stats-strip { background: var(--blue-main); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { text-align: center; padding: 1rem; border-left: 1px solid rgba(255,255,255,0.15); }
.stat-item:last-child { border-left: none; }
.stat-num { font-size: 2.5rem; font-weight: 900; color: var(--white); line-height: 1; }
.stat-num sup { font-size: 1.2rem; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 4px; }

/* ========== GRIDS ========== */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {

  body {
    padding: 10px;
  }

  .container {
    width: 100%;
    padding: 10px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  p {
    font-size: 14px;
  }

  img {
    max-width: 100%;
    height: auto;
  }

}
/* دکمه منو (سه خط) */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--blue-dark);
}

/* حالت موبایل */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    position: absolute;
    top: 68px;
    left: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li a {
    padding: 15px;
    border-bottom: 1px solid #eee;
  }
}
