/* ==========================================================================
   اتاق اصناف تهران — سیستم طراحی
   طراحی و اجرا: شرکت آریان دیتا — ariandata.ir
   ========================================================================== */
@font-face { font-family: 'BTitr'; src: url('../fonts/BTitrBold.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'BMitra'; src: url('../fonts/BMitra.woff') format('woff'); font-display: swap; }

:root {
  --brand: #1f35c4; --brand-2: #2c47e8; --brand-deep: #0f1a63; --brand-ink: #0a1145;
  --accent: #f47a12; --accent-2: #ff9a3c; --accent-soft: #fff1e4;
  --ok: #0c8f6a; --ok-soft: #e3f6ef; --warn: #c98a06; --warn-soft: #fdf4dc; --err: #c42d4a; --err-soft: #fce8ec; --info: #1590b8; --info-soft: #e2f3f9;
  --bg: #f3f4f8; --bg-2: #eceef5; --card: #ffffff; --ink: #141a33; --ink-2: #434a66; --mute: #7a8099; --line: #e2e5ef; --line-2: #d1d6e4;
  --shadow-1: 0 1px 2px rgba(15, 26, 99, .06), 0 2px 8px rgba(15, 26, 99, .05);
  --shadow-2: 0 10px 30px -10px rgba(15, 26, 99, .22), 0 2px 6px rgba(15, 26, 99, .06);
  --shadow-3: 0 30px 60px -20px rgba(10, 17, 69, .35);
  --r-s: 8px; --r: 14px; --r-l: 22px;
  --f-ui: 'Vazirmatn', Tahoma, sans-serif; --f-head: 'BTitr', 'Vazirmatn', sans-serif; --f-read: 'Vazirmatn', 'BMitra', serif;
  --wrap: 1280px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #6f86ff; --brand-2: #8ea0ff; --brand-deep: #1a2470; --brand-ink: #c9d2ff;
  --accent: #ff9a3c; --accent-2: #ffb46e; --accent-soft: #3a2614;
  --ok-soft: #10342a; --warn-soft: #3a2f10; --err-soft: #3d1820; --info-soft: #0f2d38;
  --bg: #0c1022; --bg-2: #121731; --card: #161c38; --ink: #eef0fa; --ink-2: #b9bfd8; --mute: #8a90ad; --line: #252c4f; --line-2: #343c66;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 12px 30px -10px rgba(0, 0, 0, .6); --shadow-3: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-ui); font-size: 15px; line-height: 1.85; color: var(--ink); background: var(--bg); direction: rtl; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.5; }
.num { font-feature-settings: 'tnum'; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; top: -60px; right: 16px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
[data-lucide], svg.lucide { width: 18px; height: 18px; flex: none; }
.muted { color: var(--mute); }
.demo-note { font-size: 12px; color: var(--mute); display: flex; gap: 6px; align-items: center; }
.demo-note svg { width: 14px; height: 14px; }

/* ---------- دکمه‌ها و نشان‌ها ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s, color .2s; background: var(--card); }
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn--brand:hover { background: var(--brand-2); }
.btn--accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn--accent:hover { filter: brightness(1.05); box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: #fff; color: var(--brand-deep); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); transition: .2s; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); line-height: 1.9; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge--ok { background: var(--ok-soft); color: var(--ok); } .badge--warn { background: var(--warn-soft); color: var(--warn); } .badge--err { background: var(--err-soft); color: var(--err); } .badge--info { background: var(--info-soft); color: var(--info); } .badge--brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); } .badge--accent { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip b { font-weight: 800; opacity: .7; font-size: 11px; }

/* ---------- نوار بالا ---------- */
.topbar { background: var(--brand-ink); color: #c8cff5; font-size: 13px; }
:root[data-theme="dark"] .topbar { background: #070a18; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; min-height: 42px; gap: 16px; }
.topbar__date { display: flex; align-items: center; gap: 7px; }
.topbar__date svg { width: 15px; height: 15px; color: var(--accent-2); }
.topbar__date .sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .2); margin-inline: 6px; }
.topbar__date .occ { margin-inline-start: 10px; background: rgba(244, 122, 18, .18); color: var(--accent-2); padding: 0 10px; border-radius: 99px; font-size: 12px; }
.topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar__links a { display: inline-flex; gap: 6px; align-items: center; transition: color .2s; }
.topbar__links a:hover { color: #fff; }
.topbar__links svg { width: 15px; height: 15px; }
.topbar .icon-btn { width: 30px; height: 30px; background: transparent; border-color: rgba(255, 255, 255, .15); color: #c8cff5; }

/* ---------- هدر ---------- */
.masthead { background: linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 55%, #2a46ef 100%); color: #fff; position: sticky; top: 0; z-index: 50; transition: box-shadow .3s; }
:root[data-theme="dark"] .masthead { background: linear-gradient(120deg, #0b1144, #1a2470 60%, #24318f); }
.masthead::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 12% 120%, rgba(244, 122, 18, .35), transparent 40%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E"); pointer-events: none; }
.masthead__in { position: relative; display: flex; align-items: center; gap: 24px; min-height: 84px; transition: min-height .3s; }
.masthead.is-stuck { box-shadow: 0 10px 30px -10px rgba(10, 17, 69, .55); }
.masthead.is-stuck .masthead__in { min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 54px; height: 54px; border-radius: 16px; background: #fff; display: grid; place-items: center; padding: 6px; box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .35); position: relative; overflow: hidden; transition: .3s; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__mark svg { display: none; width: 34px; height: 34px; color: var(--brand); }
.brand__mark.fallback svg { display: block; }
.is-stuck .brand__mark { width: 44px; height: 44px; border-radius: 12px; }
.brand__txt b { display: block; font-family: var(--f-head); font-size: 26px; font-weight: 400; line-height: 1.2; letter-spacing: -.3px; }
.brand__txt small { display: block; font-size: 11px; letter-spacing: 1.2px; opacity: .7; direction: ltr; text-align: right; font-weight: 500; }
.search { flex: 1; max-width: 520px; margin-inline-start: auto; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; right: 14px; color: rgba(255, 255, 255, .7); }
.search input { width: 100%; height: 46px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .1); color: #fff; padding: 0 44px 0 44px; outline: none; transition: .2s; backdrop-filter: blur(6px); }
.search input::placeholder { color: rgba(255, 255, 255, .6); }
.search input:focus { background: #fff; color: var(--ink); border-color: #fff; }
.search input:focus + kbd { opacity: 0; }
.search:focus-within svg { color: var(--brand); z-index: 1; }
.search kbd { position: absolute; left: 12px; font-family: inherit; font-size: 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px; padding: 0 7px; line-height: 20px; opacity: .7; }
.burger { display: none; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }

.mainnav { position: relative; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(5, 10, 50, .18); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.mainnav > .wrap > ul > li { position: relative; }
.mainnav > .wrap > ul > li > a { display: flex; align-items: center; gap: 4px; padding: 0 16px; height: 48px; font-weight: 700; font-size: 14.5px; color: rgba(255, 255, 255, .86); position: relative; transition: color .2s; }
.mainnav > .wrap > ul > li > a svg { width: 14px; height: 14px; opacity: .7; transition: transform .2s; }
.mainnav > .wrap > ul > li > a::after { content: ''; position: absolute; bottom: 0; right: 16px; left: 16px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.mainnav > .wrap > ul > li:hover > a, .mainnav > .wrap > ul > li.is-active > a { color: #fff; }
.mainnav > .wrap > ul > li:hover > a::after, .mainnav > .wrap > ul > li.is-active > a::after { transform: scaleX(1); }
.mainnav li:hover > a svg { transform: rotate(180deg); }
.sub, .mega { position: absolute; top: 100%; right: 0; background: var(--card); color: var(--ink); border-radius: 0 0 var(--r) var(--r); box-shadow: var(--shadow-3); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .22s; z-index: 60; border-top: 3px solid var(--accent); }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.sub { min-width: 220px; padding: 8px; display: block !important; }
.sub a { display: block; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.sub a:hover { background: var(--bg); color: var(--brand); padding-right: 18px; }
.mega { width: min(860px, 92vw); padding: 18px; }
.mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mega__item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: .2s; }
.mega__item:hover { background: var(--bg); }
.mega__item > svg { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.mega__item b { display: block; font-size: 14px; } .mega__item small { display: block; font-size: 12px; color: var(--mute); line-height: 1.6; }
.mega__all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }

/* ---------- تیکر اطلاعیه‌ها ---------- */
.ticker { background: var(--card); border-bottom: 1px solid var(--line); }
.ticker__in { display: flex; align-items: center; gap: 14px; height: 46px; }
.ticker__label { display: inline-flex; align-items: center; gap: 7px; flex: none; background: var(--accent); color: #fff; padding: 0 16px 0 22px; height: 30px; border-radius: 8px; font-size: 13px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); }
.ticker__label svg { width: 15px; height: 15px; }
.ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker__move { display: inline-flex; gap: 20px; white-space: nowrap; animation: tick 70s linear infinite; font-size: 14px; color: var(--ink-2); }
.ticker__move a:hover { color: var(--brand); }
.ticker:hover .ticker__move { animation-play-state: paused; }
.ticker .dot { color: var(--accent); font-size: 9px; align-self: center; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- عنوان بخش‌ها (وام‌گرفته از قالب) ---------- */
.sec { padding-block: 34px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sec-head h2 { font-family: var(--f-head); font-weight: 400; font-size: 22px; display: inline-flex; align-items: center; gap: 10px; position: relative; padding-inline-start: 16px; }
.sec-head h2::before { content: ''; position: absolute; right: 0; top: 18%; bottom: 18%; width: 5px; border-radius: 4px; background: linear-gradient(var(--accent), var(--brand)); }
.sec-head .line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 10px); }
.sec-head .more { font-size: 13px; font-weight: 700; color: var(--brand); display: inline-flex; gap: 4px; align-items: center; }
.sec-head .more svg { width: 15px; height: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .2px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- کارت عمومی ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card__pad { padding: 22px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h3 { font-size: 15.5px; display: flex; gap: 8px; align-items: center; }
.card__head h3 svg { color: var(--brand); }

/* ---------- هیرو / اسلایدر هوشمند ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding-top: 24px; }
.slider { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--brand-ink); min-height: 470px; box-shadow: var(--shadow-2); isolation: isolate; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-on { opacity: 1; z-index: 1; }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s ease-out; }
.slide.is-on .slide__img { transform: scale(1); }
.slide__img.ph { background: linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 9, 40, .95) 0%, rgba(5, 9, 40, .55) 45%, rgba(5, 9, 40, .05) 75%), linear-gradient(270deg, rgba(5, 9, 40, .35), transparent 50%); }
.slide__body { position: absolute; z-index: 2; bottom: 74px; right: 36px; left: 36px; color: #fff; max-width: 760px; }
.slide__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; opacity: 0; transform: translateY(14px); transition: .6s .2s; }
.slide__cat { background: var(--accent); padding: 2px 12px; border-radius: 6px; font-weight: 800; }
.slide__kicker { color: #ffd2a8; font-size: 15px; font-weight: 600; margin-bottom: 6px; opacity: 0; transform: translateY(14px); transition: .6s .3s; }
.slide__title { font-family: var(--f-head); font-weight: 400; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.55; opacity: 0; transform: translateY(14px); transition: .6s .4s; text-wrap: balance; }
.slide__title a:hover { color: #ffd2a8; }
.slide.is-on .slide__meta, .slide.is-on .slide__kicker, .slide.is-on .slide__title { opacity: 1; transform: none; }
.slide__smart { display: inline-flex; gap: 5px; align-items: center; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); padding: 2px 10px; border-radius: 6px; }
.slide__smart svg { width: 14px; height: 14px; }
.slider__ctrl { position: absolute; z-index: 3; bottom: 22px; right: 36px; left: 36px; display: flex; align-items: center; gap: 14px; }
.slider__dots { display: flex; gap: 6px; flex: 1; }
.slider__dot { flex: 1; max-width: 70px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; border: 0; padding: 0; position: relative; }
.slider__dot i { position: absolute; inset: 0; background: var(--accent); transform-origin: right; transform: scaleX(0); }
.slider__dot.is-done i { transform: scaleX(1); }
.slider__dot.is-on i { animation: prog var(--dur, 6s) linear forwards; }
.slider.paused .slider__dot.is-on i { animation-play-state: paused; }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slider__btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); transition: .2s; }
.slider__btn:hover { background: var(--accent); border-color: var(--accent); }
.slider__count { color: rgba(255, 255, 255, .8); font-size: 13px; min-width: 48px; text-align: center; }
.hero__side { display: flex; flex-direction: column; gap: 10px; }
.thumbs { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.thumb { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: .25s; text-align: right; }
.thumb img, .thumb .ph { width: 86px; height: 62px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-2); }
.thumb h4 { font-size: 13.5px; font-weight: 700; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb small { color: var(--mute); font-size: 12px; }
.thumb:hover { border-color: var(--line-2); transform: translateX(-3px); }
.thumb.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }

/* ---------- خدمات سریع ---------- */
.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 24px; }
.q { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: .3s; }
.q::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: var(--c, var(--brand)); opacity: .07; transition: .4s; }
.q:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: transparent; }
.q:hover::after { opacity: .14; transform: scale(1.3); }
.q__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent); color: var(--c, var(--brand)); }
.q__ic svg { width: 22px; height: 22px; }
.q b { font-size: 15px; } .q small { color: var(--mute); font-size: 12.5px; line-height: 1.7; }

/* ---------- شبکه اخبار ---------- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.ncard { display: grid; grid-template-columns: 240px 1fr; gap: 18px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: .25s; margin-bottom: 14px; }
.ncard:hover { box-shadow: var(--shadow-2); border-color: transparent; }
.ncard__img { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16/11; background: var(--bg-2); }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ncard:hover .ncard__img img { transform: scale(1.06); }
.date-tag { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .95); color: var(--brand-ink); border-radius: 10px; text-align: center; padding: 4px 10px; line-height: 1.3; box-shadow: var(--shadow-1); border-bottom: 3px solid var(--accent); }
.date-tag b { display: block; font-size: 19px; font-weight: 900; } .date-tag span { font-size: 11px; font-weight: 700; }
.ncard__kicker { font-size: 13px; color: var(--accent); font-weight: 700; }
.ncard h3 { font-family: var(--f-head); font-weight: 400; font-size: 19px; line-height: 1.65; margin: 2px 0 6px; }
.ncard h3 a:hover { color: var(--brand); }
.ncard p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncard__meta { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--mute); align-items: center; flex-wrap: wrap; }
.ncard__meta span { display: inline-flex; gap: 5px; align-items: center; }
.ncard__meta svg { width: 14px; height: 14px; }

.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: .25s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.pcard__img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__b { padding: 14px 16px 16px; }
.pcard h4 { font-size: 15px; line-height: 1.8; font-weight: 800; }
.pcard small { color: var(--mute); font-size: 12px; }

.side-box { margin-bottom: 20px; }
.rank { list-style: none; margin: 0; padding: 6px 18px 12px; counter-reset: r; }
.rank li { counter-increment: r; display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.8; }
.rank li:last-child { border: 0; }
.rank li::before { content: counter(r, persian); font-size: 26px; font-weight: 900; color: color-mix(in srgb, var(--brand) 25%, transparent); line-height: 1; min-width: 24px; }
.rank li a:hover { color: var(--brand); }

/* ---------- نوار آماری ---------- */
.stats-band { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; border-radius: var(--r-l); padding: 34px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; overflow: hidden; }
.stats-band::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 90% 10%, rgba(244, 122, 18, .35), transparent 40%); }
.stat { position: relative; z-index: 1; }
.stat b { font-size: 36px; font-weight: 900; display: block; line-height: 1.3; }
.stat span { opacity: .8; font-size: 14px; }

/* ---------- بنر نمایشگاه ---------- */
.expo-band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.expo-card { position: relative; border-radius: var(--r-l); padding: 28px; color: #fff; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; background: var(--c); isolation: isolate; }
.expo-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 15% 85%, rgba(255, 255, 255, .25), transparent 45%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.12'%3E%3Ccircle cx='40' cy='40' r='30'/%3E%3Ccircle cx='40' cy='40' r='14'/%3E%3C/g%3E%3C/svg%3E"); }
.expo-card h3 { font-family: var(--f-head); font-weight: 400; font-size: 26px; }
.expo-card .big-ic { position: absolute; left: 22px; top: 22px; width: 90px; height: 90px; opacity: .25; }
.countdown { display: flex; gap: 10px; margin-block: 16px; }
.countdown div { background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); border-radius: 12px; padding: 6px 12px; text-align: center; min-width: 64px; }
.countdown b { display: block; font-size: 24px; font-weight: 900; line-height: 1.3; } .countdown span { font-size: 11px; opacity: .85; }

/* ---------- صفحه داخلی ---------- */
.page-hero { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; padding: 40px 0 70px; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 8% 100%, rgba(244, 122, 18, .4), transparent 35%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='none' stroke='%23ffffff' stroke-opacity='.06'/%3E%3C/svg%3E"); pointer-events: none; }
.page-hero .wrap { position: relative; z-index: 1; }
.crumbs { font-size: 13px; opacity: .8; display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.crumbs svg { width: 14px; height: 14px; }
.page-hero h1 { font-family: var(--f-head); font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); }
.page-hero p { margin: 6px 0 0; opacity: .85; max-width: 720px; font-size: 15.5px; }
.lift { margin-top: -44px; position: relative; z-index: 2; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 140px; }

/* ---------- فرم‌ها ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.field > label em { font-style: normal; color: var(--err); }
.field > label small { color: var(--mute); font-weight: 500; }
.input, .select, .textarea { width: 100%; height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); padding: 0 14px; outline: none; transition: border .2s, box-shadow .2s; }
.textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 2; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.input.is-bad { border-color: var(--err); }
.hint { font-size: 12.5px; color: var(--mute); }
.hint--err { color: var(--err); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.input[data-jdate] { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237a8099' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line-2); font-size: 13.5px; font-weight: 600; transition: .2s; }
.seg input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }
.drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--mute); cursor: pointer; transition: .2s; }
.drop:hover, .drop.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, transparent); color: var(--brand); }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.files img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }

/* ---------- مراحل (Stepper) ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 26px; counter-reset: s; }
.steps li { flex: 1; list-style: none; counter-increment: s; position: relative; padding-top: 44px; font-size: 13px; font-weight: 700; color: var(--mute); text-align: center; }
.steps li::before { content: counter(s, persian); position: absolute; top: 0; right: 50%; transform: translateX(50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 2px solid var(--line-2); z-index: 1; transition: .3s; }
.steps li::after { content: ''; position: absolute; top: 16px; right: 50%; width: calc(100% + 8px); height: 2px; background: var(--line-2); }
.steps li:last-child::after { display: none; }
.steps li.is-on { color: var(--brand); } .steps li.is-on::before { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 15%, transparent); }
.steps li.is-done { color: var(--ok); } .steps li.is-done::before { content: '✓'; background: var(--ok); border-color: var(--ok); color: #fff; } .steps li.is-done::after { background: var(--ok); }
.step-pane { display: none; animation: fade .35s; } .step-pane.is-on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }

/* ---------- دستیار هوشمند ---------- */
.ai { border-radius: var(--r); background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 7%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); padding: 18px; }
.ai__head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-weight: 800; }
.ai__orb { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(from 0deg, var(--brand), var(--accent), var(--brand)); display: grid; place-items: center; color: #fff; animation: spin 6s linear infinite; }
.ai__orb svg { width: 17px; height: 17px; animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai__row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; align-items: center; }
.ai__row:last-child { border: 0; }
.ai__row span:first-child { color: var(--mute); }
.meter { height: 8px; border-radius: 8px; background: var(--bg-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 8px; background: var(--c, var(--brand)); transition: width .5s; }
.suggest { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.suggest--info { background: var(--info-soft); color: var(--info); }
.suggest--err { background: var(--err-soft); color: var(--err); }
.suggest--ok { background: var(--ok-soft); color: var(--ok); }
.suggest svg { margin-top: 3px; }

/* ---------- پیگیری / تایم‌لاین ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; right: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 46px 22px 0; }
.timeline li::before { content: ''; position: absolute; right: 8px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--line-2); }
.timeline li.is-done::before { border-color: var(--ok); background: var(--ok); }
.timeline li.is-now::before { border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent; } }
.timeline b { display: block; font-size: 14.5px; } .timeline small { color: var(--mute); font-size: 12.5px; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: right; font-size: 12.5px; color: var(--mute); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; }
table.t td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: color-mix(in srgb, var(--brand) 3%, transparent); }

/* ---------- KPI ---------- */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: relative; overflow: hidden; }
.kpi__top { display: flex; justify-content: space-between; align-items: center; color: var(--mute); font-size: 13px; font-weight: 600; }
.kpi__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent); color: var(--c, var(--brand)); }
.kpi b { display: block; font-size: 30px; font-weight: 900; margin-top: 6px; line-height: 1.3; }
.kpi .delta { font-size: 12.5px; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; }
.kpi .delta svg { width: 14px; height: 14px; }
.up { color: var(--ok); } .down { color: var(--err); }
.spark { position: absolute; left: 0; bottom: 0; width: 55%; height: 44px; opacity: .9; }

/* ---------- مودال / توست / تاریخ‌گزین ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal.out { opacity: 0; transition: .25s; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 12, 40, .55); backdrop-filter: blur(4px); }
.modal__box { position: relative; background: var(--card); border-radius: var(--r-l); padding: 28px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-3); }
.modal__box--wide { width: min(860px, 100%); }
.modal__x { position: absolute; left: 14px; top: 14px; border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.toasts { position: fixed; bottom: 20px; left: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-3); font-size: 14px; animation: fade .3s; max-width: 380px; }
.toast--ok svg { color: #3ddc97; } .toast--warn svg { color: #ffc24b; } .toast--err svg { color: #ff6b81; }
.toast.out { opacity: 0; transform: translateY(10px); transition: .4s; }
.jdp { position: absolute; top: calc(100% + 6px); right: 0; z-index: 80; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3); padding: 12px; }
.jdp__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.jdp__head button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--bg); font-size: 18px; }
.jdp__wd, .jdp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.jdp__wd span { font-size: 12px; color: var(--mute); font-weight: 700; padding: 4px 0; }
.jdp__wd span:last-child { color: var(--err); }
.jdp__d { height: 36px; border: 0; border-radius: 9px; background: transparent; font-size: 13.5px; font-weight: 600; position: relative; }
.jdp__d:hover { background: var(--bg); }
.jdp__d.is-off { color: var(--err); }
.jdp__d.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.jdp__d.is-sel { background: var(--brand); color: #fff; }
.jdp__d i { position: absolute; bottom: 4px; right: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.jdp__d[disabled] { opacity: .3; }
.jdp__foot { display: flex; justify-content: space-between; margin-top: 8px; }
.jdp__foot button { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 13px; }

/* ---------- فوتر ---------- */
.footer { margin-top: 60px; background: var(--brand-ink); color: #b8c0ea; }
:root[data-theme="dark"] .footer { background: #070a18; }
.footer__band { background: linear-gradient(90deg, var(--accent), #ff9a3c); color: #fff; }
.footer__band-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 18px; }
.footer__band b { display: block; font-size: 17px; } .footer__band span { font-size: 13px; opacity: .9; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 30px; padding-block: 44px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 4px 0; font-size: 14px; }
.footer li a:hover { color: #fff; padding-right: 4px; }
.footer li a { transition: .2s; }
.footer .contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer .contact svg { margin-top: 6px; color: var(--accent-2); width: 16px; height: 16px; }
.footer__about p { font-size: 14px; line-height: 2.1; margin: 14px 0; }
.brand--light .brand__txt b { color: #fff; font-size: 22px; }
.brand--light .brand__mark { width: 46px; height: 46px; }
.social { display: flex; gap: 8px; }
.social a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); transition: .2s; }
.social a:hover { background: var(--accent); color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.footer__bottom-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-block: 10px; }
.maker { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: .25s; }
.maker:hover { background: rgba(255, 255, 255, .12); border-color: var(--accent); }
.maker b { color: #fff; }
.maker__logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 12px; color: #fff; background: linear-gradient(135deg, #00b4d8, #0057ff); letter-spacing: .5px; direction: ltr; }
.to-top { position: fixed; left: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .3s; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- نمایش تدریجی ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1100px) {
  .hero, .news-layout, .split { grid-template-columns: minmax(0, 1fr); }
  .hero__side .thumbs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; }
  .hero__side .thumb { min-width: 280px; scroll-snap-align: start; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .search, .masthead__cta, .topbar__links a { display: none; }
  .burger { display: inline-grid; margin-inline-start: auto; }
  .mainnav { display: none; }
  body.nav-open .mainnav { display: block; position: absolute; inset: 100% 0 auto 0; background: var(--brand-deep); max-height: calc(100vh - 120px); overflow: auto; }
  body.nav-open .mainnav ul { flex-direction: column; padding-block: 8px; }
  body.nav-open .sub, body.nav-open .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; width: auto; }
  body.nav-open .has-sub:hover .sub, body.nav-open .has-mega:hover .mega { display: block; }
  .mega__grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .expo-band, .board { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .ncard { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .slider { min-height: 420px; }
  .slide__body { right: 20px; left: 20px; bottom: 70px; }
  .slider__ctrl { right: 20px; left: 20px; }
  .steps li { font-size: 0; padding-top: 34px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .footer__grid, .grid-4 { grid-template-columns: 1fr; }
  .brand__txt b { font-size: 21px; }
  .brand__mark { width: 46px; height: 46px; }
  .topbar__date .occ { display: none; }
  .footer__band-in { flex-direction: column; text-align: center; }
  .card__pad { padding: 16px; }
}

/* اصلاح موقعیت مگامنو و جلوگیری از اسکرول افقی */
html, body { overflow-x: clip; }
.mainnav > .wrap { position: relative; }
.mainnav > .wrap > ul > li.has-mega { position: static; }
.has-mega .mega { right: 20px; }
