/* Rasta Academy — سیستم طراحی، هدر و فوتر */

:root {
    --t-blue: #2F6BFF;
    --t-blue-600: #1E4FD8;
    --t-blue-50: #EEF3FF;
    --t-blue-100: #DCE6FF;
    --t-ink: #0B1220;
    --t-ink-2: #344054;
    --t-muted: #667085;
    --t-line: #E7EBF3;
    --t-soft: #F6F8FC;
    --t-bg: #FAFBFD;
    --t-container: 1280px;
    --t-header-h: 76px;
    --t-ease: cubic-bezier(.2, .8, .2, 1);
    --t-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -28px rgba(16, 24, 40, .3);
}

/* ================= پایه ================= */

html {
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--t-bg);
    color: var(--t-ink);
    font-family: var(--rasta-font, Tahoma, sans-serif);
    font-size: 15px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(55% 40% at 100% 0%, rgba(47, 107, 255, .07), transparent 60%),
        radial-gradient(40% 30% at 0% 8%, rgba(47, 107, 255, .045), transparent 60%);
    pointer-events: none;
}

body.rasta-lock {
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--t-blue);
}

::selection {
    background: var(--t-blue);
    color: #fff;
}

.rasta-container {
    width: min(var(--t-container), calc(100% - 40px));
    margin-inline: auto;
}

.rasta-skip {
    position: fixed;
    top: -100px;
    right: 16px;
    z-index: 100001;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--t-ink);
    color: #fff;
    text-decoration: none;
}

.rasta-skip:focus {
    top: 16px;
}

.rasta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--t-blue);
    font-size: 13px;
    font-weight: 800;
}

.rasta-eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

/* ================= دکمه‌ها ================= */

.rasta-btn,
.rasta-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--t-soft);
    color: var(--t-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .3s var(--t-ease), box-shadow .3s ease;
}

.rasta-btn svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.rasta-btn:hover {
    transform: translateY(-1px);
}

.rasta-btn:focus-visible {
    outline: 2px solid var(--t-blue);
    outline-offset: 3px;
}

.rasta-btn--primary,
.rasta-btn--primary:visited {
    background: var(--t-blue);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(47, 107, 255, .85);
}

.rasta-btn--primary:hover,
.rasta-btn--primary:focus {
    background: var(--t-blue-600);
    color: #fff;
}

.rasta-btn--ghost,
.rasta-btn--ghost:visited {
    border-color: var(--t-line);
    background: #fff;
    color: var(--t-ink-2);
}

.rasta-btn--ghost:hover {
    border-color: var(--t-blue);
    color: var(--t-blue);
}

.rasta-btn--light,
.rasta-btn--light:visited {
    background: #fff;
    color: var(--t-ink);
    box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .45);
}

.rasta-btn--light:hover {
    background: var(--t-ink);
    color: #fff;
}

.rasta-btn--lg {
    height: 56px;
    padding: 0 28px;
    border-radius: 16px;
    font-size: 15px;
}

.rasta-btn--block {
    width: 100%;
}

/* ================= نوار اعلان ================= */

.rasta-announce {
    background: var(--t-ink);
    color: #E4E9F5;
    font-size: 13px;
}

.rasta-announce__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 40px;
    padding: 6px 0;
    text-align: center;
}

.rasta-announce__dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--t-blue);
    box-shadow: 0 0 0 4px rgba(47, 107, 255, .25);
    animation: rastaPulse 2s ease-in-out infinite;
}

.rasta-announce a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease;
}

.rasta-announce a:hover {
    background: var(--t-blue);
}

.rasta-announce a svg {
    width: 14px;
    height: 14px;
}

@keyframes rastaPulse {
    50% { box-shadow: 0 0 0 7px rgba(47, 107, 255, 0); }
}

/* ================= هدر ================= */

.rasta-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: 14px;
    transition: transform .4s var(--t-ease);
}

.admin-bar .rasta-header {
    top: 32px;
}

.rasta-header.is-hidden {
    transform: translateY(calc(-100% - 40px));
}

.rasta-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    height: var(--t-header-h);
    padding: 0 16px;
    border: 1px solid rgba(231, 235, 243, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--t-shadow);
    transition: height .35s var(--t-ease), box-shadow .35s ease;
}

.rasta-header.is-scrolled .rasta-header__bar {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 22px 50px -26px rgba(16, 24, 40, .4);
}

/* لوگو */
.rasta-logo,
.rasta-logo:visited {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    color: var(--t-ink);
    font-size: 19px;
    font-weight: 900;
    text-decoration: none;
}

.rasta-logo__img {
    display: block;
    width: auto;
    max-height: 44px;
    transition: max-height .35s var(--t-ease);
}

.rasta-header.is-scrolled .rasta-logo__img {
    max-height: 38px;
}

.rasta-logo__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--t-blue), #6E97FF);
    color: #fff;
    box-shadow: 0 10px 20px -10px rgba(47, 107, 255, .9);
}

.rasta-logo__mark svg {
    width: 20px;
    height: 20px;
}

/* منو */
.rasta-nav {
    display: flex;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.rasta-nav__list,
.rasta-nav__list .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rasta-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rasta-nav__list > li {
    position: relative;
}

.rasta-nav__list > li > a {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--t-ink-2);
    font-size: 14px;
    white-space: nowrap;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.rasta-nav__list > li.menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border: solid currentColor;
    border-width: 0 1.7px 1.7px 0;
    opacity: .6;
    transform: rotate(45deg);
    transition: transform .25s ease;
}

.rasta-nav__list > li:hover > a,
.rasta-nav__list > li:focus-within > a,
.rasta-nav__list > li.current-menu-item > a,
.rasta-nav__list > li.current-menu-ancestor > a {
    background: var(--t-blue-50);
    color: var(--t-blue);
}

.rasta-nav__list > li.menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.rasta-nav__list .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 5;
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--t-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 60px -28px rgba(16, 24, 40, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .3s var(--t-ease), visibility 0s linear .3s;
}

.rasta-nav__list .sub-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    right: 0;
    left: 0;
    height: 14px;
}

.rasta-nav__list li:hover > .sub-menu,
.rasta-nav__list li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.rasta-nav__list .sub-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--t-ink-2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, padding .25s var(--t-ease);
}

