
/* =========================================================
   Karizma - Modern RTL Landing (Test Build)
   Notes:
   - Uses CSS variables for Light/Dark themes
   - Pure HTML/CSS/JS (no framework)
   ========================================================= */

:root{
  --radius-1: 12px;
  --radius-2: 18px;
  --radius-3: 26px;

  --shadow-1: 0 10px 30px rgba(0,0,0,.22);
  --shadow-2: 0 16px 50px rgba(0,0,0,.35);

  --container: 1180px;
  --gutter: 18px;

  --ease: cubic-bezier(.2,.8,.2,1);
  --ring: 0 0 0 3px rgba(46,197,255,.25);

  /* fallback */
  --bg: #f7f9ff;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #0b1225;
  --muted: #44506a;
  --border: #d7def2;
  --primary: #0b7cff;
  --primary-2: #22b8ff;
  --danger: #ff4d6d;
  --success: #21c17a;

  --link: #0b7cff;
}

:root[data-theme="dark"]{
  --bg: #070B17;
  --surface: #0B1A3A;
  --surface-2: #0E2552;
  --text: #F3F7FF;
  --muted: #B4C2DA;
  --border: #243B78;
  --primary: #2EC5FF;
  --primary-2: #1E65FF;
  --link: var(--primary);
}

:root[data-theme="light"]{
  --bg: #f7f9ff;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #0b1225;
  --muted: #44506a;
  --border: #d7def2;
  --primary: #0b7cff;
  --primary-2: #22b8ff;
  --link: #0b7cff;
}

/* Prefer user's OS theme if no explicit theme stored */

/* OS theme preference disabled: default is light unless user toggles */

@media (prefers-color-scheme: light){
  :root:not([data-theme]){ 
    --bg: #f7f9ff;
    --surface: #ffffff;
    --surface-2: #eef3ff;
    --text: #0b1225;
    --muted: #44506a;
    --border: #d7def2;
    --primary: #0b7cff;
    --primary-2: #22b8ff;
    --link: #0b7cff;
  }
}

