/* =====================================================
   مهان تجارت راستین — استایل اصلی سایت
   ساختار: Variables > Reset > Typography > Layout > Components > Pages > Responsive
   ===================================================== */

:root {
  --navy: #0B1220;
  --navy-2: #16233A;
  --navy-soft: #2A3A55;
  --accent: #12A9A5;
  --accent-dark: #0E8683;
  --accent-light: #EAF6F6;
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --text: #1B2430;
  --text-light: #5B6472;
  --text-faint: #8A93A3;
  --border: #E6E9EE;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 18, 32, 0.12);
  --container: 1200px;
  --transition: 220ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
@media (max-width: 768px) { section { padding: 56px 0; } }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
h1, h2, h3, h4 { color: var(--navy); font-weight: 700; line-height: 1.5; }
h1 { font-size: clamp(30px, 4vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }
.section-head p { color: var(--text-light); margin-top: 12px; font-size: 16px; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { border-color: var(--border); color: var(--navy); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* -------------------- Header -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 96px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 15px; color: var(--navy); }
.brand-text span { font-size: 11px; color: var(--text-faint); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; }
.main-nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--navy);
  font-weight: 500;
  transition: var(--transition);
}
.main-nav a.nav-link:hover, .main-nav a.nav-link.active { color: var(--accent-dark); background: var(--accent-light); }

.nav-item.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition);
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}
.dropdown a:hover { background: var(--accent-light); color: var(--accent-dark); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.hamburger span { width: 20px; height: 2px; background: var(--navy); display: block; transition: var(--transition); }

/* -------------------- Mobile nav -------------------- */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(11,18,32,0.5);
  z-index: 200;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86%);
  background: var(--surface);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 280ms ease;
  overflow-y: auto;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mobile-nav-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 18px; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a.nav-link { display: block; padding: 12px 8px; font-size: 16px; color: var(--navy); border-bottom: 1px solid var(--border); }
.mobile-sub { padding-inline-start: 14px; display: flex; flex-direction: column; }
.mobile-sub a { font-size: 14px; color: var(--text-light); padding: 8px; }
.mobile-nav-cta { margin-top: 20px; }

/* -------------------- Hero -------------------- */
.hero {
  padding-top: 72px;
  padding-bottom: 72px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero p.lead { font-size: 17px; color: var(--text-light); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; }
.hero-badges { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-badge { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 8px; }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* -------------------- Activity cards -------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: var(--transition);
}
.activity-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.activity-card .icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.activity-card h3 { margin-bottom: 10px; font-size: 17px; }
.activity-card p { color: var(--text-light); font-size: 14.5px; }

/* -------------------- Why us -------------------- */
.why-section { background: var(--navy); color: #fff; }
.why-section .section-head h2, .why-section .section-head p { color: #fff; }
.why-section .section-head p { color: #B7C0D1; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}
.why-card .icon { color: var(--accent); margin-bottom: 16px; }
.why-card h3 { color: #fff; font-size: 16.5px; margin-bottom: 8px; }
.why-card p { color: #AEB8CA; font-size: 14px; }

/* -------------------- About summary (home) -------------------- */
.about-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-summary p { color: var(--text-light); margin-bottom: 16px; font-size: 15.5px; }
.about-summary img { border-radius: var(--radius-lg); }

/* -------------------- Solutions -------------------- */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.solution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.solution-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.solution-card .thumb { aspect-ratio: 16/10; background: var(--accent-light); display: flex; align-items: center; justify-content: center; color: var(--accent-dark); overflow: hidden; padding: 10px; }
.solution-card .thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-md); }
.solution-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.solution-card p { color: var(--text-light); font-size: 14.5px; flex: 1; }

/* -------------------- Brands -------------------- */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
  transition: var(--transition);
}
.brand-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.brand-card img { margin: 0 auto 16px; }
.brand-card p { color: var(--text-light); font-size: 14px; margin-bottom: 16px; min-height: 66px; }

/* -------------------- Projects (home teaser use only cards) -------------------- */
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-item strong { display: block; font-size: 26px; color: var(--navy); }
.stat-item span { font-size: 13px; color: var(--text-faint); }

/* -------------------- CTA band -------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--radius-lg);
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.cta-band p { color: #B7C0D1; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--navy); color: #C7CEDB; padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
}
.footer-brand .logo-badge img { height: 44px; width: auto; }
.footer-brand p { font-size: 14px; color: #9AA5BA; line-height: 1.9; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { font-size: 14px; color: #9AA5BA; transition: var(--transition); }
.site-footer a:hover { color: var(--accent); }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: #9AA5BA; }
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: var(--transition);
}
.social-row a:hover { background: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; font-size: 13px; color: #7C879C; flex-wrap: wrap; gap: 10px;
}

/* -------------------- Breadcrumb / page header -------------------- */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 0 44px;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #AEB8CA; max-width: 600px; }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; color: #8A93A3; margin-bottom: 14px; }
.breadcrumb a { color: #AEB8CA; }
.breadcrumb a:hover { color: var(--accent); }

/* -------------------- Products page -------------------- */
.products-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: flex-start; }
.filters-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 96px;
}
.filters-panel h4 { font-size: 15px; margin-bottom: 14px; }
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--text-light); cursor: pointer; }
.filter-option input { accent-color: var(--accent); }
.filter-reset { font-size: 13px; color: var(--accent-dark); margin-top: 6px; display: inline-block; }

