/* Site header, «دوره‌ها» menu, menu panel and footer (header.php, parts/site-chrome-mega.php, header-phone-menu.php, footer.php). */
.sc-head,
.sc-drawer,
.sc-foot {
	--sc-deep: var(--ye-deep);
	--sc-accent: var(--ye-accent);
	--sc-ink: var(--ye-ink);
	--sc-muted: var(--ye-muted);
	--sc-border: var(--ye-border);
	--sc-tint: var(--ye-tint);
	--sc-gold: var(--ye-gold);
	--sc-night: var(--ye-night);
}
.sc-head *,
.sc-drawer *,
.sc-foot * { box-sizing: border-box; }
.sc-head a,
.sc-drawer a,
.sc-foot a { text-decoration: none; }

/* Buttons */
.sc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 12px; font-size: 15px; font-weight: var(--ye-w-bold); line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.sc-btn--primary,
.sc-btn--primary:visited { background: var(--sc-deep); color: #fff; box-shadow: 0 8px 18px rgba(46, 31, 84, .18); }
.sc-btn--primary:hover,
.sc-btn--primary:focus { background: var(--ye-deep-hover); color: #fff; }
.sc-btn--ghost,
.sc-btn--ghost:visited { border: 1px solid var(--sc-border); background: #fff; color: var(--sc-ink); }
.sc-btn--ghost:hover,
.sc-btn--ghost:focus { border-color: var(--ye-border-accent); color: var(--sc-deep); }
.sc-btn--light,
.sc-btn--light:visited { background: #fff; color: var(--sc-deep); }
.sc-btn--light:hover,
.sc-btn--light:focus { background: var(--ye-tint-strong); color: var(--sc-deep); }

/* Header */
.headbar.sc-head { position: relative; z-index: 990; padding: 0; border-bottom: 1px solid var(--sc-border); background: rgba(255, 255, 255, .97); box-shadow: 0 6px 22px rgba(46, 31, 84, .06); }
.headbar.sc-head--sticky { position: sticky; top: 0; }
body.admin-bar .headbar.sc-head--sticky { top: 32px; }
html:has(.sc-head--sticky) { scroll-padding-top: 90px; }
/* Course library sections had their own gap for the jump from the home page; the header now leaves room. */
html:has(.sc-head--sticky) .course-library-section { scroll-margin-top: 12px; }
.sc-head__in { position: relative; display: flex; align-items: center; gap: 18px; max-width: 1170px; height: 74px; margin: 0 auto; padding: 0 15px; }
.sc-logo { display: block; flex: 0 0 auto; }
.sc-logo img { display: block; width: auto; height: 46px; }

.sc-nav-wrap { display: flex; align-self: stretch; }
.sc-nav { display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sc-nav__item { display: flex; align-items: center; list-style: none; }
.sc-nav__link,
.sc-nav__link:visited { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--sc-ink); font-size: 15.5px; font-weight: 700; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.sc-nav__link:hover,
.sc-nav__link:focus,
.sc-nav__item--mega:hover > .sc-nav__link,
.sc-nav__item--mega.is-open > .sc-nav__link { background: var(--sc-tint); color: var(--sc-deep); }
.sc-nav__link .fa-graduation-cap { color: var(--sc-accent); }
.sc-nav__caret { font-size: 14px; opacity: .55; }

.sc-actions { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.sc-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--sc-border); border-radius: 12px; background: #fff; color: var(--sc-ink); font-size: 17px; line-height: 1; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.sc-icon:hover,
.sc-icon:focus { border-color: var(--ye-border-accent); color: var(--sc-deep); }

/* Cart, messages and currency keep their own markup; they take the header's button look here. */
.sc-head .header-action-wrapper { float: none; margin: 0; }
.sc-head .header-action-btn,
.sc-head .header-action-btn.yt-currency-btn { float: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin: 0; padding: 0; border: 1px solid var(--sc-border); border-radius: 12px; background: #fff; color: var(--sc-ink); font-size: 17px; line-height: 1; }
.sc-head .header-action-btn:hover,
.sc-head .header-action-btn.active { border-color: var(--ye-border-accent); background: #fff; color: var(--sc-deep); }
.sc-head .header-action-btn .count:empty { display: none; }
.sc-head .header-action-btn .count,
.sc-head .sadoo-mini-cart__count { position: absolute; top: -7px; left: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sc-gold); color: #2b1600; font-size: 12px; font-weight: var(--ye-w-bold); line-height: 20px; text-align: center; }
.sc-currency .yt-currency-switcher-form { display: flex; }
.sc-head .sc-currency .header-action-btn.yt-currency-btn { width: auto; min-width: 64px; padding: 0 12px; color: var(--sc-muted); font-size: 13.5px !important; font-weight: 700; }
.sc-head .msgboard-wrapper .msgboard-msgs { top: calc(100% + 10px); margin-top: 0; }

.sc-head__cta { display: inline-flex; }
.sc-menu-btn { display: none; }
.sc-menu-btn--account { display: inline-flex; }
.sc-menu-btn__bars { display: none; }

/* «دوره‌ها» menu */
.sc-mega { position: absolute; top: 100%; right: 15px; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 250px; gap: 8px 24px; width: min(960px, calc(100% - 30px)); padding: 22px 24px 18px; border: 1px solid var(--sc-border); border-radius: 0 0 20px 20px; background: #fff; box-shadow: 0 24px 60px rgba(26, 5, 54, .16); visibility: hidden; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .16s ease .12s, transform .16s ease .12s, visibility 0s linear .28s; }
.sc-nav__item--mega:hover .sc-mega,
.sc-nav__item--mega:focus-within .sc-mega,
.sc-nav__item--mega.is-open .sc-mega { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: .05s, .05s, 0s; }
.sc-nav__item--mega.is-closed .sc-mega { visibility: hidden; opacity: 0; pointer-events: none; }
.sc-mega__col ul { margin: 0; padding: 0; list-style: none; }
.sc-mega__col li { list-style: none; }
.sc-mega__title { margin: 0 0 8px; color: var(--sc-muted); font-size: 13px; font-weight: var(--ye-w-bold); }
.sc-mega__col a,
.sc-mega__col a:visited { display: flex; align-items: center; gap: 9px; margin: 0 -10px; padding: 8px 10px; border-radius: 10px; color: var(--sc-ink); font-size: 15px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.sc-mega__col a:hover,
.sc-mega__col a:focus { background: var(--sc-tint); color: var(--sc-deep); }
.sc-mega__col small { color: var(--ye-faint); font-size: 12px; font-weight: 600; }
.sc-mega__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #d9c6f1; }
.sc-mega__card { grid-row: span 2; grid-column: 4; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 18px; border-radius: 16px; background: linear-gradient(140deg, var(--ye-deep), var(--ye-accent)); color: #fff; }
.sc-mega__card strong { font-size: 16.5px; line-height: 1.6; }
.sc-mega__card p { margin: 0; color: rgba(255, 255, 255, .86); font-size: 13.5px; line-height: 1.9; }
.sc-mega__card .sc-btn { height: 40px; margin-top: auto; font-size: 14px; }
.sc-mega__foot { grid-column: 1 / 4; display: flex; align-items: center; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--sc-border); }
.sc-mega__foot a,
.sc-mega__foot a:visited { display: inline-flex; align-items: center; gap: 6px; color: var(--sc-accent); font-size: 14.5px; font-weight: var(--ye-w-bold); }

/* Menu panel */
html.sc-drawer-open,
html.sc-drawer-open body { overflow: hidden; }
.sc-drawer { position: fixed; inset: 0; z-index: 2147483000; direction: rtl; text-align: right; }
.sc-drawer[hidden] { display: none; }
.sc-drawer__shade { position: absolute; inset: 0; background: rgba(26, 5, 54, .45); opacity: 0; transition: opacity .25s ease; }
.sc-drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; width: min(88vw, 370px); background: #fff; box-shadow: 10px 0 40px rgba(26, 5, 54, .2); overflow-y: auto; overscroll-behavior: contain; outline: none; transform: translateX(-104%); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.sc-drawer.is-open .sc-drawer__shade { opacity: 1; }
.sc-drawer.is-open .sc-drawer__panel { transform: none; }
.sc-drawer__top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--sc-border); background: #fff; }
.sc-drawer__logo img { display: block; width: auto; height: 36px; }
.sc-drawer__body { padding: 14px 16px 28px; }
.sc-drawer__auth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sc-drawer__auth .sc-btn { height: 46px; }
.sc-drawer__user { margin-bottom: 12px; padding: 14px; border: 1px solid var(--sc-border); border-radius: 16px; background: var(--ye-tint-soft); }
.sc-drawer__user > strong { display: block; margin-bottom: 10px; color: var(--sc-ink); font-size: 16px; }
.sc-drawer__user > .sc-btn { width: 100%; height: 44px; }
.sc-drawer__account { margin: 10px 0 0; padding: 0; list-style: none; }
.sc-drawer__account li { list-style: none; border-top: 1px solid #efe8f7; }
.sc-drawer__account a,
.sc-drawer__account a:visited { display: block; padding: 10px 2px; color: var(--sc-muted); font-size: 15px; font-weight: 600; }
.sc-drawer__account a:hover { color: var(--sc-deep); }
.sc-drawer__search { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; margin: 0 0 6px; padding: 0 14px; border: 1px solid var(--sc-border); border-radius: 12px; background: var(--sc-tint); color: #8e849b; font: inherit; font-size: 14.5px; text-align: right; cursor: pointer; }
.sc-dlist { margin: 0; padding: 0; list-style: none; }
.sc-dlist > li { list-style: none; border-bottom: 1px solid #f1ecf7; }
.sc-dlist > li > a,
.sc-dlist > li > a:visited,
.sc-dlist summary { display: flex; align-items: center; gap: 12px; padding: 12px 2px; color: var(--sc-ink); font-size: 16px; font-weight: 700; list-style: none; cursor: pointer; }
.sc-dlist summary::-webkit-details-marker { display: none; }
.sc-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--sc-tint); color: var(--sc-accent); font-size: 16px; }
.sc-dlist__caret { margin-right: auto; color: var(--ye-faint); transition: transform .2s ease; }
.sc-dlist details[open] .sc-dlist__caret { transform: rotate(180deg); }
.sc-dsub { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 0 14px; }
.sc-dsub a,
.sc-dsub a:visited { padding: 9px 10px; border: 1px solid #f0e8f9; border-radius: 10px; background: var(--ye-tint-soft); color: var(--sc-ink); font-size: 13.5px; font-weight: 650; line-height: 1.5; }
.sc-dsub a.sc-dsub__all { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--sc-accent); font-weight: var(--ye-w-bold); }
.sc-drawer__cta { margin-top: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(140deg, var(--ye-deep), var(--ye-accent)); color: #fff; }
.sc-drawer__cta strong { display: block; font-size: 15.5px; }
.sc-drawer__cta p { margin: 4px 0 12px; color: rgba(255, 255, 255, .86); font-size: 13px; line-height: 1.9; }
.sc-drawer__cta .sc-btn { width: 100%; }
.sc-drawer__meta { display: flex; gap: 8px; margin-top: 14px; }
.sc-drawer__currency,
.sc-drawer__region,
.sc-drawer__region:visited { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--sc-border); border-radius: 12px; background: #fff; color: var(--sc-muted); font-size: 13.5px; font-weight: 700; }
.sc-drawer__currency .yt-currency-switcher-form { display: inline-flex; }
.sc-drawer__currency .header-action-btn.yt-currency-btn { float: none; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; color: var(--sc-deep); font-size: 13.5px !important; font-weight: var(--ye-w-bold); line-height: 1.4; }

/* Footer */
.main-footer.sc-foot { margin-top: 60px; padding: 0; border-top: 0; color: rgba(255, 255, 255, .78); }
.sc-foot .sc-foot__app { position: relative; z-index: 1; padding: 0 15px; }
.sc-foot .app-bar-wrapper { margin-top: 0; }
.sc-foot .app-bar { margin-bottom: 0; }
.sc-foot__dark { margin-top: -90px; padding-top: 90px; background: var(--sc-night); }
.sc-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1170px; margin: 0 auto; padding: 28px 15px; border-bottom: 1px solid rgba(255, 255, 255, .08); list-style: none; }
.sc-trust li { display: flex; align-items: center; gap: 12px; list-style: none; }
.sc-trust i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .08); color: var(--sc-gold); font-size: 19px; }
.sc-trust p { margin: 0; }
.sc-trust strong { display: block; color: #fff; font-size: 15px; line-height: 1.6; }
.sc-trust span { display: block; font-size: 13px; line-height: 1.7; }
.sc-foot__main { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr 1fr; gap: 28px; max-width: 1170px; margin: 0 auto; padding: 38px 15px 26px; }
.sc-brand__logo { display: inline-flex; padding: 10px 14px; border-radius: 14px; background: #fff; }
.sc-brand__logo img { display: block; width: auto; height: 38px; }
.sc-brand__tag { margin: 16px 0 0; color: #fff; font-size: 16px; font-weight: var(--ye-w-bold); line-height: 1.8; }
.sc-brand__tag p { margin: 0; }
.sc-brand > p { margin: 6px 0 16px; font-size: 14.5px; line-height: 2.05; }
.sc-social { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-social a,
.sc-social a:visited { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; font-weight: 700; }
.sc-social a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.sc-col summary { display: block; margin: 0 0 12px; color: #fff; font-size: 15.5px; font-weight: var(--ye-w-bold); list-style: none; cursor: default; }
.sc-col summary::-webkit-details-marker { display: none; }
.sc-col summary .fa { display: none; }
.sc-col ul { margin: 0; padding: 0; list-style: none; }
.sc-col li { list-style: none; }
.sc-col li a,
.sc-col li a:visited { display: inline-block; padding: 5px 0; color: rgba(255, 255, 255, .74); font-size: 14.5px; line-height: 1.7; }
.sc-col li a:hover,
.sc-col li a:focus { color: #fff; }
.sc-foot__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1170px; margin: 0 auto; padding: 16px 15px 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13.5px; }
.sc-foot__bottom p { margin: 0; }
.sc-foot__bottom a,
.sc-foot__bottom a:visited { color: rgba(255, 255, 255, .9); font-weight: 700; }
.sc-foot__bottom a:hover { color: #fff; }
.sc-region { display: inline-flex; align-items: center; gap: 8px; }
.sc-appstrip { display: none; }

/* Inner-page hero buttons (header-hero.php): one line between joined buttons. */
.small-hero .btns a + a { border-right: none; }

/* Full-screen layers that sat level with the old header: keep them over the sticky one. */
.mag-dl-bg { z-index: 99990; }
.mag-dl-pop { z-index: 99991; }

@media (max-width: 1239px) {
	.sc-head__in { gap: 12px; }
	.sc-nav__link,
	.sc-nav__link:visited { padding: 0 9px; font-size: 15px; }
	.sc-head .sc-currency .header-action-btn.yt-currency-btn { min-width: 56px; padding: 0 8px; }
}

@media (max-width: 1079px) {
	.sc-head__in { height: 64px; gap: 10px; }
	.sc-logo img { height: 38px; }
	.sc-nav-wrap,
	.sc-actions .sc-currency,
	.sc-actions .sc-head__cta { display: none; }
	.sc-menu-btn { display: inline-flex; }
	.sc-menu-btn__bars { display: inline-block; }
	.sc-menu-btn__user { display: none; }
	html:has(.sc-head--sticky) { scroll-padding-top: 80px; }
}

@media (max-width: 991px) {
	.sc-trust { grid-template-columns: 1fr 1fr; padding: 22px 15px; }
	.sc-foot__main { grid-template-columns: 1fr 1fr; }
	.sc-brand { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
	body.admin-bar .headbar.sc-head--sticky { top: 46px; }
}

@media (max-width: 767px) {
	.sc-head__in { padding: 0 12px; }
	.sc-actions { gap: 6px; }
	.sc-head .msgboard-wrapper { position: static; }
	.sc-head .msgboard-wrapper .msgboard-msgs { top: calc(100% + 6px); right: 12px; left: 12px; width: auto; }
	.sc-foot .app-bar-wrapper { display: none; }
	.sc-appstrip,
	.sc-appstrip:visited { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: linear-gradient(140deg, var(--ye-deep), var(--ye-accent)); box-shadow: 0 14px 30px rgba(46, 31, 84, .22); color: #fff; }
	.sc-appstrip > .fa { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .14); color: var(--sc-gold); font-size: 26px; }
	.sc-appstrip__text strong { display: block; color: #fff; font-size: 15px; }
	.sc-appstrip__text span { display: block; color: rgba(255, 255, 255, .84); font-size: 12.5px; line-height: 1.8; }
	.sc-appstrip__btn { margin-right: auto; padding: 9px 12px; border-radius: 10px; background: #fff; color: var(--sc-deep); font-size: 13px; font-weight: var(--ye-w-bold); white-space: nowrap; }
	.sc-foot__dark { margin-top: -40px; padding-top: 40px; }
	.sc-trust { gap: 16px 12px; }
	.sc-trust i { flex-basis: 38px; width: 38px; height: 38px; font-size: 16px; }
	.sc-trust strong { font-size: 14px; }
	.sc-trust span { font-size: 12px; }
	.sc-foot__main { grid-template-columns: 1fr; gap: 0; padding: 24px 15px 8px; }
	.sc-brand { padding-bottom: 18px; }
	.sc-col { border-top: 1px solid rgba(255, 255, 255, .08); }
	.sc-col summary { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 15px 0; cursor: pointer; }
	.sc-col summary .fa { display: inline-block; opacity: .6; transition: transform .2s ease; }
	.sc-col[open] summary .fa { transform: rotate(180deg); }
	.sc-col ul { padding-bottom: 12px; }
	.sc-foot__bottom { flex-direction: column; padding: 16px 15px 96px; text-align: center; }
}

@media (max-width: 600px) {
	body.admin-bar .headbar.sc-head--sticky { top: 0; }
}

@media (max-width: 419px) {
	.sc-head__in { gap: 8px; }
	.sc-logo img { height: 32px; }
	.sc-icon,
	.sc-head .header-action-btn { width: 40px; height: 40px; }
}

@media (max-width: 359px) {
	.small-hero .btns a { padding: 0 10px; font-size: 13px; }
	.sc-logo img { height: 28px; }
	.sc-icon,
	.sc-head .header-action-btn { width: 36px; height: 36px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.sc-mega,
	.sc-drawer__panel,
	.sc-drawer__shade { transition: none; }
}
