@font-face {
  font-family: 'Vazirmatn';
  /* One variable file covers 100-900, replacing five separate weight files. */
  src: url('../fonts/Vazirmatn-wght.woff2') format('woff2-variations'),
       url('../fonts/Vazirmatn-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  /* swap, not the default block: text paints immediately in the fallback and
     re-renders when the font lands, instead of being invisible while it loads. */
  font-display: swap;
}

/* ==========================================================================
   Sazandeh — Construction Tools & Materials
   Modern RTL Persian storefront — design system & components
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --brand:        #1d4ed8;   /* deep blue   */
  --brand-dark:   #1e3a8a;
  --brand-light:  #3b82f6;
  --accent:       #f59e0b;   /* construction amber */
  --accent-dark:  #d97706;
  --ink:          #0f172a;   /* slate-900   */
  --body:         #334155;   /* slate-700   */
  --muted:        #64748b;   /* slate-500   */
  --line:         #e2e8f0;   /* slate-200   */
  --surface:      #ffffff;
  --bg:           #f8fafc;   /* slate-50    */
  --bg-alt:       #f1f5f9;   /* slate-100   */

  --radius:       0.85rem;
  --radius-sm:    0.6rem;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow:       0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg:    0 16px 40px rgba(15, 23, 42, .14);

  /* Bootstrap overrides */
  --bs-primary: #1d4ed8;
  --bs-primary-rgb: 29, 78, 216;
  --bs-body-color: #334155;
  --bs-body-bg: #f8fafc;
  --bs-font-sans-serif: 'Vazirmatn', Tahoma, Arial, sans-serif;
  --bs-border-radius: 0.85rem;
}

/* ---------- Base ---------- */
* { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  direction: rtl;
  background-color: var(--bg);
  color: var(--body);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* A single overlong token (pasted URL, &nbsp;-joined paragraph) must never
     be able to scroll the whole page sideways on a phone. */
  overflow-x: hidden;
}

/* Editor-authored bodies: wrap anywhere rather than overflow the column. */
.service-content,
.project-content,
.post-content,
.blog-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-content img,
.project-content img,
.post-content img,
.blog-content img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-weight: 800;
  color: var(--ink);
  /* Never negative for Persian: tracking pulls joined letters apart. */
  letter-spacing: 0;
}

a { transition: color .2s ease; text-decoration: none; }

