/* ════════════════════════════════════════════════
   SMAcode — استایل عمومی سایت
   نسخه نهایی
   ════════════════════════════════════════════════ */


/* ══ ۱. متغیرهای طراحی ══ */
:root {
    /* رنگ‌ها */
    --c1:    #0D9488;
    --c1l:   #14B8A6;
    --c1bg:  #F0FDFA;
    --dk:    #0F172A;
    --tx:    #334155;
    --txl:   #64748B;
    --bg:    #F8FAFC;
    --wh:    #fff;
    --bd:    #E2E8F0;

    /* فاصله‌ها */
    --r:   0.5rem;
    --sx:  clamp(.25rem, .5vw, .5rem);
    --ss:  clamp(.5rem, 1vw, .75rem);
    --sm:  clamp(.75rem, 1.5vw, 1.25rem);
    --sl:  clamp(1.25rem, 2.5vw, 2rem);
    --sxl: clamp(2rem, 4vw, 3.5rem);
    --s2l: clamp(3rem, 6vw, 5rem);

    /* فونت‌ها */
    --fx:  clamp(.7rem, .6rem + .4vw, .8rem);
    --fs:  clamp(.78rem, .7rem + .4vw, .9rem);
    --fb:  clamp(.85rem, .75rem + .5vw, 1rem);
    --fm:  clamp(.95rem, .85rem + .5vw, 1.1rem);
    --fl:  clamp(1.1rem, .9rem + .8vw, 1.5rem);
    --fxl: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
    --f2l: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem);

    /* عرض محتوا */
    --w: min(75rem, 92%);

    /* هدر */
    --header-h:  4.5rem;
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-bd: rgba(226, 232, 240, 0.8);
    --header-z:  1000;
    --drawer-w:  18rem;

    /* فوتر */
    --footer-bg:  #0F172A;
    --footer-bd:  rgba(255, 255, 255, .08);
    --footer-tx:  #94A3B8;
    --footer-txh: #fff;

    /* لوگو */
    --sma-color: #16a34a;
    --sma-glow: rgba(22, 163, 74, 0.3);
    --code-color: #111111;
    --code-shadow: none;
    --hover-color: #14b8a6;
    --hover-glow: rgba(20, 184, 166, 0.4);
}

/* روز */
[data-time="day"] {
    --code-color: #ca8a04;
    --code-shadow: 0 0 10px rgba(234, 179, 8, 0.35), 0 0 22px rgba(234, 179, 8, 0.15);
}

/* شب */
[data-time="night"] {
    --code-color: #1e293b;
    --code-shadow: none;
}


/* ══ ۲. ریست و پایه ══ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--bd) var(--bg);
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    font-size: var(--fb);
    color: var(--tx);
    background: var(--bg);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--c1);
    text-decoration: none;
    transition: color .25s;
}

a:hover { color: var(--c1l); }

h1, h2, h3, h4, h5, h6 {
    color: var(--dk);
    line-height: 1.5;
    font-weight: 700;
}

p { margin-bottom: var(--sm); }
ul, ol { padding-right: 1.5rem; }
button { font-family: inherit; }

::selection {
    background: var(--c1);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--c1);
    outline-offset: 2px;
    border-radius: var(--r);
}


/* ══ ۳. کلاس‌های کمکی ══ */
.sr-only,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fp-wrap {
    width: var(--w);
    margin: 0 auto;
}


/* ══ ۴. دکمه‌های عمومی ══ */
.fp-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sx);
    padding: var(--ss) var(--sl);
    border-radius: var(--r);
    font-weight: bold;
    font-size: var(--fs);
    transition: all .3s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid var(--c1);
    cursor: pointer;
    line-height: 1.5;
}

.fp-btn--filled {
    background: linear-gradient(135deg, var(--c1), var(--c1l));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 .25rem 1rem rgba(13, 148, 136, .25);
}

.fp-btn--filled:hover {
    transform: translateY(-.125rem);
    box-shadow: 0 .4rem 1.5rem rgba(13, 148, 136, .35);
    color: #fff;
}

.fp-btn--ghost {
    background: var(--wh);
    color: var(--c1);
}

.fp-btn--ghost:hover {
    background: var(--c1);
    color: #fff;
    transform: translateY(-.125rem);
}

.fp-btn--white {
    background: #fff;
    color: var(--c1);
    border-color: #fff;
}

.fp-btn--white:hover {
    transform: translateY(-.125rem);
    box-shadow: 0 .4rem 1.25rem rgba(0, 0, 0, .2);
    color: var(--c1);
}


/* ══ ۵. بج و عناوین سکشن ══ */
.fp-badge {
    display: inline-block;
    background: rgba(13, 148, 136, .08);
    color: var(--c1);
    padding: var(--sx) var(--sm);
    border-radius: 1.25rem;
    font-size: var(--fx);
    font-weight: bold;
    margin-bottom: var(--sm);
}

.fp-section-title {
    font-size: var(--fxl);
    color: var(--dk);
    margin-bottom: var(--sm);
    line-height: 1.6;
}

.fp-section-desc {
    color: #94A3B8;
    font-size: var(--fs);
    text-align: center;
    max-width: 30rem;
    margin: 0 auto var(--sl);
}

.fp-section-header {
    text-align: center;
    margin-bottom: var(--sxl);
}

.fp-section-action {
    text-align: center;
    margin-top: var(--sxl);
}


/* ══ ۶. سیستم انیمیشن ورود ══ */
.fp-reveal {
    opacity: 0;
    transition: all .8s ease;
}

.fp-reveal--u { transform: translateY(2.5rem); }
.fp-reveal--r { transform: translateX(2.5rem); }
.fp-reveal--l { transform: translateX(-2.5rem); }

.fp-reveal.visible {
    opacity: 1;
    transform: translate(0);
}


/* ══ ۷. اسکرول‌بار سفارشی ══ */
::-webkit-scrollbar { width: .5rem; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bd); border-radius: .25rem; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }


