/* TAGHAT v4.7.3 — کارت دانلود اپلیکیشن (شورت‌کد [taghat_download_app])
   لایت/دارک: خودکار (prefers-color-scheme) + دکمهٔ تم سایت (html[data-theme]) */
.tg-dl {
    --dl-card: #ffffff;
    --dl-card-border: rgba(16, 35, 65, 0.08);
    --dl-shadow: 0 24px 60px rgba(16, 35, 65, 0.16);
    --dl-text: #102341;
    --dl-muted: #5b6b86;
    --dl-btn: #102341;
    --dl-btn-border: #102341;
    --dl-btn-hover: #1a3a7a;
    --dl-qr-bg: #ffffff;
    --dl-divider: rgba(16, 35, 65, 0.1);
    --dl-steps-bg: #f4f6fb;
    --dl-amber: #F6A52C;
    --dl-navy: #102341;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .tg-dl {
    --dl-card: rgba(255, 255, 255, 0.07);
    --dl-card-border: rgba(255, 255, 255, 0.14);
    --dl-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --dl-text: #eef2fb;
    --dl-muted: #a7b6d3;
    --dl-btn: #1b3158;
    --dl-btn-border: rgba(255, 255, 255, 0.16);
    --dl-btn-hover: #24427a;
    --dl-qr-bg: #ffffff;
    --dl-divider: rgba(255, 255, 255, 0.12);
    --dl-steps-bg: rgba(255, 255, 255, 0.06);
}
}
:root[data-theme="dark"] .tg-dl {
    --dl-card: rgba(255, 255, 255, 0.07);
    --dl-card-border: rgba(255, 255, 255, 0.14);
    --dl-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --dl-text: #eef2fb;
    --dl-muted: #a7b6d3;
    --dl-btn: #1b3158;
    --dl-btn-border: rgba(255, 255, 255, 0.16);
    --dl-btn-hover: #24427a;
    --dl-qr-bg: #ffffff;
    --dl-divider: rgba(255, 255, 255, 0.12);
    --dl-steps-bg: rgba(255, 255, 255, 0.06);
}

.tg-dl {
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--dl-text);
    max-width: 520px;
    margin: 0 auto;
}
.tg-dl *, .tg-dl *::before, .tg-dl *::after { box-sizing: border-box; }

.tg-dl-card {
    overflow: hidden;
    border-radius: 28px;
    background: var(--dl-card);
    border: 1px solid var(--dl-card-border);
    box-shadow: var(--dl-shadow);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

/* سربرگ سرمه‌ای: لوگوی انجمن (نئونی) روی زمینهٔ تیره بهتر دیده می‌شود */
.tg-dl-head {
    position: relative;
    padding: 30px 24px 26px;
    text-align: center;
    background: linear-gradient(135deg, #102341 0%, #1a3a7a 100%);
    overflow: hidden;
}
.tg-dl-head::before {
    content: "";
    position: absolute;
    width: 220px; height: 220px;
    inset-inline-start: -70px; top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 165, 44, 0.45), transparent 70%);
    pointer-events: none;
}
.tg-dl-logo { position: relative; }
.tg-dl-logo .tg-dl-logo-img { display: inline-block; width: auto; max-width: 78%; max-height: 74px; height: auto; }

.tg-dl-body { padding: 26px 22px 6px; text-align: center; }
.tg-dl-title { margin: 0 0 8px; font-size: clamp(18px, 5vw, 22px); line-height: 1.7; font-weight: 800; color: var(--dl-text); }
.tg-dl-sub { margin: 0 auto 22px; max-width: 38ch; font-size: 14px; line-height: 1.9; color: var(--dl-muted); }

.tg-dl-group { margin-bottom: 22px; text-align: start; }
.tg-dl-label {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 10px;
    font-size: 14px; font-weight: 800; color: var(--dl-text);
}
.tg-dl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dl-amber); box-shadow: 0 0 0 4px rgba(246, 165, 44, 0.2); }

.tg-dl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-dl-btns--one { grid-template-columns: 1fr; }