.text-brand    { color: var(--brand) !important; }
.text-accent   { color: var(--accent-dark) !important; }
.bg-brand      { background-color: var(--brand) !important; }
.bg-brand-soft { background-color: #eff6ff !important; }
.bg-accent     { background-color: var(--accent) !important; }

.section-title { position: relative; display: inline-block; }
.section-title::after {
  content: '';
  position: absolute;
  bottom: -.55rem; right: 0;
  width: 48px; height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Top Bar ---------- */
.topbar {
  background: var(--brand-dark);
  color: #cbd5e1;
  font-size: .82rem;
}
.topbar a { color: #e2e8f0; }
.topbar a:hover { color: #fff; }

/* ---------- Navbar ---------- */
.navbar {
  font-size: .95rem;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
  padding-top: .65rem; padding-bottom: .65rem;
}
.navbar .navbar-brand { color: var(--ink) !important; font-weight: 800; font-size: 1.25rem; }
.navbar .navbar-brand .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-size: 1.2rem;
}
.navbar .navbar-brand .brand-logo { height: 46px; width: auto; display: block; }
.site-footer .footer-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 4px;
}
.site-footer .footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.navbar .nav-link {
  color: var(--body) !important;
  font-weight: 600;
  padding: .5rem .9rem !important;
  border-radius: .5rem;
  transition: color .2s, background .2s;
}
/* The categories toggle is a <button>, not an <a href="#"> — it opens a menu
   rather than going anywhere, and an empty-fragment link is both uncrawlable
   and wrong for keyboard users. Strip the native button chrome so it matches
   its <a> siblings exactly. */
.navbar button.nav-link {
  background-color: transparent;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--brand) !important; background: #eff6ff; }
.navbar .dropdown-menu {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  padding: .4rem;
}
.navbar .dropdown-item { padding: .55rem 1rem; border-radius: .45rem; font-weight: 500; transition: background .2s; }
.navbar .dropdown-item:hover { background-color: #eff6ff; color: var(--brand); }

/* ---------- Header menus (partials/_navbar.html) ----------
   Both menus open as panels centred under the navbar rather than hanging off
   their toggle: the shop panel is wide enough for categories side by side,
   and anchored to a toggle in the middle of the bar it ran off the left edge
   of a laptop screen. The navbar is sticky, so it is the positioned ancestor
   once the dropdown <li> gives up its own `position: relative`. */
@media (min-width: 992px) {
  .navbar .nav-item.dropdown-mega { position: static; }
  .navbar .dropdown-menu.mega-menu[data-bs-popper],
  .navbar .dropdown-menu.mega-menu {
    left: 0; right: 0; margin-inline: auto; margin-top: .35rem;
    width: min(54rem, calc(100vw - 2rem));
  }
  .navbar .dropdown-menu.mega-menu.is-compact { width: min(42rem, calc(100vw - 2rem)); }
}
.navbar .dropdown-menu.mega-menu { padding: 0; border-radius: 1rem; overflow: hidden; }
.mega-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .15rem 1.25rem;
  padding: 1rem 1.1rem .6rem; max-height: min(70vh, 34rem); overflow-y: auto; overscroll-behavior: contain;
}
.mega-grid.is-services { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .25rem .75rem; }
.mega-col { padding-bottom: .5rem; }
.navbar .mega-menu .dropdown-item { white-space: normal; border-radius: .55rem; }
.navbar .mega-menu .mega-head { display: flex; align-items: center; gap: .65rem; padding: .45rem .5rem; color: var(--ink); font-weight: 400; }
.navbar .mega-menu .mega-head:hover, .navbar .mega-menu .mega-head:focus { background: #eff6ff; color: var(--brand); }
.mega-text strong { display: block; font-weight: 800; font-size: .95rem; line-height: 1.55; }
.mega-text small { display: block; font-size: .75rem; color: var(--muted); }
.mega-icon {
  flex: 0 0 38px; height: 38px; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #fffbeb; color: var(--accent-dark); font-size: 1.05rem;
}
.mega-icon.is-brand { background: #eff6ff; color: var(--brand); }
.mega-icon img { width: 100%; height: 100%; object-fit: cover; }
.mega-links { list-style: none; margin: .1rem 0 0; padding: 0; padding-inline-start: 3.35rem; }
.navbar .mega-links .dropdown-item { padding: .22rem .5rem; font-size: .86rem; font-weight: 500; color: var(--body); }
.navbar .mega-links .dropdown-item:hover, .navbar .mega-links .dropdown-item:focus { color: var(--brand); background: var(--bg-alt); }
.mega-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .7rem 1.1rem; background: var(--bg-alt); border-top: 1px solid var(--line);
}
.mega-foot-link { font-size: .88rem; font-weight: 700; color: var(--brand); }
.mega-foot-link:hover { color: var(--brand-dark); }
@media (max-width: 991.98px) {
  /* Inside the collapsed phone menu the panel is just part of the list. */
  .navbar .dropdown-menu.mega-menu { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
  .mega-grid, .mega-grid.is-services { grid-template-columns: 1fr; padding: .25rem 0; max-height: none; }
  .mega-foot { background: transparent; border-top: 1px dashed var(--line); padding: .6rem .25rem; }
}

/* Between 992 and 1200px the bar is crowded: keep every button on one line
   and give the search box less room (its width is set inline, hence the
   !important). */
.navbar .btn { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nav-search .form-control { width: 150px !important; }
}

.nav-search .form-control {
  border-radius: 2rem;
  padding-right: 2.5rem;
  background: var(--bg-alt);
  border-color: transparent;
}
.nav-search .form-control:focus { background: #fff; }
.nav-search .search-icon { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: .6rem; padding: .55rem 1.25rem; transition: transform .15s ease, box-shadow .2s ease, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background-color: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background-color: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 6px 18px rgba(29,78,216,.3); }
.btn-accent { background-color: var(--accent); border-color: var(--accent); color: #1f2937; }
.btn-accent:hover { background-color: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: 0 6px 18px rgba(217,119,6,.3); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background-color: var(--brand); border-color: var(--brand); }
.btn-lg { padding: .8rem 1.8rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(120deg, rgba(30,58,138,.92) 0%, rgba(29,78,216,.78) 55%, rgba(29,78,216,.45) 100%),
    url('../img/bg/hero-1600.webp') center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}
/* A 1600px background on a 400px phone is wasted bytes on the LCP element,
   and mobile is where the connection is slowest. */
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(120deg, rgba(30,58,138,.92) 0%, rgba(29,78,216,.78) 55%, rgba(29,78,216,.45) 100%),
      url('../img/bg/hero-800.webp') center/cover no-repeat;
  }
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 70px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero .badge-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  border-radius: 2rem;
  padding: .4rem 1rem;
  font-weight: 600;
  font-size: .85rem;
}
.hero-stat { border-right: 2px solid rgba(255,255,255,.25); }
.hero-stat:first-child { border-right: 0; }

/* ---------- Cards ---------- */
.card { border-radius: var(--radius); border: 1px solid var(--line); }
.shadow-soft { box-shadow: var(--shadow-sm) !important; }

.product-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; border-color: #c7d2fe; }
.product-card .product-img {
  height: 210px; width: 100%;
  object-fit: cover;
  background: var(--bg-alt);
  transition: transform .4s ease;
}
.product-card:hover .product-img { transform: scale(1.05); }
.product-card .img-wrap { overflow: hidden; position: relative; }
.product-card .cat-chip {
  position: absolute; top: .75rem; right: .75rem;
  background: rgba(255,255,255,.92); color: var(--brand);
  font-size: .72rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 2rem;
  box-shadow: var(--shadow-sm);
}
/* Sits on the opposite corner to .cat-chip, so the two never collide. */
.product-card .discount-chip {
  position: absolute; top: .75rem; left: .75rem;
  background: #dc2626; color: #fff;
  font-size: .78rem; font-weight: 800;
  padding: .25rem .55rem; border-radius: 2rem;
  box-shadow: var(--shadow-sm);
}
.product-card .price { color: var(--brand); font-weight: 800; }
.product-card .card-title a { color: var(--ink); }
.product-card .card-title a:hover { color: var(--brand); }

.category-card {
  transition: transform .3s ease, box-shadow .3s ease;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; }
.category-card .cat-img { height: 160px; object-fit: cover; width: 100%; }
.category-card .cat-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--brand); font-size: 1.6rem; margin: -2rem auto 0;
  border: 4px solid #fff; box-shadow: var(--shadow-sm);
}
/* Subcategory chips under a category card (چسب‌ها → چسب FRP …) */
.category-card .cat-children {
  display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center;
  border-top: 1px dashed var(--line); padding-top: .75rem;
}
.cat-chip {
  display: inline-block; font-size: .75rem; line-height: 1.4;
  padding: .2rem .6rem; border-radius: 2rem;
  background: #f1f5f9; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); transition: background .2s ease, color .2s ease;
}
.cat-chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Product detail ---------- */
/* Long Persian product names ran to two huge lines at the default h1 size. */
.product-title {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.85rem);
  line-height: 1.6;
}
@media (min-width: 992px) {
  /* The gallery is short and the buying column tall; keeping it in view while
     reading beats leaving a blank block beside the specs. */
  .product-gallery-sticky { position: sticky; top: 90px; }
}
.product-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem;
  border-top: 1px solid var(--line); padding-top: 1rem;
}
.product-facts > div { display: flex; gap: .4rem; align-items: baseline; font-size: .875rem; }
.product-facts dt { color: var(--muted); font-weight: 500; margin: 0; }
.product-facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.product-facts a { color: var(--brand); text-decoration: none; }
.product-description { white-space: normal; overflow-wrap: anywhere; }

