/* ==========================================================================
   19-mobile-paging: صفحه‌به‌صفحه شدنِ نسخه‌ی موبایل + جا شدن محتوای هر صفحه در یک قاب
   قانون مهم: همه‌ی قاعده‌های این فایل داخل @media (max-width:760px) هستند.
   هیچ قاعده‌ای بیرون از این بلوک‌ها نیست، پس دسکتاپ و تبلت بزرگ دقیقاً مثل قبل می‌مونن.
   قاب هر صفحه = var(--page-h) = ارتفاع صفحه منهای هدر بالا و نوار پایین.
   ========================================================================== */

@media (max-width:760px){

/* ---------- ۱) اسکرول لمسی صفحه‌به‌صفحه: یک کشیدنِ انگشت = یک صفحه ---------- */
html{scroll-snap-type:y mandatory;scroll-behavior:auto;overscroll-behavior-y:none}
.screen-1,.screen-2,.screen-3,.screen-5,#about,#path,#courses,#instructors,
#audience .s9-head,#audience .s9-method,#faq .sp-hero,#faq .sp-side,#faq .sp-card,#contact .nf-top,#contact .nf-cols{scroll-snap-align:start;scroll-snap-stop:always}
/* صفحه‌ای که بلندتر از قابه (سوالات، فوتر): هم بالا و هم پایینش نقطه‌ی توقفه و وسطش آزاد اسکرول می‌شه */
/* overflow:hidden باعث می‌شه بچه‌ها به خود صفحه snap بشن نه به اسکرول اصلی؛ clip این مشکل رو نداره */
#audience,#faq,:root:root footer#contact.nf{overflow:clip}
#audience{scroll-snap-align:none}
/* content-visibility:auto بچه‌های صفحه رو از نقطه‌ی توقف می‌ندازه؛ برای صفحه‌های چندتوقفه خاموشش می‌کنیم */
#audience.page-far,#faq.page-far{content-visibility:visible}

/* ---------- ۲) صفحه ۲: اسلایدر کارت‌ها ---------- */
.screen-2{padding:.5rem max(1.1rem,env(safe-area-inset-left))}
.bn-main{padding:.5rem .5rem 0}
.bn-left,.bn-col3,.bn-col4{gap:.45rem}
.bn-col3,.bn-col4{margin-top:.45rem}
.bn-hero{aspect-ratio:16/7.2}
.bn-hero h2{font-size:clamp(1.3rem,6vw,1.8rem)}
.bn-hero p{font-size:.8rem;margin-top:.2rem}
.bn-hero-txt{bottom:.75rem}
.bn-text>.bn-in,.bn-card-txt{padding:.7rem .95rem}
.bn-text h3,.bn-card h3{font-size:1rem}
.bn-text p,.bn-card p{font-size:.78rem;line-height:1.6;margin-top:.2rem}
.bn-card.has-pic{min-height:0}
.bn-card.has-pic .bn-img{height:38%}
.bn-ctrl{padding:.45rem .5rem .55rem}
.bn-ctrl .bn-left{gap:.45rem}
.bn-btn{min-height:2.6rem;font-size:.85rem}

/* ---------- ۳) صفحه ۳: محیط کدنویسی (مأموریت‌ها) ---------- */
.screen-3{height:var(--page-h);min-height:0;padding-block:.5rem}
.screen-3 .pz{height:100%;display:flex;flex-direction:column;min-height:0;padding-inline:max(.9rem,env(safe-area-inset-left))}
.screen-3 .pz-head{flex:none;margin-bottom:.45rem;max-width:none}
.screen-3 .pz-head h2{font-size:1.2rem;line-height:1.35;margin:0 0 .15rem}
.screen-3 .pz-head p{font-size:.78rem;line-height:1.55}
.screen-3 .pz-win{flex:1 1 0;min-height:0;height:auto;max-height:none;width:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);padding:6px;gap:6px;border-radius:12px}
/* لیست مأموریت‌ها: نوار افقی کم‌ارتفاع (برچسب و XP دسکتاپ در موبایل لازم نیست) */
.screen-3 .pz-side{display:block;padding:0;overflow:visible}
.screen-3 .pz-side .pz-brand,.screen-3 .pz-side .pz-lab,.screen-3 .pz-side .pz-xp{display:none}
.screen-3 #pzList{display:flex;flex-direction:row;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:1px 2px}
.screen-3 #pzList::-webkit-scrollbar{display:none}
.screen-3 .pz-m{flex:none;width:auto;min-height:36px;height:36px;padding:0 12px;border:1px solid var(--ln);border-radius:99px;background:rgba(255,255,255,.03)}
.screen-3 .pz-m[aria-current=true]{background:rgba(110,139,255,.16);border-color:rgba(110,139,255,.5)}
.screen-3 .pz-m b{width:12px;height:12px}
.screen-3 .pz-m .pz-en{font-size:.78rem}
.screen-3 .pz-m .pz-fa{font-size:.7rem;max-width:7rem}
.screen-3 .pz-main{min-height:0;flex:1 1 0}
.screen-3 .pz-top{padding:3px 6px;gap:6px}
.screen-3 .pz-tab{padding:3px 8px;font-size:.72rem}
.screen-3 .pz-act{gap:0}
.screen-3 .pz-btn,.screen-3 .pz-run{min-height:38px;padding:0 9px;font-size:.78rem}
.screen-3 .pz-run kbd{display:none}
.screen-3 .pz-task{padding:6px 10px;font-size:.82rem;line-height:1.6}
.screen-3 .pz-exp{font-size:.72rem;margin-top:2px}
.screen-3 .pz-ed{flex:1 1 0;min-height:76px;font-size:14px;line-height:24px}
.screen-3 .pz-g{width:36px;padding-right:8px}
.screen-3 .pz-kb{display:none}
.screen-3 .pz-out{min-height:48px;max-height:5.6rem;padding:6px 12px;font-size:.8rem}
.screen-3 .pz-st{padding:2px 10px}
.screen-3 .pz-task code,.screen-3 .pz-task bdi{white-space:nowrap}

