/* Mobile WebView layer shared by the three program pages (Industrial / Articleship / Freshers).
   Loaded after each page's master sections.css + header.css + dark.css. Targets 320-430px: no horizontal scroll,
   wrapping text, clamp() type, 44px tap targets, safe-area insets, light + dark via [data-theme].
   Master's own sections.css stays untouched so it can be re-synced; everything mobile-specific lives here. */

/* Page chrome ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.program-page {
  padding-bottom: 0;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
.program-page img, .program-page video, .program-page svg { max-width: 100%; }
.program-page h1, .program-page h2, .program-page h3, .program-page p, .program-page li { overflow-wrap: anywhere; }
.program-page .page-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
:root[data-theme="dark"] body.program-page,
:root[data-theme="dark"] .program-page main { background-color: #0b1020; }

/* Master's desktop shell leaks: its stacking values would put the page above the Airy Flow drawer. */
.app-header { z-index: 1000; }
.expanded-menu { z-index: 10001 !important; }
.expanded-menu-backdrop { z-index: 10000; }
/* Side drawer: master's sections.css pads the drawer 68px and absolutely positions the close button; stacked on
   header.css's header row (which used to add the status-bar inset again) that put "Navigation" ~120px down.
   Make it the same compact drawer as every portal page: drawer starts below the status bar, one 36px-close + title row. */
.expanded-menu {
  top: var(--msc-sai-top, 0px) !important;
  height: calc(100vh - var(--msc-sai-top, 0px)) !important;
  height: calc(100dvh - var(--msc-sai-top, 0px)) !important;
  width: min(320px, 86vw) !important;
  max-width: none !important;
  padding: 0 !important;
}
.expanded-menu .menu-close-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  border-radius: 50% !important;
  background: var(--af-chip, #f1f5f9) !important;
  color: #475569 !important;
  box-shadow: none !important;
  flex-shrink: 0;
}
.expanded-menu .menu-close-btn svg { width: 20px !important; height: 20px !important; stroke: currentColor !important; }
:root[data-theme="dark"] .expanded-menu .menu-close-btn { color: #c3cde2 !important; }
.fixed-cta { z-index: 900 !important; }
#notifyStatusToast { z-index: 10002; }
html { scroll-padding-top: calc(var(--af-header-h, 58px) + max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)) + 12px); }

/* Hero: the fixed app header already reserves the top space (master padded for its own 72px header) */
.program-page .hero-section { padding-top: clamp(20px, 6vw, 36px); }
.program-page .hero-heading,
.program-page .hero-title { font-size: clamp(1.75rem, 8vw, 2.6rem); line-height: 1.12; }

/* Tap targets (>= 44px) --------------------------------------------------------- */
.program-page .notify-me-btn,
.program-page .btn-blue-primary,
.program-page .btn-emerald-primary,
.program-page .btn-coral-primary,
.program-page .btn-outline-secondary,
.program-page .btn-secondary,
.program-page .btn-navy-sample,
.program-page .notify-banner-btn,
.program-page .fixed-cta-btn,
.program-page .notify-me-footer-btn,
.program-page .linkedin-pill-btn,
.program-page .mentor-linkedin-link {
  min-height: 44px;
  touch-action: manipulation;
}
.program-page .carousel-nav-btn { width: 44px; height: 44px; }
.program-page .footer-social-btn { width: 44px; height: 44px; }
.program-page .footer-nav-link { min-height: 44px; padding: 6px 0; }
.program-page .notify-me-btn[disabled],
.program-page .js-notify-btn[disabled] { opacity: 0.7; cursor: progress; }
.program-page .js-notify-btn.subscribed { box-shadow: none; }