.rasta-nav__list .sub-menu a:hover,
.rasta-nav__list .sub-menu .current-menu-item > a {
    padding-right: 20px;
    background: var(--t-soft);
    color: var(--t-blue);
}

.rasta-menu-hint {
    padding: 8px 14px;
    border: 1px dashed var(--t-line);
    border-radius: 12px;
    color: var(--t-muted);
    font-size: 13px;
    text-decoration: none;
}

/* دکمه‌های هدر */
.rasta-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

:is(.rasta-header, .rasta-search, .rasta-drawer) .rasta-hbtn {
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--t-line);
    border-radius: 14px;
    background: #fff;
    color: var(--t-ink-2);
    box-shadow: none;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .3s var(--t-ease);
}

:is(.rasta-header, .rasta-search, .rasta-drawer) .rasta-hbtn:hover,
:is(.rasta-header, .rasta-search, .rasta-drawer) .rasta-hbtn:focus-visible {
    border-color: var(--t-blue-100);
    background: var(--t-blue-50);
    color: var(--t-blue);
}

:is(.rasta-header, .rasta-search, .rasta-drawer) .rasta-hbtn svg {
    width: 20px;
    height: 20px;
}

.rasta-header__burger {
    display: none !important;
}

.rasta-badge {
    position: absolute;
    top: -7px;
    left: -7px;
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--t-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.rasta-badge[data-count="0"] {
    display: none;
}

.rasta-header .rasta-header__login {
    height: 44px;
    padding: 0 18px;
}

/* حساب کاربری */
.rasta-account {
    position: relative;
}

.rasta-header .rasta-account__toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    margin: 0;
    padding: 0 6px 0 12px;
    border: 1px solid var(--t-line);
    border-radius: 14px;
    background: #fff;
    color: var(--t-ink);
    box-shadow: none;
    font: inherit;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.rasta-header .rasta-account__toggle:hover,
.rasta-header .rasta-account__toggle[aria-expanded="true"] {
    border-color: var(--t-blue-100);
    background: var(--t-blue-50);
}

.rasta-account__avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
}

.rasta-account__name {
    max-width: 110px;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rasta-account__toggle svg {
    width: 15px;
    height: 15px;
    color: var(--t-muted);
    transition: transform .25s ease;
}

.rasta-account__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.rasta-account__menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 250px;
    padding: 8px;
    border: 1px solid var(--t-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 60px -28px rgba(16, 24, 40, .45);
    animation: rastaDrop .25s var(--t-ease) both;
}

.rasta-account__menu[hidden] {
    display: none;
}

.rasta-account__head {
    margin-bottom: 6px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--t-line);
}

.rasta-account__head span {
    display: block;
    color: var(--t-muted);
    font-size: 12px;
}

.rasta-account__head strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.rasta-account__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--t-ink-2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.rasta-account__link svg {
    width: 18px;
    height: 18px;
}

.rasta-account__link:hover {
    background: var(--t-soft);
    color: var(--t-blue);
}

.rasta-account__link.is-danger:hover {
    background: #FEF2F2;
    color: #D92D20;
}

@keyframes rastaDrop {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* نخ و سوزن: پیشرفت اسکرول */
.rasta-thread {
    position: absolute;
    right: 24px;
    bottom: -1px;
    left: 24px;
    height: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}

.rasta-header.has-progress .rasta-thread {
    opacity: 1;
}

.rasta-thread__line {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(var(--progress, 0) * 100%);
    border-radius: 2px;
    background: linear-gradient(to left, var(--t-blue), #8DB2FF);
}

.rasta-thread__needle {
    position: absolute;
    top: 50%;
    right: calc(var(--progress, 0) * 100%);
    width: 30px;
    height: 8px;
    color: var(--t-ink);
    transform: translate(50%, -50%) translateX(-14px);
}

.rasta-thread__needle svg {
    display: block;
    width: 30px;
    height: 8px;
}

/* ================= جستجو ================= */

.rasta-search,
.rasta-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.rasta-search[hidden],
.rasta-drawer[hidden] {
    display: none;
}

.rasta-search__veil,
.rasta-drawer__veil {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 32, .45);
    opacity: 0;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: opacity .35s ease;
}

.rasta-search.is-open .rasta-search__veil,
.rasta-drawer.is-open .rasta-drawer__veil {
    opacity: 1;
}

.rasta-search {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 20px;
}

.rasta-search__panel {
    position: relative;
    width: min(760px, 100%);
    padding: 26px 28px 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 50px 120px -40px rgba(11, 18, 32, .6);
    opacity: 0;
    transform: translateY(-14px) scale(.98);
    transition: opacity .3s ease, transform .4s var(--t-ease);
}

.rasta-search.is-open .rasta-search__panel {
    opacity: 1;
    transform: none;
}

.rasta-search__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.rasta-search__title {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.5;
}

.rasta-search__form form {
    display: flex;
    gap: 10px;
    margin: 0;
}

.rasta-search__form input[type="search"],
.rasta-search__form input[type="text"] {
    flex: 1;
    width: 100%;
    height: 58px;
    margin: 0;
    padding: 0 20px;
    border: 1.5px solid var(--t-line);
    border-radius: 18px;
    background: var(--t-soft);
    color: var(--t-ink);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.rasta-search__form input[type="search"]:focus,
.rasta-search__form input[type="text"]:focus {
    border-color: var(--t-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 107, 255, .14);
}

.rasta-search__form button[type="submit"] {
    height: 58px;
    margin: 0;
    padding: 0 26px;
    border: 0;
    border-radius: 18px;
    background: var(--t-blue);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease;
}

.rasta-search__form button[type="submit"]:hover {
    background: var(--t-blue-600);
}

.rasta-search__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--t-muted);
    font-size: 13px;
}

.rasta-search__tags a {
    padding: 6px 14px;
    border: 1px solid var(--t-line);
    border-radius: 999px;
    color: var(--t-ink-2);
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.rasta-search__tags a:hover {
    border-color: var(--t-blue);
    background: var(--t-blue-50);
    color: var(--t-blue);
}

/* ================= کشوی موبایل ================= */

.rasta-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(370px, 88vw);
    padding: 18px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -30px 0 80px -30px rgba(11, 18, 32, .5);
    transform: translateX(105%);
    transition: transform .45s var(--t-ease);
}