/* ---------- ۴) صفحه ۵: ویدیوی اختصاصی هر جلسه ---------- */
#screen5.screen-5{height:var(--page-h);min-height:0}
#screen5.screen-5>.vault{min-height:0;height:100%;padding:.5rem 1.1rem .6rem;gap:.4rem}
#screen5 .vault-intro{margin-bottom:0;gap:.3rem}
#screen5 .vault-intro h3{font-size:1.45rem;line-height:1.3}
#screen5 .vault-intro-aside p,#screen5 .vault-intro>p{font-size:.8rem;line-height:1.6}
#screen5 .vault-chips{display:none}
#screen5 .vault-tag{padding:.2rem .6rem;font-size:.75rem}
#screen5 .vault-ring-wrap{flex:1 1 0;min-height:0}
#screen5 .vault-panel{gap:.5rem;padding:.55rem;overflow:hidden}
#screen5 .vault-now-playing{height:5.2rem;min-height:0}
#screen5 .vault-episode-list li:nth-child(n+4){display:none}
#screen5 .vault-episode-list li{padding-block:.3rem}
#screen5 .vault-side{gap:.4rem}
#screen5 .vault-ring-stat{min-height:0;padding:0}
#screen5 .vault-points{gap:.35rem}
#screen5 .vault-points li{padding:0;min-height:0}
#screen5 .vault-points li span:not(.vault-point-icon){display:none}
#screen5 .vault-fomo{padding:.55rem .9rem;margin:0}