/* ══ ۸. Skip Link ══ */
.skip-link {
    position: absolute;
    top: -100%;
    right: 0;
    background: var(--c1);
    color: #fff;
    padding: .5rem 1rem;
    font-size: .9rem;
    border-radius: 0 0 .5rem .5rem;
    z-index: 9999;
    text-decoration: none;
    transition: top .3s;
}

.skip-link:focus { top: 0; }


/* ══ ۹. نوار اعلان ══ */
.site-notice {
    background: linear-gradient(135deg, var(--c1), var(--c1l));
    color: #fff;
    font-size: var(--fx);
    text-align: center;
    padding: .4rem 1rem;
    position: relative;
    z-index: calc(var(--header-z) + 1);
}

.site-notice__wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    max-width: var(--w);
    margin: 0 auto;
}

.site-notice a { color: #fff; text-decoration: underline; }

.site-notice__close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: .2rem .4rem;
    font-size: 1rem;
    line-height: 1;
    opacity: .7;
    transition: opacity .2s;
    position: absolute;
    left: 1rem;
}

.site-notice__close:hover { opacity: 1; }


/* ══ ۱۰. هدر ══ */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--header-z);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-bd);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: box-shadow .3s, background .3s;
}

.site-header.scrolled {
    box-shadow: 0 .125rem 1rem rgba(0, 0, 0, .08);
}

.site-header__wrap {
    width: var(--w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-header__logo { flex-shrink: 0; }

.site-header__logo-text {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.site-header__logo-main {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--dk);
    letter-spacing: -.02em;
}

.site-header__logo-sub {
    margin-top: 4px !important;
    font-size: 11px !important;
    color: #6b7280 !important;
    opacity: 0.85 !important;
}

.custom-logo {
    height: 2.5rem;
    width: auto;
    display: block;
}

/* ── منوی دسکتاپ — همیشه افقی ── */
.site-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.site-nav .site-nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .site-nav__list > li {
    display: inline-block;
    width: auto;
    float: none;
    position: relative;
}

.site-nav .site-nav__list > li > a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .75rem;
    color: var(--tx);
    text-decoration: none;
    font-size: var(--fs);
    font-weight: 600;
    border-radius: .375rem;
    transition: all .25s;
    white-space: nowrap;
    width: auto;
}

.site-nav .site-nav__list > li > a:hover,
.site-nav .site-nav__list > li.current-menu-item > a {
    background: var(--c1bg);
    color: var(--c1);
}

.site-nav .site-nav__list > li.current-menu-item > a { font-weight: 700; }

/* زیرمنو دسکتاپ */
.site-nav .site-nav__list .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--wh);
    border: 1px solid var(--bd);
    border-radius: .75rem;
    padding: .4rem;
    min-width: 13rem;
    list-style: none;
    margin: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(.5rem);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    z-index: 100;
}

.site-nav .site-nav__list > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav .site-nav__list .sub-menu li { margin: 0; }

.site-nav .site-nav__list .sub-menu a {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .875rem;
    font-size: var(--fx);
    font-weight: 500;
    border-radius: .5rem;
    color: var(--tx);
    transition: all .2s;
    width: 100%;
}

.site-nav .site-nav__list .sub-menu a:hover {
    background: var(--c1bg);
    color: var(--c1);
    padding-right: 1rem;
}

.site-nav .site-nav__list .sub-menu li.current-menu-item > a,
.site-nav .site-nav__list .sub-menu li.is-active > a {
    background: var(--c1bg);
    color: var(--c1);
    font-weight: 600;
}

.site-nav .site-nav__list .sub-menu .sub-menu {
    top: 0;
    right: 100%;
    margin-right: .3rem;
}

/* Walker آیتم‌ها */
.menu-item__text { position: relative; }

.menu-item__arrow {
    transition: transform .3s;
    opacity: .5;
    flex-shrink: 0;
}

.site-nav .site-nav__list > li:hover > a .menu-item__arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.menu-item__toggle { display: none; }
.menu-item__icon { width: 1em; height: 1em; flex-shrink: 0; }

/* دکمه‌های هدر */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.site-header__search-btn,
.site-header__theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    color: var(--tx);
    border-radius: .375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
}

.site-header__search-btn:hover,
.site-header__theme-btn:hover {
    background: var(--c1bg);
    color: var(--c1);
}

.site-header__theme-icon--dark { display: none; }

/* همبرگر — پیش‌فرض مخفی */
.site-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: .375rem;
    transition: background .25s;
}

.site-header__burger:hover { background: var(--c1bg); }

.site-header__burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dk);
    border-radius: 1px;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    transform-origin: center;
}

.site-header__burger.is-open .site-header__burger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header__burger.is-open .site-header__burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header__burger.is-open .site-header__burger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* جستجو هدر */
.site-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wh);
    border-bottom: 1px solid var(--bd);
    padding: 1rem 4%;
    z-index: calc(var(--header-z) - 1);
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .08);
    animation: slideDown .3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.site-search__wrap {
    width: var(--w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.site-search .search-form { flex: 1; display: flex; gap: .5rem; }

.site-search .search-field {
    flex: 1;
    padding: .55rem 1rem;
    border: 1.5px solid var(--bd);
    border-radius: .5rem;
    font-size: var(--fs);
    font-family: inherit;
    color: var(--dk);
    transition: border-color .25s;
    background: var(--bg);
}

.site-search .search-field:focus {
    outline: none;
    border-color: var(--c1);
    background: var(--wh);
}

.site-search .search-submit {
    padding: .55rem 1.25rem;
    background: var(--c1);
    color: #fff;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    font-size: var(--fs);
    font-family: inherit;
    font-weight: 600;
    transition: background .25s;
}

.site-search .search-submit:hover { background: var(--c1l); }

.site-search__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--txl);
    padding: .4rem;
    border-radius: .375rem;
    display: flex;
    align-items: center;
    transition: all .25s;
}

.site-search__close:hover {
    color: var(--dk);
    background: var(--bg);
}

