/* Vidyapeeth Education - mobile & responsive layer (v2.0)
 * Loaded after every other front-end stylesheet. Only adds / corrects; desktop look is untouched
 * above 1024px except for a few global safety rules.
 * Breakpoints: 1024 (tablet) / 768 (large phone) / 480 (phone) / 360 (small phone)
 */

/* ============ 0. Global safety ============ */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.apro-page,body.apro-chrome{overflow-x:clip}
:is(.aph,.apro-pg,.apro-hdr,.apro-ftr) :is(img,video,iframe,svg){max-width:100%}
:is(.aph,.apro-pg) :is(h1,h2,h3,h4,p,li,td,th,dd,dt){overflow-wrap:anywhere;word-break:normal}
:is(.aph,.apro-pg) a,:is(.aph,.apro-pg) button{-webkit-tap-highlight-color:rgba(35,71,217,.12);touch-action:manipulation}
:is(.aph,.apro-pg,.apro-hdr,.apro-ftr) :focus-visible{outline:3px solid var(--h1b,rgba(35,71,217,.25));outline-offset:2px}

/* tidy heading tracking on every screen (the very tight tracking made words touch) */
.aph .aph-slide-txt :is(h1,h2){letter-spacing:-.6px;word-spacing:.04em}
.aph .aph-h{letter-spacing:-.3px}

/* ============ 1. Tablet (<=1024) ============ */
@media (max-width:1024px){
	.aph-sec{padding:60px 0}
	.apro-in,.aph-wrap{padding-left:18px;padding-right:18px}
	.apro-ph{padding:44px 0 84px}
	.apro-ph .apro-in{gap:18px}
	.apro-ftr-g{grid-template-columns:1fr 1fr}
}