/* ---------- ۵) مسیر یادگیری / دوره‌ها ---------- */
#path.screen-7,#courses.screen-8{height:var(--page-h);min-height:0}
#path .s7-shell{height:100%;padding-block:.6rem;gap:.5rem;justify-content:space-between}
#path .s7-head{margin:0}
#path .s7-head h2{font-size:1.7rem;line-height:1.3}
#path .s7-head p{font-size:.8rem;line-height:1.6}
#path .s7-board{flex:1 1 auto;min-height:0}
#courses .s8-wrap{height:100%;padding-block:.6rem;gap:.5rem}
#courses .s8-head{position:static;gap:.4rem}
#courses .s8-head h2{font-size:1.6rem;line-height:1.3}
#courses .s8-head p:not(.s8-kicker){font-size:.8rem;line-height:1.55}
#courses .s8-cta{min-height:42px}
#courses .s8-grid{flex:1 1 auto;min-height:0}
#courses .course{min-height:0}
#courses .course{padding:.8rem .9rem;gap:.35rem}
#courses .course h3{font-size:1.3rem;margin:0}
#courses .course>p,#courses .course-desc{font-size:.8rem;line-height:1.55;margin:0}
#courses .course-facts li,#courses .course-facts>*{padding-block:.28rem;font-size:.8rem}
#courses .course-facts li:nth-last-child(-n+2){display:none}
#courses .course-cta{min-height:42px;margin-top:.2rem}
#courses .course-num,#courses .course>strong:first-child{font-size:2rem;line-height:1}

/* ---------- ۶) مخاطبان: دو توقف (انتخاب مسیر | روش آموزش) ---------- */
#audience .s9-head{position:relative!important;top:auto!important;padding-block:.4rem}
#audience .s9-head h2{font-size:1.65rem;line-height:1.3}
#audience .s9-shell{gap:.6rem}
#audience .s9-main{gap:.8rem}
#audience .s9-paths{min-height:0}
#audience .s9-method{min-height:calc(var(--page-h) - 1.2rem);height:auto;padding:.9rem .9rem 1rem;gap:.6rem;justify-content:center}
#audience .s9-method h3{font-size:1.2rem;line-height:1.4;margin:0}
#audience .s9-method>p,#audience .s9-method header p{font-size:.78rem;line-height:1.55;margin:.2rem 0 0}
#audience .s9-method ol,#audience .s9-method ul{gap:.5rem}
#audience .s9-method li{padding:.55rem .6rem;min-height:0}
#audience .s9-method li p{font-size:.7rem;line-height:1.45;margin:.15rem 0 0}
#audience .s9-method li h4,#audience .s9-method li strong{font-size:.88rem}
#audience .s9-col-title{font-size:1.1rem;line-height:1.4;margin:0}
#audience .s9-col-sub{font-size:.76rem;line-height:1.5;margin:0}
#audience .s9-loop{gap:.45rem}
#audience .s9-step{padding:.5rem .6rem;min-height:0;height:auto;gap:.15rem}
#audience .s9-num{width:2rem;height:2rem;font-size:.75rem}
#audience .s9-step h4{font-size:.85rem;margin:0}
#audience .s9-step p{font-size:.68rem;line-height:1.4;margin:0}
#audience .s9-method .s9-cta,#audience .s9-method a{min-height:42px}
#audience .s9-loop{flex:0 0 auto;grid-auto-rows:auto;align-content:start}
#audience .s9-method{margin-top:max(0px,calc(var(--page-h) - 188px - 308px - 4rem))}

}

/* ==========================================================================
   گوشی‌های کوتاه (ارتفاع ≤ ۷۲۰): متن‌های فرعی کمتر، فاصله‌ها فشرده‌تر؛ باز هم هر صفحه توی یک قاب می‌مونه
   ========================================================================== */