.products-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box input {
  width: 100%; padding: 12px 40px 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--surface);
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box svg { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--text-faint); }
.sort-select {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--surface); color: var(--text);
}
.results-count { font-size: 13px; color: var(--text-faint); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card .thumb { aspect-ratio: 4/3; background: var(--accent-light); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat-tag { font-size: 11.5px; color: var(--accent-dark); background: var(--accent-light); align-self: flex-start; padding: 4px 10px; border-radius: 999px; }
.product-card .brand-tag { font-size: 12px; color: var(--text-faint); }
.product-card h3 { font-size: 16px; }
.product-card p.desc { font-size: 13.5px; color: var(--text-light); flex: 1; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price-tag { font-weight: 700; color: var(--navy); font-size: 15px; }
.price-tag small { font-weight: 400; font-size: 12px; color: var(--text-faint); }
.price-tag.on-request { color: var(--accent-dark); font-size: 13.5px; font-weight: 600; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }

/* -------------------- Product detail -------------------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: flex-start; }
.product-gallery { background: var(--accent-light); border-radius: var(--radius-lg); padding: 30px; }
.product-info .brand-tag { font-size: 13px; color: var(--accent-dark); font-weight: 600; }
.product-info h1 { margin: 8px 0 16px; }
.product-price { font-size: 26px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.product-price small { font-size: 14px; font-weight: 400; color: var(--text-faint); }
.product-info .desc { color: var(--text-light); margin-bottom: 24px; }
.spec-list { border-top: 1px solid var(--border); margin-bottom: 24px; }
.spec-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-light); }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.related-heading { margin: 64px 0 24px; }

/* -------------------- About page -------------------- */
.about-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-hero-grid p { color: var(--text-light); margin-bottom: 16px; font-size: 15.5px; }

/* -------------------- Contact -------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: flex-start; }
.contact-info-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-info-card li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-info-card li:last-child { border-bottom: none; }
.contact-info-card .icon { color: var(--accent-dark); flex-shrink: 0; }
.contact-info-card strong { display: block; font-size: 14px; margin-bottom: 3px; }
.contact-info-card span { font-size: 13.5px; color: var(--text-light); }
.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 13.5px; color: var(--text); font-weight: 600; }
.form-field input, .form-field textarea {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; background: var(--bg);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.form-note { font-size: 12.5px; color: var(--text-faint); margin-top: 10px; }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-top: 28px; }
.map-placeholder {
  aspect-ratio: 21/8; background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark); font-size: 14px; text-align: center; padding: 20px;
}
.form-success {
  display: none; background: var(--accent-light); color: var(--accent-dark); border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; margin-bottom: 16px;
}
.form-success.show { display: block; }
.form-error {
  display: none; background: #FDECEC; color: #B3261E; border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; margin-bottom: 16px;
}
.form-error.show { display: block; }

/* -------------------- Reveal animation --------------------
   نکته: مخفی‌سازی اولیه فقط زمانی اعمال می‌شود که کلاس js روی
   تگ html باشد (یعنی جاوااسکریپت فعال و اجرا شده است). به این
   ترتیب اگر اسکریپت به هر دلیلی اجرا نشود، محتوا همیشه قابل مشاهده
   می‌ماند و پنهان نمی‌شود. */
.reveal { transition: opacity 600ms ease, transform 600ms ease; }
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* -------------------- Placeholder note badges -------------------- */
.note-badge {
  display: inline-block; font-size: 11.5px; color: #9A6B1F; background: #FFF6E5;
  border: 1px solid #F2E0B8; padding: 3px 10px; border-radius: 999px; margin-inline-start: 8px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 1024px) {
  .card-grid, .why-grid, .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .solution-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid, .about-summary, .about-hero-grid, .product-detail, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .products-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-actions .btn-primary.header-cta { display: none; }
  .hamburger { display: flex; }
  .card-grid, .why-grid, .brand-grid, .solution-grid, .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