/* ── منوی موبایل ── */
.mobile-menu__overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: calc(var(--header-z) + 1);
    opacity: 0;
    transition: opacity .35s;
    backdrop-filter: blur(2px);
}

.mobile-menu.is-open .mobile-menu__overlay { opacity: 1; }

.mobile-menu__drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--drawer-w);
    height: 100%;
    background: var(--wh);
    z-index: calc(var(--header-z) + 2);
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-menu.is-open .mobile-menu__drawer { transform: translateX(0); }

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bd);
}

.mobile-menu__title {
    font-size: 26px !important;
    font-weight: 900;
    color: var(--dk);
}

.mobile-menu__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--txl);
    padding: .3rem;
    border-radius: .375rem;
    display: flex;
    transition: all .25s;
}

.mobile-menu__close:hover {
    color: var(--dk);
    background: var(--bg);
}

/* لیست منوی موبایل — همیشه عمودی */
.mobile-menu__drawer .mobile-menu__list,
.mobile-menu__drawer .site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column !important;
    gap: .25rem;
    flex: 1;
    width: 100%;
}

.mobile-menu__drawer .mobile-menu__list > li,
.mobile-menu__drawer .site-nav__list > li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    position: relative;
}

.mobile-menu__drawer .mobile-menu__list > li > a,
.mobile-menu__drawer .site-nav__list > li > a {
    display: block !important;
    width: 100% !important;
    padding: .7rem .875rem;
    color: var(--tx);
    text-decoration: none;
    font-size: var(--fs);
    font-weight: 600;
    border-radius: .5rem;
    transition: all .25s;
    white-space: normal;
    text-align: right;
}

.mobile-menu__drawer .mobile-menu__list > li > a:hover,
.mobile-menu__drawer .mobile-menu__list > li.current-menu-item > a,
.mobile-menu__drawer .site-nav__list > li > a:hover,
.mobile-menu__drawer .site-nav__list > li.current-menu-item > a {
    background: var(--c1bg);
    color: var(--c1);
}

/* زیرمنو موبایل */
.mobile-menu__drawer .sub-menu,
.mobile-menu__drawer .mobile-sub-menu,
.mobile-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 var(--sm) 0 0;
    display: none;
    flex-direction: column !important;
    border-right: 2px solid var(--c1bg);
    margin-right: var(--sm);
    width: 100%;
}

.mobile-menu__drawer .sub-menu.is-open,
.mobile-menu__drawer .mobile-sub-menu.is-open,
.mobile-sub-menu.is-open {
    display: flex !important;
    flex-direction: column !important;
    animation: slideDown .3s ease;
}

.mobile-menu__drawer .sub-menu > li,
.mobile-menu__drawer .mobile-sub-menu > li {
    display: block !important;
    width: 100% !important;
}

.mobile-menu__drawer .sub-menu > li > a,
.mobile-menu__drawer .mobile-sub-menu > li > a,
.mobile-sub-menu li a {
    font-size: var(--fx) !important;
    padding: .5rem .875rem !important;
    opacity: .85;
}

.mobile-sub-menu li a:hover { opacity: 1; }
.mobile-menu-item--child a { padding-right: var(--sl) !important; }

/* دکمه toggle زیرمنو */
.mobile-menu-item__toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--txl);
    cursor: pointer;
    transition: all .25s;
    border-radius: .5rem;
}

.mobile-menu-item__toggle:hover {
    color: var(--c1);
    background: var(--c1bg);
}

.mobile-menu-item__toggle svg { transition: transform .3s; }
.mobile-menu-item__toggle.is-open svg { transform: rotate(180deg); }

/* جستجوی موبایل */
.mobile-menu__search .search-form {
    display: flex;
    gap: .5rem;
    border-top: 1px solid var(--bd);
    padding-top: 1rem;
}

.mobile-menu__search .search-field {
    flex: 1;
    padding: .5rem .75rem;
    border: 1.5px solid var(--bd);
    border-radius: .5rem;
    font-size: var(--fs);
    font-family: inherit;
}

.mobile-menu__search .search-submit {
    padding: .5rem .875rem;
    background: var(--c1);
    color: #fff;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

/* ══ ۱۱. فوتر ══ */
.site-footer {
    position: relative;
    overflow: hidden;
    background: #111827;
    color: #d1d5db;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    direction: rtl;
    margin-top: auto;
}

.site-footer__wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-footer__top {
    position: relative;
    z-index: 2;
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__col--about { gap: 16px; }

.site-footer__logo { margin-bottom: 4px; }
.site-footer__logo .smacode-logo__title { font-size: 26px !important; }

.site-footer__logo-text {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--footer-txh);
    text-decoration: none;
    display: inline-block;
    margin-bottom: var(--sm);
}

.site-footer .custom-logo {
    height: 2.5rem;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--sm);
}

.site-footer__about-text {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.8;
    margin: 0;
}

.site-footer__col-title {
    color: #f3f4f6;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
}

.site-footer__col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, #16a34a, #0D9488);
    border-radius: 2px;
}

.site-footer__social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.site-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
    transition: background 0.25s, color 0.25s, transform 0.25s;
}

.site-footer__social-link:hover {
    background: #16a34a;
    color: #ffffff;
    transform: translateY(-2px);
}

.site-footer__social-link svg { width: 18px; height: 18px; }

.site-footer__nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer__nav li { margin: 0; padding: 0; }

.site-footer__nav a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: color 0.25s, padding-right 0.25s;
    position: relative;
}

.site-footer__nav a::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #374151;
    transition: background 0.25s;
    flex-shrink: 0;
}

