/* ═══════════════════════════════════════════════
   KING BI — Mobile & tablet layout
   Loaded last so these rules win on small screens.
   ═══════════════════════════════════════════════ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
img, svg, video, canvas {
  max-width: 100%;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── TABLET / SMALL LAPTOP ───────────────────── */
@media (max-width: 980px) {
  .container { padding: 0 20px; }

  .nav {
    padding: 12px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .nav.scrolled { padding: 10px 16px; }
  .nav-sep, .nav-label, .nav-links { display: none !important; }
  .nav-actions { gap: 8px; }
  .nav-inner .btn-nav-portal,
  .nav-inner .btn-nav-reg { display: none !important; }
  .nav-toggle { display: flex; }
  .btn-theme-toggle,
  .nav-toggle,
  .mobile-nav-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .hero {
    min-height: auto;
    padding: 104px 0 48px;
    padding-top: max(104px, calc(env(safe-area-inset-top) + 72px));
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
    width: 100%;
  }
  .hero-copy { text-align: center; max-width: none; }
  .hero-h1 {
    font-size: clamp(26px, 7vw, 38px);
    letter-spacing: -1px;
    line-height: 1.15;
  }
  .hline { overflow: visible; }
  .hline > span {
    overflow-wrap: break-word;
  }
  .hero-sub {
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.65;
  }
  .hero-cta-group {
    justify-content: center;
    max-width: 100%;
    width: 100%;
    gap: 12px;
  }
  .cta-btn,
  .cta-btn-ghost {
    justify-content: center;
    padding: 16px 22px;
    font-size: 15px;
    border-radius: 16px;
    min-height: 52px;
  }
  .hero-portal-hint { text-align: center; }
  .hero-stats {
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .hero-visual {
    max-width: min(420px, 100%);
    margin: 0 auto;
    width: 100%;
  }
  .hero-float,
  .scroll-hint,
  .floaters { display: none !important; }

  .s-free, .s-pro, .s-ben, .s-offer, .s-showcase,
  .s-courses, .s-reviews { padding: 72px 0; }

  .pmod-grid,
  .showcase-public-grid {
    grid-template-columns: 1fr;
  }
}

/* ── PHONE ───────────────────────────────────── */
@media (max-width: 700px) {
  .container { padding: 0 16px; }

  .nav { padding: 10px 14px; }
  .nav-brand { font-size: 20px; }

  .hero { padding: 96px 0 40px; }
  .hero-grid { padding: 0 16px; gap: 24px; }
  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 1.4px;
    padding: 7px 14px;
    margin-bottom: 16px;
    max-width: 100%;
  }
  .hero-h1 {
    font-size: clamp(24px, 7.2vw, 32px);
    letter-spacing: -0.6px;
    margin-bottom: 16px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }
  .hst-sep { display: none; }
  .hst-n { font-size: 20px; letter-spacing: -0.4px; }
  .hst-l { font-size: 11px; line-height: 1.3; }
  .hero-social-proof {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    padding: 12px 14px;
    margin-top: 18px;
  }
  .hsp-text { align-items: center; }
  .hsp-desc { font-size: 12.5px; }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-btn,
  .cta-btn-ghost {
    width: 100%;
    padding: 16px 20px;
  }
  .hero-frame { aspect-ratio: 4 / 5; border-radius: 18px; }
  .hero-frame-cap { left: 12px; right: 12px; bottom: 12px; padding: 12px 14px; }

  .free-grid,
  .ben-grid,
  .courses-grid,
  .reviews-grid,
  .pmod-grid,
  .how-track,
  .ppillar-grid,
  .showcase-public-grid,
  .pro-split { grid-template-columns: 1fr !important; }

  .courses-filter-tabs,
  .showcase-public-filters,
  .week-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    width: 100%;
    padding: 2px 2px 10px;
    margin-left: 0;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .courses-filter-tabs::-webkit-scrollbar,
  .showcase-public-filters::-webkit-scrollbar,
  .week-tabs::-webkit-scrollbar { display: none; }
  .c-filter-btn,
  .spf-btn,
  .wtab {
    flex: 0 0 auto;
    min-height: 42px;
    white-space: nowrap;
  }

  .courses-search-input {
    font-size: 16px;
    min-height: 48px;
  }

  .c-card-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-course-enroll,
  .btn-review-cta,
  .btn-free-whatsapp,
  .btn-oc-whatsapp {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    min-height: 48px;
    padding: 14px 16px;
  }

  .pro-cta-banner,
  .reviews-cta-banner,
  .free-cta-banner {
    padding: 22px 16px;
    text-align: center;
    justify-content: center;
  }
  .pro-cta-text h3 { font-size: 20px; }

  .offer-card { padding: 28px 16px; }
  .oc-steps { flex-direction: column; }
  .ocs-arr { align-self: flex-start; padding: 6px 0; transform: rotate(90deg); }
  .oc-prices { flex-direction: column; gap: 10px; }
  .ocp-new { font-size: 34px; }

  .dlist li { padding: 14px 14px; gap: 12px; }
  .dlist li p { padding-top: 2px; }

  .footer {
    padding: 48px 16px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }
  .ft-brand { font-size: 30px; }
  .ft-nav { gap: 12px 18px; }

  .mobile-nav-drawer {
    width: min(360px, 88vw);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav-link {
    min-height: 48px;
    padding: 14px 20px;
  }
  .mobile-nav-actions {
    padding: 16px 20px max(28px, env(safe-area-inset-bottom));
  }
  .mobile-nav-actions .btn-nav-portal,
  .mobile-nav-actions .btn-nav-reg {
    display: flex !important;
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }
}

/* ── SMALL PHONE ─────────────────────────────── */
@media (max-width: 400px) {
  .hero-h1 { font-size: 22px; }
  .hst-n { font-size: 18px; }
  .hst-l { font-size: 10px; }
  .c-course-title { font-size: 17px; }
  .cta-btn, .cta-btn-ghost { font-size: 14px; padding: 14px 14px; }
}

/* Touch: no hover-lift that feels sticky */
@media (hover: none) {
  .course-card:hover,
  .icard:hover,
  .bcard:hover,
  .pmod:hover,
  .sc-pub-card:hover,
  .rev-card:hover {
    transform: none;
  }
  .cta-btn:hover,
  .cta-btn-ghost:hover,
  .btn-course-enroll:hover,
  .btn-review-cta:hover {
    transform: none;
  }
}