.spec-table th, .spec-table td { padding: .55rem .75rem; vertical-align: middle; }
.spec-table th {
  color: var(--muted); font-weight: 500; width: 45%;
  background: #f8fafc; border-radius: .35rem;
}
.spec-table td { font-weight: 600; color: var(--ink); }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--line); }

/* ---------- Share bar ---------- */
.share-bar { margin-top: .5rem; }
.share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: var(--muted); border: 1px solid var(--line);
  font-size: 1.05rem; text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.share-btn:hover { transform: translateY(-2px); color: #fff; }
.share-telegram:hover { background: #229ED9; border-color: #229ED9; }
.share-whatsapp:hover { background: #25D366; border-color: #25D366; }
.share-x:hover        { background: #000;    border-color: #000; }
.share-mail:hover     { background: #64748b; border-color: #64748b; }
.share-copy:hover     { background: var(--brand); border-color: var(--brand); }
.share-btn.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

.hover-lift { transition: transform .3s ease, box-shadow .3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg) !important; }

/* ---------- Feature / Trust strip ---------- */
.feature-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  transition: transform .25s, box-shadow .25s;
}
.feature-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-tile .icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.feature-tile .icon.blue   { background: #eff6ff; color: var(--brand); }
.feature-tile .icon.green  { background: #ecfdf5; color: #059669; }
.feature-tile .icon.amber  { background: #fffbeb; color: var(--accent-dark); }
.feature-tile .icon.rose   { background: #fff1f2; color: #e11d48; }

/* ---------- Service cards ---------- */
.service-card {
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); padding: 1.75rem; height: 100%;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.service-card .icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-size: 1.5rem; margin-bottom: 1.1rem;
}

/* ---------- Badges ---------- */
.badge { font-weight: 700; padding: .4em .8em; border-radius: 2rem; }

/* ---------- Section helpers ---------- */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  border-radius: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../img/bg/placeholder-product.webp') center/cover;
  opacity: .12;
}

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: .6rem; border-color: var(--line); padding: .6rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(29,99,235,.15); }

/* ---------- OTP Inputs ---------- */
.otp-inputs .otp-digit { width: 48px; height: 54px; font-size: 1.4rem; font-weight: 700; border-radius: .5rem; text-align: center; }
.otp-inputs .otp-digit:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(29,99,235,.25); }

/* ---------- Tables ---------- */
.table th { font-weight: 700; white-space: nowrap; color: var(--ink); }

/* ---------- Blog content ---------- */
.blog-content h2, .blog-content h3, .blog-content h4 { margin-top: 1.5rem; margin-bottom: .75rem; }
.blog-content p { margin-bottom: 1rem; }
.blog-content img { max-width: 100%; border-radius: .5rem; margin: 1rem 0; }
.blog-content ul, .blog-content ol { padding-right: 1.5rem; margin-bottom: 1rem; }

/* ---------- Gallery ---------- */
.gallery-thumb { transition: opacity .2s, transform .2s, border-color .2s; border: 2px solid transparent; }
.gallery-thumb:hover { opacity: .85; transform: scale(1.05); }

/* ---------- Search dropdown ---------- */
#searchResults { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); }
#searchResults .search-item { padding: .6rem 1rem; cursor: pointer; transition: background .2s; }
#searchResults .search-item:hover { background-color: #eff6ff; }

/* ---------- Rating ---------- */
.rating-star { transition: transform .2s; }
.rating-star:hover { transform: scale(1.2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; }
.site-footer h2, .site-footer h3, .site-footer h5, .site-footer h6 { color: #fff; }
/* Bootstrap's .text-secondary is #6c757d — mid-grey on the near-black
   footer, which fails WCAG AA. #cbd5e1 on #0f172a is ~11.7:1. */
.site-footer .text-secondary { color: #cbd5e1 !important; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--accent) !important; }
.site-footer .social-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); color: #cbd5e1; font-size: 1.1rem;
  transition: background .2s, color .2s, transform .2s;
}
.site-footer .social-btn:hover { background: var(--brand); color: #fff !important; transform: translateY(-3px); }
.trust-badge { background: #fff; border-radius: .6rem; padding: .4rem; }

/* ---------- Pagination ---------- */
.page-link { font-weight: 600; color: var(--brand); border-radius: .5rem !important; margin: 0 .15rem; border-color: var(--line); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--ink); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { content: "\F285"; font-family: "bootstrap-icons"; font-size: .7rem; color: var(--muted); }

/* ---------- Invoice ---------- */
.invoice-container { max-width: 900px; margin: 0 auto; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Utilities ---------- */
.min-vh-40 { min-height: 40vh; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .hero-stat { border-right: 0; }
}
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .product-card .product-img { height: 170px; }
  .otp-inputs .otp-digit { width: 40px; height: 46px; font-size: 1.1rem; }
  .table-responsive { font-size: .85rem; }
}
@media (max-width: 576px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .product-card .product-img { height: 150px; }
  h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; }
}

/* ==========================================================================
   Content pages — articles, services, projects
   One vocabulary for all three: the eyebrow over a title, chips, a facts
   panel, numbered steps, the FAQ accordion and the long-form .prose column.
   ========================================================================== */

/* ---------- Shared pieces ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 700; color: var(--brand);
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 2rem;
  padding: .3rem .85rem;
}
.eyebrow.on-dark { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }

.chip-row {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.chip {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  font-size: .85rem; font-weight: 600; line-height: 1.6;
  padding: .35rem .95rem; border-radius: 2rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--body);
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--brand-light); color: var(--brand); }
.chip.active, .chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-sm { font-size: .75rem; padding: .15rem .65rem; }
.chip-brand { background: #eff6ff; border-color: #dbeafe; color: var(--brand); }

.page-band { padding: 2.25rem 0 1.75rem; background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%); }
.page-band h1 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); line-height: 1.5; margin: .6rem 0 .4rem; text-wrap: balance; }
.page-band p { color: var(--body); max-width: 64ch; margin: 0; }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: .75rem 1rem; margin-bottom: 1.25rem;
}
.section-head h2 { margin: 0; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); }
.section-head p { margin: .35rem 0 0; color: var(--muted); }

.content-section { padding-top: 2.75rem; scroll-margin-top: calc(var(--nav-h, 70px) + 60px); }
.content-section > h2 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.65rem); line-height: 1.5; margin-bottom: 1rem; }
.content-section > .section-lead { color: var(--muted); margin: -.5rem 0 1rem; }

/* ---------- Long-form text ---------- */
.prose {
  font-size: clamp(1rem, .96rem + .22vw, 1.125rem);
  line-height: 1.95; color: #1e293b; max-width: 72ch;
  overflow-wrap: anywhere;
}
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.5rem; line-height: 1.5; margin: 2em 0 .7em; scroll-margin-top: calc(var(--nav-h, 70px) + 16px); }
.prose h3 { font-size: 1.25rem; line-height: 1.55; margin: 1.7em 0 .6em; scroll-margin-top: calc(var(--nav-h, 70px) + 16px); }
.prose h4 { font-size: 1.08rem; margin: 1.4em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose a:not(.btn) { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.prose a:not(.btn):hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--accent-dark); }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 1.5em 0; padding: .9em 1.15em; background: var(--bg-alt);
  border-inline-start: 4px solid var(--brand-light); border-radius: .5rem; color: var(--ink);
}
.prose img { max-width: 100%; height: auto; border-radius: .75rem; margin: .5em 0; }
.prose hr { margin: 2em 0; border: 0; border-top: 1px dashed #cbd5e1; opacity: 1; }
.prose pre { direction: ltr; text-align: left; background: var(--ink); color: #e2e8f0; padding: 1em; border-radius: .6rem; overflow-x: auto; font-size: .9em; }
/* Quill's alignment and indent classes — the sanitiser keeps ql-* classes. */
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-left { text-align: left; }
.prose .ql-align-justify { text-align: justify; }
/* On a phone's narrow column, justified Persian opens wide gaps between
   words; the author's justify applies from tablet width up. */
@media (max-width: 575.98px) { .prose .ql-align-justify { text-align: start; } }
.prose .ql-indent-1 { padding-inline-start: 2em; }
.prose .ql-indent-2 { padding-inline-start: 4em; }
.prose .ql-indent-3 { padding-inline-start: 6em; }

.table-scroll { overflow-x: auto; margin: 1.25em 0; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95em; min-width: 30rem; margin: 0; }
.prose th, .prose td { padding: .6em .85em; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { background: var(--bg-alt); color: var(--ink); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }

/* The editor's «نکته / هشدار / توضیح» boxes. Each is a class on a paragraph;
   consecutive paragraphs of the same kind join into one box. */
.prose [class*="ql-callout-"] {
  margin: 1.4em 0; padding: .8em 1.15em; border-radius: .6rem;
  border-inline-start: 4px solid var(--c-line); background: var(--c-bg); color: var(--c-ink);
}
.prose [class*="ql-callout-"]::before {
  content: var(--c-label); display: block; font-size: .8em; font-weight: 800; margin-bottom: .15em;
}
.prose .ql-callout-tip { --c-line: #10b981; --c-bg: #ecfdf5; --c-ink: #064e3b; --c-label: 'نکته'; }
.prose .ql-callout-warning { --c-line: var(--accent); --c-bg: #fffbeb; --c-ink: #78350f; --c-label: 'هشدار'; }
.prose .ql-callout-info { --c-line: var(--brand-light); --c-bg: #eff6ff; --c-ink: #1e3a8a; --c-label: 'توضیح'; }
.prose .ql-callout-tip + .ql-callout-tip,
.prose .ql-callout-warning + .ql-callout-warning,
.prose .ql-callout-info + .ql-callout-info {
  margin-top: -1.4em; padding-top: .2em; border-start-start-radius: 0; border-start-end-radius: 0;
}
.prose .ql-callout-tip + .ql-callout-tip::before,
.prose .ql-callout-warning + .ql-callout-warning::before,
.prose .ql-callout-info + .ql-callout-info::before { content: none; }
.prose .ql-callout-tip:has(+ .ql-callout-tip),
.prose .ql-callout-warning:has(+ .ql-callout-warning),
.prose .ql-callout-info:has(+ .ql-callout-info) { border-end-start-radius: 0; border-end-end-radius: 0; padding-bottom: .2em; }

.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 1.5em 0; border-radius: .75rem; overflow: hidden; background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Reading progress ---------- */
.read-progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 1100; pointer-events: none; }
.read-progress > span { display: block; height: 100%; background: var(--accent); transform-origin: right; transform: scaleX(0); }

/* ---------- Article page ---------- */
.article-header { padding: 1.75rem 0 1.5rem; background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%); }
.article-title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.45rem); line-height: 1.55; margin: .75rem 0; max-width: 30ch; text-wrap: balance; }
.article-lead { font-size: clamp(1.02rem, .98rem + .2vw, 1.15rem); color: var(--body); line-height: 1.95; margin: 0 0 1rem; max-width: 68ch; }
.article-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--muted); font-size: .9rem; }
.article-meta i { color: var(--brand-light); margin-inline-end: .3rem; }
.article-cover { margin: 0 0 2rem; }
.article-cover img { width: 100%; height: auto; aspect-ratio: 7 / 4; object-fit: cover; border-radius: 1rem; box-shadow: var(--shadow); }
.article-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .article-aside > .sticky-stack { position: sticky; top: calc(var(--nav-h, 70px) + 20px); }
}
.sticky-stack { display: grid; gap: 1rem; }
@media (min-width: 992px) {
  /* Below the navbar and the section bar that sticks under it. */
  .aside-sticky { position: sticky; top: calc(var(--nav-h, 70px) + 72px); }
}

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .9rem; }
.toc-title { font-weight: 800; color: var(--ink); margin-bottom: .5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: .35rem .7rem; border-inline-start: 2px solid var(--line); color: var(--body); line-height: 1.75; }
.toc li.lvl-3 a { padding-inline-start: 1.5rem; font-size: .85rem; color: var(--muted); }
.toc a:hover { color: var(--brand); }
.toc a.active { color: var(--brand); border-inline-start-color: var(--brand); background: #eff6ff; font-weight: 700; }
/* The desktop contents sit in a sticky column. A long article's list is
   taller than the screen, and a sticky box that overflows the viewport never
   shows its lower part — so the list itself scrolls, capped to what is left
   of the screen once the box's title and the call-to-action card below it
   (about 22rem together, with the gaps) are in view. The cap is on the <ol>,
   not the <nav>: the nav carries Bootstrap's d-lg-block, whose
   `display: block !important` rules out laying it out as a flex column. */
@media (min-width: 992px) {
  .article-aside .toc ol {
    max-height: max(9rem, calc(100vh - var(--nav-h, 70px) - 22rem));
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-inline-end: .2rem;
  }
}
.toc-mobile { margin-bottom: 1.75rem; }
.toc-mobile ol { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.toc-mobile summary { cursor: pointer; list-style: none; font-weight: 800; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "\F282"; font-family: "bootstrap-icons"; color: var(--muted); transition: transform .2s; }
.toc-mobile[open] summary { margin-bottom: .6rem; }
.toc-mobile[open] summary::after { transform: rotate(180deg); }

.cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin: 2.25rem 0; padding: 1.15rem 1.3rem; border-radius: var(--radius);
  background: var(--ink); color: #cbd5e1; font-size: .95rem; line-height: 1.8;
}
.cta-inline .cta-text { flex: 1 1 16rem; }
.cta-inline strong { display: block; color: #fff; font-size: 1.02rem; }
.cta-inline p { margin: 0; }
.cta-inline .btn { white-space: nowrap; }

.author-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.author-box .avatar {
  flex: 0 0 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.author-box p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.8; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: .6rem; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: .9rem 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.75;
  display: flex; gap: .75rem; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--brand); transition: transform .2s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq-answer { padding: 0 1.1rem 1rem; color: var(--body); line-height: 1.95; }

/* ---------- Service page ---------- */
/* A drafting-paper grid behind the title — the service pages are the
   engineering side of the business. */
.svc-hero {
  padding: 1.75rem 0 2.75rem; border-bottom: 1px solid var(--line);
  background-color: #f1f5f9;
  background-image:
    linear-gradient(rgba(29,78,216,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,78,216,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
.svc-title { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); line-height: 1.5; margin: .75rem 0; text-wrap: balance; }
.svc-lead { font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); line-height: 1.95; color: var(--body); max-width: 58ch; margin: 0; }
.svc-hero-media img { width: 100%; height: auto; aspect-ratio: 7 / 5; object-fit: cover; border-radius: 1.1rem; border: 6px solid #fff; box-shadow: var(--shadow-lg); }
.hero-trust { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .9rem; color: var(--body); }
.hero-trust li { display: flex; align-items: center; gap: .45rem; }
.hero-trust i { color: var(--accent-dark); }

.section-nav {
  position: sticky; top: var(--nav-h, 70px); z-index: 1010;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav .chip-row { padding: .55rem 0; }
.section-nav .chip { border-color: transparent; background: transparent; }
.section-nav .chip:hover { background: #eff6ff; }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; margin: 0; }
.facts-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.facts-grid dt { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .15rem; }
.facts-grid dd { margin: 0; font-weight: 800; color: var(--ink); line-height: 1.6; font-variant-numeric: tabular-nums; }

.symptom-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; }
.symptom-grid li {
  display: flex; gap: .65rem; align-items: flex-start; line-height: 1.85;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem;
}
.symptom-grid i { color: var(--accent-dark); font-size: 1.1rem; margin-top: .2rem; }

/* Numbered execution steps, joined by a dashed line like a site-plan route. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-bottom: 1.5rem; padding-inline-start: 3.6rem; }
.steps li::before {
  content: counter(step, persian);
  position: absolute; inset-inline-start: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #1f2937; font-weight: 800; box-shadow: 0 0 0 5px #fef3c7;
}
.steps li::after {
  content: ""; position: absolute; inset-inline-start: calc(1.25rem - 1px); top: 2.9rem; bottom: .35rem; width: 2px;
  background: repeating-linear-gradient(to bottom, #fcd34d 0 6px, transparent 6px 12px);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.05rem; line-height: 1.6; margin: .4rem 0 .25rem; }
.steps p { margin: 0; color: var(--body); line-height: 1.9; }

.pros-cons { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pros-cons .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.pros-cons h3 { font-size: 1.05rem; display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.icon-list { list-style: none; padding: 0; margin: 0; }
.icon-list li { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .5rem; line-height: 1.85; }
.icon-list i { margin-top: .25rem; flex-shrink: 0; }

.cost-box { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); background: var(--ink); color: #cbd5e1; border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.cost-box h3 { color: #fff; font-size: 1rem; margin-bottom: .5rem; }
.cost-box .price { font-size: 1.3rem; font-weight: 800; color: #fff; line-height: 1.7; }
.cost-box small { color: #94a3b8; }
.cost-box .icon-list i { color: var(--accent); }

.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.contact-card .btn { width: 100%; }
.channel-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.channel-row .btn { flex: 1 1 5rem; width: auto; padding-inline: .5rem; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list a { display: flex; align-items: center; gap: .5rem; padding: .55rem 0; color: var(--ink); border-bottom: 1px dashed var(--line); }
.link-list li:last-child a { border-bottom: 0; }
.link-list a:hover { color: var(--brand); }
.link-list i { color: var(--brand-light); }

/* ---------- Cards: services, projects, articles ---------- */
.svc-card, .project-card, .post-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.svc-card:hover, .project-card:hover, .post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.svc-card-media, .project-card-media, .post-card-media { position: relative; display: block; background: var(--bg-alt); overflow: hidden; }
.svc-card-media { aspect-ratio: 7 / 4; overflow: visible; }
.project-card-media { aspect-ratio: 4 / 3; }
.post-card-media { aspect-ratio: 16 / 9; }
.svc-card-media img, .project-card-media img, .post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-card:hover .project-card-media img, .post-card:hover .post-card-media img { transform: scale(1.04); }
.card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; color: #94a3b8; }
.svc-card-icon {
  position: absolute; bottom: -22px; inset-inline-start: 1.1rem; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.svc-card-body { padding: 1.9rem 1.2rem .9rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.svc-card-body h2, .svc-card-body h3 { font-size: 1.1rem; line-height: 1.6; margin: 0; }
.svc-card-body h2 a, .svc-card-body h3 a { color: var(--ink); }
.svc-card-body p { color: var(--muted); font-size: .9rem; line-height: 1.85; margin: 0; }
.svc-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .4rem; }
.svc-card-actions { display: flex; gap: .5rem; padding: 0 1.2rem 1.2rem; }
.svc-card-actions .btn { flex: 1; font-size: .88rem; padding: .5rem .6rem; }

.card-badge {
  position: absolute; top: .75rem; inset-inline-start: .75rem; max-width: calc(100% - 1.5rem);
  background: rgba(255,255,255,.95); color: var(--brand); font-size: .75rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 2rem; box-shadow: var(--shadow-sm);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-card-body, .post-card-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.project-card-title, .post-card-title {
  font-size: 1.02rem; line-height: 1.75; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-title a, .post-card-title a { color: var(--ink); }
.project-card-title a:hover, .post-card-title a:hover { color: var(--brand); }
.card-meta { color: var(--muted); font-size: .84rem; margin: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.card-meta i { margin-inline-end: .25rem; }
.project-card-scope { font-size: .85rem; color: var(--body); margin: auto 0 0; padding-top: .55rem; border-top: 1px dashed var(--line); }
.post-card-excerpt {
  color: var(--muted); font-size: .9rem; line-height: 1.85; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .card-meta { margin-top: auto; padding-top: .3rem; }
@media (min-width: 768px) {
  .post-card--featured { flex-direction: row; }
  .post-card--featured .post-card-media { flex: 0 0 55%; aspect-ratio: auto; min-height: 20rem; }
  .post-card--featured .post-card-body { padding: 1.75rem 2rem; justify-content: center; gap: .7rem; }
  .post-card--featured .post-card-title { font-size: 1.45rem; line-height: 1.65; -webkit-line-clamp: 3; }
  .post-card--featured .post-card-excerpt { -webkit-line-clamp: 3; }
  .post-card--featured .card-meta { margin-top: .5rem; }
}

/* ---------- Project list filters ---------- */
.filter-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .55rem; }
.filter-label { flex: 0 0 4.5rem; font-size: .85rem; color: var(--muted); font-weight: 700; }
.filter-row .chip-row { flex: 1; min-width: 0; }

/* ---------- Project page ---------- */
.project-hero { padding: 1.75rem 0 1.25rem; }
.project-cover { display: block; border-radius: 1.1rem; overflow: hidden; box-shadow: var(--shadow); background: var(--bg-alt); }
.project-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.facts-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1.25rem 1rem; }
.facts-panel h2 { font-size: 1rem; margin: .75rem 0 .25rem; }
.facts-panel dl { margin: 0; }
.facts-panel dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.facts-panel dl > div:last-child { border-bottom: 0; }
.facts-panel dt { color: var(--muted); font-weight: 500; white-space: nowrap; }
.facts-panel dd { margin: 0; color: var(--ink); font-weight: 700; text-align: end; }
.facts-panel dd a { color: var(--brand); }

.story { display: grid; gap: .9rem; }
.story-step { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--story); border-radius: var(--radius); padding: 1rem 1.25rem; }
.story-step h3 { font-size: .95rem; color: var(--story); margin-bottom: .35rem; }
.story-step p { margin: 0; line-height: 1.95; }
.story-step.is-before { --story: #dc2626; }
.story-step.is-solution { --story: var(--brand); }
.story-step.is-result { --story: #059669; }

/* Before / after. Time runs right to left in Persian, so «پیش از» is on the
   right and «پس از» on the left; the slider moves the seam between them. */
.ba-compare { --pos: 50%; position: relative; aspect-ratio: 4 / 3; border-radius: 1rem; overflow: hidden; background: var(--ink); direction: ltr; user-select: none; }
.ba-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-compare .ba-before { clip-path: inset(0 0 0 var(--pos)); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.2); pointer-events: none; }
.ba-handle {
  position: absolute; top: 50%; left: var(--pos); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: var(--accent); color: #1f2937; box-shadow: var(--shadow); pointer-events: none;
}
.ba-compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-compare:has(input:focus-visible) .ba-handle { outline: 3px solid #fff; outline-offset: 3px; }
.ba-label { position: absolute; top: .75rem; padding: .2rem .7rem; border-radius: 2rem; background: rgba(15,23,42,.75); color: #fff; font-size: .8rem; font-weight: 700; direction: rtl; pointer-events: none; }
.ba-label.is-before { right: .75rem; }
.ba-label.is-after { left: .75rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .6rem; }
.gallery-grid a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: .6rem; overflow: hidden; background: var(--bg-alt); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }
.gallery-grid a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.gallery-kind { position: absolute; bottom: .4rem; inset-inline-start: .4rem; background: rgba(15,23,42,.75); color: #fff; font-size: .72rem; padding: .1rem .5rem; border-radius: 2rem; }

.testimonial { margin: 0; background: linear-gradient(135deg, #eff6ff 0%, #fff 70%); border: 1px solid #dbeafe; border-radius: var(--radius); padding: 1.5rem 1.6rem 1.25rem; }
.testimonial blockquote { margin: 0 0 .75rem; font-size: 1.08rem; line-height: 2; color: var(--ink); }
.testimonial blockquote::before { content: "«"; color: var(--brand-light); }
.testimonial blockquote::after { content: "»"; color: var(--brand-light); }
.testimonial figcaption { color: var(--muted); font-size: .9rem; }

/* ---------- Lightbox (static/js/content.js) ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: transparent; }
.lightbox::backdrop { background: rgba(2,6,23,.92); }
.lightbox-figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.75rem 1rem 2.5rem; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 8.5rem); object-fit: contain; border-radius: .5rem; }
.lightbox-figure figcaption { color: #e2e8f0; margin-top: .75rem; text-align: center; font-size: .95rem; max-width: 60ch; }
.lightbox-btn {
  position: fixed; width: 46px; height: 46px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: rgba(255,255,255,.14); color: #fff; transition: background .2s;
}
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255,255,255,.3); }
.lightbox-close { top: 1rem; left: 1rem; }
.lightbox-prev { top: 50%; right: 1rem; transform: translateY(-50%); }
.lightbox-next { top: 50%; left: 1rem; transform: translateY(-50%); }
.lightbox-count { position: fixed; top: 1.4rem; right: 1.4rem; color: #cbd5e1; font-size: .9rem; }
@media (min-width: 768px) { .lightbox-figure { padding-inline: 5rem; } }

/* ---------- The two ways forward: execution and materials ---------- */
.process { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.process li { counter-increment: p; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1rem .9rem; }
.process li::before {
  content: counter(p, persian); display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; margin-bottom: .5rem;
  background: #fef3c7; color: var(--accent-dark); font-weight: 800; font-size: .9rem;
}
.process strong { display: block; color: var(--ink); line-height: 1.6; }
.process span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.75; margin-top: .15rem; }

/* ---------- Homepage ---------- */
.home-hero { padding: 3.25rem 0 4.5rem; }
.home-title { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.45; color: #fff; margin: 1rem 0 .75rem; max-width: 22ch; text-wrap: balance; }
.home-lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); line-height: 1.95; color: #dbeafe; max-width: 52ch; margin: 0; }

/* The two doors. Same size, same weight, same place for the button: neither
   business reads as the side line of the other. */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: 2rem; max-width: 56rem; }
.path-card {
  position: relative; display: flex; flex-direction: column; gap: .35rem;
  padding: 1.35rem 1.4rem 1.2rem; border-radius: 1.1rem; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px); transition: background .2s, transform .2s, border-color .2s;
}
.path-card:hover, .path-card:focus-visible { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); color: #fff; transform: translateY(-3px); }
.path-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.path-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #1f2937; font-size: 1.35rem; margin-bottom: .35rem; }
.path-kicker { font-size: .8rem; font-weight: 700; color: #fcd34d; }
.path-title { font-size: 1.2rem; line-height: 1.6; }
.path-text { font-size: .92rem; line-height: 1.85; color: #cbd5e1; }
.path-cta { margin-top: auto; padding-top: .75rem; font-weight: 800; display: inline-flex; align-items: center; gap: .4rem; }
.path-card:hover .path-cta i { transform: translateX(-3px); }
.path-cta i { transition: transform .2s; }

.hero-facts { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 1.5rem; color: var(--accent); line-height: 1.3; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: .85rem; color: #cbd5e1; }

.duo { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.duo-panel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.duo-head { padding: 1.35rem 1.4rem 1.1rem; border-bottom: 1px solid var(--line); }
.duo-head h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); margin: .6rem 0 .3rem; }
.duo-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.duo-panel.is-execution .duo-head {
  background-color: #f1f5f9;
  background-image: linear-gradient(rgba(29,78,216,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(29,78,216,.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.duo-panel.is-shop .duo-head { background: linear-gradient(135deg, #fffbeb, #fff7ed); }
.duo-panel.is-shop .eyebrow { color: var(--accent-dark); background: #fffbeb; border-color: #fde68a; }
.duo-list { list-style: none; margin: 0; padding: .4rem 1rem; flex: 1; }
.duo-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; border-bottom: 1px dashed var(--line); }
.duo-children { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 3.35rem .65rem 0; }
.duo-list li:last-child { border-bottom: 0; }
.duo-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .6rem .35rem; color: var(--ink); font-weight: 600; }
.duo-row:hover { color: var(--brand); }
.duo-icon { flex: 0 0 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #eff6ff; color: var(--brand); overflow: hidden; }
.duo-icon img { width: 100%; height: 100%; object-fit: cover; }
.is-shop .duo-icon { background: #fffbeb; color: var(--accent-dark); }
.duo-name { flex: 1; min-width: 0; line-height: 1.6; }
.duo-count { font-size: .78rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.duo-arrow { color: #94a3b8; font-size: .8rem; }
.duo-side { flex: 0 0 auto; font-size: .76rem; font-weight: 700; color: var(--accent-dark); background: #fffbeb; border: 1px solid #fde68a; border-radius: 2rem; padding: .15rem .6rem; white-space: nowrap; }
.duo-side:hover { background: var(--accent); color: #1f2937; }
.duo-steps { list-style: none; counter-reset: ds; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .9rem 1.4rem 0; font-size: .82rem; color: var(--body); }
.duo-steps li { counter-increment: ds; display: inline-flex; align-items: center; gap: .35rem; }
.duo-steps li::before { content: counter(ds, persian); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fef3c7; color: var(--accent-dark); font-weight: 800; font-size: .75rem; }
.duo-steps li + li::after { content: none; }
.duo-steps li:not(:last-child)::after { content: "\2190"; color: #cbd5e1; margin-inline-start: .2rem; }
.duo-search { display: flex; gap: .5rem; padding: .9rem 1.4rem 0; }
.duo-search .form-control { border-radius: .6rem; }
.duo-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.4rem 1.35rem; }
.duo-actions .btn { flex: 1 1 10rem; }

.ask-block {
  display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: center;
  background: var(--ink); color: #cbd5e1; border-radius: 1.25rem; padding: 1.75rem 1.6rem;
}
@media (min-width: 992px) { .ask-block { grid-template-columns: minmax(0, 1fr) auto; padding: 2.25rem 2.5rem; } }
.ask-block h2 { color: #fff; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.7rem); margin-bottom: .4rem; }
.ask-block p { margin: 0 0 1rem; }
.ask-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.ask-chip { display: inline-block; font-size: .88rem; line-height: 1.7; padding: .4rem .95rem; border-radius: 2rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #e2e8f0; }
.ask-chip:hover { background: rgba(255,255,255,.16); color: #fff; }
.ask-channels { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 992px) { .ask-channels { flex-direction: column; min-width: 13rem; } }

/* ---------- Sticky call bar on phones ---------- */
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 1030; display: flex; gap: .5rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,23,42,.08);
}
.sticky-cta .btn { flex: 1; font-size: .92rem; padding: .6rem .5rem; }
body.has-sticky-cta { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
@media (min-width: 992px) {
  .sticky-cta { display: none; }
  body.has-sticky-cta { padding-bottom: 0; }
}

/* ---------- Staff shortcuts ---------- */
.staff-edit {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 1040;
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 2rem;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 700; box-shadow: var(--shadow-lg);
}
.staff-edit:hover { background: var(--brand); color: #fff; }
body.has-sticky-cta .staff-edit { bottom: calc(5rem + env(safe-area-inset-bottom)); }
@media (min-width: 992px) { body.has-sticky-cta .staff-edit { bottom: 1rem; } }
.preview-bar { position: sticky; top: 0; z-index: 1050; background: #fef3c7; color: #78350f; border-bottom: 1px solid #fcd34d; padding: .55rem 0; font-size: .9rem; }
.preview-bar a { color: #78350f; font-weight: 800; text-decoration: underline; }

.share-eitaa:hover { background: #f7911e; border-color: #f7911e; }
.share-letter { font-size: .78rem; font-weight: 800; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  .svc-card, .project-card, .post-card, .project-card-media img, .post-card-media img, .gallery-grid img { transition: none; }
  .svc-card:hover, .project-card:hover, .post-card:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .navbar, .topbar, footer, .site-footer, .no-print, .btn, .breadcrumb, .alert, .pagination, #searchResults { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 12px; }
  .card { border: none !important; box-shadow: none !important; }
  .invoice-container { width: 100%; max-width: none; }
  .table { font-size: 11px; }
  .table th, .table td { padding: 4px 8px; }
  .page-break-before { page-break-before: always; }
  .avoid-break { page-break-inside: avoid; }
}