.site-footer__nav a:hover { color: #16a34a; padding-right: 4px; }
.site-footer__nav a:hover::before { background: #16a34a; }

.site-footer__posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__post-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-footer__post-link {
    color: #d1d5db;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s;
    line-height: 1.5;
}

.site-footer__post-link svg {
    flex-shrink: 0;
    color: #374151;
    transition: color 0.25s;
}

.site-footer__post-link:hover { color: #16a34a; }
.site-footer__post-link:hover svg { color: #16a34a; }

.site-footer__post-date {
    font-size: 11px;
    color: #6b7280;
    padding-right: 20px;
}

.site-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9ca3af;
}

.site-footer__contact svg { flex-shrink: 0; color: #6b7280; }
.site-footer__contact a { color: #9ca3af; text-decoration: none; transition: color 0.25s; }
.site-footer__contact a:hover { color: #16a34a; }

.site-footer__newsletter { margin-top: 16px; }

.site-footer__newsletter-title {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 8px;
}

.site-footer__newsletter-input-wrap {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.25s;
}

.site-footer__newsletter-input-wrap:focus-within { border-color: #16a34a; }

.site-footer__newsletter-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    outline: none;
    color: #f3f4f6;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    min-width: 0;
}

.site-footer__newsletter-input::placeholder { color: #6b7280; }

.site-footer__newsletter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: #16a34a;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.25s;
}

.site-footer__newsletter-btn:hover { background: #15803d; }

.site-footer__newsletter-msg {
    font-size: 12px;
    margin: 6px 0 0;
    min-height: 18px;
}

.site-footer__newsletter-msg.error { color: #EF4444; }

.site-footer__bottom {
    position: relative;
    z-index: 2;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.2);
}

.site-footer__bottom-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__copy { margin: 0; font-size: 13px; color: #6b7280; }
.site-footer__copy a { color: #9ca3af; text-decoration: none; transition: color 0.25s; }
.site-footer__copy a:hover { color: #16a34a; }

.site-footer__legal { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.site-footer__legal a { color: #6b7280; text-decoration: none; transition: color 0.25s; }
.site-footer__legal a:hover { color: #16a34a; }
.site-footer__legal span { color: #374151; }

.site-footer__totop {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    z-index: 9999;
}

.site-footer__totop:hover {
    background: #15803d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.site-footer__totop[hidden] { display: none; }


/* ══ ۱۲. لوگو ══ */
.smacode-logo,
.smacode-logo:link,
.smacode-logo:visited {
    position: relative !important;
    display: inline-flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    line-height: 1.1 !important;
}

.smacode-logo__title,
.mobile-menu__title {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.02em !important;
    animation: smacodeFadeUp 0.65s ease both;
}

.smacode-logo__sma {
    display: inline-block !important;
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
    background: none !important;
    text-shadow: none !important;
    position: relative !important;
    transition: color 0.3s, -webkit-text-fill-color 0.3s, text-shadow 0.3s, transform 0.3s, filter 0.3s !important;
    animation: smacodeGlow 2.8s ease-in-out infinite;
}

.smacode-logo__code {
    display: inline-block !important;
    color: var(--code-color) !important;
    -webkit-text-fill-color: var(--code-color) !important;
    background: none !important;
    text-shadow: var(--code-shadow) !important;
    position: relative !important;
    transition: color 0.3s, -webkit-text-fill-color 0.3s, text-shadow 0.3s, transform 0.3s, filter 0.3s !important;
}

[data-time="day"] .smacode-logo__code {
    animation: codeDayPulse 2.2s ease-in-out infinite !important;
}

[data-time="night"] .smacode-logo__code {
    animation: none !important;
    text-shadow: none !important;
}

/* هاور لوگو — هدر و فوتر */
.smacode-logo:hover .smacode-logo__sma,
.site-header .smacode-logo:hover .smacode-logo__sma,
.site-footer .smacode-logo:hover .smacode-logo__sma {
    color: #14b8a6 !important;
    -webkit-text-fill-color: #14b8a6 !important;
    text-shadow: 0 0 18px rgba(20, 184, 166, 0.45) !important;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.3)) !important;
    transform: translateY(-2px) !important;
    animation: none !important;
}

.smacode-logo:hover .smacode-logo__code,
.site-header .smacode-logo:hover .smacode-logo__code,
.site-footer .smacode-logo:hover .smacode-logo__code {
    color: #14b8a6 !important;
    -webkit-text-fill-color: #14b8a6 !important;
    text-shadow: 0 0 18px rgba(20, 184, 166, 0.45) !important;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.3)) !important;
    transform: translateY(-2px) !important;
    animation: none !important;
}

@keyframes smacodeFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes smacodeGlow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50%      { text-shadow: 0 0 14px rgba(22, 163, 74, 0.3); }
}

@keyframes codeDayPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(234, 179, 8, 0.25); }
    50%      { text-shadow: 0 0 20px rgba(234, 179, 8, 0.5), 0 0 35px rgba(234, 179, 8, 0.2); }
}


/* ══════════════════════════════════════
   ۱۳. هدر حالت روشن
   ══════════════════════════════════════ */

html[data-theme="light"] .site-header,
html:not([data-theme="dark"]) .site-header {
    background: rgba(236, 253, 245, .88);
    border-bottom: 1px solid rgba(167, 243, 208, .4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .site-header.scrolled,
html:not([data-theme="dark"]) .site-header.scrolled {
    background: rgba(236, 253, 245, .95);
    box-shadow: 0 2px 16px rgba(22, 163, 74, .06);
}


/* ══════════════════════════════════════
   ۱۴. فوتر حالت روشن
   ══════════════════════════════════════ */

html[data-theme="light"] .site-footer,
html:not([data-theme="dark"]) .site-footer {
    background:
        radial-gradient(ellipse 80% 50% at 20% 100%, rgba(22, 163, 74, .06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(13, 148, 136, .05) 0%, transparent 50%),
        radial-gradient(circle at 50% 0%, rgba(13, 148, 136, .03) 0%, transparent 40%),
        linear-gradient(180deg, #ECFDF5 0%, #E2F5EC 40%, #E8F0EC 100%);
    color: #475569;
    border-top: 1px solid rgba(167, 243, 208, .4);
}

html[data-theme="light"] .site-footer::before,
html:not([data-theme="dark"]) .site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(22, 163, 74, .3) 20%, rgba(13, 148, 136, .5) 50%, rgba(22, 163, 74, .3) 80%, transparent 100%);
    opacity: .6;
}

html[data-theme="light"] .site-footer::after,
html:not([data-theme="dark"]) .site-footer::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13, 148, 136, .03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

html[data-theme="light"] .site-footer__top,
html:not([data-theme="dark"]) .site-footer__top { border-bottom: 1px solid rgba(167, 243, 208, .3); }

html[data-theme="light"] .site-footer__bottom,
html:not([data-theme="dark"]) .site-footer__bottom { background: rgba(236, 253, 245, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

html[data-theme="light"] .site-footer__col-title,
html:not([data-theme="dark"]) .site-footer__col-title { color: #1E293B; }

html[data-theme="light"] .site-footer__logo-text,
html:not([data-theme="dark"]) .site-footer__logo-text { color: #1E293B; }

html[data-theme="light"] .site-footer__about-text,
html:not([data-theme="dark"]) .site-footer__about-text { color: #64748B; }

html[data-theme="light"] .site-footer__social-link,
html:not([data-theme="dark"]) .site-footer__social-link { background: rgba(255,255,255,.7); color: #64748B; border: 1px solid rgba(167,243,208,.4); box-shadow: 0 2px 8px rgba(0,0,0,.04); }

html[data-theme="light"] .site-footer__social-link:hover,
html:not([data-theme="dark"]) .site-footer__social-link:hover { background: #16a34a; color: #fff; border-color: #16a34a; box-shadow: 0 4px 12px rgba(22,163,74,.25); transform: translateY(-3px); }

html[data-theme="light"] .site-footer__nav a,
html:not([data-theme="dark"]) .site-footer__nav a { color: #475569; }
html[data-theme="light"] .site-footer__nav a::before,
html:not([data-theme="dark"]) .site-footer__nav a::before { background: #94A3B8; }
html[data-theme="light"] .site-footer__nav a:hover,
html:not([data-theme="dark"]) .site-footer__nav a:hover { color: #16a34a; }
html[data-theme="light"] .site-footer__nav a:hover::before,
html:not([data-theme="dark"]) .site-footer__nav a:hover::before { background: #16a34a; }

html[data-theme="light"] .site-footer__post-item,
html:not([data-theme="dark"]) .site-footer__post-item { border-bottom-color: rgba(167,243,208,.3); }
html[data-theme="light"] .site-footer__post-link,
html:not([data-theme="dark"]) .site-footer__post-link { color: #334155; }
html[data-theme="light"] .site-footer__post-link:hover,
html:not([data-theme="dark"]) .site-footer__post-link:hover { color: #16a34a; }
html[data-theme="light"] .site-footer__post-link svg,
html:not([data-theme="dark"]) .site-footer__post-link svg { color: #94A3B8; }
html[data-theme="light"] .site-footer__post-link:hover svg,
html:not([data-theme="dark"]) .site-footer__post-link:hover svg { color: #16a34a; }
html[data-theme="light"] .site-footer__post-date,
html:not([data-theme="dark"]) .site-footer__post-date { color: #94A3B8; }

html[data-theme="light"] .site-footer__contact li,
html:not([data-theme="dark"]) .site-footer__contact li { color: #64748B; }
html[data-theme="light"] .site-footer__contact svg,
html:not([data-theme="dark"]) .site-footer__contact svg { color: #0D9488; }
html[data-theme="light"] .site-footer__contact a,
html:not([data-theme="dark"]) .site-footer__contact a { color: #64748B; }
html[data-theme="light"] .site-footer__contact a:hover,
html:not([data-theme="dark"]) .site-footer__contact a:hover { color: #16a34a; }

html[data-theme="light"] .site-footer__newsletter-title,
html:not([data-theme="dark"]) .site-footer__newsletter-title { color: #334155; }
html[data-theme="light"] .site-footer__newsletter-input-wrap,
html:not([data-theme="dark"]) .site-footer__newsletter-input-wrap { border: 1.5px solid rgba(167,243,208,.5); background: rgba(255,255,255,.8); border-radius: 10px; }
html[data-theme="light"] .site-footer__newsletter-input-wrap:focus-within,
html:not([data-theme="dark"]) .site-footer__newsletter-input-wrap:focus-within { border-color: #16a34a; box-shadow: 0 2px 12px rgba(22,163,74,.1); }
html[data-theme="light"] .site-footer__newsletter-input,
html:not([data-theme="dark"]) .site-footer__newsletter-input { background: rgba(255,255,255,.8); color: #0F172A; }
html[data-theme="light"] .site-footer__newsletter-input::placeholder,
html:not([data-theme="dark"]) .site-footer__newsletter-input::placeholder { color: #94A3B8; }
html[data-theme="light"] .site-footer__newsletter-btn,
html:not([data-theme="dark"]) .site-footer__newsletter-btn { background: linear-gradient(135deg, #16a34a, #0D9488); color: #fff; }
html[data-theme="light"] .site-footer__newsletter-btn:hover,
html:not([data-theme="dark"]) .site-footer__newsletter-btn:hover { background: linear-gradient(135deg, #15803d, #0F766E); }
html[data-theme="light"] .site-footer__newsletter-msg,
html:not([data-theme="dark"]) .site-footer__newsletter-msg { color: #16a34a; }

html[data-theme="light"] .site-footer__copy,
html:not([data-theme="dark"]) .site-footer__copy { color: #64748B; }
html[data-theme="light"] .site-footer__copy a,
html:not([data-theme="dark"]) .site-footer__copy a { color: #334155; }
html[data-theme="light"] .site-footer__copy a:hover,
html:not([data-theme="dark"]) .site-footer__copy a:hover { color: #16a34a; }
html[data-theme="light"] .site-footer__legal a,
html:not([data-theme="dark"]) .site-footer__legal a { color: #64748B; }
html[data-theme="light"] .site-footer__legal a:hover,
html:not([data-theme="dark"]) .site-footer__legal a:hover { color: #16a34a; }
html[data-theme="light"] .site-footer__legal span,
html:not([data-theme="dark"]) .site-footer__legal span { color: #94A3B8; }

html[data-theme="light"] .site-footer__totop,
html:not([data-theme="dark"]) .site-footer__totop { background: linear-gradient(135deg, #16a34a, #0D9488); color: #fff; border: none; box-shadow: 0 4px 14px rgba(22,163,74,.25); }
html[data-theme="light"] .site-footer__totop:hover,
html:not([data-theme="dark"]) .site-footer__totop:hover { background: linear-gradient(135deg, #15803d, #0F766E); box-shadow: 0 6px 20px rgba(22,163,74,.35); transform: translateY(-3px); }

/* لوگو فوتر — حالت روشن */
html[data-theme="light"] .site-footer .smacode-logo__sma,
html:not([data-theme="dark"]) .site-footer .smacode-logo__sma { color: #16a34a !important; -webkit-text-fill-color: #16a34a !important; }

/* لوگو فوتر code — روز طلایی */
html[data-theme="light"][data-time="day"] .site-footer .smacode-logo__code,
html:not([data-theme="dark"])[data-time="day"] .site-footer .smacode-logo__code {
    color: #ca8a04 !important;
    -webkit-text-fill-color: #ca8a04 !important;
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.35), 0 0 22px rgba(234, 179, 8, 0.15) !important;
    animation: codeDayPulse 2.2s ease-in-out infinite !important;
}

/* لوگو فوتر code — شب تیره */
html[data-theme="light"][data-time="night"] .site-footer .smacode-logo__code,
html:not([data-theme="dark"])[data-time="night"] .site-footer .smacode-logo__code {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    text-shadow: none !important;
    animation: none !important;
}

/* لوگو فوتر — هاور حالت روشن (هم روز هم شب) */
html[data-theme="light"] .site-footer .smacode-logo:hover .smacode-logo__sma,
html:not([data-theme="dark"]) .site-footer .smacode-logo:hover .smacode-logo__sma,
html[data-theme="light"] .site-footer .smacode-logo:hover .smacode-logo__code,
html:not([data-theme="dark"]) .site-footer .smacode-logo:hover .smacode-logo__code {
    color: #14b8a6 !important;
    -webkit-text-fill-color: #14b8a6 !important;
    text-shadow: 0 0 18px rgba(20, 184, 166, 0.45) !important;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.3)) !important;
    transform: translateY(-2px) !important;
    animation: none !important;
}

/* منوی موبایل — حالت روشن */
html[data-theme="light"] .mobile-menu__drawer,
html:not([data-theme="dark"]) .mobile-menu__drawer { background: #ECFDF5; }
html[data-theme="light"] .mobile-menu__header,
html:not([data-theme="dark"]) .mobile-menu__header { border-bottom-color: rgba(167,243,208,.4); }
html[data-theme="light"] .mobile-menu__search .search-form,
html:not([data-theme="dark"]) .mobile-menu__search .search-form { border-top-color: rgba(167,243,208,.4); }
html[data-theme="light"] .mobile-menu__search .search-field,
html:not([data-theme="dark"]) .mobile-menu__search .search-field { background: rgba(255,255,255,.8); border-color: rgba(167,243,208,.4); color: #0F172A; }

/* ══════════════════════════════════════
   ۱۵. هدر و فوتر حالت تاریک
   ══════════════════════════════════════ */

html[data-theme="dark"] .site-header {
    background: rgba(11, 17, 32, .95);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .site-header.scrolled {
    background: rgba(11, 17, 32, .98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .site-footer {
    background:
        radial-gradient(ellipse 80% 50% at 20% 100%, rgba(22, 163, 74, .04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(13, 148, 136, .03) 0%, transparent 50%),
        linear-gradient(180deg, #0B1120 0%, #060B18 100%);
    color: #94A3B8;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .site-footer::before {
    background: linear-gradient(90deg, transparent 0%, rgba(22,163,74,.3) 20%, rgba(13,148,136,.4) 50%, rgba(22,163,74,.3) 80%, transparent 100%);
    opacity: .3;
}

html[data-theme="dark"] .site-footer::after {
    background: radial-gradient(circle, rgba(22,163,74,.03) 0%, transparent 70%);
}

html[data-theme="dark"] .site-footer__top { border-bottom-color: rgba(255,255,255,.06); }

html[data-theme="dark"] .site-footer__bottom {
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html[data-theme="dark"] .site-footer__col-title { color: #E2E8F0; }
html[data-theme="dark"] .site-footer__logo-text { color: #E2E8F0; }
html[data-theme="dark"] .site-footer__about-text { color: #94A3B8; }

html[data-theme="dark"] .site-footer__social-link {
    background: rgba(255,255,255,.06);
    color: #94A3B8;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
}

html[data-theme="dark"] .site-footer__social-link:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(22,163,74,.2);
}

html[data-theme="dark"] .site-footer__nav a { color: #94A3B8; }
html[data-theme="dark"] .site-footer__nav a::before { background: #374151; }
html[data-theme="dark"] .site-footer__nav a:hover { color: #16a34a; }
html[data-theme="dark"] .site-footer__nav a:hover::before { background: #16a34a; }

html[data-theme="dark"] .site-footer__post-item { border-bottom-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .site-footer__post-link { color: #CBD5E1; }
html[data-theme="dark"] .site-footer__post-link:hover { color: #16a34a; }
html[data-theme="dark"] .site-footer__post-link svg { color: #374151; }
html[data-theme="dark"] .site-footer__post-link:hover svg { color: #16a34a; }
html[data-theme="dark"] .site-footer__post-date { color: #64748B; }

html[data-theme="dark"] .site-footer__contact li { color: #94A3B8; }
html[data-theme="dark"] .site-footer__contact svg { color: #64748B; }
html[data-theme="dark"] .site-footer__contact a { color: #94A3B8; }
html[data-theme="dark"] .site-footer__contact a:hover { color: #16a34a; }

html[data-theme="dark"] .site-footer__newsletter-title { color: #CBD5E1; }

html[data-theme="dark"] .site-footer__newsletter-input-wrap {
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    box-shadow: none;
}

html[data-theme="dark"] .site-footer__newsletter-input-wrap:focus-within {
    border-color: #16a34a;
    box-shadow: 0 2px 12px rgba(22,163,74,.15);
}

html[data-theme="dark"] .site-footer__newsletter-input { background: transparent; color: #E2E8F0; }
html[data-theme="dark"] .site-footer__newsletter-input::placeholder { color: #64748B; }
html[data-theme="dark"] .site-footer__newsletter-btn { background: #16a34a; }
html[data-theme="dark"] .site-footer__newsletter-btn:hover { background: #15803d; }
html[data-theme="dark"] .site-footer__newsletter-msg { color: #16a34a; }

html[data-theme="dark"] .site-footer__copy { color: #64748B; }
html[data-theme="dark"] .site-footer__copy a { color: #94A3B8; }
html[data-theme="dark"] .site-footer__copy a:hover { color: #16a34a; }
html[data-theme="dark"] .site-footer__legal a { color: #64748B; }
html[data-theme="dark"] .site-footer__legal a:hover { color: #16a34a; }
html[data-theme="dark"] .site-footer__legal span { color: #374151; }

/* لوگو فوتر — Dark Mode */
html[data-theme="dark"] .site-footer .smacode-logo__sma {
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
}

html[data-theme="dark"] .site-footer .smacode-logo__code {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    text-shadow: none !important;
    animation: none !important;
}

/* لوگو فوتر — هاور Dark Mode */
html[data-theme="dark"] .site-footer .smacode-logo:hover .smacode-logo__sma,
html[data-theme="dark"] .site-footer .smacode-logo:hover .smacode-logo__code {
    color: #14b8a6 !important;
    -webkit-text-fill-color: #14b8a6 !important;
    text-shadow: 0 0 18px rgba(20, 184, 166, 0.45) !important;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.3)) !important;
    transform: translateY(-2px) !important;
    animation: none !important;
}

/* منوی موبایل — Dark Mode */
html[data-theme="dark"] .mobile-menu__drawer { background: #0B1120; }
html[data-theme="dark"] .mobile-menu__header { border-bottom-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .mobile-menu__search .search-form { border-top-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .mobile-menu__search .search-field { background: #0F172A; border-color: #334155; color: #E2E8F0; }

/* المان‌های هدر — Dark Mode */
html[data-theme="dark"] .site-nav .site-nav__list > li > a { color: #CBD5E1; }

html[data-theme="dark"] .site-nav .site-nav__list > li > a:hover,
html[data-theme="dark"] .site-nav .site-nav__list > li.current-menu-item > a {
    background: rgba(13,148,136,.12);
    color: #14B8A6;
}

html[data-theme="dark"] .site-nav .site-nav__list .sub-menu {
    background: #1E293B;
    border-color: #334155;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

html[data-theme="dark"] .site-nav .site-nav__list .sub-menu a { color: #CBD5E1; }

html[data-theme="dark"] .site-nav .site-nav__list .sub-menu a:hover,
html[data-theme="dark"] .site-nav .site-nav__list .sub-menu li.is-active > a {
    background: rgba(13,148,136,.12);
    color: #14B8A6;
}

html[data-theme="dark"] .site-header__search-btn,
html[data-theme="dark"] .site-header__theme-btn { color: #CBD5E1; }

html[data-theme="dark"] .site-header__search-btn:hover,
html[data-theme="dark"] .site-header__theme-btn:hover {
    background: rgba(13,148,136,.12);
    color: #14B8A6;
}

html[data-theme="dark"] .site-header__burger-line { background: #E2E8F0; }
html[data-theme="dark"] .site-header__burger:hover { background: rgba(13,148,136,.12); }

html[data-theme="dark"] .site-search {
    background: #1E293B;
    border-bottom-color: #334155;
    box-shadow: 0 .5rem 2rem rgba(0,0,0,.4);
}

html[data-theme="dark"] .site-search .search-field {
    background: #0F172A;
    border-color: #334155;
    color: #E2E8F0;
}

html[data-theme="dark"] .site-search .search-field:focus {
    background: #1E293B;
    border-color: #14B8A6;
}

html[data-theme="dark"] .site-search__close { color: #94A3B8; }
html[data-theme="dark"] .site-search__close:hover { color: #E2E8F0; background: rgba(255,255,255,.05); }

html[data-theme="dark"] .mobile-menu__drawer .mobile-menu__list > li > a,
html[data-theme="dark"] .mobile-menu__drawer .site-nav__list > li > a { color: #CBD5E1; }

html[data-theme="dark"] .mobile-menu__drawer .mobile-menu__list > li > a:hover,
html[data-theme="dark"] .mobile-menu__drawer .mobile-menu__list > li.current-menu-item > a,
html[data-theme="dark"] .mobile-menu__drawer .site-nav__list > li > a:hover,
html[data-theme="dark"] .mobile-menu__drawer .site-nav__list > li.current-menu-item > a {
    background: rgba(13,148,136,.12);
    color: #14B8A6;
}

html[data-theme="dark"] .mobile-menu__close { color: #94A3B8; }
html[data-theme="dark"] .mobile-menu__close:hover { color: #E2E8F0; }
html[data-theme="dark"] .mobile-menu-item__toggle { color: #94A3B8; }
html[data-theme="dark"] .mobile-menu-item__toggle:hover { color: #14B8A6; background: rgba(13,148,136,.12); }
html[data-theme="dark"] .mobile-sub-menu { border-right-color: rgba(13,148,136,.12); }

html[data-theme="dark"] .site-header__theme-icon--light { display: none !important; }
html[data-theme="dark"] .site-header__theme-icon--dark { display: block !important; }

html[data-theme="dark"] .smacode-logo__code {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    text-shadow: none !important;
    animation: none !important;
}

html[data-theme="dark"] .menu-item__arrow { color: #94A3B8; }
html[data-theme="dark"] .site-nav .site-nav__list > li:hover > a .menu-item__arrow { color: #14B8A6; }

/* ══════════════════════════════════════
   ۱۶. ریسپانسیو
   ══════════════════════════════════════ */

/* ── دسکتاپ: منو باید افقی بماند ── */
@media screen and (min-width: 1025px) {
    .site-header .site-nav {
        display: flex !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
    }

    .site-header .site-nav .site-nav__list {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: .25rem !important;
        width: auto !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-header .site-nav .site-nav__list > li {
        display: inline-block !important;
        width: auto !important;
        float: none !important;
        flex: 0 0 auto !important;
        position: relative !important;
    }

    .site-header .site-nav .site-nav__list > li > a {
        display: inline-flex !important;
        width: auto !important;
        white-space: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .site-header__burger {
        display: none !important;
    }
}

/* ── تبلت و موبایل ── */
@media screen and (max-width: 1024px) {
    /* منوی دسکتاپ مخفی */
    .site-header .site-nav {
        display: none !important;
    }

    /* همبرگر نمایش داده شود */
    .site-header__burger {
        display: flex !important;
    }

    /* جستجو در هدر بماند */
    .site-header__search-btn {
        display: flex !important;
    }

    /* فوتر دو ستونه */
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--sl);
    }

    .site-footer__col--about {
        grid-column: 1 / -1;
    }

    /* منوی داخل دراور موبایل — حتماً ستونی */
    .mobile-menu__drawer .mobile-menu__list,
    .mobile-menu__drawer .site-nav__list {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: .25rem !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-menu__drawer .mobile-menu__list > li,
    .mobile-menu__drawer .site-nav__list > li {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    .mobile-menu__drawer .mobile-menu__list > li > a,
    .mobile-menu__drawer .site-nav__list > li > a {
        display: block !important;
        width: 100% !important;
        padding: .8rem .95rem !important;
        border-radius: .6rem !important;
        white-space: normal !important;
        text-align: right !important;
        line-height: 1.6 !important;
        font-size: var(--fs) !important;
    }

    .mobile-menu__drawer .mobile-menu__list > li > a:hover,
    .mobile-menu__drawer .mobile-menu__list > li.current-menu-item > a,
    .mobile-menu__drawer .site-nav__list > li > a:hover,
    .mobile-menu__drawer .site-nav__list > li.current-menu-item > a {
        background: var(--c1bg) !important;
        color: var(--c1) !important;
    }

    /* زیرمنوی موبایل */
    .mobile-menu__drawer .sub-menu,
    .mobile-menu__drawer .mobile-sub-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 var(--sm) 0 0 !important;
        border-right: 2px solid var(--c1bg) !important;
        margin-right: var(--sm) !important;
    }

    .mobile-menu__drawer .sub-menu.is-open,
    .mobile-menu__drawer .mobile-sub-menu.is-open {
        display: flex !important;
        flex-direction: column !important;
    }

    .mobile-menu__drawer .sub-menu > li,
    .mobile-menu__drawer .mobile-sub-menu > li {
        display: block !important;
        width: 100% !important;
    }

    .mobile-menu__drawer .sub-menu > li > a,
    .mobile-menu__drawer .mobile-sub-menu > li > a {
        width: 100% !important;
        font-size: var(--fx) !important;
        padding: .5rem .875rem !important;
        opacity: .85;
    }

    /* جستجوی داخل دراور */
    .mobile-menu__search {
        margin-top: var(--sm);
    }

    .mobile-menu__search .search-form {
        display: flex !important;
        gap: .5rem !important;
        border-top: 1px solid var(--bd) !important;
        padding-top: 1rem !important;
    }

    .mobile-menu__search .search-field {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

/* ── تبلت ── */
@media screen and (max-width: 1024px) {
    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}

/* ── موبایل ── */
@media screen and (max-width: 768px) {
    .smacode-logo__title {
        font-size: 25px !important;
    }

    .site-header__logo-sub {
        font-size: 10px !important;
    }

    .site-footer__top {
        padding: 40px 0 30px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .site-footer__bottom-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer__legal {
        justify-content: center;
    }

    .site-footer__totop {
        bottom: 16px;
        left: 16px;
        width: 38px;
        height: 38px;
    }

    .site-footer__logo .smacode-logo__title {
        font-size: 24px !important;
    }
}

/* ── موبایل کوچک ── */
@media screen and (max-width: 480px) {
    .smacode-logo__title {
        font-size: 22px !important;
    }

    .site-footer__wrap {
        padding: 0 16px;
    }

    .site-footer__top {
        padding: 32px 0 24px;
    }

    .site-footer__social-link {
        width: 34px;
        height: 34px;
    }

    .site-footer__newsletter-input {
        padding: 8px 12px;
        font-size: 12px;
    }

    .site-footer__newsletter-btn {
        padding: 8px 12px;
    }
}

/* ── هدر موبایل ── */
@media screen and (max-width: 48rem) {
    :root {
        --header-h: 3.75rem;
    }
}

/* ── فوتر موبایل ── */
@media screen and (max-width: 40rem) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__bottom-wrap {
        flex-direction: column;
        text-align: center;
    }
}

/* ── کاهش حرکت ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .fp-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
/* استایل پایه برای منوهای بازشو */
.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.site-nav__list > li {
    position: relative;
}

/* مخفی کردن زیرمنوها در حالت عادی */
.site-nav__list li ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 10px 0;
}

/* نمایش زیرمنوها هنگام قرار گرفتن ماوس */
.site-nav__list li:hover > ul {
    display: block;
}

.site-nav__list li ul li {
    display: block;
}

.site-nav__list li ul li a {
    padding: 10px 20px;
    display: block;
    color: #333;
}