.tg-store {
    display: flex; align-items: center; justify-content: flex-start; gap: 11px;
    width: 100%; min-height: 62px;
    padding: 10px 14px;
    border-radius: 18px;
    background: var(--dl-btn);
    border: 1px solid var(--dl-btn-border);
    color: #fff;
    text-decoration: none;
    font-family: inherit; text-align: start; cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 35, 65, 0.22);
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
    -webkit-tap-highlight-color: transparent;
}
.tg-store:hover, .tg-store:focus-visible { background: var(--dl-btn-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(16, 35, 65, 0.3); }
.tg-store:active { transform: translateY(0) scale(.985); }
.tg-store:focus-visible { outline: 2px solid var(--dl-amber); outline-offset: 3px; }
.tg-store-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; }
.tg-store-ico img, .tg-store-ico svg { display: block; width: 32px; height: 32px; object-fit: contain; }
.tg-store-ico--apple { color: #fff; }
.tg-store-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.tg-store-txt small { font-size: 11px; font-weight: 500; opacity: .75; }
.tg-store-txt strong { font-size: 15px; font-weight: 800; white-space: nowrap; }
.tg-store--pwa { background: #0b0f1a; border-color: rgba(255, 255, 255, 0.14); }
.tg-store--pwa:hover, .tg-store--pwa:focus-visible { background: #1a2238; }
.tg-store--pwa[aria-expanded="true"] { border-color: var(--dl-amber); }

.tg-dl-steps {
    margin: 0; padding: 14px 34px 14px 16px;
    border-radius: 16px 16px 0 0; background: var(--dl-steps-bg);
    font-size: 13.5px; line-height: 2; color: var(--dl-text);
}
.tg-dl-steps-wrap[hidden] { display: none; }
.tg-dl .tg-ltr { white-space: nowrap; }
.tg-dl-steps li::marker { color: var(--dl-amber); font-weight: 800; }

.tg-dl-qr {
    margin-top: 6px; padding: 22px 22px 26px;
    border-top: 1px dashed var(--dl-divider);
    text-align: center;
}
.tg-dl-qr-box {
    display: inline-flex; align-items: center; justify-content: center;
    width: 176px; height: 176px; padding: 10px;
    border-radius: 20px; background: var(--dl-qr-bg);
    border: 2px solid var(--dl-amber);
    box-shadow: 0 10px 26px rgba(246, 165, 44, 0.25);
}
.tg-dl-qr-box img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.tg-dl-qr-ph {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
    border-radius: 12px; border: 2px dashed #b8c3d9; color: #7a89a6; font-weight: 800; font-size: 22px; letter-spacing: 2px;
}
.tg-dl-qr-text { margin: 12px 0 0; font-size: 13.5px; font-weight: 700; color: var(--dl-muted); }

@media (max-width: 380px) {
    .tg-dl-body { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .tg-store { transition: none; }
}

/* v4.7.4 — دکمهٔ بزرگ کافه‌بازار (تصویر رسمی) */
.tg-store--hero {
    display: block; width: 100%; min-height: 0;
    padding: 0; border: 0; border-radius: 22px; background: transparent;
    box-shadow: 0 0 0 3px rgba(246, 165, 44, 0.55), 0 14px 32px rgba(16, 35, 65, 0.32);
    overflow: hidden; line-height: 0;
}
.tg-store--hero:hover, .tg-store--hero:focus-visible {
    background: transparent; transform: translateY(-3px);
    box-shadow: 0 0 0 3px var(--dl-amber), 0 18px 38px rgba(246, 165, 44, 0.35);
}
.tg-badge-img { display: block; width: 100%; height: auto; }
.tg-badge-text { display: flex; align-items: center; justify-content: center; min-height: 84px; background: #000; color: #fff; font-size: 18px; font-weight: 800; line-height: 1.5; }

.tg-dl-openweb {
    display: block; margin: 0; padding: 12px 16px; text-align: center;
    border-radius: 0 0 16px 16px; background: var(--dl-amber); color: #1b1405;
    font-weight: 800; font-size: 14px; text-decoration: none;
}
.tg-dl-openweb:hover { filter: brightness(1.06); color: #1b1405; }

/* v4.7.5 — کافه‌بازار تنها گزینهٔ اندروید: برجسته‌تر (حلقهٔ نبض‌دار ملایم) */
.tg-store--hero { border-radius: 24px; animation: tgDlPulse 3.2s ease-in-out infinite; }
.tg-store--hero:hover, .tg-store--hero:focus-visible { animation: none; }
@keyframes tgDlPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(246, 165, 44, 0.55), 0 14px 32px rgba(16, 35, 65, 0.32); }
    50%      { box-shadow: 0 0 0 7px rgba(246, 165, 44, 0.25), 0 18px 40px rgba(246, 165, 44, 0.30); }
}
.tg-dl-pick { margin: 10px 0 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--dl-muted); }
@media (prefers-reduced-motion: reduce) { .tg-store--hero { animation: none; } }

/* بخش صفحهٔ اصلی (بالای فوتر) */
.tg-dl-section { padding: 56px 0 64px; }

/* داخل اپلیکیشن اندروید یا وقتی PWA نصب شده، کارت دانلود نمایش داده نمی‌شود */
html.tg-in-app .tg-dl, html.tg-pwa-installed .tg-dl { display: none; }