/* Fixed CTA bar: readable text, 44px button, notch / home-indicator safe ---------- */
.fixed-cta {
  padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  padding-top: 8px !important;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 8px !important;
}
.fixed-cta .status-closed-text {
  font-size: clamp(10px, 2.9vw, 12px) !important;
  letter-spacing: 0.03em !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  max-width: 7.2em;
}
.fixed-cta .price-container { gap: 6px !important; }
.fixed-cta .price-container .original { font-size: 12px !important; }
.fixed-cta .price-container .discounted { font-size: clamp(16px, 5vw, 20px) !important; }
.fixed-cta .notify-me-footer-btn,
.fixed-cta .fixed-cta-btn,
.fixed-cta .js-notify-btn,
.fixed-cta #notifyMeFooterBtn {
  min-height: 44px !important;
  padding: 0 clamp(12px, 4vw, 20px) !important;
  font-size: clamp(12.5px, 3.6vw, 14px) !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  justify-content: center;
}
@media (max-width: 360px) {
  .fixed-cta .price-container .original { display: none !important; }
}

/* Floating notify status toast sits above the CTA bar */
.notify-status.show { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.notify-status { max-width: calc(100vw - 24px); }
.program-page [data-state="error"].waitlist-status,
.program-page [data-state="error"].notify-status-msg { color: #ef4444; }

/* Freshers hero metrics: 2x2 instead of master's single column on phones */
@media (max-width: 600px) {
  .program-page .metrics-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; padding: 16px; }
  .program-page .metric-item { border-right: none; padding-right: 0; }
  .program-page .metric-item:nth-child(odd) { border-right: 1px solid var(--border-color, #E2E8F0); padding-right: 10px; }
  .program-page .metric-value { font-size: clamp(18px, 5.6vw, 22px); }
}

/* Let mentor highlight tiles wrap instead of truncating ("Business Finan...") */
.program-page .highlight-val,
.program-page .highlight-lbl { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Final-CTA / banner buttons: master scales the label up on phones and it wraps */
.program-page .notify-banner-btn { font-size: clamp(14px, 4.2vw, 16px); width: auto; max-width: 100%; justify-content: center; }
.program-page .btn-emerald-primary,
.program-page .btn-blue-primary,
.program-page .btn-coral-primary { max-width: 100%; }

/* ===== Header account button: solid dark-blue, round, 40px, both themes ===== */
.app-header .auth-icon-btn,
:root[data-theme="dark"] .app-header .auth-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #1D4ED8 !important; color: #fff !important;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.35);
}
.app-header .auth-icon-btn:hover,
.app-header .auth-icon-btn:active,
:root[data-theme="dark"] .app-header .auth-icon-btn:hover { background: #1E40AF !important; }
.app-header .auth-icon-btn i { color: #fff !important; font-size: 16px; }
:root[data-theme="dark"] .app-header .auth-icon-btn { background: #2563EB !important; box-shadow: 0 0 0 1px rgba(255,255,255,0.14); }
.app-header .hdr-icon-btn { border-radius: 50%; }
.hdr-icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .hdr-icon-btn .icon-sun { display: none; }
:root[data-theme="dark"] .hdr-icon-btn .icon-moon { display: block; }

/* ===== Footer: theme-aware (light page = light footer, dark page = dark footer), compact on phones ===== */
.program-page .page-footer {
  background: var(--bg-subtle, #F8FAFC); color: #0F172A; border-top: 1px solid #E2E8F0;
}
.program-page .footer-logo-img { filter: none; opacity: 1; }
.program-page .footer-col-title { color: #0F172A; }
.program-page .footer-brand-desc,
.program-page .footer-nav-link { color: #475569; }
.program-page .footer-nav-link:hover { color: #1D4ED8; }
.program-page .footer-nav-link.active-link { color: #1D4ED8; }
.program-page .footer-social-btn { background: #fff; border-color: #CBD5E1; color: #1E293B; }
.program-page .footer-trust-badge { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.program-page .footer-bottom-bar { border-top-color: #E2E8F0; }
.program-page .footer-copyright-text { color: #64748B; }
.program-page .footer-bottom-tagline { color: #475569; }
:root[data-theme="dark"] .program-page .page-footer { background: #0b1020; color: #e8eefb; border-top-color: #27324a; }
:root[data-theme="dark"] .program-page .footer-logo-img { filter: brightness(0) invert(1); opacity: .95; }
:root[data-theme="dark"] .program-page .footer-col-title { color: #fff; }
:root[data-theme="dark"] .program-page .footer-brand-desc,
:root[data-theme="dark"] .program-page .footer-nav-link { color: #aab6cf; }
:root[data-theme="dark"] .program-page .footer-nav-link:hover,
:root[data-theme="dark"] .program-page .footer-nav-link.active-link { color: #7db0ff; }
:root[data-theme="dark"] .program-page .footer-social-btn { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #e2e8f0; }
:root[data-theme="dark"] .program-page .footer-trust-badge { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.28); color: #34d399; }
:root[data-theme="dark"] .program-page .footer-bottom-bar { border-top-color: #27324a; }
:root[data-theme="dark"] .program-page .footer-copyright-text { color: #8d9ab6; }
:root[data-theme="dark"] .program-page .footer-bottom-tagline { color: #aab6cf; }

@media (max-width: 640px) {
  .program-page .page-footer { padding: 24px 16px calc(76px + env(safe-area-inset-bottom, 0px)); }
  .program-page .footer-grid { gap: 18px; margin-bottom: 14px; }
  .program-page .footer-brand-col { align-items: flex-start; text-align: left; }
  .program-page .footer-logo-link { margin-bottom: 10px; }
  .program-page .footer-logo-img { height: 32px; }
  .program-page .footer-brand-desc { text-align: left; margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
  .program-page .footer-social-row { justify-content: flex-start; margin-bottom: 12px; gap: 10px; }
  .program-page .footer-social-btn { width: 40px; height: 40px; }
  .program-page .footer-trust-badge { margin: 0; }
  .program-page .footer-nav-col { align-items: stretch; text-align: left; border-top: 1px solid #E2E8F0; padding-top: 14px; }
  :root[data-theme="dark"] .program-page .footer-nav-col { border-top-color: #27324a; }
  .program-page .footer-col-title { margin: 0 0 6px; font-size: 13px; }
  .program-page .footer-col-title::after { display: none; }
  .program-page .footer-col-list { gap: 0; align-items: stretch; }
  .program-page .footer-nav-link { min-height: 40px; padding: 0; justify-content: flex-start; width: 100%; font-size: 14px; line-height: 1.3; }
  .program-page .footer-nav-link:hover { transform: none; }
  .program-page .footer-bottom-bar { align-items: flex-start; text-align: left; gap: 4px; padding-top: 14px; }
  .program-page .footer-copyright-text,
  .program-page .footer-bottom-tagline { justify-content: flex-start; }
}

/* Fixed CTA bar follows the theme: white in light, page-dark in dark */
.fixed-cta { background: rgba(255,255,255,0.97) !important; color: #0F172A !important; border-top: 1px solid #E2E8F0 !important; box-shadow: 0 -4px 18px rgba(15,23,42,0.10) !important; }
.fixed-cta .status-closed-text { color: #B45309 !important; }
.fixed-cta .price-container .original { color: #64748B !important; }
.fixed-cta .price-container .discounted { color: #0F172A !important; }
:root[data-theme="dark"] .fixed-cta { background: rgba(11,16,32,0.97) !important; color: #fff !important; border-top-color: #27324a !important; box-shadow: 0 -4px 24px rgba(0,0,0,0.45) !important; }
:root[data-theme="dark"] .fixed-cta .status-closed-text { color: #fbbf24 !important; }
:root[data-theme="dark"] .fixed-cta .price-container .original { color: #8d9ab6 !important; }
:root[data-theme="dark"] .fixed-cta .price-container .discounted { color: #fff !important; }
