/* ==========================================================
   ایرمان بازرگان پیروزان - استایل سایت
   سبک: سرمه‌ای، کارت‌های گرد، موج بین بخش‌ها، فوتر کپسولی
   رنگ‌های لوگوی IBP (سبز و بنفش) به‌عنوان رنگ تکمیلی
   ========================================================== */

:root {
  --navy: #1e1b6d;
  --navy-dark: #15134f;
  --lavender: #8d8bd1;
  --bg: #ececf1;
  --card: #ffffff;
  --ink: #1d1b2e;
  --ink-soft: #55526a;
  --line: #dcdbe6;

  --green: #009444;
  --green-dark: #00763a;
  --purple: #662d91;

  --orange: #e8702a;   /* برند کرمانشاه گشت */
  --blue: #1575e8;     /* برند نوبت ۱۹ */

  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 80px;
  --container: 1180px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --shadow: 0 12px 32px rgba(30, 27, 109, .10);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.95;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, address { margin: 0; }
address { font-style: normal; }

.ic {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -80px; z-index: 300;
  background: var(--navy); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { top: 0; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  border: 2px solid transparent; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #e9e8fb; }
.btn-outline { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }

.square-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 14px;
  background: var(--navy); color: #fff; cursor: pointer;
  transition: background-color .2s;
}
.square-btn:hover { background: var(--purple); }

/* ---------- هدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(236, 236, 241, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 72px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.4; }
.brand-text strong { font-size: .95rem; font-weight: 800; color: var(--navy); }
.brand-text small { font-size: .78rem; color: var(--ink-soft); }

.site-nav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-list { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav-list a {
  position: relative; display: block; padding: 8px 16px;
  font-weight: 700; font-size: .95rem; color: var(--navy);
  border-radius: 12px; transition: background-color .2s, color .2s;
}
.nav-list a:hover { background: rgba(30, 27, 109, .08); }
.nav-list a[aria-current="true"] { color: var(--purple); }
.nav-list a[aria-current="true"]::after {
  content: ""; position: absolute; inset-inline: 16px; bottom: 0; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, var(--green), var(--purple));
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  background: #fff; color: var(--navy); font-weight: 700; font-size: .93rem;
  border-radius: 14px; box-shadow: 0 2px 8px rgba(30,27,109,.08);
  transition: background-color .2s, color .2s;
}
.nav-phone:hover { background: var(--navy); color: #fff; }
.nav-phone .ic { width: 18px; height: 18px; }

.nav-toggle { display: none; position: relative; margin-inline-start: auto; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; inset-inline-start: 14px; width: 20px; height: 2px;
  border-radius: 2px; background: #fff; transition: transform .25s, top .25s;
}
.nav-toggle-bar { top: 23px; }
.nav-toggle-bar::before { top: -7px; inset-inline-start: 0; }
.nav-toggle-bar::after { top: 7px; inset-inline-start: 0; }
.menu-open .nav-toggle-bar { background: transparent; }
.menu-open .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.menu-open .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* ---------- بنر اصلی ---------- */
.hero { padding: 12px 0 72px; }

.banner {
  position: relative; overflow: hidden;
  padding: 64px 56px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(50% 90% at 0% 100%, rgba(0,148,68,.45), transparent 70%),
    radial-gradient(50% 90% at 100% 0%, rgba(102,45,145,.55), transparent 70%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  box-shadow: var(--shadow);
}
.banner-arcs { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; pointer-events: none; }

.banner-grid {
  position: relative; display: grid; align-items: center; gap: 48px;
  grid-template-columns: 1.05fr .95fr;
}

.banner h1 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.55; }
.lead { margin-top: 18px; max-width: 32em; font-size: 1.1rem; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.banner-products { display: grid; gap: 14px; }

.mini-card {
  --accent: var(--purple);
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 20px;
  padding: 20px 24px;
  background: #fff; color: var(--ink);
  border-radius: var(--radius);
  border-inline-start: 6px solid var(--accent);
  transition: transform .2s, box-shadow .2s;
}
.mini-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,.25); }
.mini-card--gasht { --accent: var(--orange); }
.mini-card--nobat { --accent: var(--blue); }
.mini-card img { width: 128px; }
.mini-card h2 { font-size: 1.1rem; font-weight: 800; line-height: 1.6; color: var(--navy); }
.mini-card p { font-size: .9rem; color: var(--ink-soft); line-height: 1.8; }
.mini-card-link { grid-column: 1 / -1; justify-self: start; font-size: .9rem; font-weight: 700; color: var(--accent); }
.mini-card-link::after { content: " ‹"; }

/* ---------- عنوان بخش‌ها ---------- */
.section { padding: 24px 0 80px; }
.section--tight { padding-top: 0; }

.section-head { text-align: center; max-width: 42em; margin: 0 auto 40px; }
.section-label { display: block; font-size: .92rem; color: var(--ink-soft); }
.section h2, .about h2 {
  position: relative; display: inline-block;
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.6; color: var(--navy);
}
.section-head h2::before, .section-head h2::after {
  content: ""; position: absolute; top: 50%; width: 70px; height: 2px;
  background: currentColor; opacity: .35;
}
.section-head h2::before { inset-inline-start: calc(100% + 18px); }
.section-head h2::after { inset-inline-end: calc(100% + 18px); }
.section-head p { margin-top: 6px; color: var(--ink-soft); }
.section-head--light h2, .section-head--light .section-label { color: #fff; }
.section-head--light .section-label { opacity: .8; }
.section-head--small { margin-bottom: 20px; }

/* ---------- محصولات ---------- */
.product-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.product {
  --accent: var(--purple);
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow);
}
.product--gasht { --accent: var(--orange); }
.product--nobat { --accent: var(--blue); }

.product-logo {
  display: grid; place-items: center; padding: 44px 32px;
  background: color-mix(in srgb, var(--accent) 10%, white);
}
.product-logo img { width: 100%; max-width: 250px; }

.product-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 30px 34px 34px; }
.product-tag {
  padding: 2px 14px; font-size: .85rem; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, white); border-radius: 999px;
}
.product-body h3 { margin-top: 12px; font-size: 1.55rem; font-weight: 800; color: var(--navy); }
.product-body p { margin-top: 4px; color: var(--ink-soft); }
.btn-product { margin-top: auto; background: var(--navy); color: #fff; }
.product-body p + .btn-product { margin-top: 24px; }
.btn-product:hover { background: var(--accent); }

/* ---------- درباره ما (سرمه‌ای با موج) ---------- */
.about {
  position: relative; background: var(--navy); color: #fff;
  padding: 140px 0 120px;
}
.wave { position: absolute; inset-inline: 0; line-height: 0; pointer-events: none; }
.wave svg { display: block; width: 100%; fill: var(--bg); }
.wave--top { top: -1px; }
.wave--top svg { height: 96px; }
.wave--bottom { bottom: -1px; }
.wave--bottom svg { height: 80px; }

.wave-btn {
  position: absolute; top: 40px; inset-inline-start: 50%;
  translate: 50% 0;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: #fff; color: var(--navy);
  box-shadow: 0 6px 16px rgba(30,27,109,.2); z-index: 2;
}
[dir="rtl"] .wave-btn { translate: 50% 0; }
.wave-btn:hover { background: var(--lavender); color: #fff; }

.about .section-head { margin-bottom: 34px; }

.about-wrap { position: relative; }
.about-wrap::before {
  content: ""; position: absolute; top: -22px; inset-inline-end: 36px;
  width: 42%; height: 80%; border-radius: 28px; background: var(--lavender); opacity: .75;
}
.about-card {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  padding: 36px; border-radius: 28px;
  background: #fff; color: var(--ink);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.about-copy p { color: var(--ink-soft); text-align: justify; }
.about-copy p + p { margin-top: 12px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.about-visual {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 260px; padding: 28px; text-align: center;
  border-radius: 20px;
  background:
    radial-gradient(70% 70% at 0% 100%, rgba(0,148,68,.14), transparent 70%),
    radial-gradient(70% 70% at 100% 0%, rgba(102,45,145,.16), transparent 70%),
    #f3f2fb;
}
.about-visual img { width: min(260px, 80%); }
.about-visual p { font-weight: 700; color: var(--navy); line-height: 1.8; }
.about-visual span { font-weight: 400; font-size: .9rem; color: var(--ink-soft); }

/* ---------- چیپ‌های ویژگی ---------- */
.chips { padding: 40px 0 72px; }
.chips-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.chip {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-radius: 20px;
  background: var(--bg); color: var(--navy);
  font-weight: 700; font-size: .95rem; line-height: 1.7;
  box-shadow: 6px 6px 14px rgba(30,27,109,.13), -6px -6px 14px rgba(255,255,255,.9);
}
.chip .ic { width: 30px; height: 30px; }
.chip:nth-child(2) .ic { color: var(--green-dark); }
.chip:nth-child(3) .ic { color: var(--purple); }

/* ---------- مستندها ---------- */
.doc-panel {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
  padding: 52px 56px; border-radius: 32px; color: #fff;
  background:
    radial-gradient(55% 120% at 0% 100%, rgba(0,148,68,.5), transparent 70%),
    linear-gradient(135deg, var(--purple) 0%, var(--navy) 100%);
  box-shadow: var(--shadow);
}
.doc-copy h2 { color: #fff; }
.doc-copy p { margin: 12px 0 26px; max-width: 34em; color: rgba(255,255,255,.9); }
.doc-number { text-align: center; padding-inline: 16px; }
.doc-number strong { display: block; font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 800; line-height: 1.1; }
.doc-number span { font-size: 1.1rem; }

/* ---------- تماس ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 28px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-icon {
  display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 16px; background: var(--navy); color: #fff;
}
.contact-card h3 { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.contact-card address { color: var(--ink-soft); }
.phone-list a {
  display: inline-block; min-height: 44px; line-height: 44px;
  font-size: 1.4rem; font-weight: 700; color: var(--navy); unicode-bidi: plaintext;
}
.phone-list a:hover { color: var(--green-dark); }

/* ---------- فوتر ---------- */
.site-footer { padding: 24px 0 36px; }

.licenses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.license {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 150px; padding: 20px 14px; text-align: center;
  background: #fff; border: 1px dashed var(--lavender); border-radius: var(--radius);
}
.license-icon {
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: #efeefa; color: var(--navy);
}

.license-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.license-icon .ic { width: 28px; height: 28px; }
.license img { max-height: 64px; width: auto; }
.license-title { font-size: .92rem; font-weight: 700; color: var(--navy); line-height: 1.7; }

.footer-bar-wrap { position: relative; }
.footer-glow {
  position: absolute; inset-inline: 8%; bottom: -14px; height: 40px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple));
  filter: blur(26px); opacity: .55; border-radius: 50%;
}
.footer-bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 40px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: .92rem;
}
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: rgba(255,255,255,.14); transition: background-color .2s, color .2s;
}
.socials a:hover { background: #fff; color: var(--navy); }

/* دکمه بازگشت به بالا */
.to-top {
  position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 90;
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--navy); color: #fff;
  box-shadow: 0 8px 20px rgba(30,27,109,.35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background-color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--purple); }

/* ==========================================================
   رسپانسیو
   ========================================================== */
@media (max-width: 1020px) {
  .banner { padding: 48px 36px; }
  .banner-grid { grid-template-columns: 1fr; gap: 36px; }
  .banner-products { grid-template-columns: 1fr 1fr; }
  .mini-card { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; }
  .about-visual { min-height: 200px; }
  .chips-list { grid-template-columns: repeat(2, 1fr); }
  .licenses { grid-template-columns: repeat(2, 1fr); }
}

/* منوی موبایل */
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }

  .site-nav {
    position: absolute; top: var(--header-h); inset-inline: 12px;
    display: none; flex-direction: column; align-items: stretch; gap: 14px;
    padding: 14px; background: #fff; border-radius: 24px;
    box-shadow: 0 24px 50px rgba(30,27,109,.22);
    max-height: calc(100vh - var(--header-h) - 16px); overflow-y: auto;
  }
  .menu-open .site-nav { display: flex; }

  .nav-list { flex-direction: column; align-items: stretch; margin: 0; gap: 2px; }
  .nav-list a { padding: 14px 16px; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .nav-list a[aria-current="true"] { background: #efeefa; }
  .nav-list a[aria-current="true"]::after { display: none; }

  .nav-actions { gap: 10px; }
  .nav-phone { flex: 1; justify-content: center; min-height: 52px; background: var(--bg); }
  .nav-actions .square-btn { width: 52px; height: 52px; }
}

@media (max-width: 720px) {
  :root { --header-h: 70px; }
  .brand img { width: 58px; }
  .brand-text small { display: none; }

  .hero { padding-bottom: 48px; }
  .banner { padding: 36px 22px; border-radius: 26px; }
  .banner-products { grid-template-columns: 1fr; }
  .mini-card { grid-template-columns: auto 1fr; padding: 18px; }
  .mini-card img { width: 108px; }
  .hero-actions .btn { flex: 1 1 150px; }

  .section { padding-bottom: 56px; }
  .section-head { margin-bottom: 28px; }
  .section-head h2::before, .section-head h2::after { display: none; }

  .product-list { grid-template-columns: 1fr; }
  .product-logo { padding: 32px 24px; }
  .product-body { padding: 24px 22px 28px; }
  .btn-product { width: 100%; }

  .about { padding: 120px 0 96px; }
  .about-wrap::before { inset-inline-end: 20px; }
  .about-card { padding: 22px; gap: 24px; }
  .about-copy p { text-align: start; }
  .about-actions .btn { flex: 1 1 140px; }

  .chips { padding: 28px 0 48px; }
  .chips-list { gap: 14px; }
  .chip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; font-size: .88rem; }

  .doc-panel { grid-template-columns: 1fr; padding: 34px 22px; gap: 20px; border-radius: 26px; }
  .doc-number { text-align: start; padding: 0; order: -1; }
  .doc-number strong { display: inline; margin-inline-end: 10px; }
  .doc-panel .btn { width: 100%; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 22px; }

  .licenses { gap: 12px; }
  .license { min-height: 130px; padding: 16px 10px; }
  .license-title { font-size: .85rem; }

  .footer-bar { flex-direction: column; border-radius: 28px; padding: 24px 20px; text-align: center; gap: 14px; }
  .to-top { bottom: 16px; inset-inline-start: 16px; width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