.rasta-drawer.is-open .rasta-drawer__panel {
    transform: none;
}

.rasta-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rasta-drawer__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--t-blue-50), #fff);
}

.rasta-drawer__avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.rasta-drawer__user span {
    display: block;
    color: var(--t-muted);
    font-size: 12px;
}

.rasta-drawer__user strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.rasta-drawer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rasta-drawer__links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--t-line);
    border-radius: 14px;
    color: var(--t-ink-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.rasta-drawer__links a.is-danger {
    color: #D92D20;
}

.rasta-drawer__links svg {
    width: 17px;
    height: 17px;
}

.rasta-dmenu,
.rasta-dmenu .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rasta-dmenu > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid var(--t-line);
}

.rasta-dmenu a {
    display: block;
    padding: 14px 4px;
    color: var(--t-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.rasta-dmenu .current-menu-item > a {
    color: var(--t-blue);
}

.rasta-dmenu .sub-menu {
    display: none;
    grid-column: 1 / -1;
    margin-bottom: 10px;
    padding: 4px 14px 4px 0;
    border-right: 2px solid var(--t-blue-100);
}

.rasta-dmenu .sub-menu a {
    padding: 9px 4px;
    color: var(--t-ink-2);
    font-size: 14px;
    font-weight: 600;
}

.rasta-dmenu li.is-open > .sub-menu {
    display: block;
}

.rasta-drawer .rasta-sub-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--t-soft);
    color: var(--t-ink-2);
    cursor: pointer;
}

.rasta-drawer .rasta-sub-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

.rasta-dmenu li.is-open > .rasta-sub-toggle svg {
    transform: rotate(180deg);
}

.rasta-drawer__foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

/* شبکه‌های اجتماعی */
.rasta-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rasta-socials a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    transition: background .2s ease, transform .3s var(--t-ease);
}

.rasta-socials a:hover {
    background: var(--t-blue);
    transform: translateY(-3px);
}

.rasta-socials svg {
    width: 19px;
    height: 19px;
}

.rasta-socials--soft a {
    border-color: var(--t-line);
    background: var(--t-soft);
    color: var(--t-ink-2);
}

.rasta-socials--soft a:hover {
    color: #fff;
}

/* ================= محتوای عمومی ================= */

.rasta-main {
    display: block;
    min-height: 50vh;
}

.rasta-page {
    padding-top: 48px;
}

.rasta-entry__title {
    margin: 0 0 24px;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 900;
    line-height: 1.4;
}

.rasta-entry__title a {
    color: inherit;
    text-decoration: none;
}

.rasta-entry--card {
    margin-bottom: 20px;
    padding: 24px 28px;
    border: 1px solid var(--t-line);
    border-radius: 22px;
    background: #fff;
}

.rasta-entry--card .rasta-entry__title {
    margin-bottom: 8px;
    font-size: 21px;
}

/* ================= فوتر ================= */

.rasta-footer {
    position: relative;
    margin-top: 120px;
    padding: 72px 0 clamp(90px, 13vw, 190px);
    overflow: hidden;
    border-radius: 40px 40px 0 0;
    background: var(--t-ink);
    color: #9AA6BF;
}

.rasta-footer.has-cta {
    margin-top: 180px;
    padding-top: 0;
    overflow: visible;
}

.rasta-footer > .rasta-container {
    position: relative;
    z-index: 1;
}

.rasta-cta-band {
    position: relative;
    top: -80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: -40px;
    padding: 46px 52px;
    overflow: hidden;
    border-radius: 30px;
    background:
        radial-gradient(90% 140% at 0% 0%, rgba(160, 190, 255, .55), transparent 50%),
        linear-gradient(135deg, #2F6BFF 0%, #1D3FB0 100%);
    color: #fff;
    box-shadow: 0 50px 90px -45px rgba(47, 107, 255, .9);
}

.rasta-cta-band__text {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.rasta-cta-band__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    font-size: 12.5px;
    font-weight: 800;
}

.rasta-cta-band__eyebrow svg {
    width: 15px;
    height: 15px;
}

.rasta-cta-band h2 {
    margin: 14px 0 8px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.4;
}

.rasta-cta-band p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
}

.rasta-cta-band .rasta-btn {
    position: relative;
    z-index: 1;
}

.rasta-cta-band__thread {
    position: absolute;
    bottom: -14px;
    left: -10px;
    width: 420px;
    height: 160px;
    color: rgba(255, 255, 255, .35);
    pointer-events: none;
}

.rasta-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding: 24px 0 48px;
}

.rasta-footer .rasta-logo,
.rasta-footer .rasta-logo:visited {
    color: #fff;
    font-size: 22px;
}

.rasta-footer .rasta-logo__img {
    max-height: 52px;
}

.rasta-footer__brand p {
    max-width: 340px;
    margin: 18px 0 22px;
    font-size: 14px;
    line-height: 2.1;
}

.rasta-footer__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 20px;
    color: #fff;
    font-size: 15.5px;
    font-weight: 800;
}

.rasta-footer__title::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--t-blue);
}

.rasta-footer__menu,
.rasta-footer__contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rasta-footer__menu li {
    margin: 0 0 12px;
}

.rasta-footer__menu a {
    display: inline-block;
    color: #9AA6BF;
    font-size: 14px;
    text-decoration: none;
    transition: color .2s ease, transform .3s var(--t-ease);
}

.rasta-footer__menu a:hover {
    color: #fff;
    transform: translateX(-4px);
}

.rasta-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
}

.rasta-footer__icon {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .06);
    color: #8DB2FF;
}

.rasta-footer__icon svg {
    width: 18px;
    height: 18px;
}

.rasta-footer__contact small {
    display: block;
    color: #6F7C98;
    font-size: 12px;
}

.rasta-footer__contact a,
.rasta-footer__contact b {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    text-decoration: none;
}

.rasta-footer__contact a {
    text-align: right;
}

.rasta-footer__contact a:hover {
    color: #8DB2FF;
}