@media (max-width:760px) and (max-height:720px){
.bn-text p,.bn-card p{display:none}
.bn-hero{aspect-ratio:16/6}
#about .s6-shell{gap:.5rem;padding-block:.5rem}
#about .s6-head{margin:0}
#about .s6-head h2{font-size:1.7rem;line-height:1.3}
#about .s6-head p{display:none}
#about .s6-card{height:auto}
#about .s6-vis{min-height:0!important;height:9.5rem}
#about .s6-txt{padding-block:.5rem}
#about .s6-txt p{font-size:.78rem;line-height:1.55}
#path .s7-head p{display:none}
#path .s7-head h2{font-size:1.4rem}
#path .s7-t{min-height:0}
#path .s7-t>p,#path .s7-t p{display:none}
#courses .s8-kicker{display:none}
#courses .s8-cta{min-height:36px}
#courses .course{padding:.55rem .8rem}
#courses .course h3{font-size:1.15rem}
#courses .course-num,#courses .course>strong:first-child{font-size:1.4rem}
#courses .course-facts li{padding-block:.2rem}
#path .s7-t pre,#path .s7-t .s7-code{max-height:5.2rem;overflow:hidden}
#courses .s8-head p:not(.s8-kicker){display:none}
#courses .s8-head h2{font-size:1.4rem}
#courses .course-facts li:nth-child(n+4){display:none}
#courses .course>p,#courses .course-desc{display:none}
#audience .s9-head h2{font-size:1.35rem}
#audience .s9-method{min-height:0;margin-top:0}
#audience .s9-step p{display:none}
.screen-3 .pz-head p{display:none}
#screen5 .vault-intro-aside p{display:none}
}

/* ==========================================================================
   v2: ارتفاع واقعی قاب در Chrome اندروید + کارت‌های افقی → چیدمان جاشو + صفحه‌های چندقسمتی
   ========================================================================== */
