/* =====================================================================
   PHARMA BRIDGE — PHONE LAYOUT
   Loaded on every page after the page's own styles. Uses the same
   tokens (--navy, --green, --line ...) that each page already defines.
   ===================================================================== */

/* Nothing may push the page sideways (reveal animations, long words, wide cards). */
html,body{overflow-x:clip}
@media (max-width:760px){
  .js [data-reveal="left"],.js [data-reveal="right"]{transform:translate3d(0,24px,0)}
}

/* ---------- Header on phones: logo, account, menu button ---------- */
.m-menu-btn{display:none}
@media (max-width:860px){
  .m-menu-btn{display:inline-grid;place-items:center;flex:none;width:46px;height:46px;margin-left:4px;border-radius:50%;border:1.5px solid var(--line);background:#fff;color:var(--navy);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:border-color .2s,background-color .2s}
  .m-menu-btn:active{background:var(--mist)}
  .m-menu-btn svg{width:22px;height:22px}
  /* The header's big button moves into the menu and the bottom bar. */
  .nav > .btn{display:none}
  .nav,.app-nav{gap:10px;min-height:64px}
  .nav .nav-account,.app-nav > .btn{margin-left:auto}
  .app-nav > .btn{min-height:42px;padding:0 16px;font-size:15px}
}
@media (max-width:400px){
  .site-header .brand img,.app-header .brand img{width:38px;height:38px}
  .site-header .brand,.app-header .brand{gap:9px}
  .site-header .brand-name,.app-header .brand-name{font-size:20px}
  .nav-account{font-size:15px}
}
@media (max-width:340px){
  .site-header .brand-name,.app-header .brand-name{font-size:18px}
}

/* ---------- Menu sheet ---------- */
.m-sheet{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;justify-content:flex-start;visibility:hidden;pointer-events:none}
.m-sheet.is-open{visibility:visible;pointer-events:auto}
.m-scrim{position:absolute;inset:0;background:rgba(5,32,75,.55);opacity:0;transition:opacity .3s var(--ease,ease)}
.m-sheet.is-open .m-scrim{opacity:1}
.m-panel{position:relative;background:#fff;border-radius:0 0 28px 28px;padding:12px 20px 22px;max-height:92dvh;overflow:auto;transform:translateY(-104%);transition:transform .42s var(--ease,ease);box-shadow:0 24px 60px rgba(5,32,75,.3);padding-top:max(12px,env(safe-area-inset-top))}
.m-sheet.is-open .m-panel{transform:none}
.m-top{display:flex;align-items:center;justify-content:space-between;min-height:56px;margin-bottom:6px}
.m-close{width:46px;height:46px;border-radius:50%;border:0;background:var(--mist);color:var(--navy);display:grid;place-items:center;cursor:pointer}
.m-close svg{width:20px;height:20px}
.m-links{display:grid;margin:0 0 18px;padding:0;list-style:none}
.m-links a{display:flex;align-items:center;justify-content:space-between;min-height:56px;padding:0 4px;border-bottom:1px solid var(--line);color:var(--navy);text-decoration:none;font-family:var(--display);font-weight:650;font-size:21px;font-stretch:94%}
.m-links a:after{content:"";width:9px;height:9px;border-right:2.4px solid var(--green);border-top:2.4px solid var(--green);transform:rotate(45deg);margin-right:6px}
.m-links a[aria-current="page"]{color:var(--green-dark)}
.m-actions{display:grid;gap:10px}
.m-actions .btn{width:100%;display:flex}
.m-note{margin-top:16px;font-size:15px;color:var(--muted);text-align:center}
.m-note a{font-weight:600}
html.m-locked,html.m-locked body{overflow:hidden}
@media (prefers-reduced-motion:reduce){.m-panel,.m-scrim{transition:none}}

/* ---------- Bottom "Register" bar (home and course pages) ---------- */
.m-cta{display:none}
@media (max-width:860px){
  .m-cta{display:flex;position:fixed;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));z-index:45;align-items:center;gap:12px;padding:8px 8px 8px 18px;border-radius:999px;background:var(--navy);color:#fff;box-shadow:0 16px 40px rgba(5,32,75,.35);transform:translateY(140%);visibility:hidden;transition:transform .45s var(--spring,ease),visibility 0s .45s;will-change:transform}
  .m-cta.is-on{transform:none;visibility:visible;transition:transform .45s var(--spring,ease),visibility 0s}
  .m-cta .info{flex:1;min-width:0;line-height:1.2}
  .m-cta .info strong{display:block;font-family:var(--display);font-weight:700;font-size:17px;font-stretch:92%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .m-cta .info span{display:block;font-size:14px;color:#B9C8DE;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .m-cta .info b{color:#9FE3B0;font-weight:700}
  .m-cta .info s{color:#8FA3C0;margin-left:4px}
  @media (max-width:380px){.m-cta .info s{display:none}}
  .m-cta .btn{flex:none;min-height:48px;padding:0 22px;font-size:16px;box-shadow:none}
  body.m-cta-on .wa{bottom:92px}
  .wa{transition:bottom .4s var(--ease,ease),transform .3s var(--spring,ease)}
}
@media (prefers-reduced-motion:reduce){.m-cta{transition:none}}

/* ---------- Rows you swipe sideways (mentors, reviews, filters) ---------- */
@media (max-width:760px){
  .m-rail{display:grid!important;grid-auto-flow:column;grid-template-columns:none!important;grid-auto-columns:84%;gap:12px!important;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:20px;margin-inline:-20px;padding:4px 20px 12px;scrollbar-width:none}
  .m-rail::-webkit-scrollbar{display:none}
  .m-rail > *{scroll-snap-align:start;min-width:0}
  .m-swipe-hint{display:flex;align-items:center;gap:8px;margin-top:2px;font-size:14px;color:var(--muted)}
  .m-swipe-hint i{display:inline-block;width:22px;height:6px;border-radius:999px;background:var(--line);position:relative;overflow:hidden}
  .m-swipe-hint i:after{content:"";position:absolute;inset:0;width:45%;border-radius:999px;background:var(--green);animation:hintSlide 1.8s var(--ease,ease) infinite alternate}
  @keyframes hintSlide{to{transform:translateX(125%)}}

  /* One line of filter chips that scrolls, instead of three wrapped rows */
  .m-chips{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;margin-inline:-20px;padding:2px 20px 6px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 28px),transparent)}
  .m-chips::-webkit-scrollbar{display:none}
  .m-chips > *{flex:none}
}
@media (min-width:761px){.m-swipe-hint{display:none}}
@media (prefers-reduced-motion:reduce){.m-swipe-hint i:after{animation:none}}

/* ---------- Home and course pages on phones ---------- */
@media (max-width:760px){
  .section{padding-block:56px}
  .section-head{margin-bottom:24px}
  .announce{font-size:14px;line-height:1.35;padding:10px 16px}
  .announce a{display:inline-block;padding:4px 2px}

  /* Mentor cards: photo beside the name, so four mentors fit in one swipe row */
  .mentor:has(img){display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:14px;align-items:center;padding:16px}
  .mentor:has(img) img{width:64px;height:64px;margin:0;grid-row:1 / span 2}
  .mentor:has(img) strong{align-self:end;font-size:18px;line-height:1.2}
  .mentor:has(img) span{align-self:start;font-size:14px;line-height:1.4}
  #reviewList .mentor{display:flex;flex-direction:column;padding:20px}
  #reviewList .mentor p{flex:1}

  /* Course cards: shorter, so the list doesn't take a screen per course */
  .course{padding:18px 18px 16px;border-radius:20px}
  .course h3{font-size:20px;margin:10px 0 6px}
  .course p{font-size:15px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .course .badges{gap:6px}
  .course .badge{font-size:13px;padding:2px 10px}
  .course .c-icon{width:38px;height:38px;border-radius:12px}
  .course .dept-chips{margin-top:12px;gap:6px}
  .course-foot{padding-top:14px}
  .course-foot .btn{min-height:44px;padding:0 18px;font-size:15px}
  .course-grid{gap:14px}
  .chip{min-height:40px;padding:0 15px;display:inline-flex;align-items:center}
  .filters{gap:10px;margin-bottom:20px}
  .filter-label{flex:none}

  /* Featured program: the price and Register come right after the summary */
  .featured{gap:24px}
  .featured .live-scene{display:none}
  .featured-links{margin-top:18px}
  .batch-card{border-radius:24px;padding:22px}
  .price b{font-size:34px}

  /* Lists and FAQ */
  .why{gap:18px}
  .who{border-radius:24px;padding:28px 22px}
  .faq summary{font-size:18px;padding:18px 40px 18px 0}
  .faq summary:after{top:12px}
  .viva-card{min-height:0;padding:22px}
  .viva-actions{flex-wrap:nowrap;gap:10px;padding-top:18px}
  .viva-actions .btn{flex:1;padding:0 12px}
  .flip-inner{height:180px}
  .final .lead{margin-bottom:22px}
  .site-footer{padding:44px 0 calc(28px + env(safe-area-inset-bottom))}
  .site-footer ul a{display:inline-block;padding:6px 0}
  .site-footer ul{gap:2px}
  .wa{width:54px;height:54px;right:14px;bottom:14px}
}

/* ---------- Signed-in and public app pages on phones ---------- */
.bh-short{display:none}
.auth-top a.back{white-space:nowrap}
@media (max-width:420px){.bh-long{display:none}.bh-short{display:inline}}
@media (max-width:860px){.app-links[aria-label="Main"]{display:none}}
@media (max-width:760px){
  .container{width:min(1140px,100% - 32px)}
  .page{padding-top:20px}
  .page-head{margin-bottom:18px;gap:10px}
  .page-head h1{font-size:28px}
  .card{border-radius:20px;padding:18px}
  .card + .card,.grid-2 > div > .card + .card{margin-top:14px}
  .grid-2,.grid-3{gap:14px}
  .card-head{margin-bottom:10px}
  .card-head h2{font-size:20px}
  .mobile-tabs{left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));border-radius:20px}
  .mobile-tabs a{font-size:13px;min-height:52px;align-content:center}
  body.has-tabs{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .app-nav{min-height:60px}
  .app-footer{padding-bottom:20px}
  .app-footer .container{flex-direction:column;gap:6px}

  /* Lists of rows (courses, classes, certificates) stack their button under the text */
  .row-list > .row-between{align-items:flex-start}
  .row-list > .row-between > .btn,.row-list > .row-between > form{margin-left:0}

  /* Forms: no squeezed side-by-side fields, comfortable targets */
  .pw-toggle{min-height:44px;min-width:56px}
  .check{min-height:44px;align-items:center}
  .check input{margin-top:0}
  .choice span{min-height:44px;display:inline-flex;align-items:center;padding:0 16px}
  .auth-main{padding:16px 16px 28px}
  .auth-card{padding-top:12px}
  .auth-card h1{font-size:30px}
  .auth-alt a{display:inline-block;padding:6px 0}
  .link-btn{padding:10px 0}
}

/* Steps (mentor onboarding): content column may shrink, so cards never push past the screen */
.step-card{grid-template-columns:44px minmax(0,1fr)}
@media (max-width:560px){
  .step-card{grid-template-columns:36px minmax(0,1fr);gap:12px}
  .step-num{width:36px;height:36px;font-size:16px}
  .photo-pick{flex-wrap:wrap}
}

/* Focus mode: live class and checkout, no bottom tabs or footer */
body.focus-mode .page{padding-bottom:28px}

/* ---------- Dashboard on phones ---------- */
@media (max-width:760px){
  .hide-phone{display:none!important}
  .welcome{border-radius:24px;padding:22px 20px;gap:18px}
  .welcome h1{font-size:27px}
  .welcome .lead{font-size:16px;margin-top:6px}
  .welcome .actions{margin-top:16px}
  .welcome .actions .btn{min-height:46px}
  .id-card{transform:none;padding:16px 18px 14px;border-radius:18px}
  .id-card .sid{font-size:27px;margin-top:12px}
  .id-card .stripe{width:110px;height:44px;right:-26px;bottom:-20px}
  .copy-btn{min-height:40px;padding:0 14px}
  .facts-list div{padding:11px 0}
}
@media (max-width:400px){.id-card .top .brand-name{display:none}}

/* ---------- Registration and payment on phones ---------- */
@media (max-width:760px){
  .enrol-page .fee-card{order:-1}
}
.photo-pick > div{flex:1 1 200px;min-width:0}
@media (max-width:760px){
  .course .dept-chips{display:none}
  .course.is-soon p{-webkit-line-clamp:2}
}
/* Smallest phones (320px): "Sign in" lives in the menu so the logo has room */
@media (max-width:350px){
  .nav > .nav-account:not(:has(.av)){display:none}
  .nav .m-menu-btn{margin-left:auto}
}

/* =====================================================================
   HOMEPAGE HERO: THE WHOLE FIRST SCREEN FITS AT 100% ZOOM (15 Nov 2026)
   Headline, buttons, bridge and the four facts all show without
   scrolling on laptop screens; on phones the hero is tighter so the
   bridge and facts come into view much sooner. Only the homepage hero
   has #typed, so the course page is not affected.
   ===================================================================== */

/* ---------- Laptops and desktops: sizes follow the screen height ---------- */
@media (min-width:861px){
  .hero:has(#typed){padding:clamp(18px,3.6vh,64px) 0 clamp(20px,3.4vh,56px)}
  .hero:has(#typed) .container{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"copy copy" "bridge facts" "hint hint";column-gap:clamp(24px,3.4vw,56px);align-items:center}
  .hero:has(#typed) .hero-copy{grid-area:copy;max-width:880px}
  .hero:has(#typed) h1{font-size:clamp(40px,min(7vw,10.2vh),80px)}
  .hero:has(#typed) h1 .en{font-size:clamp(18px,min(2.5vw,3.6vh),30px);margin-top:clamp(4px,1.2vh,14px)}
  .hero:has(#typed) .typed-line{font-size:clamp(26px,min(4.2vw,6.2vh),50px);margin-top:2px}
  .hero:has(#typed) .lead{font-size:clamp(16px,min(1.6vw,2.7vh),19px);max-width:48em;margin-top:clamp(8px,1.8vh,22px)}
  .hero:has(#typed) .hero-actions{margin-top:clamp(12px,2.6vh,30px)}

  /* The bridge gets the height that is left on the screen; the facts sit beside it */
  .hero:has(#typed) .bridge-scroll{grid-area:bridge;justify-self:start;width:100%;margin-top:clamp(8px,2.2vh,40px);overflow:visible}
  .hero:has(#typed) .bridge{min-width:0;width:clamp(360px,calc((54vh - 175px) * 3.79),100%);height:auto;overflow:visible}
  .hero:has(#typed) .swipe-hint{grid-area:hint}
  .hero:has(#typed) .facts{grid-area:facts;display:grid;grid-template-columns:repeat(2,auto);gap:clamp(10px,2vh,20px) clamp(20px,2.4vw,36px);margin:clamp(8px,2.2vh,40px) 0 0;padding:clamp(14px,2.2vh,22px) clamp(18px,2vw,26px);background:rgba(255,255,255,.72);border:1px solid var(--line);border-radius:22px;box-shadow:0 14px 34px rgba(5,32,75,.07);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  .hero:has(#typed) .facts dt{font-size:clamp(13px,1.9vh,14px)}
  .hero:has(#typed) .facts dd{font-size:clamp(16px,2.6vh,20px);line-height:1.25}

  /* Bridge words stay readable when the bridge is drawn smaller */
  .hero:has(#typed) .bridge .stop text.lbl{font-size:24px}
  .hero:has(#typed) .bridge .stop text.num{font-size:26px}
  .hero:has(#typed) .bridge .end text{font-size:23px}
  .hero:has(#typed) #walker .w-tag{transform:translate(0px,-52px) scale(1.25)}

  /* Decorations keep to the right and stay clear of the facts */
  .hero:has(#typed) .molecule{top:clamp(150px,24vh,300px);right:2%;width:clamp(100px,16vh,150px)}
  .hero:has(#typed) .cap-2{top:clamp(150px,30vh,250px)}
}

/* ---------- Narrow laptops and landscape tablets ---------- */
/* The menu links stay on one line instead of wrapping under each other */
@media (min-width:861px) and (max-width:1100px){
  .nav-links{gap:16px}
  .nav-links a{font-size:15px;white-space:nowrap}
}
@media (min-width:861px) and (max-width:980px){
  .nav-links a[href="#why"]{display:none}
}
@media (min-width:861px) and (max-width:1200px){
  .hero:has(#typed) .cap-2{display:none}
}
@media (min-width:861px) and (max-width:1100px){
  .hero:has(#typed) .facts{gap:10px 18px;padding:14px 16px}
  .hero:has(#typed) .facts dd{font-size:16px}
  .hero:has(#typed) .bridge{width:clamp(320px,calc((54vh - 195px) * 3.79),100%)}
  .hero:has(#typed) .cap-3{display:none}
}

/* ---------- Phones: a tighter hero, so the bridge and facts show sooner ---------- */
@media (max-width:760px){
  .hero:has(#typed){padding:clamp(16px,3vh,28px) 0 clamp(18px,3vh,28px)}
  .hero:has(#typed) h1{font-size:clamp(30px,9vw,40px);line-height:1.08}
  /* Same two-line headline on every phone, which leaves room on the right for the capsules */
  .hero:has(#typed) h1 .hw:nth-child(4){display:block;width:fit-content}
  .hero:has(#typed) h1 .en{font-size:clamp(16px,4.6vw,19px);margin-top:8px}
  .hero:has(#typed) .typed-line{font-size:clamp(24px,7.2vw,30px);margin-top:2px}
  .hero:has(#typed) .lead{font-size:15.5px;line-height:1.55;margin-top:10px}
  .hero:has(#typed) .hero-actions{margin-top:16px;gap:10px}
  .hero:has(#typed) .hero-actions .btn{flex:1 1 auto;min-height:48px;padding:0 14px;font-size:15px}
  /* The whole bridge fits the phone's width (no sideways swiping); its parts are drawn bigger to stay readable */
  .hero:has(#typed) .bridge-scroll{margin-top:20px;overflow:visible}
  .hero:has(#typed) .bridge{min-width:0;width:100%;overflow:visible}
  .hero:has(#typed) .swipe-hint{display:none}
  .hero:has(#typed) .bridge .stop circle,.hero:has(#typed) .bridge .end circle,.hero:has(#typed) .bridge .end path{transform-box:fill-box;transform-origin:center}
  .hero:has(#typed) .bridge .stop circle{scale:1.4}
  .hero:has(#typed) .bridge .stop text.num{font-size:34px}
  .hero:has(#typed) .bridge .stop text.lbl{font-size:38px;stroke-width:12px;translate:0 16px}
  .hero:has(#typed) .bridge .end circle,.hero:has(#typed) .bridge .end path{scale:1.3}
  .hero:has(#typed) .bridge .end text{font-size:34px;translate:0 14px}
  .hero:has(#typed) .bridge .pillar{stroke-width:5}
  .hero:has(#typed) .bridge .deck{stroke-width:9}
  .hero:has(#typed) #walker .w-body{scale:1.6}
  .hero:has(#typed) #walker .w-tag{transform:translate(0px,-44px) scale(1.5)}
  /* Floating capsules and the molecule on phones too, placed in the gaps beside the text */
  .hero:has(#typed) .cap-2,.hero:has(#typed) .cap-3,.hero:has(#typed) .molecule{display:block}
  .hero:has(#typed) .cap-1{top:18px;right:-16px;--w:62px}
  .hero:has(#typed) .molecule{top:30px;right:13%;width:50px;opacity:.45}
  .hero:has(#typed) .cap-3{top:calc(3vh + 30vw - 2px);right:5%;--w:30px}
  .hero:has(#typed) .cap-2{top:auto;bottom:30px;right:-18px;--w:42px}
  .hero:has(#typed) .facts{margin-top:12px;gap:10px 16px}
  .hero:has(#typed) .facts dt{font-size:12.5px}
  .hero:has(#typed) .facts dd{font-size:15.5px;line-height:1.3}
}

/* Smallest phones: no room for the molecule beside the headline */
@media (max-width:350px){
  .hero:has(#typed) .molecule,.hero:has(#typed) .cap-3{display:none}
  .hero:has(#typed) .cap-2{right:-26px}
}

/* Large phones and small tablets: the bridge is already wide, so its parts need less enlarging */
@media (min-width:540px) and (max-width:760px){
  .hero:has(#typed) .bridge .stop circle{scale:1.15}
  .hero:has(#typed) .bridge .stop text.num{font-size:28px}
  .hero:has(#typed) .bridge .stop text.lbl{font-size:28px;translate:0 8px}
  .hero:has(#typed) .bridge .end circle,.hero:has(#typed) .bridge .end path{scale:1.1}
  .hero:has(#typed) .bridge .end text{font-size:26px;translate:0 6px}
  .hero:has(#typed) #walker .w-body{scale:1.25}
}

/* Homepage course cards: the title links to the course page (15 Nov 2026) */
#courseGrid .course h3 a{color:inherit;text-decoration:none}
#courseGrid .course h3 a:hover{color:var(--blue)}
#courseGrid .course h3 a:after{content:"";position:absolute;inset:0;z-index:0}
#courseGrid .course{position:relative}
#courseGrid .course .course-foot,#courseGrid .course .btn{position:relative;z-index:1}