/* ============ 2. Phone (<=768) ============ */
@media (max-width:768px){

	/* ---- header: compact, safe-area aware, big tap targets ---- */
	.apro-top{font-size:12px}
	.apro-hdr{padding-top:env(safe-area-inset-top,0)}
	.apro-hdr-in{min-height:62px;gap:12px}
	.apro-logo{height:40px;max-width:120px}
	.apro-mark{width:40px;height:40px;border-radius:12px}
	.apro-burger{width:44px;height:44px;border-radius:12px}
	.apro-panel{max-height:calc(100dvh - var(--apro-hdr-h,62px) - var(--apro-adm,0px) - 8px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:10px 16px calc(18px + env(safe-area-inset-bottom,0))}
	.apro-nl{min-height:48px}
	.apro-dd-m a{padding:12px 14px;min-height:48px}
	.apro-act .apro-btn-o,.apro-act .apro-btn-p{min-height:48px}
	body.apro-menu-open{overflow:hidden}

	/* ---- home hero ---- */
	.aph .aph-hero{background:linear-gradient(170deg,#0b1b5e 0%,var(--h1,#2347d9) 120%)}
	.aph .aph-slide-in,.aph .aph-slide.pos-right .aph-slide-in,.aph .aph-slide.pos-center .aph-slide-in,.aph .aph-slide.pos-hide .aph-slide-in{padding:18px 16px 112px;gap:18px}
	.aph .aph-slide-fig,.aph .aph-slide.pos-right .aph-slide-fig{border-radius:18px;max-width:none;box-shadow:0 22px 44px -18px rgba(0,0,0,.55),0 0 0 4px rgba(255,255,255,.06)}
	.aph .aph-slide-txt,.aph .aph-slide.pos-right .aph-slide-txt,.aph .aph-slide.pos-center .aph-slide-txt{max-width:none;text-align:left;margin:0}
	.aph .aph-slide.pos-center .aph-slide-txt p{margin-left:0}
	.aph .aph-badge{font-size:12.5px;padding:5px 13px;margin-bottom:12px}
	.aph .aph-slide-txt :is(h1,h2){font-size:clamp(25px,7.4vw,32px);line-height:1.15;margin:0 0 10px}
	.aph .aph-slide-txt p{font-size:15px;line-height:1.6;margin:0 0 18px;max-width:none}
	.aph .aph-btns,.aph .aph-slide.pos-center .aph-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
	.aph .aph-btns .aph-btn{padding:14px 12px;font-size:15px;min-height:50px;border-radius:13px;text-align:center;width:100%}
	.aph .aph-hero-ui{bottom:84px}
	.aph .aph-dot{width:9px;height:9px}
	.aph .aph-dot.on{width:28px}
	.aph .aph-prog{height:3px;top:0;bottom:auto}

	/* ---- quick access: clean 2x2 tiles that sit under the hero, no half-hidden cards ---- */
	.aph .aph-quick{margin-top:-62px;padding:0 0 4px}
	.aph .aph-quick-grid{grid-template-columns:1fr 1fr;gap:12px}
	.aph .aph-qcard{flex-direction:column;justify-content:center;gap:8px;padding:18px 8px;min-height:104px;text-align:center;border:1px solid var(--line,#e6eaf4);border-radius:18px;box-shadow:0 14px 30px -10px rgba(11,27,94,.28)}
	.aph .aph-qcard span{font-size:30px}
	.aph .aph-qcard b{font-size:14.5px;line-height:1.25;flex:none}
	.aph .aph-qcard:active{transform:scale(.97)}
	.aph .aph-qcard i{display:none}
	.aph .aph-reveal{transform:translateY(18px)}

	/* ---- ticker ---- */
	.aph .aph-marquee{margin-top:24px;padding:12px 0}
	.aph .aph-mq-track span{font-size:13.5px;padding:0 16px}

	/* ---- sections ---- */
	.aph-sec{padding:46px 0}
	.aph-h{font-size:clamp(23px,6.4vw,28px);margin-bottom:26px}
	.aph-h::after{width:46px;height:3px;margin-top:10px}
	.aph-stats{padding:44px 0 4px}
	.aph-stats-grid{grid-template-columns:1fr 1fr;gap:12px}
	.aph-stat{background:#fff;border:1px solid var(--line,#e6eaf4);border-radius:16px;padding:16px 8px}
	.aph-stat b{font-size:30px}
	.aph-stat span{font-size:13px}
	.aph-about-in{gap:30px}
	.aph-about-photo{border-radius:20px;aspect-ratio:16/11}
	.aph-about-txt>p{font-size:15.5px;line-height:1.75}
	.aph-feat-grid,.aph-rev-grid,.aph-course-grid{gap:14px}
	.aph-feat{padding:20px 18px;border-radius:16px;display:grid;grid-template-columns:52px 1fr;column-gap:14px;align-items:start}
	.aph-feat span{grid-row:1/3;width:52px;height:52px;font-size:24px;margin:0}
	.aph-feat h3{font-size:17px;margin:0 0 4px}
	.aph-feat p{font-size:14.5px}
	.aph-course{border-radius:18px}
	.aph-course img,.aph-course-ph{height:170px}
	.aph-course-f{flex-wrap:wrap;gap:10px}
	.aph-course-f span{margin-left:auto}
	.aph-mini{padding:8px 16px;min-height:38px;display:inline-flex;align-items:center}
	.aph-cen-grid{grid-template-columns:1fr;gap:14px}
	.aph-cen{padding:22px 18px;border-radius:20px}
	.aph-steps{grid-template-columns:1fr;gap:14px}
	.aph-steps li{display:grid;grid-template-columns:52px 1fr;column-gap:14px;text-align:left;align-items:start;background:#fff;border:1px solid var(--line,#e6eaf4);border-radius:16px;padding:14px}
	.aph-steps li span{width:48px;height:48px;font-size:20px;margin:0;grid-row:1/3;animation:none}
	.aph-steps h3{margin:2px 0 2px}
	.aph-band{padding:38px 0}
	.aph-band-in{flex-direction:column;align-items:stretch;text-align:left}
	.aph-band .aph-btn{width:100%}
	.aph-gal{grid-template-columns:1fr 1fr;gap:10px}
	.aph-gal img{height:130px;border-radius:12px}
	.aph-faq summary{padding:16px 28px 16px 0;min-height:52px;font-size:15.5px}
	.aph-verify input,.aph-verify .aph-btn{min-height:50px;width:100%}
	.aph-contact-info{padding:22px 18px;border-radius:18px}
	.aph-map iframe{min-height:240px;border-radius:16px}
	.aph-cta{padding:46px 0}
	.aph-cta p{font-size:16px}
	.aph-cta .aph-btn{width:100%}
	.aph-btn{padding:14px 22px}

	/* ---- inner page banner ---- */
	.apro-ph,.apro-ph.compact{padding:30px 0 70px}
	.apro-pg .apro-ph h1{font-size:clamp(24px,7vw,30px);letter-spacing:-.4px}
	.apro-pg .apro-ph p{font-size:15px}
	.apro-crumb{font-size:12.5px;margin-bottom:8px;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
	.apro-crumb::-webkit-scrollbar{display:none}
	.apro-body{margin-top:-46px}

	/* ---- forms: 16px font stops iOS zoom-on-focus, tall tap targets ---- */
	.apro-pg .apro-f :is(input[type=text],input[type=email],input[type=tel],input[type=date],input[type=password],input[type=search],input[type=number],select,textarea){font-size:16px;height:52px}
	.apro-pg .apro-f textarea{height:auto;min-height:110px}
	.apro-pg .apro-sbox input{font-size:16px}
	.apro-pg .apro-btn{min-height:50px;padding:13px 20px}
	.apro-pg .apro-btn-sm{min-height:42px}
	.apro-actions{gap:10px}
	.apro-actions .apro-btn{flex:1 1 150px}
	.apro-vsearch .apro-btn{width:100%}
	.apro-split,.apro-split.narrow{border-radius:22px}
	.apro-info{padding:26px 20px}
	.apro-split:not(.narrow) .apro-info-in{position:static}
	.apro-pg .apro-info h2,.apro-pg .apro-formside h2{font-size:22px}
	.apro-formside{padding:26px 18px}
	.apro-toolbar{padding:12px;border-radius:16px;gap:10px}
	.apro-sbox{min-width:0;max-width:none;flex:1 1 100%}
	.apro-count{padding:0}

	/* ---- cards / course ---- */
	.apro-grid{gap:16px}
	.apro-card{border-radius:20px}
	.apro-card-img{height:180px}
	.apro-card-b{padding:18px}
	.apro-card-f{gap:12px}
	.apro-card-a{flex:1;justify-content:flex-end}
	.apro-cd-side{position:static}
	.apro-enroll{padding:22px 18px}
	.apro-pg .apro-cd h2{font-size:24px}
	.apro-prose{font-size:16px;line-height:1.7}
	.apro-detail-img{border-radius:14px;max-height:260px}

	/* ---- student / franchise dashboard ---- */
	.apro-dash{gap:14px}
	.apro-snav{margin:0 -4px;border-radius:18px;padding:6px;scroll-snap-type:x proximity;scrollbar-width:none;position:sticky;top:calc(var(--apro-hdr-h,62px) + var(--apro-adm,0px) + 6px);z-index:20;box-shadow:0 10px 26px rgba(15,23,42,.1)}
	.apro-snav::-webkit-scrollbar{display:none}
	.apro-pg .apro-snav a{padding:8px 14px 8px 8px;font-size:14px;scroll-snap-align:start;min-height:46px}
	.apro-snav a .e{width:32px;height:32px;font-size:16px}
	.apro-head{padding:20px 18px;gap:14px;border-radius:20px;flex-direction:row;align-items:center}
	.apro-head img,.apro-head .apro-av2{width:64px;height:64px;font-size:24px}
	.apro-pg .apro-head h2{font-size:20px}
	.apro-pg .apro-head p{font-size:13.5px}
	.apro-stats{grid-template-columns:1fr 1fr;gap:10px}
	.apro-stats>div{padding:14px 12px 12px 16px;border-radius:16px}
	.apro-stats b{font-size:21px}
	.apro-stats span{font-size:12.5px}
	.apro-dash-main>h3{font-size:18px;margin:22px 0 12px}
	.apro-docs{grid-template-columns:1fr 1fr!important;gap:10px}
	.apro-pg a.apro-doc{padding:16px 14px;border-radius:16px;font-size:14.5px}

	/* ---- tables: wide ones scroll with a visible edge; narrow ones become cards (mobile.js adds data-label) ---- */
	.apro-scroll{border-radius:16px;position:relative}
	.apro-pg .apro-table th,.apro-pg .apro-table td{padding:12px 14px;font-size:14px}
	.apro-pg .apro-table.apro-stack{display:block;min-width:0}
	.apro-pg .apro-table.apro-stack thead{display:none}
	.apro-pg .apro-table.apro-stack tbody{display:grid;gap:12px;padding:12px}
	.apro-pg .apro-table.apro-stack tr{display:block;background:#fff;border:1px solid var(--line,#e6eaf4);border-radius:16px;overflow:hidden;box-shadow:0 8px 20px rgba(15,23,42,.05)}
	.apro-pg .apro-table.apro-stack td{display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:right;padding:11px 14px;border-bottom:1px solid var(--line,#e6eaf4)}
	.apro-pg .apro-table.apro-stack td:last-child{border-bottom:0}
	.apro-pg .apro-table.apro-stack td::before{content:attr(data-label);flex:none;max-width:44%;text-align:left;font-weight:700;font-size:12.5px;color:var(--mut,#5b6475)}
	.apro-pg .apro-table.apro-stack td:not([data-label])::before{display:none}
	.apro-pg .apro-table.apro-stack td:not([data-label]){justify-content:flex-end;flex-wrap:wrap}
	.apro-pg .apro-table.apro-stack tbody tr:hover td{background:transparent}
	.apro-pg .apro-table.apro-stack td .apro-btn,.apro-pg .apro-table.apro-stack td a.apro-btn{min-height:40px}
	.apro-scroll.has-stack{overflow:visible;border:0;box-shadow:none;background:transparent}
	/* key/value info tables (th + td per row) stay as rows */
	.apro-pg .apro-table.apro-info-t tbody tr>th:first-child:not(:only-child){width:38%}

	/* ---- exam player ---- */
	.apro-examhead{position:sticky;top:calc(var(--apro-hdr-h,62px) + var(--apro-adm,0px));z-index:30;border-radius:0 0 16px 16px}
	.apro-timer{font-size:19px;padding:6px 14px}
	.apro-q{border-radius:18px;padding:16px 14px}
	.apro-q>p{font-size:16px}
	.apro-pg .apro-opt{padding:13px 14px;min-height:52px;border-radius:13px}
	.apro-opt input{width:22px;height:22px}

	/* ---- modal becomes a bottom sheet ---- */
	.apro-modal{align-items:end;padding:0;place-items:end center}
	.apro-md-card{width:100%;max-height:88dvh;border-radius:22px 22px 0 0;padding:26px 18px calc(20px + env(safe-area-inset-bottom,0));transform:translateY(40px)}
	.apro-md-actions{flex-direction:column}
	.apro-md-actions .apro-btn{width:100%;min-height:50px}

	/* ---- footer ---- */
	.apro-ftr{padding-top:46px}
	.apro-ftr.has-cta{padding-top:calc(58px + 40px)}
	.apro-ftr-g{gap:30px}
	.apro-ftr ul{gap:4px}
	.apro-ftr ul a{display:inline-block;padding:8px 0}
	.apro-ftr-cta-wrap{margin-top:46px}
	.apro-ftr-cta{padding:24px 20px;border-radius:20px;gap:16px}
	.apro-ftr-cta-b{width:100%;display:grid;grid-template-columns:1fr 1fr}
	.apro-ftr-cta .apro-btn-p,.apro-ftr-cta .apro-btn-g{padding:13px 10px;min-height:48px;font-size:14.5px}
	.apro-ftr-b{margin-top:34px;padding:18px 0 calc(18px + env(safe-area-inset-bottom,0));text-align:center;align-items:center}
	.apro-soc a{width:46px;height:46px}
}

/* ============ 3. Small phone (<=480) ============ */
@media (max-width:480px){
	.apro-in,.aph-wrap{padding-left:16px;padding-right:16px}
	.aph .aph-btns,.aph .aph-slide.pos-center .aph-btns{grid-template-columns:1fr}
	.aph .aph-hero-ui{bottom:76px}
	.aph .aph-slide-in,.aph .aph-slide.pos-right .aph-slide-in,.aph .aph-slide.pos-center .aph-slide-in,.aph .aph-slide.pos-hide .aph-slide-in{padding-bottom:104px}
	.aph-gal img{height:116px}
	.apro-stats{gap:8px}
	.apro-docs{grid-template-columns:1fr!important}
	.apro-head{flex-direction:column;align-items:flex-start}
	.apro-ftr-cta-b{grid-template-columns:1fr}
	.apro-brand-t b{font-size:15.5px;max-width:160px}
}

/* ============ 4. Very small (<=360) ============ */
@media (max-width:360px){
	.aph .aph-slide-txt :is(h1,h2){font-size:23px}
	.aph .aph-quick-grid{gap:8px}
	.aph .aph-qcard{padding:14px 6px;min-height:92px}
	.aph .aph-qcard b{font-size:13.5px}
	.aph-stats-grid{gap:8px}
	.apro-brand-t b{max-width:130px}
}

/* ============ 5. Landscape phones ============ */
@media (max-height:480px) and (orientation:landscape){
	.apro-panel{max-height:calc(100dvh - 70px)}
	.aph .aph-slide-in{padding-bottom:90px}
}

/* ============ 6. Touch devices: no sticky hover lifts ============ */
@media (hover:none){
	.aph-feat:hover,.aph-rev:hover,.aph-course:hover,.aph-cen:hover,.apro-card:hover,.aph-qcard:hover{transform:none;box-shadow:inherit}
	.apro-card:hover .apro-card-img img{transform:none}
	.aph-btn:hover,.apro-pg .apro-btn:hover{transform:none}
}

/* ============ 7. Wide tables: soft edge shadows show there is more to scroll ============ */
@media (max-width:768px){
	.apro-scroll:not(.has-stack){background:linear-gradient(90deg,#fff 30%,rgba(255,255,255,0)) left center/40px 100% no-repeat local,linear-gradient(270deg,#fff 30%,rgba(255,255,255,0)) right center/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgba(15,23,42,.18),rgba(15,23,42,0)) left center/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgba(15,23,42,.18),rgba(15,23,42,0)) right center/14px 100% no-repeat scroll,#fff}
}

/* ============ 8. Reduced motion ============ */
@media (prefers-reduced-motion:reduce){
	.aph .aph-reveal{opacity:1;transform:none}
}

/* ===== v2.0: two courses per row on phones ===== */
@media (max-width:768px){
	.apro-pg .apro-grid.apro-cgrid,.apro-pg .apro-grid.apro-cols-3,.apro-pg .apro-grid.apro-cols-2,.apro-pg .apro-grid.apro-cols-4{grid-template-columns:1fr 1fr;gap:10px}
	.apro-cgrid .apro-card{border-radius:16px}
	.apro-cgrid .apro-card-img{height:96px}
	.apro-cgrid .apro-card-b{padding:12px}
	.apro-cgrid .apro-card-b h3{font-size:14.5px;line-height:1.25;margin:4px 0}
	.apro-cgrid .apro-card-b>p{display:none}
	.apro-cgrid .apro-card-meta .apro-pill{font-size:11px;padding:3px 8px}
	.apro-cgrid .apro-fee{font-size:16px}.apro-cgrid .apro-fee small{font-size:11px}
	.apro-cgrid .apro-card-a{grid-template-columns:1fr;gap:6px}
	.apro-cgrid .apro-card-a .apro-btn{min-height:40px;font-size:14px;padding:8px}
	.aph .aph-course-grid{grid-template-columns:1fr 1fr!important;gap:10px}
	.aph .aph-course img,.aph .aph-course-ph{height:96px}
	.aph .aph-course h3{font-size:14.5px}
	.aph .aph-course p{display:none}
	.aph .aph-course-f{flex-direction:column;align-items:stretch}
	.aph .aph-course-f .aph-mini{text-align:center;justify-content:center}
}
