/* ---------- نرم‌افزارها: همه‌ی کلاس‌ها با پیشوند sw- ---------- */
.sw-page, .sw-single {
    --sw-win: #1d6fe0;
    --sw-and: #2fb36b;
    --sw-lin: #f0821f;
    --sw-mac: #1ec6c0;
    --sw-card: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
    --sw-line: rgba(255,255,255,.14);
    color: var(--wht, #f5f5f5);
    max-width: 1180px;
    margin: 0 auto;
    padding: 130px 20px 60px;
}

/* دو زبان: فقط زبان فعال نمایش داده می‌شود */
html:not(.en) .sw-en { display: none !important; }
html.en .sw-fa { display: none !important; }

.sw-c-win { --c: var(--sw-win); }
.sw-c-and { --c: var(--sw-and); }
.sw-c-lin { --c: var(--sw-lin); }
.sw-c-mac { --c: var(--sw-mac); }

.sw-h1 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 700; line-height: 1.25; margin: 6px 0 10px; }
.sw-h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.sw-h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.sw-eyebrow { color: var(--red2, #ff2a2a); font-size: 14px; }
.sw-lead { color: #bdbdbd; max-width: 720px; }
.sw-empty { color: #9a9a9a; padding: 16px 0; }

.sw-box, .sw-guide-box, .sw-req-card, .sw-dl, .sw-card {
    background: var(--sw-card);
    border: 1px solid var(--sw-line);
    border-radius: 22px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.sw-box { padding: 26px; margin-top: 22px; }

/* ---------- فهرست ---------- */
.sw-hero { margin-bottom: 26px; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sw-chip {
    padding: 8px 18px; border-radius: 999px; border: 1px solid var(--sw-line);
    background: rgba(255,255,255,.04); color: inherit; cursor: pointer; font: inherit; transition: .2s;
}
.sw-chip:hover { border-color: var(--c, #fff); }
.sw-chip.is-active { background: var(--c, #e10600); border-color: transparent; color: #fff; }
.sw-chip.sw-c-win.is-active { background: var(--sw-win); }
.sw-chip.sw-c-and.is-active { background: var(--sw-and); }
.sw-chip.sw-c-lin.is-active { background: var(--sw-lin); }
.sw-chip.sw-c-mac.is-active { background: var(--sw-mac); }
.sw-chip[data-filter="all"].is-active { background: var(--red, #e10600); }

.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.sw-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.sw-card:hover { transform: translateY(-4px); border-color: rgba(255,42,42,.5); }
.sw-card[hidden] { display: none; }
.sw-card-cover { display: block; aspect-ratio: 1 / 1; background: #0b0b0b; }
.sw-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sw-card-title { font-size: 19px; font-weight: 700; line-height: 1.4; }
.sw-card-title a:hover { color: var(--red2, #ff2a2a); }
.sw-card-meta { display: flex; gap: 14px; flex-wrap: wrap; color: #aaa; font-size: 13px; }
.sw-card-excerpt { color: #d5d5d5; font-size: 14px; line-height: 1.9; }
.sw-card-cta { color: #9a9a9a; font-size: 12px; }
.sw-btn {
    margin-top: auto; align-self: flex-start; padding: 10px 26px; border-radius: 999px;
    background: #fff; color: #111; font-weight: 700; transition: .2s;
}
.sw-btn:hover { background: var(--red, #e10600); color: #fff; }

/* ---------- نشانی‌ها و پلتفرم‌ها ---------- */
.sw-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-badge {
    padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff;
    background: var(--c, #888); box-shadow: 0 0 14px color-mix(in srgb, var(--c, #888) 45%, transparent);
}

/* ---------- صفحه‌ی یک نرم‌افزار ---------- */
.sw-crumb { font-size: 14px; color: #aaa; margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.sw-crumb a:hover { color: #fff; }
.sw-top { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 30px; align-items: start; }
.sw-cover {
    aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; border: 1px solid rgba(225,6,0,.5);
    background: #0b0b0b; box-shadow: 0 0 30px rgba(225,6,0,.22);
}
.sw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.sw-tagline { color: #d8d8d8; line-height: 2; max-width: 680px; margin: 4px 0 14px; }
.sw-tagline p { margin-bottom: 6px; }
.sw-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 18px; }
.sw-facts > div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--sw-line); background: rgba(255,255,255,.04); }
.sw-facts dt { color: #9a9a9a; font-size: 12px; }
.sw-facts dd { font-weight: 700; margin-top: 2px; }

/* معرفی با سه تا چهار خط و دکمه‌ی نمایش بیشتر */
.sw-desc { line-height: 2; color: #e2e2e2; }
.sw-desc.is-clamped { max-height: 8.4em; overflow: hidden; }
.sw-desc p { margin-bottom: 10px; }
.sw-more { margin-top: 12px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--sw-line); background: none; color: inherit; cursor: pointer; font: inherit; }
.sw-more[hidden] { display: none; }
.sw-more:hover { border-color: var(--red2, #ff2a2a); }

/* سیستم مورد نیاز */
.sw-req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.sw-req-card { padding: 22px; }
.sw-req-card.is-rec { border-color: rgba(225,6,0,.55); box-shadow: 0 0 22px rgba(225,6,0,.18); }
.sw-req-list { display: grid; gap: 10px; }
.sw-req-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed rgba(255,255,255,.1); font-size: 14px; }
.sw-req-row dt { color: #9a9a9a; }
.sw-req-row dd { font-weight: 700; text-align: left; }

/* گالری */
.sw-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.sw-gal-item { padding: 0; border: 1px solid var(--sw-line); border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #0b0b0b; aspect-ratio: 16 / 10; }
.sw-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.sw-gal-item:hover img { transform: scale(1.06); }

/* راهنمای نصب */
.sw-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.sw-guide-box { padding: 20px 22px; }
.sw-steps { padding-inline-start: 22px; line-height: 2; color: #dcdcdc; }
.sw-steps li { margin-bottom: 4px; }

/* باکس دانلود */
.sw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sw-tab {
    padding: 9px 18px; border-radius: 12px; border: 2px solid var(--c); background: transparent;
    color: inherit; cursor: pointer; font: inherit; font-weight: 700; transition: .2s;
}
.sw-tab:hover, .sw-tab.is-active { background: var(--c); color: #fff; }
.sw-panel[hidden] { display: none; }
.sw-dl-list { display: grid; gap: 10px; }
.sw-dl-btn {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 18px; border-radius: 14px; border: 2px solid var(--c); background: rgba(255,255,255,.03);
    font-weight: 700; transition: .2s;
}
.sw-dl-btn:hover { background: var(--c); color: #fff; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.sw-dl-arrow { font-size: 18px; }
.sw-panel .sw-c-win, .sw-panel.sw-c-win { --c: var(--sw-win); }
.sw-panel.sw-c-and { --c: var(--sw-and); }
.sw-panel.sw-c-lin { --c: var(--sw-lin); }
.sw-panel.sw-c-mac { --c: var(--sw-mac); }
.sw-pass {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px;
    padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--sw-line);
}
.sw-pass-val { font-weight: 700; background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 8px; }
.sw-copy {
    padding: 7px 16px; border-radius: 999px; border: 1px solid var(--sw-line); background: none;
    color: inherit; cursor: pointer; font: inherit;
}
.sw-copy:hover { border-color: #fff; }
.sw-copy.is-done { background: #2fb36b; border-color: transparent; color: #fff; }

.sw-report {
    display: block; margin-top: 16px; padding: 12px 18px; border-radius: 14px; text-align: center;
    border: 1px solid rgba(255,42,42,.6); background: rgba(225,6,0,.14); font-weight: 700;
}
.sw-report:hover { background: var(--red, #e10600); color: #fff; }

.sw-acc { margin-top: 14px; border: 1px solid var(--sw-line); border-radius: 14px; padding: 4px 16px; background: rgba(255,255,255,.03); }
.sw-acc summary { cursor: pointer; padding: 12px 0; font-weight: 700; list-style: none; }
.sw-acc summary::-webkit-details-marker { display: none; }
.sw-acc summary::after { content: "+"; float: left; font-size: 18px; color: var(--red2, #ff2a2a); }
.sw-acc[open] summary::after { content: "−"; }
.sw-acc-body { padding: 4px 0 14px; line-height: 2; color: #dcdcdc; }

/* ---------- لایت‌باکس گالری ---------- */
.sw-lb {
    position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92);
    display: flex; flex-direction: column;
}
.sw-lb[hidden] { display: none; }
.sw-lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.sw-lb-count { font-weight: 700; color: #ddd; direction: ltr; }
.sw-lb-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-lb-tools button, .sw-lb-tools a {
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--sw-line);
    background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.sw-lb-tools button:hover, .sw-lb-tools a:hover { background: var(--red, #e10600); border-color: transparent; }
.sw-lb-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: grab; }
.sw-lb-stage:active { cursor: grabbing; }
.sw-lb-stage img { max-width: 92vw; max-height: 80vh; user-select: none; -webkit-user-drag: none; transform-origin: center center; transition: transform .15s ease-out; }
.sw-lb-stage img.is-dragging { transition: none; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 860px) {
    .sw-top { grid-template-columns: 1fr; }
    .sw-cover { max-width: 320px; }
    .sw-box { padding: 20px; }
    .sw-page, .sw-single { padding-top: 120px; }
}