*{ box-sizing: border-box; }
html{
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body{
  margin: 0;
  font-family: "Vazirmatn", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

button, input, select, textarea{ font: inherit; }

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }
img{ max-width: 100%; display: block; }

.container{
  width: min(var(--container), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* ---------------------------------------------------------
   Utilities
--------------------------------------------------------- */
.hidden{ display: none !important; }
.muted{ color: var(--muted); }
.small{ font-size: .92rem; }
.kbd{
  padding: .1rem .4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .85rem;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.sep{
  height: 1px;
  background: color-mix(in srgb, var(--border) 60%, transparent);
  margin: 18px 0;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn{
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 999px;
  padding: .72rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  user-select: none;
  text-decoration: none !important;
}
.btn:hover{ transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.btn:active{ transform: translateY(0px); }
.btn:focus-visible{ outline: none; box-shadow: var(--ring); }

.btn-primary{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 0;
  color: #041022;
  box-shadow: 0 12px 40px rgba(46,197,255,.22);
}
:root[data-theme="light"] .btn-primary{
  color: #03101f;
  box-shadow: 0 12px 40px rgba(11,124,255,.18);
}

.btn-secondary{
  background: color-mix(in srgb, var(--surface-2) 75%, transparent);
}

.btn-ghost{
  background: transparent;
}

.btn-icon{
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.badge.ready{ border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.badge.soon{ border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }

/* ---------------------------------------------------------
   Header / Nav
--------------------------------------------------------- */
.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  padding: .6rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 9999;
}
.skip-link:focus{ left: 12px; top: 12px; }

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.brand img{
  width: 36px;
  height: 36px;
}
.brand .title{
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand .title strong{ font-size: 1.02rem; }
.brand .title span{ font-size: .82rem; color: var(--muted); }

.nav{
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav a{
  font-weight: 800;
  color: var(--text);
  opacity: .9;
  padding: .55rem .75rem;
  border-radius: 999px;
  text-decoration: none !important;
}
.nav a:hover{
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  opacity: 1;
}


.nav a[aria-current="page"]{
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  opacity: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}

.drawer-links a[aria-current="page"]{
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
.nav-cta{
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn{
  display: none;
}

@media (max-width: 980px){
  /* Mobile header: keep hamburger always top-right on ALL pages */
  .header-inner{
    position: relative;
    padding-right: 68px; /* room for the absolute menu button */
  }
  .brand{ padding-right: 6px; }
  /* Home page (index) has inline header styles; enforce the same behavior */
  body.home-v12 .header-inner{
    position: relative;
    padding-right: 68px !important;
  }
  body.home-v12 .nav-cta{ direction: rtl !important; }

  /* Prevent brand + actions overlap on small screens */
  .brand{
    min-width: 0;
    flex: 1 1 auto;
  }
  .brand .title{
    min-width: 0;
  }
  .brand .title strong,
  .brand .title span{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .nav-cta{
    flex-shrink: 0;
    gap: 8px;
  }
  .menu-btn{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }
  body.home-v12 .menu-btn{ right: 0 !important; }

  /* On mobile, hide the accessibility skip-link that can appear by mistake */
  .skip-link{ display: none !important; }

  .nav{ display: none; }
  .menu-btn{ display: inline-flex; }
  body.nav-open .nav-drawer{ transform: translateX(0); opacity: 1; pointer-events: auto; }
  body.nav-open .backdrop{ opacity: 1; pointer-events: auto; }

  /* Fix: prevent header brand text from being truncated on mobile */
  .brand .title strong,
  .brand .title span{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }
}

/* Mobile drawer */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
  z-index: 60;
}
.nav-drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: min(92vw, 380px);
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  transform: translateX(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
  z-index: 70;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-links{
  display: grid;
  gap: 8px;
}
.drawer-links a{
  padding: .75rem .85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--text);
  font-weight: 800;
  text-decoration: none !important;
}
.drawer-links a:hover{ border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }

.drawer-cta{
  margin-top: auto;
  display: grid;
  gap: 10px;
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero{
  position: relative;
  padding: 46px 0 26px;
  overflow: hidden;
}
.hero::before,
.hero::after{
  content:"";
  position:absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(50px);
  opacity: .35;
  pointer-events:none;
}
.hero::before{
  background: radial-gradient(circle at 30% 30%, var(--primary), transparent 60%);
  top: -180px;
  right: -140px;
}
.hero::after{
  background: radial-gradient(circle at 60% 50%, var(--primary-2), transparent 62%);
  bottom: -220px;
  left: -160px;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 26px;
  align-items: center;
}
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.hero h1{
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.7rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero-cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.hero-card{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: var(--radius-2);
  padding: 14px 14px;
  box-shadow: var(--shadow-1);
}
.hero-card .row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-card strong{ font-size: 1rem; }
.hero-card .hint{ color: var(--muted); font-size: .92rem; margin-top: 8px; }

.stat-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.stat{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border-radius: 999px;
  padding: .45rem .7rem;
  font-weight: 800;
  font-size: .92rem;
}

/* ---------------------------------------------------------
   Sections / Cards
--------------------------------------------------------- */
.section{
  padding: 34px 0;
}
.section-header{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-header h2{
  margin: 0;
  font-size: 1.45rem;
}
.section-header p{
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
  max-width: 56ch;
}

.grid{
  display: grid;
  gap: 14px;
}
.grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.grid.cols-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){
  .grid.cols-3{ grid-template-columns: repeat(2, 1fr); }
  .grid.cols-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .grid.cols-3,
  .grid.cols-4{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: var(--radius-2);
  padding: 16px;
  box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover{
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: var(--shadow-2);
}
.card h3{
  margin: 0 0 6px;
  font-size: 1.04rem;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.card-top{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.card-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------------------------------------------------------
   Chips / Filters
--------------------------------------------------------- */
.filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.search{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-radius: 999px;
  padding: .5rem .8rem;
}
.search input{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}
.search input::placeholder{ color: color-mix(in srgb, var(--muted) 80%, transparent); }

.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip{
  padding: .45rem .7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--text);
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
}
.chip[aria-pressed="true"]{
  background: color-mix(in srgb, var(--primary) 20%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

/* ---------------------------------------------------------
   FAQ Accordion
--------------------------------------------------------- */
.faq{
  display: grid;
  gap: 10px;
}
.faq-item{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: var(--radius-2);
  overflow: hidden;
}
.faq-q{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  font-size: 1rem;
  padding: 14px 14px;
  cursor: pointer;
}
.faq-q span{ text-align: right; }
.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.faq-a .inner{
  padding: 0 14px 14px;
  color: var(--muted);
}
.faq-item[open] .faq-a{ max-height: 420px; }
.faq-item[open] .faq-q{ background: color-mix(in srgb, var(--surface-2) 38%, transparent); }

/* ---------------------------------------------------------
   CTA block
--------------------------------------------------------- */
.cta{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary) 18%, var(--surface)),
              color-mix(in srgb, var(--primary-2) 12%, var(--surface)));
  border-radius: var(--radius-3);
  padding: 18px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-2);
}
@media (max-width: 980px){
  .cta{ grid-template-columns: 1fr; }
}
.cta h3{ margin: 0 0 6px; font-size: 1.2rem; }
.cta p{ margin: 0; color: var(--muted); }
.cta .actions{ display:flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }

/* ---------------------------------------------------------
   Forms
--------------------------------------------------------- */
.form{
  display: grid;
  gap: 10px;
}
.field{
  display: grid;
  gap: 6px;
}
.label{
  font-weight: 800;
  font-size: .92rem;
}
.input, .select, .textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  padding: .75rem .85rem;
  outline: none;
  font-size: 1rem;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.textarea{ min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus{
  box-shadow: var(--ring);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.footer{
  padding: 34px 0 26px;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 980px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .footer-grid{ grid-template-columns: 1fr; }
}

.footer h4{ margin: 0 0 10px; }
.footer a{ color: var(--muted); text-decoration: none; }
.footer a:hover{ color: var(--text); text-decoration: underline; }
.footer .copy{ margin-top: 18px; color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------
   Modal (Demo Request)
--------------------------------------------------------- */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
  z-index: 90;
}
.modal{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 100;
}
.modal-card{
  width: min(92vw, 720px);
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-2);
  padding: 16px;
  transform: translateY(10px) scale(.98);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.modal-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.modal-title{
  display:flex;
  align-items:center;
  gap: 10px;
}
.modal-title img{ width: 28px; height: 28px; }
.modal-title strong{ font-size: 1.0rem; }

body.modal-open .modal-backdrop{ opacity: 1; pointer-events: auto; }
body.modal-open .modal{ pointer-events: auto; }
body.modal-open .modal-card{ transform: translateY(0) scale(1); opacity: 1; }

.toast{
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 120;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  max-width: min(92vw, 420px);
}
.toast.show{
  opacity: 1;
  transform: translateY(0);
}


/* ---------------------------------------------------------
   Home (minimal, premium)
--------------------------------------------------------- */
.home .hero.home-hero{
  padding: 56px 0 34px;
}
.home-hero-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 26px;
  align-items: center;
}
@media (max-width: 980px){
  .home-hero-grid{ grid-template-columns: 1fr; }
}

.home-hero-badges{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.trust-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.trust-item{
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  min-width: 160px;
}

.home-showcase{
  border-radius: var(--radius-3);
  padding: 18px;
  background:
    radial-gradient(900px 220px at 90% 0%,
      color-mix(in srgb, var(--primary-2) 20%, transparent),
      transparent 55%),
    radial-gradient(700px 220px at 10% 100%,
      color-mix(in srgb, var(--primary) 16%, transparent),
      transparent 55%),
    color-mix(in srgb, var(--surface) 62%, transparent);
}

.showcase-head{
  display: flex;
  align-items: center;
  gap: 12px;
}
.showcase-mark{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary) 20%, var(--surface)),
              color-mix(in srgb, var(--primary-2) 14%, var(--surface)));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-1);
}
.showcase-mark img{ width: 28px; height: 28px; }

.showcase-list{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.showcase-row{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: .5rem;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent);
}
.dot-a{ background: color-mix(in srgb, var(--primary) 90%, #fff); }
.dot-b{ background: color-mix(in srgb, var(--primary-2) 90%, #fff); }
.dot-c{ background: color-mix(in srgb, var(--text) 60%, #fff); }

.showcase-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.feature-card .feature-icon{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary) 16%, var(--surface)),
              color-mix(in srgb, var(--primary-2) 12%, var(--surface)));
  box-shadow: var(--shadow-1);
}

.cat-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .95rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.cat-chip:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-1);
}
.cat-chip[aria-disabled="true"]{ pointer-events: none; }

.step{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-num{
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary) 22%, var(--surface)),
              color-mix(in srgb, var(--primary-2) 16%, var(--surface)));
  box-shadow: var(--shadow-1);
}


/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; }
}



/* ===== Nav: prevent two-line labels (درباره ما / سوالات متداول ...) ===== */
.nav a{ white-space: nowrap; }
.nav{ gap: 10px; flex-wrap: nowrap; }
@media (max-width: 1100px){
  .nav{ gap: 8px; }
  .nav a{ font-size: .95rem; }
}

/* ===== Product modules grid ===== */
.modules-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 6px;
}
.module-card{
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.module-card h4{
  margin: 0 0 6px;
  font-size: .98rem;
}
.module-card p{
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
}
@media (max-width: 860px){
  .modules-grid{ grid-template-columns: 1fr; }
}



/* ===== Home hero brand ===== */
.home-hero-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin: 10px 0 12px;
}
.hero-logo{
  width:64px;
  height:64px;
  border-radius:18px;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.18));
}
.hero-brand-name{
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.hero-brand-tagline{
  margin-top: 4px;
  font-size: 1.0rem;
  color: var(--muted);
}
@media (max-width: 860px){
  .hero-logo{ width:54px; height:54px; border-radius:16px; }
  .hero-brand-name{ font-size: 1.8rem; }
}

/* ---------------------------------------------------------
   Hero Box (Home-like rectangular banner for inner pages)
--------------------------------------------------------- */
.hero-box{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-3);
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: var(--shadow-1);
  padding: 22px;
}
.hero-box::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(780px circle at 18% 22%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 58%),
    radial-gradient(680px circle at 82% 28%, color-mix(in srgb, var(--primary-2) 16%, transparent), transparent 60%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 92%, transparent),
      color-mix(in srgb, var(--surface) 72%, transparent)
    );
  opacity: .9;
  pointer-events:none;
}
.hero-box > *{
  position: relative;
  z-index: 1;
}
@media (max-width: 560px){
  .hero-box{
    padding: 16px;
    border-radius: 18px;
  }
}

/* If a hero-card is inside the hero-box, make it a bit softer */
.hero-box .hero-card{
  box-shadow: none;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

/* ---------------------------------------------------------
   Responsive fixes for some inline grids used in the demo pages
   (so they look great on mobile without rewriting every HTML file)
--------------------------------------------------------- */
@media (max-width: 920px){
  .grid[style*="grid-template-columns: 1.1fr .9fr"]{
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 680px){
  .grid[style*="grid-template-columns: 1fr 1fr"]{
    grid-template-columns: 1fr !important;
  }
}

/* ---------------------------------------------------------
   Online chat (chat.html) styles
--------------------------------------------------------- */
.chat-card{
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.chat-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.chat-title{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-title strong{ font-weight: 900; }
.chat-title span{ color: var(--muted); font-size: .9rem; }

.chat-status{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.chat-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--success) 18%, transparent);
}

.chat-messages{
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  flex: 1;
}

.msg{
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}
.msg.you{
  align-self: flex-start;
}
.msg.support{
  align-self: flex-end;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.msg .meta{
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted);
}

.chat-input{
  padding: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  display: flex;
  gap: 10px;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.chat-input input{
  flex: 1;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: .75rem 1rem;
  outline: none;
}
.chat-input input:focus{
  box-shadow: var(--ring);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
}

@media (max-width: 560px){
  .chat-card{ min-height: 520px; }
  .msg{ max-width: 92%; }
}


/* =========================================================
   Mobile polish + Home hero2/trustbar styles
   (Added to fix mobile layout & missing class styles)
========================================================= */

html, body{ overflow-x: hidden; }

/* Pills (used in header + hero2) */
.pill{
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 999px;
  padding: .66rem 1rem;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  user-select: none;
  text-decoration: none !important;
  white-space: nowrap;
}
.pill:hover{ transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary) 42%, var(--border)); }
.pill:active{ transform: translateY(0px); }
.pill:focus-visible{ outline: none; box-shadow: var(--ring); }

.pill-primary{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 0;
  color: #041022;
  box-shadow: 0 12px 30px rgba(26,140,255,.18);
}
.pill-soft{
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.pill-outline{
  background: transparent;
  border-color: color-mix(in srgb, var(--border) 85%, transparent);
}
.pill-icon{
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
}

/* Make header behave nicely on small screens */
@media (max-width: 980px){
  .brand{ min-width: 0; }
}
@media (max-width: 560px){
  .header-inner{
    flex-wrap: nowrap;
    gap: 10px;
  }
  .brand{
    min-width: 0;
    gap: 8px;
  }
  .brand img{
    width: 34px;
    height: 34px;
  }
  .brand .title span{
    display: none;
  }
  .brand .title strong{
    font-size: .98rem;
  }

  /* Keep actions compact */
  .nav-cta{
    gap: 8px;
    flex-wrap: nowrap;
  }
  /* Buttons-based header (all inner pages) */
  .nav-cta .btn-primary{ display: none; } /* hide 'درخواست مشاوره' on very small screens */
  .nav-cta .btn-secondary{
    padding: .56rem .78rem;
    font-size: .86rem;
    line-height: 1.1;
    white-space: nowrap;
  }
  .nav-cta .btn-icon{
    width: 38px;
    height: 38px;
  }
  .nav-cta a.pill-outline{ display: none; } /* consult goes to menu */
  .nav-cta a.pill-primary{
    padding: .56rem .8rem;
    font-size: .86rem;
    line-height: 1.1;
    white-space: nowrap;
  }
  .nav-cta .pill-icon{
    width: 38px;
    height: 38px;
  }
  .menu-btn{
    width: 38px;
    height: 38px;
  }

  /* Keep a bit of breathing room for chat widget on mobile */
  main{ padding-bottom: 70px; }
}

/* Home page (index) - Enamad should never cover UI (especially the mobile drawer) */
body.home-v12 .enamad-fixed{
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  margin: 16px auto 0;
  width: fit-content;
  z-index: 1 !important;
  background: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
body.home-v12 .enamad-fixed img{
  width: 110px !important;
  height: auto !important;
  display: block;
}

/* Ensure drawer always sits above 3rd-party widgets */
.backdrop{ z-index: 9998; }
.nav-drawer{ z-index: 9999; }

/* ---------------------------------------------------------
   Home hero2 (missing styles)
--------------------------------------------------------- */
.hero2{
  position: relative;
  padding: 26px 0 14px;
  overflow: hidden;
}
.hero2-circle{
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: .34;
  pointer-events: none;
  top: -220px;
  right: -220px;
  background: radial-gradient(circle at 30% 30%, var(--primary), transparent 60%);
}
.hero2-inner{
  display: flex;
  justify-content: center;
}
.hero2-card{
  position: relative;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--surface) 78%, transparent),
              color-mix(in srgb, var(--surface-2) 58%, transparent));
  border-radius: var(--radius-3);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.hero2-swoosh{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .95;
}
.hero2-swoosh svg{
  position: absolute;
  width: 140%;
  height: 120%;
  left: -20%;
  top: -22%;
}
.hero2-actions{
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}
.hero2-brand{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.hero2-brand img{
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.hero2-brand h1{
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero2-brand p{
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.hero2-slogan{
  position: relative;
  margin-top: 14px;
  display: block;
  width: 100%;
  text-align: center;
}
.hero2-slogan span{
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;

  /* Mobile-safe, no background pill */
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  font-size: clamp(1.15rem, 4vw, 1.85rem);
  line-height: 1.25;
  box-shadow: none;
}

/* Hide the slogan text on mobile screens only (keep it visible on desktop/windows) */
@media (max-width: 620px){
  .hero2-slogan{ display: none !important; }
}

.hero2-badges{
  position: relative;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface-2) 44%, transparent);
  color: var(--text);
  font-weight: 800;
  font-size: .9rem;
}

@media (max-width: 560px){
  .hero2{ padding: 18px 0 10px; }
  .hero2-card{
    padding: 14px 14px 14px;
    border-radius: 22px;
  }
  .hero2-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .hero2-actions .pill{
    width: 100%;
  }
  .hero2-brand{
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
  .hero2-brand img{
    width: 40px;
    height: 40px;
  }
  .hero2-slogan{
	  display: none !important; /* hide slogan only on mobile */
	  width: 100%;
	  justify-content: center;
  }
  .hero2-slogan span{
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;

    /* prevent clipping on very narrow screens */
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: balance;

    line-height: 1.45;
    font-size: .92rem;
    padding: .58rem .85rem;
  }
  .hero2-badges{
    justify-content: center;
  }
}

/* ---------------------------------------------------------
   Trust bar (missing styles)
--------------------------------------------------------- */
.trustbar{
  padding: 10px 0 6px;
}
.trustbar-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.trust-item{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-radius: var(--radius-2);
  padding: 14px 14px;
  box-shadow: var(--shadow-1);
}
.trust-icon{
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  flex: 0 0 auto;
}
.trust-icon svg{
  width: 24px;
  height: 24px;
}
.trust-text strong{
  display: block;
  margin: 0 0 4px;
  font-size: 1rem;
}
.trust-text span{
  display: block;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

@media (max-width: 980px){
  .trustbar-list{
    grid-template-columns: 1fr;
  }
}
