/* card.css — صفحه عمومی کارت ویزیت هوشمند */
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root { --a: #2f5bea; --a2: #6b8cff; --deep: #1e3a9a; --bg: #eef1f7; --sf: #fff; --sf2: #f5f7fb; --ink: #121827; --mut: #667089; --line: #e4e8f1; --r: 20px; }
body.dark { --bg: #0c1018; --sf: #151b27; --sf2: #1b2232; --ink: #eef1f7; --mut: #9aa3b8; --line: #263045; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; color: var(--ink); line-height: 1.9; font-size: 15.5px; -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 50% -200px, color-mix(in srgb, var(--a) 22%, transparent), transparent 70%), var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.card { max-width: 460px; margin: 0 auto; padding: 0 14px 28px; }

/* سربرگ */
.top { position: relative; text-align: center; padding-bottom: 6px; }
.cover { height: 170px; margin: 0 -14px; overflow: hidden; background: linear-gradient(135deg, var(--deep), var(--a) 55%, var(--a2)); position: relative; }
.cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(420px 200px at 85% 0%, rgba(255,255,255,.22), transparent 70%), radial-gradient(300px 160px at 0% 100%, rgba(255,255,255,.12), transparent 70%); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover:has(img)::after { background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.25)); }
@media (min-width: 500px) { .cover { margin: 14px 0 0; border-radius: var(--r) var(--r) 0 0; } }
.av { width: 112px; height: 112px; border-radius: 50%; margin: -58px auto 0; position: relative; z-index: 1; background: var(--sf); padding: 4px; box-shadow: 0 10px 30px -10px rgba(10, 20, 40, .45); }
body.sq .av { border-radius: 26px; } body.sq .av img, body.sq .av span { border-radius: 22px; }
.av img, .av span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av span { display: grid; place-items: center; background: linear-gradient(135deg, var(--a2), var(--deep)); color: #fff; font-weight: 700; font-size: 38px; }
h1 { font-size: 24px; line-height: 1.45; margin: 12px 0 2px; letter-spacing: -.2px; }
.sub { margin: 0; color: var(--mut); font-weight: 500; font-size: 15px; }
.sub i { font-style: normal; margin: 0 8px; opacity: .5; }
.bio { margin: 12px auto 0; max-width: 400px; color: var(--ink); opacity: .86; font-size: 15px; }

/* دکمه‌های اصلی */
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 20px 0 14px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 16px; border: 0; background: var(--sf); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px -10px rgba(10,20,40,.25); font-size: 13.5px; font-weight: 500; transition: transform .15s; }
.act:first-child { background: var(--a); color: #fff; box-shadow: 0 10px 24px -10px var(--a); }
.act i { font-style: normal; font-size: 20px; line-height: 1.2; }
.act:active { transform: scale(.97); }

/* بلوک‌ها */
.blk { background: var(--sf); border-radius: var(--r); padding: 16px 18px; margin-top: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid var(--line); }
.blk h3 { margin: 0 0 6px; font-size: 16px; }
.blk p { margin: 0; color: var(--ink); opacity: .88; }
.bh { font-size: 17px; margin: 22px 4px 0; }
.contact { padding: 6px 8px; }
.contact .row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 14px; }
.contact a.row:hover { background: var(--sf2); }
.contact .row + .row { border-top: 1px solid var(--line); }
.contact .row i { font-style: normal; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--a) 12%, var(--sf)); flex: 0 0 auto; }
.contact .row span { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; }
.contact small { color: var(--mut); font-size: 12px; }
.contact b { font-weight: 500; overflow-wrap: anywhere; }
.links { display: grid; gap: 8px; margin-top: 12px; }
.lnk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--sf); border: 1px solid var(--line); border-radius: 16px; font-weight: 500; transition: border-color .15s, transform .15s; }
.lnk em { font-style: normal; color: var(--a); }
.lnk:hover { border-color: var(--a); }
.lnk:active { transform: scale(.99); }
.socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.soc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; background: var(--sf); border: 1px solid var(--line); border-radius: 16px; font-size: 13px; font-weight: 500; }
.soc i { font-style: normal; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; color: #fff; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.gal:has(.gi:only-child) { grid-template-columns: 1fr; }
.gal:has(.gi:nth-child(2):last-child), .gal:has(.gi:nth-child(4):last-child) { grid-template-columns: 1fr 1fr; }
.gi { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--sf2); }
.gal:has(.gi:only-child) .gi { aspect-ratio: 16 / 10; }
.gi img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gi:hover img { transform: scale(1.04); }
video { width: 100%; border-radius: 14px; margin-top: 8px; background: #000; }
.vwrap { position: relative; padding-top: 56.25%; margin-top: 8px; border-radius: 14px; overflow: hidden; background: #000; }
.vwrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.mbtn.native { display: block; margin-top: 6px; text-align: center; }
.mbtn { text-align: center; padding: 9px 8px; border-radius: 12px; background: var(--sf2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.botl { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, var(--a), var(--deep)); color: #fff; box-shadow: 0 12px 28px -14px var(--a); }
.botl i { font-style: normal; font-size: 24px; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.botl span { flex: 1; display: flex; flex-direction: column; line-height: 1.6; }
.botl small { opacity: .85; font-size: 12.5px; direction: rtl; }
.botl em { font-style: normal; font-size: 18px; }

/* پایین */
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 26px auto 0; font-size: 12.5px; color: var(--mut); padding: 8px 14px; border-radius: 99px; width: fit-content; background: var(--sf); border: 1px solid var(--line); }
.brand:hover { color: var(--a); }
.pad { height: 20px; }
.lb { position: fixed; inset: 0; background: rgba(5, 8, 15, .92); display: grid; place-items: center; z-index: 10; padding: 16px; }
.lb[hidden] { display: none; }
.lb img { max-height: 88vh; border-radius: 12px; }
.lb button { position: absolute; top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: #111827; color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; transition: .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.nf { text-align: center; padding-top: 80px; }
.nf .av { margin-top: 0; }
body.pv .card { padding-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* فهرست بخش‌ها */
.secnav { position: sticky; top: 0; z-index: 4; display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px; margin: 0 -2px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { white-space: nowrap; padding: 6px 14px; border-radius: 99px; background: var(--sf); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.secnav a:hover { border-color: var(--a); color: var(--a); }
.bh { scroll-margin-top: 64px; }

/* کاتالوگ محصولات */
.prods { padding: 16px 14px; }
.prods .ph { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.prods .ph small { color: var(--mut); font-size: 12.5px; }
.psearch { width: 100%; margin: 8px 0 2px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sf2); color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.psearch:focus { border-color: var(--a); }
.pcats { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 4px; scrollbar-width: none; }
.pcats::-webkit-scrollbar { display: none; }
.pcats button { white-space: nowrap; border: 1px solid var(--line); background: var(--sf2); border-radius: 99px; padding: 5px 14px; font-size: 13px; }
.pcats button.on { background: var(--a); border-color: var(--a); color: #fff; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pc { display: flex; flex-direction: column; text-align: right; padding: 0 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--sf); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.pc:active { transform: scale(.98); }
.pc[hidden] { display: none; }
.pimg { aspect-ratio: 1; background: var(--sf2); display: grid; place-items: center; font-size: 32px; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pc b { font-size: 13.5px; line-height: 1.6; padding: 8px 10px 0; font-weight: 500; }
.pp { padding: 2px 10px 0; color: var(--a); font-weight: 700; font-size: 13.5px; }
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(5, 8, 15, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sbox { width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; background: var(--sf); border-radius: 24px 24px 0 0; position: relative; animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sx { position: absolute; top: 12px; left: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; }
.simg { aspect-ratio: 4 / 3; background: var(--sf2); display: grid; place-items: center; font-size: 48px; }
.simg img { width: 100%; height: 100%; object-fit: cover; }
.sin { padding: 16px 20px 24px; }
.sin h3 { margin: 0; font-size: 19px; }
.spr { color: var(--a); font-weight: 700; font-size: 17px; margin-top: 2px; }
.sin p { margin: 10px 0 0; white-space: pre-line; opacity: .88; }
.sact { display: grid; gap: 8px; margin-top: 16px; }
.sbtn { display: block; text-align: center; padding: 13px; border-radius: 14px; background: var(--a); color: #fff; font-weight: 700; }
.sbtn.wa { background: #1fa855; } .sbtn.tg { background: #229ed9; }
.sbtn.ghost { background: var(--sf2); color: var(--ink); border: 1px solid var(--line); }
.pdfl { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
@media (min-width: 500px) { .sheet { align-items: center; } .sbox { border-radius: 24px; } }

/* زبان‌ها */
.langs { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(10, 14, 25, .38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.langs a, .langs span { color: #fff; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 99px; line-height: 1.7; }
.langs .on { background: #fff; color: #111827; }
@media (min-width: 500px) { .langs { top: 26px; } }
body.ltrp .sub, body.ltrp .bio { letter-spacing: 0; }
body.ltrp .lnk em, body.ltrp .botl em { transform: none; }