.rasta-footer__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.rasta-footer__trust > * {
    padding: 8px;
    border-radius: 16px;
    background: #fff;
}

.rasta-footer__trust img {
    display: block;
    max-height: 90px;
}

.rasta-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #6F7C98;
    font-size: 13px;
}

.rasta-footer__top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease;
}

.rasta-footer__top:hover {
    background: var(--t-blue);
    color: #fff;
}

.rasta-footer__top svg {
    width: 16px;
    height: 16px;
}

.rasta-footer__word {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: .78em;
    overflow: hidden;
    color: transparent;
    font-size: clamp(110px, 21vw, 330px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .08);
}

.rasta-footer.has-cta .rasta-footer__word {
    overflow: hidden;
}

.rasta-footer.has-cta {
    clip-path: inset(-200px 0 0 0 round 40px 40px 0 0);
}

/* ================= واکنش‌گرا ================= */

@media (max-width: 1240px) {
    .rasta-header__bar {
        gap: 14px;
    }

    .rasta-nav__list > li > a {
        padding: 0 10px;
        font-size: 13.5px;
    }

    .rasta-header .rasta-header__login span,
    .rasta-account__name {
        display: none;
    }

    .rasta-header .rasta-header__login {
        width: 44px;
        padding: 0;
    }

    .rasta-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* منوی همبرگری: فقط در تبلت و موبایل، یا وقتی آیتم‌های منو در عرض صفحه جا نشوند */
@media (max-width: 1023px) {
    .rasta-nav {
        display: none;
    }

    .rasta-header__burger {
        display: inline-grid !important;
    }

    .rasta-header__actions {
        margin-inline-start: auto;
    }
}

.rasta-header.is-nav-overflow .rasta-nav {
    display: none;
}

.rasta-header.is-nav-overflow .rasta-header__burger {
    display: inline-grid !important;
}

.rasta-header.is-nav-overflow .rasta-header__actions {
    margin-inline-start: auto;
}

@media (max-width: 782px) {
    .admin-bar .rasta-header {
        top: 46px;
    }
}

@media (max-width: 720px) {
    :root {
        --t-header-h: 62px;
    }

    .rasta-container {
        width: calc(100% - 28px);
    }

    .rasta-header {
        padding-top: 8px;
    }

    .rasta-header__bar {
        gap: 10px;
        padding: 0 10px;
        border-radius: 18px;
    }



    .rasta-logo__img {
        max-height: 36px;
    }

    :is(.rasta-header, .rasta-search, .rasta-drawer) .rasta-hbtn,
    .rasta-header .rasta-header__login,
    .rasta-header .rasta-account__toggle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .rasta-header .rasta-account__toggle {
        justify-content: center;
        padding: 0;
    }

    .rasta-account__toggle > svg {
        display: none;
    }

    .rasta-search {
        padding: 10px;
    }

    .rasta-search__panel {
        padding: 20px;
        border-radius: 22px;
    }

    .rasta-search__form form {
        flex-direction: column;
    }

    .rasta-cta-band {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 24px;
        border-radius: 24px;
    }

    .rasta-footer {
        border-radius: 28px 28px 0 0;
    }

    .rasta-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .rasta-footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* ================= هدر موبایل: تمام‌عرض ================= */

@media (max-width: 720px) {
    .rasta-header {
        padding-top: 0;
    }

    .rasta-header > .rasta-container {
        width: 100%;
    }

    .rasta-header__bar {
        border-width: 0 0 1px;
        border-radius: 0;
        box-shadow: none;
    }

    .rasta-header.is-scrolled .rasta-header__bar {
        box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .35);
    }

    .rasta-thread {
        right: 0;
        left: 0;
    }
}

@media (max-width: 480px) {
    .rasta-header__bar {
        gap: 6px;
        padding: 0 8px;
    }

    .rasta-header__actions {
        gap: 6px;
        margin-inline-start: 0;
    }

    .rasta-header .rasta-header__logo {
        flex: 1 1 auto;
        justify-content: flex-start;
        min-width: 0;
    }

    .rasta-header .rasta-logo__text {
        overflow: hidden;
        font-size: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rasta-header .rasta-logo__mark {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }
}

@media (max-width: 340px) {
    .rasta-header .rasta-logo__text {
        display: none;
    }

    .rasta-header .rasta-hbtn,
    .rasta-header .rasta-header__login,
    .rasta-header .rasta-account__toggle {
        width: 36px;
        height: 36px;
    }
}



/* ================= اصلاحات موبایل (تست‌شده) ================= */

/* در موبایل، نوار مدیریت وردپرس با صفحه اسکرول می‌شود؛ هدر نباید زیر آن فاصله بگیرد */
@media (max-width: 600px) {
    .admin-bar .rasta-header {
        top: 0;
    }
}

/* لینک‌های حساب در منوی موبایل، در گوشی‌های باریک یک‌ستونه */
@media (max-width: 360px) {
    .rasta-drawer__links {
        grid-template-columns: 1fr;
    }
}



/* منوی موبایل: متن ظریف‌تر */
.rasta-drawer .rasta-logo {
    font-size: 17px;
}

.rasta-drawer__user strong {
    font-size: 14px;
    font-weight: 700;
}

.rasta-drawer__links a {
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 600;
}

.rasta-dmenu a {
    padding: 12px 4px;
    font-size: 13.5px;
    font-weight: 600;
}

.rasta-dmenu .sub-menu a {
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 400;
}

.rasta-drawer .rasta-btn {
    height: 44px;
    font-size: 13px;
    font-weight: 600;
}




/* ================= هدر ثابت (غیرشناور) و تمام‌عرض ================= */
.rasta-header { position: relative; top: 0; padding-top: 0; border-bottom: 1px solid var(--t-line); background: #fff; }
.admin-bar .rasta-header { top: 0; }
.rasta-header.is-hidden { transform: none; }
.rasta-header__bar, .rasta-header.is-scrolled .rasta-header__bar { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.rasta-header .rasta-thread { display: none; }
@media (max-width: 720px) {
    .rasta-header__bar, .rasta-header.is-scrolled .rasta-header__bar { padding: 0 12px; }
}



/* ================= فوتر جدید (rasta-sf) ================= */
.rasta-sf { position: relative; margin-top: 110px; color: #9AA6BF; font-size: 14px; }
.rasta-sf.has-cta { margin-top: 70px; }
.rasta-sf a { text-decoration: none; }

/* نوار دعوت */
.rasta-sf__cta { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 44px 52px; overflow: hidden; border-radius: 30px; background: radial-gradient(60% 120% at 0% 100%, rgba(141, 178, 255, .35), transparent 60%), linear-gradient(135deg, #2F6BFF 0%, #1D3FB0 100%); color: #fff; box-shadow: 0 40px 70px -40px rgba(30, 79, 216, .9); isolation: isolate; }
.rasta-sf__cta-text { position: relative; z-index: 1; max-width: 640px; }
.rasta-sf__cta-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.9; }
.rasta-sf__cta-eyebrow svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: #fff; color: var(--t-blue); }
.rasta-sf__cta h2 { margin: 12px 0 6px; padding: 0; color: #fff; font-family: inherit; font-size: clamp(20px, 2.3vw, 28px); font-weight: 700; line-height: 1.6; }
.rasta-sf__cta p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14.5px; line-height: 2; }
.rasta-sf__cta .rasta-btn { position: relative; z-index: 1; flex: 0 0 auto; }
.rasta-sf__cta-thread { position: absolute; bottom: -14px; left: -10px; z-index: 0; width: 420px; height: 160px; color: rgba(255, 255, 255, .28); pointer-events: none; }

/* بدنه */
.rasta-sf__body { position: relative; padding: 64px 0 clamp(90px, 13vw, 190px); overflow: hidden; border-radius: 40px 40px 0 0; background: radial-gradient(40% 60% at 100% 0%, rgba(47, 107, 255, .22), transparent 70%), radial-gradient(35% 50% at 0% 30%, rgba(47, 107, 255, .12), transparent 70%), var(--t-ink); isolation: isolate; }
.rasta-sf.has-cta .rasta-sf__body { margin-top: -86px; padding-top: 140px; }
.rasta-sf__body::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 6px); -webkit-mask-image: radial-gradient(50% 60% at 85% 0%, #000 0%, transparent 100%); mask-image: radial-gradient(50% 60% at 85% 0%, #000 0%, transparent 100%); pointer-events: none; }
.rasta-sf__body > .rasta-container { position: relative; z-index: 1; }

/* ستون‌ها */
.rasta-sf__grid { display: flex; flex-wrap: wrap; gap: 40px 36px; padding-bottom: 40px; }
.rasta-sf__brand { flex: 1.5 1 280px; min-width: 0; }
.rasta-sf__col { flex: 1.2 1 220px; min-width: 0; }
.rasta-sf__col--menu { flex: .8 1 150px; }
.rasta-sf__title { position: relative; margin: 0 0 20px; padding: 0 0 12px; color: #fff; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.6; }
.rasta-sf__title::after { content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 2px; border-radius: 2px; background: var(--t-blue); }

/* برند */
.rasta-sf__brand .rasta-logo, .rasta-sf__brand .rasta-logo:visited { color: #fff; }
.rasta-sf__brand .rasta-logo__img { max-height: 48px; }
.rasta-sf__brand p { max-width: 380px; margin: 16px 0 0; color: #9AA6BF; font-size: 14px; line-height: 2.1; }
.rasta-sf__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rasta-sf__stats span { display: block; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: rgba(255, 255, 255, .04); color: #9AA6BF; font-size: 11.5px; line-height: 1.6; }
.rasta-sf__stats b { display: block; color: #fff; font-size: 17px; font-weight: 600; line-height: 1.4; }
.rasta-sf__social { margin-top: 22px; }
.rasta-sf__social small { display: block; margin-bottom: 10px; color: #7D89A3; font-size: 12px; }

/* منوها */
.rasta-sf__menu { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rasta-sf__menu li { margin: 0; padding: 0; }
.rasta-sf__menu li::before, .rasta-sf__menu li::marker { content: none; }
.rasta-sf__menu a, .rasta-sf__menu a:visited { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; color: #9AA6BF; font-size: 14px; line-height: 1.8; transition: color .25s ease, transform .35s var(--t-ease); }
.rasta-sf__menu a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: background .25s ease, transform .25s ease; }
.rasta-sf__menu a:hover { color: #fff; transform: translateX(-3px); }
.rasta-sf__menu a:hover::before { background: var(--t-blue); transform: scale(1.3); }

/* جدیدترین دوره‌ها */
.rasta-sf__courses { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rasta-sf__courses li { margin: 0; padding: 0; }
.rasta-sf__courses li::before, .rasta-sf__courses li::marker { content: none; }
.rasta-sf__courses a, .rasta-sf__courses a:visited { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 16px; color: inherit; transition: background .25s ease; }
.rasta-sf__courses a:hover { background: rgba(255, 255, 255, .05); }
.rasta-sf__thumb { position: relative; flex: 0 0 52px; width: 52px; height: 52px; overflow: hidden; border-radius: 13px; background: rgba(255, 255, 255, .06); }
.rasta-sf__thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; }
.rasta-sf__course-text { min-width: 0; }
.rasta-sf__course-text b { display: -webkit-box; overflow: hidden; color: #E6EAF2; font-size: 13.5px; font-weight: 600; line-height: 1.7; transition: color .25s ease; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rasta-sf__courses a:hover b { color: #fff; }
.rasta-sf__course-text small { display: block; color: #7D89A3; font-size: 12px; line-height: 1.6; }
.rasta-sf__course-text small.is-free { color: #F6DFA6; }

/* ارتباط با ما */
.rasta-sf__contact { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rasta-sf__contact li { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 0; }
.rasta-sf__contact li::before, .rasta-sf__contact li::marker { content: none; }
.rasta-sf__icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .05); color: #8DB2FF; }
.rasta-sf__icon svg { width: 18px; height: 18px; }
.rasta-sf__contact small { display: block; color: #7D89A3; font-size: 12px; line-height: 1.6; }
.rasta-sf__contact a, .rasta-sf__contact a:visited, .rasta-sf__contact b { display: block; color: #E6EAF2; font-size: 14px; font-weight: 400; line-height: 1.8; transition: color .2s ease; }
.rasta-sf__contact a { font-weight: 600; letter-spacing: .3px; }
.rasta-sf__contact a:hover { color: #8DB2FF; }

/* نمادهای اعتماد */
.rasta-sf__trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 16px 18px 16px 16px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; background: rgba(255, 255, 255, .03); }
.rasta-sf__trust-text { display: flex; align-items: center; gap: 12px; }
.rasta-sf__trust-text b { display: block; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.6; }
.rasta-sf__trust-text small { display: block; color: #7D89A3; font-size: 12px; line-height: 1.6; }
.rasta-sf__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rasta-sf__badges > * { display: grid; place-items: center; min-width: 84px; min-height: 84px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .6); }
.rasta-sf__badges img { display: block; width: auto; max-width: 96px; height: auto; max-height: 84px; margin: 0; cursor: pointer; }

/* نوار پایین */
.rasta-sf__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); }
.rasta-sf__copy { color: #7D89A3; font-size: 13px; line-height: 1.9; }
.rasta-sf__credit, .rasta-sf__credit:visited { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; color: #7D89A3; font-size: 13px; line-height: 1.9; }
.rasta-sf__credit b { color: #E6EAF2; font-weight: 600; transition: color .25s ease; }
.rasta-sf__credit em { padding: 0 9px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; color: #8DB2FF; font-size: 11.5px; font-style: normal; letter-spacing: .3px; transition: background .25s ease, color .25s ease; }
.rasta-sf__credit:hover b { color: #fff; }
.rasta-sf__credit:hover em { background: var(--t-blue); color: #fff; }
.rasta-sf__top, .rasta-sf__top:visited { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .05); color: #fff; transition: background .25s ease, transform .3s var(--t-ease); }
.rasta-sf__top:hover { background: var(--t-blue); color: #fff; transform: translateY(-3px); }
.rasta-sf__top svg { width: 18px; height: 18px; }

/* نوشته‌ی بزرگ پس‌زمینه */
.rasta-sf__word { position: absolute; right: 0; bottom: 0; left: 0; z-index: 0; display: flex; align-items: flex-start; justify-content: center; height: .78em; overflow: hidden; color: transparent; font-size: clamp(100px, 20vw, 320px); font-weight: 900; line-height: 1; white-space: nowrap; pointer-events: none; -webkit-text-stroke: 1px rgba(255, 255, 255, .07); }

/* واکنش‌گرا */
@media (max-width: 1100px) {
    .rasta-sf__brand { flex-basis: 100%; }
}
@media (max-width: 720px) {
    .rasta-sf { margin-top: 60px; }
    .rasta-sf.has-cta { margin-top: 40px; }
    .rasta-sf__cta { flex-direction: column; align-items: stretch; gap: 22px; padding: 30px 22px; border-radius: 24px; text-align: center; }
    .rasta-sf__cta .rasta-btn { justify-content: center; }
    .rasta-sf__body { padding-top: 48px; border-radius: 28px 28px 0 0; }
    .rasta-sf.has-cta .rasta-sf__body { margin-top: -70px; padding-top: 110px; }
    .rasta-sf__grid { gap: 32px 20px; }
    .rasta-sf__brand { text-align: center; }
    .rasta-sf__brand p { margin-inline: auto; }
    .rasta-sf__stats, .rasta-sf__social .rasta-socials { justify-content: center; }
    .rasta-sf__col { flex-basis: 100%; }
    .rasta-sf__col--menu { flex-basis: calc(50% - 10px); }
    .rasta-sf__trust { flex-direction: column; text-align: center; }
    .rasta-sf__trust-text { flex-direction: column; }
    .rasta-sf__badges { justify-content: center; }
    .rasta-sf__bottom { flex-direction: column; text-align: center; }
    .rasta-sf__credit { justify-content: center; margin-inline: auto; }
}




/* نشان رستا در لوگوی پیش‌فرض */
.rasta-logo__mark.is-brand { overflow: hidden; background: none; box-shadow: 0 10px 20px -10px rgba(37, 99, 235, .8); }
.rasta-logo__mark.is-brand svg { width: 100%; height: 100%; }


/* ================= جستجوی زنده ================= */
.rasta-sform__field { position: relative; display: flex; flex: 1; min-width: 0; }
.rasta-sform__field > svg { position: absolute; top: 50%; right: 18px; width: 20px; height: 20px; color: var(--t-muted); transform: translateY(-50%); pointer-events: none; transition: color .2s ease; }
.rasta-sform__field:focus-within > svg { color: var(--t-blue); }
.rasta-search__form .rasta-sform__field input[type="search"] { padding: 0 50px 0 48px; }
.rasta-search__form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.rasta-sform__spin { position: absolute; top: 50%; left: 18px; width: 18px; height: 18px; margin-top: -9px; border: 2px solid var(--t-blue-100); border-top-color: var(--t-blue); border-radius: 50%; opacity: 0; transition: opacity .2s ease; animation: rastaSrSpin .7s linear infinite; pointer-events: none; }
.rasta-sform.is-loading .rasta-sform__spin { opacity: 1; }
@keyframes rastaSrSpin { to { transform: rotate(360deg); } }

.rasta-sr { margin-top: 14px; padding: 6px; border: 1px solid var(--t-line); border-radius: 20px; background: #fff; animation: rastaDrop .25s var(--t-ease) both; }
.rasta-sr[hidden] { display: none; }
.rasta-sr__list { display: grid; gap: 2px; max-height: min(48vh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rasta-sr__item, .rasta-sr__item:visited { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 15px; color: var(--t-ink); text-decoration: none; transition: background .2s ease; }
.rasta-sr__item:hover, .rasta-sr__item.is-active { background: var(--t-soft); }
.rasta-sr__thumb { display: grid; flex: 0 0 56px; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 13px; background: var(--t-blue-50); color: rgba(47, 107, 255, .4); }
.rasta-sr__thumb img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
.rasta-sr__thumb svg { width: 22px; height: 22px; }
.rasta-sr__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rasta-sr__text b { display: -webkit-box; overflow: hidden; color: var(--t-ink); font-size: 14px; font-weight: 700; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; transition: color .2s ease; }
.rasta-sr__item:hover .rasta-sr__text b, .rasta-sr__item.is-active .rasta-sr__text b { color: var(--t-blue); }
.rasta-sr__text mark { padding: 0 2px; border-radius: 4px; background: rgba(47, 107, 255, .14); color: inherit; }
.rasta-sr__text small { overflow: hidden; color: var(--t-muted); font-size: 12px; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.rasta-sr__price { flex: 0 0 auto; color: var(--t-ink-2); font-size: 13px; font-weight: 700; line-height: 1.6; text-align: left; }
.rasta-sr__price del { display: block; color: var(--t-muted); font-size: 11.5px; font-weight: 400; }
.rasta-sr__price ins { text-decoration: none; }
.rasta-sr__price.is-free { padding: 3px 10px; border-radius: 999px; background: #ECFDF3; color: #067647; font-size: 12px; }
.rasta-sr__all, .rasta-sr__all:visited { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; padding: 11px; border-top: 1px dashed var(--t-line); border-radius: 0 0 15px 15px; color: var(--t-blue); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background .2s ease; }
.rasta-sr__all:hover, .rasta-sr__all.is-active { background: var(--t-blue-50); }
.rasta-sr__all svg { width: 16px; height: 16px; }
.rasta-sr__empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; text-align: center; }
.rasta-sr__empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 16px; background: var(--t-blue-50); color: var(--t-blue); }
.rasta-sr__empty-icon svg { width: 22px; height: 22px; }
.rasta-sr__empty b { color: var(--t-ink); font-size: 14.5px; font-weight: 700; }
.rasta-sr__empty small { max-width: 380px; color: var(--t-muted); font-size: 12.5px; line-height: 1.9; }
.rasta-search__panel.has-results .rasta-search__tags { display: none; }

@media (max-width: 720px) {
    .rasta-sr__list { max-height: 52vh; }
    .rasta-sr__thumb { flex-basis: 48px; width: 48px; height: 48px; border-radius: 12px; }
    .rasta-sr__price { font-size: 12px; }
}

/* ================= هیرو: دوستونه تا عرض ۹۰۰ پیکسل (زوم ۱۰۰٪ لپ‌تاپ‌ها) ================= */
@media (min-width: 901px) and (max-width: 1024px) {
    .rasta-w.rasta-hero .rasta-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; }
    .rasta-w.rasta-hero .rasta-hero__content { text-align: start; }
    .rasta-w.rasta-hero .rasta-hero__desc { margin-inline: 0; }
    .rasta-w.rasta-hero .rasta-hero__actions, .rasta-w.rasta-hero .rasta-hero__stats { justify-content: flex-start; }
    .rasta-w.rasta-hero .rasta-hero__visual { order: 0; max-width: none; margin-inline: 0; }
    .rasta-w.rasta-hero .rasta-hero__stats { gap: 8px; }
    .rasta-w.rasta-hero .rasta-hero__stat { padding: 10px 12px; }
}

/* ================= هدر آبی روشن (هماهنگ با هیرو) ================= */
.rasta-header {
    border-bottom: 1px solid rgba(47, 107, 255, .18);
    background:
        radial-gradient(38% 160% at 100% 0%, rgba(47, 107, 255, .22), transparent 70%),
        radial-gradient(30% 140% at 0% 100%, rgba(141, 178, 255, .28), transparent 70%),
        linear-gradient(180deg, #E3ECFF 0%, #EEF4FF 100%);
    isolation: isolate;
}

.rasta-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(47, 107, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 107, 255, .07) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(45% 140% at 85% 0%, #000 0%, transparent 100%);
    mask-image: radial-gradient(45% 140% at 85% 0%, #000 0%, transparent 100%);
    pointer-events: none;
}

.rasta-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    border-top: 1.5px dashed rgba(47, 107, 255, .2);
    pointer-events: none;
}

.rasta-header .rasta-hbtn,
.rasta-header .rasta-account__toggle {
    border-color: rgba(47, 107, 255, .16);
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 8px 18px -14px rgba(47, 107, 255, .55);
}

.rasta-header .rasta-hbtn:hover,
.rasta-header .rasta-hbtn:focus-visible,
.rasta-header .rasta-account__toggle:hover,
.rasta-header .rasta-account__toggle[aria-expanded="true"] {
    border-color: rgba(47, 107, 255, .35);
    background: #fff;
    color: var(--t-blue);
}

.rasta-header .rasta-nav__list > li > a {
    color: #24324F;
}

.rasta-header .rasta-nav__list > li:hover > a,
.rasta-header .rasta-nav__list > li:focus-within > a,
.rasta-header .rasta-nav__list > li.current-menu-item > a,
.rasta-header .rasta-nav__list > li.current-menu-ancestor > a {
    background: #fff;
    color: var(--t-blue);
    box-shadow: 0 8px 20px -12px rgba(47, 107, 255, .55), inset 0 0 0 1px rgba(47, 107, 255, .12);
}


/* کارت دوره: تصویر مربع کامل، بدون برش */
.rasta-ccard .rasta-ccard__media { aspect-ratio: 1 / 1; }


/* ویجت دوره‌ها: عنوان وسط، فلش‌ها و «همه‌ی دوره‌ها» گوشه‌ی چپ */
@media (min-width: 900px) {
    .rasta-courses .rasta-courses__head { position: relative; padding-inline: 250px; }
    .rasta-courses .rasta-courses__tools { position: absolute; bottom: 0; left: 0; }
}


@media (max-width: 899px) {
    .rasta-courses .rasta-courses__tools { align-self: flex-end; }
}

/* صفحه‌ی دوره: تصویر مربع کامل، بدون برش */
.rasta-sc__hero .rasta-sc__cover { aspect-ratio: 1 / 1 !important; height: auto !important; max-width: 460px; margin-inline: auto; }
.rasta-sc__hero .rasta-sc__cover > img { width: 100%; height: 100%; object-fit: cover; }



/* ================= دوره‌ی متغیر: گزینه‌ها در باکس خرید ================= */
.rasta-buy__variants { display: grid; gap: 8px; margin: 0 0 14px; }
.rasta-buy__variants-title { color: var(--t-muted); font-size: 12.5px; font-weight: 600; }
.rasta-buy__variant { position: relative; display: block; margin: 0; cursor: pointer; }
.rasta-buy__variant input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rasta-buy__variant-box { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--t-line); border-radius: 15px; background: #fff; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.rasta-buy__variant-box i { position: relative; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #C0C7D6; border-radius: 50%; transition: border-color .2s ease; }
.rasta-buy__variant-box i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--t-blue); transform: scale(0); transition: transform .2s ease; }
.rasta-buy__variant-box b { flex: 1; min-width: 0; color: var(--t-ink); font-size: 13.5px; font-weight: 600; line-height: 1.7; }
.rasta-buy__variant-box em { flex: 0 0 auto; color: var(--t-ink-2); font-size: 12.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.rasta-buy__variant:hover .rasta-buy__variant-box { border-color: var(--t-blue-100); }
.rasta-buy__variant input:checked + .rasta-buy__variant-box { border-color: var(--t-blue); background: var(--t-blue-50); box-shadow: 0 10px 22px -16px rgba(47, 107, 255, .8); }
.rasta-buy__variant input:checked + .rasta-buy__variant-box i { border-color: var(--t-blue); }
.rasta-buy__variant input:checked + .rasta-buy__variant-box i::after { transform: scale(1); }
.rasta-buy__variant input:checked + .rasta-buy__variant-box em { color: var(--t-blue); }
.rasta-buy__variant input:focus-visible + .rasta-buy__variant-box { outline: 2px solid var(--t-blue); outline-offset: 2px; }
.rasta-buy__variants.is-locked { opacity: .6; pointer-events: none; }
.rasta-ccard__price .rasta-ccard__from { margin-inline: 0 4px; }


/* ===== انیمیشن پرواز به سبد خرید ===== */
.rasta-fly {
    position: fixed;
    z-index: 100000;
    width: 72px;
    height: 72px;
    pointer-events: none;
    will-change: transform;
}

.rasta-fly__item {
    width: 100%;
    height: 100%;
    border: 3px solid #fff;
    border-radius: 18px;
    background: #2563eb center / cover no-repeat;
    box-shadow: 0 14px 30px -8px rgba(37, 99, 235, .55), 0 0 0 1px rgba(37, 99, 235, .15);
    will-change: transform;
}

.rasta-fly__item.is-empty {
    background-image: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.rasta-fly__spark {
    position: fixed;
    z-index: 99999;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, .9);
    pointer-events: none;
}

.rasta-fly__spark.is-gold {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, .9);
}

.rasta-header__cart.is-bump {
    animation: rasta-cart-bump .6s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes rasta-cart-bump {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.22) rotate(-8deg); }
    55%  { transform: scale(.94) rotate(4deg); }
    100% { transform: scale(1) rotate(0); }
}

.rasta-cart-ring {
    position: absolute;
    inset: -3px;
    border: 2px solid #3b82f6;
    border-radius: inherit;
    pointer-events: none;
    animation: rasta-cart-ring .8s ease-out forwards;
}

@keyframes rasta-cart-ring {
    from { transform: scale(.8); opacity: .9; }
    to   { transform: scale(1.9); opacity: 0; }
}

.rasta-cart-plus {
    position: absolute;
    top: -6px;
    left: 50%;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
    animation: rasta-cart-plus .9s ease-out forwards;
}

@keyframes rasta-cart-plus {
    0%   { opacity: 0; transform: translate(-50%, 6px); }
    25%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -24px); }
}

.js-rasta-cart-count.is-pop {
    animation: rasta-badge-pop .5s cubic-bezier(.3, 1.8, .5, 1);
}

@keyframes rasta-badge-pop {
    0%   { transform: scale(.4); }
    60%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .rasta-header__cart.is-bump,
    .js-rasta-cart-count.is-pop { animation: none; }
    .rasta-cart-ring,
    .rasta-cart-plus { display: none; }
}

/* سبد شناور موقت (وقتی هدر از دید خارج است) */
.rasta-cart-dock {
    position: fixed;
    top: calc(14px + var(--wp-admin--admin-bar--height, 0px));
    z-index: 100001;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff;
    color: #1d4ed8;
    text-decoration: none;
    box-shadow: 0 10px 28px -8px rgba(15, 42, 107, .35), 0 0 0 1px rgba(37, 99, 235, .12);
}

.rasta-cart-dock svg {
    width: 22px;
    height: 22px;
}

/* ===== ویجت دوره‌های رایگان (هدیه): تمام‌عرض در موبایل ===== */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: clip;
    }

    .rasta-courses.rasta-courses--gift {
        width: 100vw;
        max-width: 100vw;
        margin-inline: calc(50% - 50vw);
        border-radius: 0;
        box-shadow: none;
    }
}


/* ================= کاربران آنلاین (AG Stats) ================= */

/* هدر (دسکتاپ و تبلت) */
.rasta-header .ag-stats-online {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(47, 107, 255, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 8px 18px -14px rgba(47, 107, 255, .55);
    color: var(--t-ink-2);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: default;
    animation: rastaDrop .35s var(--t-ease) both;
}

/* منوی کشویی (موبایل) */
.rasta-drawer .ag-stats-online {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--t-line);
    border-radius: 14px;
    background: var(--t-soft);
    color: var(--t-ink-2);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

/* اجزای مشترک */
.ag-stats-online[hidden] {
    display: none !important;
}

:is(.rasta-header, .rasta-drawer) .ag-stats-online__dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #12B76A;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, .22);
    animation: agOnlinePulse 2s ease-in-out infinite;
}

:is(.rasta-header, .rasta-drawer) .ag-stats-online__num {
    color: var(--t-ink);
    font-size: 15px;
    font-weight: 800;
}

:is(.rasta-header, .rasta-drawer) .ag-stats-online__label {
    color: var(--t-muted);
    font-weight: 600;
}

@keyframes agOnlinePulse {
    50% { box-shadow: 0 0 0 7px rgba(18, 183, 106, 0); }
}

/* موبایل: حذف از هدر، نمایش در منوی کشویی */
@media (max-width: 720px) {
    .rasta-header .ag-stats-online {
        display: none !important;
    }

    .rasta-drawer .ag-stats-online:not([hidden]) {
        display: flex !important;
    }
}