/* استایل هدر (hd-) و فوتر (ft-). منبع قبلی: partials/_header.html و partials/_footer.html */

/* ===== _header.html ===== */
    .hd {
        --hd-h: 76px;
        --line: rgba(148, 163, 184, .14);
        --body: #cbd5e1;
        --muted: #94a3b8;
        --b1-hi: #60a5fa; --b1-rgb: 59, 130, 246;
        --gold: #fbbf24; --gold-rgb: 251, 191, 36;
        --hc: var(--b1-hi); --hc-rgb: var(--b1-rgb);
        position: sticky; top: 0; z-index: 30;
        width: 100%;
        color: #f8fafc;
    }
    html { scroll-padding-top: 90px; }
    html.hd-lock { overflow: hidden; }
    .hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
    .hd svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .hd a:focus-visible, .hd button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

    /* شیشه پشت هدر (بلور روی خود هدر نیست تا منوی کشویی fixed نسبت به صفحه باز شود) */
    .hd-glass {
        position: absolute; inset: 0; z-index: -1;
        background: rgba(2, 6, 23, .72);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        backdrop-filter: blur(18px) saturate(160%);
        transition: background-color .3s ease, box-shadow .3s ease;
    }
    .hd.is-scrolled .hd-glass { background: rgba(2, 6, 23, .9); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .95); }
    .hd-glass::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
        background: linear-gradient(90deg, transparent, rgba(var(--b1-rgb), .6) 20%, rgba(var(--gold-rgb), .8) 50%, rgba(var(--b1-rgb), .6) 80%, transparent);
        background-size: 200% 100%;
        animation: hd-line 7s linear infinite;
    }
    .hd-bar { position: relative; display: flex; align-items: center; gap: 1rem; max-width: 1280px; height: var(--hd-h); margin: 0 auto; padding: 0 16px; }
    .hd-start { display: flex; align-items: center; gap: .7rem; flex: none; }

    /* لوگو: لامپ آکادمی داخل کره با حلقه مداری */
    .hd-logo { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
    .hd-orb {
        position: relative; flex: none; display: grid; place-items: center;
        width: 44px; height: 44px; border-radius: 50%;
        color: #fde68a;
        background: radial-gradient(circle at 35% 30%, rgba(147, 197, 253, .6), rgba(37, 99, 235, .6) 45%, rgba(2, 6, 23, .95) 78%);
        border: 1.5px solid rgba(147, 197, 253, .7);
        box-shadow: 0 0 18px rgba(59, 130, 246, .6), inset 0 0 12px rgba(191, 219, 254, .35);
        transform-style: preserve-3d;
    }
    .hd .hd-orb svg { width: 24px; height: 24px; fill: currentColor; stroke: none; filter: drop-shadow(0 0 6px rgba(251, 191, 36, .9)); transition: transform .4s ease; }
    .hd-orb-ring { position: absolute; inset: -7px; border-radius: 50%; border: 1.5px solid rgba(var(--gold-rgb), .55); animation: hd-ring 7s linear infinite; }
    .hd-orb-ring::after { content: ""; position: absolute; top: -4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
    .hd-logo:hover .hd-orb svg { transform: scale(1.14); }
    .hd-logo-txt { display: flex; flex-direction: column; line-height: 1.3; }
    .hd-logo-txt small { font-size: .78rem; font-weight: 700; color: var(--muted); }
    .hd-logo-txt b {
        font-size: 1.3rem; font-weight: 900;
        background: linear-gradient(100deg, #fff 0%, #bfdbfe 30%, #fde68a 50%, #bfdbfe 70%, #fff 100%);
        background-size: 220% 100%;
        -webkit-background-clip: text; background-clip: text; color: transparent;
        animation: hd-shine 8s linear infinite;
    }

    /* منوی اصلی دسکتاپ */
    .hd-nav { flex: 1; min-width: 0; display: flex; justify-content: center; }
    .hd-menu { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
    .hd-menu > li { position: relative; }
    .hd-link {
        position: relative; display: inline-flex; align-items: center; gap: .3rem;
        height: 40px; padding: 0 .58rem; border-radius: 999px; border: 1px solid transparent;
        background: none; color: var(--body); font: inherit; font-size: .84rem; font-weight: 700;
        white-space: nowrap; text-decoration: none; cursor: pointer;
        transition: color .2s ease, background-color .2s ease, border-color .2s ease;
    }
    .hd-link svg { width: 13px; height: 13px; stroke-width: 2.4; transition: transform .3s ease; }
    .hd-link:hover, .hd-has-drop:hover > .hd-link, .hd-has-drop:focus-within > .hd-link {
        color: #fff; background: rgba(var(--hc-rgb), .1); border-color: rgba(var(--hc-rgb), .3);
    }
    .hd-has-drop:hover > .hd-link svg, .hd-has-drop:focus-within > .hd-link svg { transform: rotate(180deg); }
    .hd-link.is-current { color: #fff; }
    /* خط نورانی صفحه فعلی، روی لبه پایین هدر */
    .hd-link.is-current::after {
        content: ""; position: absolute; left: 50%; bottom: calc((40px - var(--hd-h)) / 2);
        width: 26px; height: 3px; margin-left: -13px; border-radius: 3px;
        background: var(--hc); box-shadow: 0 0 12px var(--hc), 0 0 3px var(--hc);
    }

    /* زیرمنو: با چرخش سه‌بعدی از بالا باز می‌شود */
    .hd-drop {
        position: absolute; top: 100%; right: 50%; z-index: 50;
        width: 350px; padding-top: 14px;
        opacity: 0; visibility: hidden;
        transform-origin: 50% 0;
        transform: translateX(50%) perspective(900px) rotateX(-22deg) translateY(-8px);
        transition: opacity .2s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
    }
    .hd-has-drop:hover > .hd-drop, .hd-has-drop:focus-within > .hd-drop {
        opacity: 1; visibility: visible; transform: translateX(50%); transition-delay: 0s;
    }
    .hd-panel {
        position: relative; padding: .5rem; border-radius: 20px;
        background: linear-gradient(180deg, #0f172a, #020617);
        border: 1px solid rgba(148, 163, 184, .16);
        box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .9), 0 0 48px -14px rgba(var(--hc-rgb), .55);
    }
    .hd-panel::before { content: ""; position: absolute; top: -1px; left: 14%; right: 14%; height: 1px; background: linear-gradient(90deg, transparent, var(--hc), transparent); }
    .hd-panel::after {
        content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
        background: #0f172a; border-top: 1px solid rgba(148, 163, 184, .16); border-left: 1px solid rgba(148, 163, 184, .16);
        transform: rotate(45deg);
    }
    .hd-list { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }

    /* آیتم زیرمنو: کاشی آیکن سه‌بعدی به رنگ تم صفحه مقصد */
    .hd-item {
        --ic: var(--hc); --ic-rgb: var(--hc-rgb);
        display: flex; align-items: center; gap: .8rem; width: 100%;
        padding: .55rem .6rem; border-radius: 14px; border: 1px solid transparent;
        background: none; color: var(--body); font: inherit; text-align: right; text-decoration: none; cursor: pointer;
        transition: background-color .2s ease, border-color .2s ease;
    }
    .hd-item:hover, .hd-item:focus-visible { background: rgba(var(--ic-rgb), .1); border-color: rgba(var(--ic-rgb), .32); color: #fff; }
    .hd-item.is-current { background: rgba(var(--ic-rgb), .13); border-color: rgba(var(--ic-rgb), .45); }
    .hd-ico {
        flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
        color: var(--ic);
        background: linear-gradient(145deg, rgba(var(--ic-rgb), .32), rgba(var(--ic-rgb), .06) 70%);
        border: 1px solid rgba(var(--ic-rgb), .45);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 7px 16px -8px rgba(var(--ic-rgb), .85);
        transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
    }
    .hd-ico svg { width: 21px; height: 21px; }
    .hd-item:hover .hd-ico, .hd-item:focus-visible .hd-ico {
        transform: perspective(260px) rotateY(-22deg) rotateX(12deg) translateZ(8px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 6px 12px 20px -8px rgba(var(--ic-rgb), .95);
    }
    .hd-txt { display: flex; flex-direction: column; gap: .12rem; flex: 1; min-width: 0; }
    .hd-txt b { font-size: .9rem; font-weight: 800; color: #f8fafc; }
    .hd-txt small { font-size: .74rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hd-item .menu-badge { flex: none; }
    .hd-item--sm { gap: .7rem; padding: .45rem .55rem; }
    .hd-item--sm .hd-ico { width: 34px; height: 34px; border-radius: 11px; }
    .hd-item--sm .hd-ico svg { width: 18px; height: 18px; }
    .hd-item--sm .hd-txt b { font-size: .84rem; font-weight: 700; }
    .hd-item--danger { --ic: #fb7185; --ic-rgb: 244, 63, 94; }
    .hd-item--danger .hd-txt b { color: #fda4af; }
    .hd-sep { height: 1px; margin: .35rem .4rem; background: var(--line); }

    /* دکمه‌های سمت چپ: سبد خرید، ورود، کاربر */
    .hd-actions { display: flex; align-items: center; gap: .6rem; flex: none; margin-inline-start: auto; }
    .hd-btn {
        position: relative; display: grid; place-items: center; flex: none;
        width: 42px; height: 42px; border-radius: 50%; padding: 0;
        color: #e2e8f0; background: rgba(15, 23, 42, .75); border: 1px solid rgba(148, 163, 184, .22);
        cursor: pointer; text-decoration: none;
        transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    }
    .hd-btn svg { width: 20px; height: 20px; }
    .hd-btn:hover { color: #fff; border-color: rgba(var(--b1-rgb), .65); box-shadow: 0 0 20px -4px rgba(var(--b1-rgb), .8); transform: translateY(-1px); }
    .hd-count {
        position: absolute; top: -5px; left: -5px;
        display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
        font-size: .72rem; font-weight: 900; line-height: 1; color: #1c1203;
        background: linear-gradient(135deg, #fde68a, #fbbf24 50%, #f59e0b);
        box-shadow: 0 0 10px rgba(var(--gold-rgb), .75);
    }
    .hd-count::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--gold); animation: hd-ping 2.2s ease-out infinite; }
    .hd-login {
        position: relative; isolation: isolate; overflow: hidden;
        display: inline-flex; align-items: center; gap: .45rem; flex: none;
        height: 42px; padding: 0 1.15rem; border: 0; border-radius: 999px;
        font: inherit; font-size: .88rem; font-weight: 800; color: #020b1f; white-space: nowrap;
        background: linear-gradient(135deg, #bfdbfe, #60a5fa 45%, #3b82f6);
        box-shadow: 0 10px 26px -10px rgba(var(--b1-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .45);
        cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
    }
    .hd-login::after {
        content: ""; position: absolute; inset: 0; z-index: -1;
        background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
        transform: translateX(120%); animation: hd-sheen 4s ease-in-out infinite;
    }
    .hd-login svg { width: 18px; height: 18px; stroke-width: 2.2; }
    .hd-login:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -10px rgba(var(--b1-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .5); }

    .hd-user { position: relative; flex: none; }
    .hd-user-btn {
        display: flex; align-items: center; gap: .6rem;
        padding: 3px; padding-inline-end: .7rem; border-radius: 999px;
        color: #e2e8f0; background: rgba(15, 23, 42, .75); border: 1px solid rgba(148, 163, 184, .22);
        font: inherit; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease;
    }
    .hd-user-btn:hover, .hd-user-btn[aria-expanded="true"] { border-color: rgba(var(--b1-rgb), .65); box-shadow: 0 0 20px -6px rgba(var(--b1-rgb), .8); }
    .hd-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(from 0deg, #60a5fa, #fbbf24, #60a5fa); animation: hd-spin 6s linear infinite; }
    .hd-avatar span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; font-size: .95rem; font-weight: 900; color: #020b1f; background: linear-gradient(135deg, #bfdbfe, #3b82f6); animation: hd-spin 6s linear infinite reverse; }
    .hd-user-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
    .hd-user-txt b { max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 800; color: #fff; }
    .hd-user-txt small { font-size: .7rem; color: var(--muted); }
    .hd-user-btn > svg { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .3s ease; }
    .hd-user-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
    .hd-user-drop { position: absolute; top: 100%; left: 0; z-index: 50; width: 250px; padding-top: 12px; }
    .hd-user-drop .hd-panel::after { left: 30px; }

    /* دکمه منوی موبایل */
    .hd-burger { display: none; }
    .hd-burger i { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: currentColor; transition: left .3s ease; }
    .hd-burger i:nth-child(1) { top: 13px; }
    .hd-burger i:nth-child(2) { top: 19px; left: 16px; }
    .hd-burger i:nth-child(3) { top: 25px; }
    .hd-burger:hover i:nth-child(2) { left: 11px; }

    /* منوی کشویی موبایل */
    .hd-scrim {
        position: fixed; inset: 0; z-index: 40;
        background: rgba(2, 6, 23, .72);
        -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
        opacity: 0; visibility: hidden; cursor: pointer;
        transition: opacity .35s ease, visibility 0s linear .35s;
    }
    .hd-scrim.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
    .hd-drawer {
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
        display: flex; flex-direction: column;
        width: min(340px, 88vw);
        background: radial-gradient(120% 50% at 100% 0%, #0a1a3f 0%, #020617 65%);
        border-left: 1px solid rgba(148, 163, 184, .16);
        border-radius: 24px 0 0 24px;
        box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .9);
        transform: translateX(105%); visibility: hidden;
        transition: transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .45s;
    }
    .hd-drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
    .hd-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
    .hd-close:hover { color: #fda4af; border-color: rgba(244, 63, 94, .6); box-shadow: 0 0 20px -4px rgba(244, 63, 94, .7); }
    .hd-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem .8rem 1.4rem; }
    .hd-acc { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
    .hd-acc .hd-item { color: #e2e8f0; }
    .hd-acc-chev { width: 18px; height: 18px; margin-inline-start: auto; flex: none; color: var(--muted); stroke-width: 2.2; transition: transform .3s ease; }
    .hd-acc-btn[aria-expanded="true"] { background: rgba(var(--ic-rgb), .1); border-color: rgba(var(--ic-rgb), .3); }
    .hd-acc-btn[aria-expanded="true"] .hd-acc-chev { transform: rotate(180deg); color: var(--hc); }
    .hd-acc-list {
        display: grid; gap: .15rem; margin: .35rem 0 .5rem; padding: .35rem; list-style: none;
        border-radius: 16px; background: rgba(var(--hc-rgb), .05); border: 1px solid rgba(var(--hc-rgb), .18);
    }
    .hd-acc-list .hd-ico { width: 36px; height: 36px; border-radius: 11px; }
    .hd-acc-list .hd-ico svg { width: 18px; height: 18px; }
    .hd-acc-list .hd-txt b { font-size: .84rem; }
    .hd-acc-list .hd-txt small { font-size: .7rem; }
    .hd-drawer.is-open .hd-acc > li { animation: hd-in .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
    .hd-drawer-foot {
        display: flex; align-items: center; justify-content: space-between; gap: .8rem;
        padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
    }
    .hd-social { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; }
    .hd-social a {
        display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff;
        background: linear-gradient(145deg, var(--s1), var(--s2));
        box-shadow: 0 4px 0 var(--s3), inset 0 1px 0 rgba(255, 255, 255, .35);
        transition: transform .2s ease, box-shadow .2s ease;
    }
    .hd-social a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--s3), inset 0 1px 0 rgba(255, 255, 255, .35); }
    .hd-social svg { width: 20px; height: 20px; }
    .hd-support {
        display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 1rem; border-radius: 999px;
        font-size: .85rem; font-weight: 800; color: #020b1f; text-decoration: none; white-space: nowrap;
        background: linear-gradient(135deg, #bfdbfe, #60a5fa 45%, #3b82f6);
        box-shadow: 0 10px 24px -10px rgba(var(--b1-rgb), .9);
    }
    .hd-support svg { width: 17px; height: 17px; stroke-width: 2.2; }

    @keyframes hd-line { to { background-position: -200% 0; } }
    @keyframes hd-ring { from { transform: rotateX(68deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateZ(360deg); } }
    @keyframes hd-shine { to { background-position: -220% 0; } }
    @keyframes hd-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
    @keyframes hd-sheen { 0%, 55% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
    @keyframes hd-spin { to { transform: rotate(360deg); } }
    @keyframes hd-in { from { opacity: 0; transform: perspective(700px) rotateY(-28deg) translateX(28px); } }

    /* زیر ۱۲۸۰ پیکسل هشت گزینه منو در یک ردیف جا نمی‌شوند؛ منوی کشویی جایگزین می‌شود */
    @media (max-width: 1279px) {
        .hd-nav { display: none; }
        .hd-burger { display: grid; }
    }
    @media (min-width: 1280px) {
        .hd-scrim, .hd-drawer { display: none; }
    }
    @media (max-width: 1023px) {
        .hd { --hd-h: 64px; }
    }
    @media (max-width: 479px) {
        .hd-start { gap: .55rem; }
        .hd-logo { gap: .55rem; }
        .hd-orb { width: 38px; height: 38px; }
        .hd .hd-orb svg { width: 21px; height: 21px; }
        .hd-logo-txt small { font-size: .7rem; }
        .hd-logo-txt b { font-size: 1.05rem; }
        .hd-actions { gap: .45rem; }
        .hd-login { padding: 0 .85rem; font-size: .8rem; }
        .hd-login svg, .hd-user-txt { display: none; }
        .hd-user-btn { padding-inline-end: .45rem; gap: .35rem; }
    }
    @media (max-width: 379px) {
        .hd-bar { gap: .5rem; }
        .hd-btn { width: 40px; height: 40px; }
        .hd-burger i:nth-child(1) { top: 12px; }
        .hd-burger i:nth-child(2) { top: 18px; }
        .hd-burger i:nth-child(3) { top: 24px; }
        .hd-orb { width: 36px; height: 36px; }
        .hd-logo-txt b { font-size: .98rem; }
        .hd-actions { gap: .4rem; }
        .hd-login { height: 40px; padding: 0 .7rem; font-size: .76rem; }
    }
    @media (prefers-reduced-motion: reduce) {
        .hd *, .hd *::before, .hd *::after, .hd-glass::after { animation: none !important; transition-duration: .01ms !important; }
    }

/* ===== _footer.html ===== */
    .ft {
        --line: rgba(148, 163, 184, .14);
        --body: #cbd5e1;
        --muted: #94a3b8;
        --b1-hi: #60a5fa; --b1-rgb: 59, 130, 246;
        --gold: #fbbf24; --gold-rgb: 251, 191, 36;
        --hc: #60a5fa; --hc-rgb: 59, 130, 246;
        padding-top: 5rem;
        color: #f8fafc;
    }
    .ft *, .ft *::before, .ft *::after { box-sizing: border-box; }
    .ft svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .ft a:focus-visible, .ft button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
    .ft-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

    /* خط بالا + برگشت به بالا */
    .ft-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
    .ft-rule { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--b1-rgb), .7), rgba(148, 163, 184, .18) 55%, transparent); }
    .ft-up {
        display: inline-flex; align-items: center; gap: .65rem; flex: none;
        height: 46px; padding: 0 1.1rem 0 .35rem; border-radius: 999px;
        border: 1px solid rgba(var(--b1-rgb), .35); background: rgba(15, 23, 42, .75);
        color: var(--body); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
        transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
    }
    .ft-up-orb {
        display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
        color: #020b1f; background: linear-gradient(135deg, #bfdbfe, #60a5fa 45%, #3b82f6);
        box-shadow: 0 6px 16px -6px rgba(var(--b1-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .5);
    }
    .ft-up-orb svg { width: 18px; height: 18px; stroke-width: 2.4; }
    .ft-up:hover { color: #fff; border-color: rgba(var(--b1-rgb), .75); box-shadow: 0 0 26px -6px rgba(var(--b1-rgb), .85); }
    .ft-up:hover .ft-up-orb svg { animation: ft-bob .9s ease-in-out infinite; }

    /* کارت اصلی: همان فضای هیروی صفحات (ستاره، نور، کف شبکه‌ای سه‌بعدی) */
    .ft-card {
        position: relative; isolation: isolate; overflow: hidden;
        border-radius: 32px; border: 1px solid var(--line);
        background: radial-gradient(110% 90% at 85% 0%, #0a1a3f 0%, #020617 60%);
    }
    .ft-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
    .ft-bg i { position: absolute; display: block; }
    .ft-glow { border-radius: 50%; filter: blur(70px); opacity: .5; }
    .ft-glow--a { width: 380px; height: 380px; right: -110px; top: -140px; background: rgba(var(--b1-rgb), .4); animation: ft-drift 16s ease-in-out infinite alternate; }
    .ft-glow--b { width: 320px; height: 320px; left: -90px; bottom: -150px; background: rgba(var(--gold-rgb), .2); animation: ft-drift 20s ease-in-out infinite alternate-reverse; }
    .ft-stars {
        inset: 0; opacity: .6;
        background-image:
            radial-gradient(1.5px 1.5px at 10% 18%, #fff, transparent),
            radial-gradient(1px 1px at 26% 60%, #bfdbfe, transparent),
            radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent),
            radial-gradient(1px 1px at 61% 42%, #fde68a, transparent),
            radial-gradient(1.5px 1.5px at 77% 22%, #fff, transparent),
            radial-gradient(1px 1px at 90% 64%, #bfdbfe, transparent),
            radial-gradient(1px 1px at 6% 84%, #fff, transparent),
            radial-gradient(1px 1px at 52% 78%, #fde68a, transparent);
        animation: ft-twinkle 5s ease-in-out infinite alternate;
    }
    .ft-floor {
        left: -50%; right: -50%; bottom: -8%; height: 40%;
        background-image:
            linear-gradient(rgba(var(--b1-rgb), .26) 1px, transparent 1px),
            linear-gradient(90deg, rgba(var(--b1-rgb), .26) 1px, transparent 1px);
        background-size: 46px 46px;
        transform: perspective(420px) rotateX(64deg);
        transform-origin: center top;
        -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
        mask-image: linear-gradient(to top, #000 10%, transparent 90%);
        animation: ft-floor 3s linear infinite;
    }
    .ft-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.4rem; padding: 3rem; }

    /* عنوان بخش‌ها: کاشی آیکن نورانی */
    .ft-h { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: 1.02rem; font-weight: 900; line-height: 1.4; color: #fff; }
    .ft-h-ico {
        display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
        color: var(--hc);
        background: linear-gradient(145deg, rgba(var(--hc-rgb), .32), rgba(var(--hc-rgb), .06) 70%);
        border: 1px solid rgba(var(--hc-rgb), .45);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 7px 16px -8px rgba(var(--hc-rgb), .85);
    }
    .ft-h-ico svg { width: 18px; height: 18px; }

    /* ستون برند */
    .ft-logo { display: inline-flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; }
    .ft-orb {
        position: relative; flex: none; display: grid; place-items: center;
        width: 62px; height: 62px; border-radius: 50%;
        color: #fde68a;
        background: radial-gradient(circle at 35% 30%, rgba(147, 197, 253, .6), rgba(37, 99, 235, .6) 45%, rgba(2, 6, 23, .95) 78%);
        border: 2px solid rgba(147, 197, 253, .7);
        box-shadow: 0 0 26px rgba(59, 130, 246, .65), 0 0 60px rgba(251, 191, 36, .18), inset 0 0 16px rgba(191, 219, 254, .35);
        transform-style: preserve-3d;
        animation: ft-pulse 4s ease-in-out infinite;
    }
    .ft .ft-orb svg { width: 32px; height: 32px; fill: currentColor; stroke: none; filter: drop-shadow(0 0 8px rgba(251, 191, 36, .9)); }
    .ft-orb i { position: absolute; border-radius: 50%; }
    .ft-orb-ring { inset: -9px; border: 1.5px solid rgba(var(--gold-rgb), .55); animation: ft-ring 8s linear infinite; }
    .ft-orb-ring--b { inset: -15px; border: 1px dashed rgba(96, 165, 250, .5); animation: ft-ring-b 12s linear infinite; }
    .ft-orb-ring::after { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
    .ft-logo-txt { display: flex; flex-direction: column; line-height: 1.3; }
    .ft-logo-txt small { font-size: .85rem; font-weight: 700; color: var(--muted); }
    .ft-logo-txt b {
        font-size: 1.6rem; font-weight: 900;
        background: linear-gradient(100deg, #fff 0%, #bfdbfe 30%, #fde68a 50%, #bfdbfe 70%, #fff 100%);
        background-size: 220% 100%;
        -webkit-background-clip: text; background-clip: text; color: transparent;
        animation: ft-shine 8s linear infinite;
    }
    .ft-about {
        margin-top: 1.6rem; padding: 1.4rem;
        border-radius: 22px; background: rgba(15, 23, 42, .6); border: 1px solid var(--line);
        -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    }
    .ft-about p { margin: .9rem 0 0; font-size: .92rem; line-height: 2.1; color: var(--body); }
    .ft-side { display: grid; gap: 2rem; align-content: start; }
    .ft-social-box { padding: 0 .4rem; }
    .ft-social { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
    .ft-soc { display: flex; flex-direction: column; align-items: center; gap: .55rem; color: var(--body); font-size: .78rem; font-weight: 700; text-decoration: none; transition: color .2s ease; }
    /* دکمه شبکه اجتماعی مثل کلید سه‌بعدی کیبورد */
    .ft-soc-key {
        display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff;
        background: linear-gradient(145deg, var(--k1), var(--k2));
        box-shadow: 0 6px 0 var(--k3), 0 16px 24px -10px var(--k2), inset 0 1px 0 rgba(255, 255, 255, .4);
        transition: transform .2s ease, box-shadow .2s ease;
    }
    .ft-soc-key svg { width: 25px; height: 25px; }
    .ft-soc:hover { color: #fff; }
    .ft-soc:hover .ft-soc-key { transform: translateY(-4px); box-shadow: 0 10px 0 var(--k3), 0 24px 30px -10px var(--k2), inset 0 1px 0 rgba(255, 255, 255, .45); }
    .ft-soc:active .ft-soc-key { transform: translateY(5px); box-shadow: 0 1px 0 var(--k3), 0 6px 12px -6px var(--k2), inset 0 1px 0 rgba(255, 255, 255, .4); }
    .ft-soc--ig { --k1: #f58529; --k2: #c13584; --k3: #7a1d58; }
    .ft-soc--ig .ft-soc-key { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }
    .ft-soc--tg { --k1: #38bdf8; --k2: #0284c7; --k3: #075985; }
    .ft-soc--yt { --k1: #f87171; --k2: #dc2626; --k3: #7f1d1d; }

    /* ستون لینک‌ها */
    .ft-cols { display: grid; gap: 2rem; align-content: start; }
    .ft-list { display: grid; gap: .2rem; margin: 1rem 0 0; padding: 0; list-style: none; }
    .ft-list a {
        --lc: #60a5fa; --lc-rgb: 59, 130, 246;
        display: flex; align-items: center; gap: .7rem;
        padding: .55rem .7rem; border-radius: 12px; border: 1px solid transparent;
        color: var(--body); font-size: .92rem; font-weight: 700; text-decoration: none;
        transition: color .2s ease, background-color .2s ease, border-color .2s ease;
    }
    .ft-list a > i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 10px var(--lc); transition: transform .25s ease; }
    .ft-list a > svg { flex: none; width: 16px; height: 16px; margin-inline-start: auto; stroke-width: 2.2; color: var(--lc); opacity: 0; transform: translateX(8px); transition: opacity .25s ease, transform .25s ease; }
    .ft-list a:hover, .ft-list a:focus-visible { color: #fff; background: rgba(var(--lc-rgb), .1); border-color: rgba(var(--lc-rgb), .3); }
    .ft-list a:hover > i { transform: scale(1.5); }
    .ft-list a:hover > svg, .ft-list a:focus-visible > svg { opacity: 1; transform: none; }
    .ft-list .menu-badge { flex: none; }

    /* خبرنامه + پاکت نامه سه‌بعدی */
    .ft-news {
        position: relative; align-self: start; margin-top: 1.4rem; padding: 1.6rem;
        border-radius: 24px;
        background: linear-gradient(160deg, rgba(var(--b1-rgb), .16), rgba(15, 23, 42, .6) 55%);
        border: 1px solid rgba(var(--b1-rgb), .32);
        box-shadow: 0 0 50px -20px rgba(var(--b1-rgb), .65);
    }
    .ft-news > p { margin: .9rem 0 1.2rem; font-size: .9rem; line-height: 2; color: var(--body); }
    .ft-env { position: absolute; top: -38px; left: 1.4rem; width: 96px; height: 64px; perspective: 600px; animation: ft-float 5s ease-in-out infinite; }
    .ft-env-box { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(12deg) rotateY(-20deg); animation: ft-sway 9s ease-in-out infinite alternate; }
    .ft-env-box > i { position: absolute; inset: 0; display: block; }
    .ft-env-back { border-radius: 8px; background: linear-gradient(160deg, #1e40af, #172554); box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .35); }
    .ft-env-box > .ft-env-letter {
        inset: 6px 9px 4px;
        display: grid; align-content: start; gap: 5px; padding: 8px 9px;
        border-radius: 4px; background: linear-gradient(180deg, #fff, #dbeafe);
        transform: translateZ(1px);
        animation: ft-letter 6s ease-in-out infinite;
    }
    .ft-env-letter b { display: block; height: 4px; border-radius: 2px; background: #93c5fd; }
    .ft-env-letter b:nth-child(1) { width: 55%; background: #fbbf24; }
    .ft-env-letter b:nth-child(3) { width: 78%; }
    .ft-env-front {
        border-radius: 0 0 8px 8px;
        background: linear-gradient(165deg, #60a5fa, #2563eb 55%, #1e40af);
        clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
        transform: translateZ(2px);
    }
    .ft-env-box > .ft-env-flap {
        bottom: auto; height: 58%;
        background: linear-gradient(180deg, #93c5fd, #3b82f6);
        clip-path: polygon(0 0, 100% 0, 50% 100%);
        transform-origin: 50% 0;
        transform: rotateX(0deg) translateZ(3px);
        animation: ft-flap 6s ease-in-out infinite;
    }
    .ft-env-seal { position: absolute; left: 50%; top: 30%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 70%); box-shadow: 0 0 10px rgba(var(--gold-rgb), .9); transform: translateZ(4px); animation: ft-seal 6s ease-in-out infinite; }
    .ft-env-shadow { position: absolute; left: 12%; right: 12%; bottom: -18px; height: 10px; border-radius: 50%; background: radial-gradient(rgba(var(--b1-rgb), .6), transparent 70%); filter: blur(3px); animation: ft-shadow 5s ease-in-out infinite; }

    .ft-field {
        display: flex; align-items: center; gap: .5rem; padding: .35rem;
        border-radius: 16px; background: rgba(2, 6, 23, .7); border: 1px solid rgba(148, 163, 184, .22);
        transition: border-color .2s ease, box-shadow .2s ease;
    }
    .ft-field:focus-within { border-color: rgba(var(--b1-rgb), .75); box-shadow: 0 0 0 3px rgba(var(--b1-rgb), .18); }
    .ft-field > svg { flex: none; width: 20px; height: 20px; margin-inline-start: .45rem; color: var(--muted); }
    .ft-field input, .ft-field input:focus {
        flex: 1; width: 100%; min-width: 0; height: 44px; padding: 0 .2rem; margin: 0;
        border: 0; outline: 0; box-shadow: none; background: transparent; -webkit-appearance: none; appearance: none;
        color: #fff; font: inherit; font-size: .9rem; direction: ltr; text-align: right;
    }
    .ft-field input::placeholder { direction: rtl; color: #64748b; }
    .ft-submit {
        position: relative; isolation: isolate; overflow: hidden; flex: none;
        height: 44px; padding: 0 1.1rem; border: 0; border-radius: 12px;
        font: inherit; font-size: .85rem; font-weight: 800; color: #020b1f; white-space: nowrap;
        background: linear-gradient(135deg, #bfdbfe, #60a5fa 45%, #3b82f6);
        box-shadow: 0 10px 24px -10px rgba(var(--b1-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .45);
        cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    }
    .ft-submit::after {
        content: ""; position: absolute; inset: 0; z-index: -1;
        background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
        transform: translateX(120%); animation: ft-sheen 4s ease-in-out infinite;
    }
    .ft-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(var(--b1-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
    .ft-submit:disabled { opacity: .65; cursor: progress; transform: none; }
    .ft-error { margin: .6rem 0 0; font-size: .8rem; font-weight: 700; color: #fb7185; }
    .ft-error[hidden] { display: none; }

    /* نوار پایین */
    .ft-bottom { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 0 1.6rem; }
    .ft-bottom p { margin: 0; font-size: .8rem; color: var(--muted); white-space: nowrap; }
    .ft-bottom .ft-rule { background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .2) 45%, rgba(var(--b1-rgb), .55)); }
    .ft-seal { display: grid; place-items: center; flex: none; padding: .4rem; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }

    /* پیام موفقیت خبرنامه */
    .ft-modal {
        position: fixed; inset: 0; z-index: 60;
        display: grid; place-items: center; padding: 16px;
        background: rgba(2, 6, 23, .75);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        opacity: 0; transition: opacity .3s ease; cursor: pointer;
    }
    .ft-modal[hidden] { display: none; }
    .ft-modal.is-open { opacity: 1; }
    .ft-modal-card {
        width: 100%; max-width: 360px; padding: 2.2rem 1.6rem; border-radius: 26px; text-align: center;
        background: radial-gradient(120% 90% at 50% 0%, #0a1a3f, #020617 70%);
        border: 1px solid rgba(var(--b1-rgb), .4);
        box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(var(--b1-rgb), .75);
        transform: perspective(800px) rotateX(22deg) scale(.9);
        transition: transform .5s cubic-bezier(.2, .8, .2, 1);
    }
    .ft-modal.is-open .ft-modal-card { transform: none; }
    .ft-modal-icon {
        display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 1.1rem; border-radius: 50%;
        color: #03140a; background: linear-gradient(135deg, #bbf7d0, #4ade80 50%, #22c55e);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, .12), 0 0 40px rgba(34, 197, 94, .6);
    }
    .ft-modal-icon svg { width: 36px; height: 36px; stroke-width: 2.8; stroke-dasharray: 30; stroke-dashoffset: 30; }
    .ft-modal.is-open .ft-modal-icon svg { animation: ft-check .6s .25s ease forwards; }
    .ft-modal-card h3 { margin: 0 0 .5rem; font-size: 1.2rem; font-weight: 900; color: #fff; }
    .ft-modal-card p { margin: 0; font-size: .92rem; color: var(--body); }

    @keyframes ft-bob { 50% { transform: translateY(-3px); } }
    @keyframes ft-drift { to { transform: translate(40px, 30px) scale(1.1); } }
    @keyframes ft-twinkle { to { opacity: .3; } }
    @keyframes ft-floor { to { background-position: 0 46px; } }
    @keyframes ft-pulse { 50% { box-shadow: 0 0 38px rgba(59, 130, 246, .85), 0 0 80px rgba(251, 191, 36, .28), inset 0 0 18px rgba(191, 219, 254, .45); } }
    @keyframes ft-ring { from { transform: rotateX(68deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateZ(360deg); } }
    @keyframes ft-ring-b { from { transform: rotateY(64deg) rotateZ(0deg); } to { transform: rotateY(64deg) rotateZ(-360deg); } }
    @keyframes ft-shine { to { background-position: -220% 0; } }
    @keyframes ft-float { 50% { transform: translateY(-8px); } }
    @keyframes ft-shadow { 50% { transform: scale(.8); opacity: .6; } }
    @keyframes ft-sway { from { transform: rotateX(12deg) rotateY(-24deg); } to { transform: rotateX(8deg) rotateY(18deg); } }
    @keyframes ft-flap { 0%, 12% { transform: rotateX(0deg) translateZ(3px); } 28%, 72% { transform: rotateX(180deg) translateZ(3px); } 88%, 100% { transform: rotateX(0deg) translateZ(3px); } }
    @keyframes ft-seal { 0%, 10% { opacity: 1; } 16%, 84% { opacity: 0; } 90%, 100% { opacity: 1; } }
    @keyframes ft-letter { 0%, 26% { transform: translateZ(1px) translateY(0); } 44%, 60% { transform: translateZ(1px) translateY(-30px); } 76%, 100% { transform: translateZ(1px) translateY(0); } }
    @keyframes ft-sheen { 0%, 55% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
    @keyframes ft-check { to { stroke-dashoffset: 0; } }

    @media (max-width: 1023px) {
        .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 2.5rem 2rem; }
        .ft-brand { grid-column: 1 / -1; }
    }
    @media (max-width: 767px) {
        .ft { padding-top: 3.5rem; }
        .ft-card { border-radius: 26px; }
        .ft-grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding: 2rem 1.1rem; }
        .ft-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
        .ft-list a { padding: .5rem .45rem; gap: .5rem; font-size: .86rem; }
        .ft-list a > svg { display: none; }
        .ft-news { margin-top: 1.8rem; padding: 1.4rem 1.1rem; }
        .ft-about { padding: 1.2rem 1.1rem; }
        .ft-bottom { flex-wrap: wrap; justify-content: center; text-align: center; }
        .ft-bottom .ft-rule { display: none; }
    }
    @media (max-width: 379px) {
        .ft-cols { grid-template-columns: minmax(0, 1fr); }
        .ft-submit { padding: 0 .8rem; }
    }
    @media (prefers-reduced-motion: reduce) {
        .ft *, .ft *::before, .ft *::after { animation: none !important; transition-duration: .01ms !important; }
        .ft-modal-icon svg { stroke-dashoffset: 0; }
    }