@media (max-width:760px){

/* ۱) قاب = ارتفاع واقعی صفحه (وقتی نوار آدرس جمع می‌شه هم پر می‌مونه؛ svh کوتاه‌تره و صفحه‌ی بعد از زیرش پیدا می‌شد) */
@supports (height:100dvh){:root:root{--page-h:calc(100dvh - var(--hdr) - var(--bb))}}

/* ۲) چرا نئو: به‌جای اسکرول افقی، لیست عمودی فشرده */
:root:root #about .s6-shell{gap:.5rem;padding-block:.6rem}
:root:root #about .s6-head h2{font-size:1.65rem;line-height:1.3;margin:.3rem 0}
:root:root #about .s6-head p{font-size:.8rem;line-height:1.55}
:root:root #about .s6-bento{display:flex;flex-direction:column;overflow:visible;gap:.45rem;padding:0;flex:0 0 auto;width:100%;margin:0}
:root:root #about .s6-card{flex:0 0 auto;width:100%;min-height:0;height:auto;padding:0}
:root:root #about .s6-vis{display:none}
:root:root #about .s6-txt{padding:.55rem .8rem;gap:.1rem;min-height:0;height:auto}
:root:root #about .s6-txt h3{font-size:.95rem;margin:0}
:root:root #about .s6-txt p{font-size:.72rem;line-height:1.5;margin:0}

/* ۳) مسیر یادگیری: مراحل زیر هم */
:root:root #path .s7-board{flex-direction:column;overflow:visible;gap:.45rem;padding:0;align-items:stretch}
:root:root #path .s7-t{flex:0 0 auto;width:100%;min-height:0;height:auto}
:root:root #path .s7-vis{display:none}
:root:root #path .s7-card{flex:0 0 auto;flex-direction:row;padding:.55rem .75rem;min-height:0;height:auto}
:root:root #path .s7-txt{flex:1 1 auto;gap:.1rem;justify-content:flex-start}
:root:root #path .s7-txt h3{font-size:.95rem}
:root:root #path .s7-txt p{display:none}
:root:root #path .s7-card .btn,:root:root #path .s7-card .path-tag,:root:root #path .s7-card a{display:none}
:root:root #path .s7-board{padding-inline:.6rem}
:root:root #path .s7-card{padding:.5rem .75rem}

/* ۴) دوره‌ها: شبکه‌ی ۲×۲ */
:root:root #courses .s8-grid{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;overflow:visible;flex:1 1 auto;align-content:start;padding:.2rem 1.1rem 0}
:root:root #courses .s8-grid>.course{flex:none;width:auto;min-width:0;height:auto;min-height:0}
:root:root #courses .course>p,:root:root #courses .course-desc{display:none}
:root:root #courses .course-facts li:nth-child(n+3){display:none}
:root:root #courses .course{padding:.6rem .7rem;gap:.25rem}

/* ۵) مخاطبان: دو صفحه‌ی کامل (انتخاب مسیر | روش آموزش) */
:root:root #audience .s9-shell{display:grid;grid-template-rows:var(--page-h) var(--page-h);gap:0;padding:0 1.1rem;height:auto;min-height:0}
:root:root #audience .s9-main{display:contents}
:root:root #audience .s9-head{grid-row:1;grid-column:1;align-self:start;margin:.5rem 0 0;padding-block:.5rem}
:root:root #audience .s9-head-main p{display:none}
:root:root #audience .s9-paths{grid-row:1;grid-column:1;align-self:center;min-height:0;padding-bottom:.6rem;gap:.4rem;flex:none}
:root:root #audience .s9-method{grid-row:2;grid-column:1;align-self:stretch;margin:0;min-height:0;height:auto;justify-content:center;scroll-margin-top:0}
:root:root #audience .s9-cards{flex-direction:column;overflow:visible;gap:.4rem;padding:0;flex:0 0 auto;grid-auto-rows:auto}
:root:root #audience .s9-card{flex:0 0 auto;width:100%;min-height:0;padding:.55rem .8rem}
:root:root #audience .s9-big{display:none}
:root:root #audience .s9-card h4{font-size:.92rem;margin:.05rem 0}
:root:root #audience .s9-card p{font-size:.72rem;line-height:1.45;margin:0}
:root:root #audience .s9-link{position:static;display:inline-block;min-height:0;padding:0;margin-top:.15rem;font-size:.72rem}

/* ۶) اسلایدر کارت‌ها: کل قاب رو پر کنه (نه کوچک‌تر، نه بزرگ‌تر) */
:root:root .screen-2{align-items:stretch;height:var(--page-h)}
:root:root .screen-2 #bn{display:flex;flex-direction:column;height:100%;min-height:0}
:root:root .screen-2 .bn-stage{flex:1 1 0;min-height:0}
:root:root .screen-2 .bn-slide{height:100%}
:root:root .screen-2 .bn-slide>.bn-main{display:flex;flex-direction:column;height:100%;gap:.45rem}
:root:root .screen-2 .bn-slide>.bn-main>.bn-left,:root:root .screen-2 .bn-slide>.bn-main>.bn-col3,:root:root .screen-2 .bn-slide>.bn-main>.bn-col4{display:contents}
:root:root .screen-2 .bn-slide .bn-t{flex:1 1 0;min-height:0;margin:0;display:flex;flex-direction:column;justify-content:center;aspect-ratio:auto}
:root:root .screen-2 .bn-slide .bn-hero{flex:1.9 1 0;justify-content:flex-end}
:root:root .screen-2 .bn-slide .bn-pic{display:none}
:root:root .screen-2 .bn-ctrl{flex:none}

/* ۳ب) مسیر یادگیری: ۲ ستون فشرده به‌جای خط زمان افقی */
:root:root #path .s7-board{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;align-content:start;overflow:visible;padding:.6rem .9rem 0;flex:1 1 auto}
:root:root #path .s7-phase,:root:root #path .s7-steps{display:contents}
:root:root #path .s7-t{display:block;position:relative;width:auto;min-width:0}
:root:root #path .s7-n{position:absolute;inset-block-start:-.45rem;inset-inline-end:-.25rem;width:1.55rem;height:1.55rem;font-size:.72rem;z-index:3;margin:0}
:root:root #path .s7-card{display:flex;flex-direction:column;justify-content:center;gap:.25rem;padding:.6rem .65rem;min-height:4.6rem}
:root:root #path .s7-chip{font-size:.62rem;padding:.1rem .45rem;align-self:flex-start;white-space:normal;line-height:1.35}
:root:root #path .s7-txt h3{font-size:.88rem;line-height:1.4}

/* ۵ب) مخاطبان: فشرده‌تر تا سرِ صفحه و کارت‌ها روی هم نیفتن */
:root:root #audience .s9-head h2{font-size:1.3rem;line-height:1.35}
:root:root #audience .s9-head{padding:.5rem .8rem}
:root:root #audience .s9-col-title{font-size:1rem}
:root:root #audience .s9-col-sub{display:none}
:root:root #audience .s9-card{padding:.45rem .7rem}
:root:root #audience .s9-card-top{gap:.5rem}
:root:root #audience .s9-ico{width:1.8rem;height:1.8rem}
:root:root #audience .s9-ico svg{width:1rem;height:1rem}
:root:root #audience .s9-card h4{font-size:.88rem}
:root:root #audience .s9-card p{font-size:.7rem;line-height:1.4}
:root:root #audience .s9-loop{flex:1 1 auto;grid-auto-rows:1fr;align-content:stretch}

/* کارت‌هایی که قبلاً داخل اسکرول افقی بودن و snap داشتن؛ حالا اسکرول افقی ندارن و نباید نقطه‌ی توقفِ صفحه بشن */
:root:root #about .s6-card,:root:root #path .s7-t,:root:root #path .s7-card,:root:root #courses .course,:root:root #audience .s9-card,:root:root .screen-2 .bn-t{scroll-snap-align:none;scroll-snap-stop:normal}

#faq,#contact,#audience{scroll-snap-align:none!important}

/* ۷) سوالات متداول: ۳ صفحه‌ی کامل (سوال‌ها | راه‌های تماس | فرم پیام) */
:root:root #faq{display:flex;flex-direction:column}
:root:root #faq .sp-hero{flex:none;min-height:11.5rem;box-sizing:border-box}
:root:root #faq .sp-board,:root:root #faq .sp-qa,:root:root #faq .sp-qa-body{display:contents}
:root:root #faq .sp-list{flex:none;margin:0 1.1rem;min-height:calc(var(--page-h) - 11.5rem);justify-content:flex-start;gap:.4rem}
:root:root #faq .sp-q{padding-block:.55rem;min-height:0}
:root:root #faq .sp-side{flex:none;margin:0 1.1rem;min-height:var(--page-h);display:flex;flex-direction:column;justify-content:center}
:root:root #faq .sp-card{flex:none;width:calc(100% - 2.2rem);box-sizing:border-box;margin:.6rem auto max(.6rem,calc(var(--page-h) - 631px - .6rem))}

/* ۸) فوتر: دو صفحه‌ی کامل */
:root:root #contact{scroll-snap-align:none;min-height:calc(var(--page-h) * 2)}
:root:root #contact .nf-wrap{flex:1 1 auto}
:root:root #contact .nf-top{flex:0 0 auto;min-height:calc(var(--page-h) - 28px);justify-content:center}
:root:root #contact .nf-cols{margin-top:0}
:root:root #contact .nf-bar{margin-top:auto}

}

/* قاب کوتاه‌تر (نوار آدرس مرورگر باز است): متن‌های فرعی کمی جمع‌تر */
@media (max-width:760px) and (max-height:850px){
:root:root #about .s6-head p{display:none}
:root:root #about .s6-head h2{font-size:1.5rem}
}
@media (max-width:760px) and (max-height:720px){
:root:root #about .s6-txt p{display:none}
:root:root #about .s6-txt{padding:.45rem .8rem}
:root:root #audience .s9-card p{display:none}
:root:root #path .s7-card{min-height:3.8rem}
:root:root #courses .course-facts li:nth-child(n+2){display:none}
:root:root #faq .sp-q{padding-block:.4rem}
:root:root #courses .s8-soon-note{display:none}
}
