/* src/styles/home-mobile.css
 *
 * Mobile homepage layout overrides. Loaded by index.html only — selectors
 * target landing-page classes (.landing-hero, .pillar-grid, .careers-promo-*,
 * etc.) that don't exist on the rest of the site, so the file is a no-op
 * elsewhere even if accidentally linked.
 *
 * Cascade strategy: every override uses !important to win against earlier
 * inline <style> blocks in index.html's <head>. That guarantee is what made
 * it safe to externalize from the original <style id="mobile-v10-override">
 * block at end of body. Do NOT introduce non-!important overrides here
 * without checking the inline blocks at index.html lines ~88, ~2671, ~2974.
 */

@media (max-width: 767px) {
      /* ─── TYPOGRAPHY ─── */
      html { font-size: 17px !important; -webkit-text-size-adjust: 100% !important; }
      body { font-size: 17px !important; line-height: 1.6 !important; }
      p, li, dd, dt,
      .landing-hero .sub, .landing-section .section-sub,
      .landing-section-header p, .brand-prose, .faq-answer {
        font-size: 16.5px !important; line-height: 1.65 !important;
      }
      .landing-hero h1, .brand-hero h1, h1 {
        font-size: clamp(32px, 9.5vw, 42px) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.025em !important;
        margin: 0 0 18px !important;
      }
      .landing-section h2, .brand-section h2, h2 {
        font-size: clamp(26px, 7.5vw, 32px) !important;
        line-height: 1.18 !important;
      }
      h3 { font-size: 19px !important; line-height: 1.3 !important; }
      .eyebrow { font-size: 11.5px !important; letter-spacing: 0.12em !important; padding: 5px 12px !important; }

      /* ─── HIDE NOISE — keep only essential sections ───
         User restored: podcast section (limited to 2 cards), background
         overlays (grain + aurora orbs 1-3). Still hidden: heavy elements
         (orbits, ribbons, glyph-field, bg-canvas) for perf. */
      .hero-orbits, .hero-claims, .hero-stats, .hero-stats-note,
      .chromatic-sweep, .aurora-ribbon-wrap,
      .aurora-ribbon-1, .aurora-ribbon-2, .aurora-ribbon-3,
      .aurora-orb-4, .aurora-orb-5, .aurora-orb-6,
      .light-beam, .glyph-field, #bg-canvas,
      .section-divider, .trust-badges,
      #how-it-works, #built-by,
      .builtby-aside, .landing-section--trust, .landing-section--secondary,
      .web-header-badge {
        display: none !important;
      }
      /* RESTORE colorful ambient background — was hidden in V10 by
         hiding .aurora-extra (the parent container), which blocked all
         orbs inside even after un-hiding them. Now keep the parent
         visible but only show the lighter 3 orbs. */
      .aurora-extra { display: block !important; }
      .grain-overlay { display: block !important; opacity: 0.5 !important; }
      .aurora-orb-1, .aurora-orb-2, .aurora-orb-3 { display: block !important; }
      .scroll-progress { display: block !important; }
      /* Podcast section: visible on mobile, but only first 2 cards */
      #podcast { display: block !important; padding: 36px 0 16px !important; }
      #podcast .podcast-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 0 18px !important;
      }
      #podcast .podcast-card:nth-of-type(n+3) { display: none !important; }

      /* ─── HERO — title + sub + ONE CTA ─── */
      .landing-hero {
        padding: 56px 18px 36px !important;
        text-align: center !important;
      }
      .landing-hero .hero-ctas {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 6px !important;
        gap: 12px !important;
        margin: 14px 0 0 !important;
      }
      .landing-hero .hero-ctas .cta-secondary { display: none !important; }
      .landing-hero .hero-ctas .cta-primary,
      a.cta-primary, a.cta-secondary {
        width: 100% !important;
        min-height: 56px !important;
        padding: 17px 22px !important;
        font-size: 17px !important;
        font-weight: 600 !important;
        border-radius: 14px !important;
        justify-content: center !important;
        box-sizing: border-box !important;
      }
      .landing-hero .sub { max-width: 94% !important; margin: 0 auto 22px !important; }

      /* ─── SECTIONS — generous spacing ─── */
      .landing-section, .brand-section {
        margin-top: 56px !important;
        padding: 0 18px !important;
      }
      .landing-section-header { margin-bottom: 22px !important; padding: 0 !important; }

      /* ─── GRIDS — force 1 column with healthy gap ─── */
      .cert-grid, .pack-grid, .pillar-grid, .careers-promo-grid,
      .podcast-grid, .news-grid, .compare-grid, .why-grid, .feature-grid,
      .courses-grid, .builtby-grid, .stats-grid, .hero-claims,
      .related-grid, .article-grid, .resource-grid, .tile-grid,
      .career-grid, .testimonials-grid, .free-resources-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 !important;
      }

      /* ─── CARDS — bigger, breathier ─── */
      .cert-card, .pillar-card, .pack-tile, .career-card,
      .compare-card, .news-card, .course-card, .related-card,
      .careers-promo-card, .podcast-card {
        padding: 22px 20px !important;
        border-radius: 16px !important;
      }
      .cert-card-brand, .pack-tile-name, .related-card-name,
      .news-card h3, .career-card h3, .careers-promo-card h3 {
        font-size: 18.5px !important; line-height: 1.3 !important;
      }
      .cert-exam {
        padding: 12px 12px !important;
        gap: 12px !important;
      }
      .cert-exam-code { font-size: 13.5px !important; }
      .cert-exam-name { font-size: 15px !important; line-height: 1.35 !important; }

      /* ─── HEADER ─── owned solely by desktop.css @media (max-width:1023px).
         The homepage no longer overrides .web-header — competing grid vs.
         flex definitions across files were the 2-line / jumping bug. */

      /* ─── FOOTER ─── */
      .web-footer { padding: 32px 18px 28px !important; }
      .web-footer-text { font-size: 13.5px !important; line-height: 1.55 !important; }
      .web-footer-links a { font-size: 14px !important; padding: 6px 8px !important; }

      /* ─── FAQ ─── */
      .faq-list { padding: 0 !important; }
      .faq-item { margin-bottom: 10px !important; }
      .faq-item summary {
        font-size: 16px !important;
        padding: 18px 50px 18px 18px !important;
        min-height: 56px;
        line-height: 1.4 !important;
      }
      .faq-item .faq-answer {
        font-size: 15.5px !important;
        padding: 0 18px 18px !important;
        line-height: 1.6 !important;
      }

      /* ─── NEWSLETTER ─── */
      .newsletter-cta-inner {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 24px 20px !important;
        margin: 0 !important;
      }
      .newsletter-cta-form { flex-direction: column !important; gap: 10px !important; width: 100% !important; }
      .newsletter-cta-form input { width: 100% !important; min-height: 52px !important; font-size: 17px !important; padding: 14px 16px !important; border-radius: 12px !important; box-sizing: border-box !important; }
      .newsletter-cta-form button { width: 100% !important; min-height: 52px !important; font-size: 16px !important; }

      /* ─── APP PROMO ─── */
      .app-promo-banner {
        flex-direction: column !important;
        padding: 26px 20px !important;
        margin: 0 !important;
        gap: 18px !important;
        text-align: center !important;
      }
      .app-promo-btn { width: 100% !important; min-height: 54px !important; font-size: 16px !important; justify-content: center !important; }

      /* ─── QOTD ─── */
      .quiz-demo-section, #qotd-section { padding: 0 18px !important; }
      .qotd-card { padding: 22px 20px !important; border-radius: 16px !important; }

      /* ─── FORMS ─── */
      input, textarea, select {
        font-size: 17px !important;
        padding: 14px 16px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
      }

      /* ─── KILL HORIZONTAL OVERFLOW (without breaking sticky header) ─── */
      html, body {
        max-width: 100vw !important;
        overflow-x: clip !important; /* clip preserves sticky; hidden breaks it */
      }
      main, section, article, footer {
        max-width: 100vw !important;
        overflow-x: hidden !important;
      }

      /* ─── TAP FEEDBACK ─── */
      .cert-card:active, .pack-tile:active, .pillar-card:active,
      a.cta-primary:active, a.cta-secondary:active, button:active {
        transform: scale(0.985);
        opacity: 0.94;
      }
    }

    /* Extra-small phones */
    @media (max-width: 380px) {
      html { font-size: 16.5px !important; }
      .landing-hero h1, .brand-hero h1, h1 { font-size: clamp(28px, 9vw, 34px) !important; }
      .landing-section h2, h2 { font-size: clamp(24px, 7vw, 28px) !important; }
      .landing-hero { padding: 42px 16px 28px !important; }
      a.cta-primary, a.cta-secondary { min-height: 52px !important; padding: 15px 20px !important; font-size: 16px !important; }
      .cert-card, .pack-tile { padding: 18px 16px !important; }
    }

    /* ═══════════════════════════════════════════════════════════════════
       ULTRA MINIMAL MOBILE HOMEPAGE (V11) — keep only:
         · Header logo (no nav)
         · Hero (title + ONE button)
         · #certifications (the primary action)
         · Footer essentials (legal links)
       Everything else is hidden because the app prompt now handles
       the "get app" path and the cert grid is the main action.
       ═══════════════════════════════════════════════════════════════════ */
    @media (max-width: 767px) {
      /* Sections to hide entirely on phone (user-curated, V12 → V19):
         - QOTD: KEEP (user wants it visible)
         - Careers: KEEP (user wants a glimpse)
         - Podcast: KEEP (limit to 2 cards via :nth-of-type — handled above)
         - Feedback CTA: HIDE (user request) */
      #how-it-works,
      #built-by,
      #get-app,
      .landing-section--secondary,
      .landing-section--trust,
      .landing-section[id*="faq"],
      .faq-section,
      .feedback-cta,
      #feedback-section,
      .section-divider {
        display: none !important;
      }

      /* Header: single authoritative definition lives in desktop.css
         @media (max-width:1023px) — single-row flex, logo left,
         hamburger right, nav hidden. No homepage-specific override. */

      /* Hero: title + ONE CTA, no sub copy, no eyebrow */
      .landing-hero .eyebrow,
      .landing-hero .sub {
        display: none !important;
      }
      .landing-hero {
        padding: 44px 18px 28px !important;
        min-height: auto !important;
      }
      .landing-hero h1 { margin: 0 0 22px !important; }
      .landing-hero .hero-ctas { margin: 0 !important; }

      /* ─── "What brings you today" — title only, no descriptions ─── */
      .goal-picker-eyebrow,
      .goal-picker-sub,
      .goal-button .goal-desc {
        display: none !important;
      }
      .goal-picker-header h2 { margin: 0 0 14px !important; font-size: 19px !important; }
      .goal-button {
        padding: 16px 14px !important;
        min-height: 64px !important;
      }
      .goal-button strong { font-size: 15.5px !important; line-height: 1.3 !important; }
      .goal-icon { font-size: 22px !important; }

      /* ─── Cert cards: TITLE ONLY → link to brand list ─── */
      .cert-card { padding: 0 !important; border-radius: 14px !important; }
      .cert-card-exams,
      .cert-card-cta { display: none !important; }
      .cert-card-head {
        display: flex !important;
        padding: 18px 18px !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 60px !important;
        margin: 0 !important;
      }
      .cert-card-brand { font-size: 17px !important; font-weight: 700 !important; }
      .cert-card-count {
        font-size: 10.5px !important;
        padding: 4px 9px !important;
        white-space: nowrap;
      }
      .cert-card::after,
      .cert-card::before { content: none !important; }

      /* Cert section: just heading + grid */
      #certifications .landing-section-header { margin-bottom: 16px !important; }
      #certifications .landing-section-header > *:not(h2) { display: none !important; }

      /* ─── Careers section: compact list, no descriptions ─── */
      #careers-section { display: block !important; margin-top: 44px !important; }
      #careers-section .landing-section-header { margin-bottom: 14px !important; }
      #careers-section .landing-section-header > *:not(h2) { display: none !important; }
      .careers-promo-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        padding: 0 !important;
      }
      .careers-promo-card {
        padding: 16px 12px !important;
        text-align: center !important;
        align-items: center !important;
        min-height: 110px;
      }
      .careers-promo-icon {
        font-size: 26px !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 auto 10px !important;
        border-radius: 12px !important;
      }
      .careers-promo-card h3 {
        font-size: 14px !important;
        line-height: 1.25 !important;
        margin: 0 !important;
        font-weight: 700 !important;
      }
      .careers-promo-cta,
      .careers-promo-cta-link,
      .careers-promo-eyebrow,
      .careers-promo-meta,
      .careers-promo-card p { display: none !important; }

      /* ─── QOTD: keep, make compact ─── */
      #qotd-section, .quiz-demo-section {
        display: block !important;
        padding: 0 18px !important;
        margin-top: 22px !important; /* was 44px — user asked tighter gap */
      }
      .qotd-card { padding: 20px !important; border-radius: 14px !important; }
      /* Trim the onboarding zone's bottom margin so the two cards sit close */
      .onboarding-zone { padding-bottom: 6px !important; margin-bottom: 0 !important; }

      /* ─── Newsletter: fix overflow/overlap ─── */
      #newsletter-section,
      .newsletter-cta {
        padding: 0 16px 24px !important;
        margin: 36px 0 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
      }
      .newsletter-cta-inner {
        max-width: 100% !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        padding: 22px 18px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border-radius: 16px !important;
      }
      .newsletter-cta-icon { width: 44px !important; height: 44px !important; font-size: 20px !important; margin: 0 auto !important; }
      .newsletter-cta-copy h2 { font-size: 18px !important; text-align: center !important; }
      .newsletter-cta-copy p {
        font-size: 13.5px !important;
        text-align: center !important;
        margin: 4px 0 12px !important;
      }
      .newsletter-cta-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
      }
      .newsletter-cta-input,
      .newsletter-cta-btn {
        width: 100% !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
      }
      .newsletter-cta-btn { min-height: 52px !important; }
      .newsletter-cta-fineprint { font-size: 11px !important; text-align: center !important; }

      /* Footer: keep legal links but tighten */
      .web-footer { padding: 28px 18px 24px !important; }
      .web-footer-text { font-size: 12.5px !important; opacity: 0.7; }
    }

    /* ═══════════════════════════════════════════════════════════════════
       LESS VERBOSE MOBILE — strip explanatory copy, eyebrows, sub-paragraphs.
       Let icons + concise titles speak for themselves.
       ═══════════════════════════════════════════════════════════════════ */
    @media (max-width: 767px) {
      /* Hide all explanatory sub-paragraphs under section headers */
      .landing-section-header p,
      .landing-section-header .section-sub,
      .landing-section .section-sub,
      .brand-section .section-sub,
      .landing-section-header > .eyebrow,
      .pillar-card-desc,
      .cert-card-desc,
      .career-card-desc,
      .careers-promo-eyebrow,
      .careers-promo-meta,
      .pack-tile-desc,
      .pack-tile-meta,
      .related-card-desc,
      .news-card-excerpt,
      .compare-card-desc,
      .hero-claim-pill-row,
      .hero-claim-feature-title,
      .hero-stats-note,
      .trademark-note {
        display: none !important;
      }

      /* Strip hero down to title + ONE button (sub kept but tightened) */
      .landing-hero .eyebrow { display: none !important; }
      .landing-hero .sub {
        font-size: 15.5px !important;
        margin: 6px auto 18px !important;
        max-width: 92% !important;
      }

      /* Compact section headers */
      .landing-section-header,
      .brand-section .section-header {
        text-align: center !important;
        margin-bottom: 18px !important;
      }
      .landing-section h2,
      .brand-section h2 {
        margin: 0 !important;
        font-size: clamp(22px, 6.5vw, 28px) !important;
      }

      /* Cert cards: tighter — name + count, exam list streamlined */
      .cert-card { padding: 18px 18px 16px !important; }
      .cert-card-head { margin-bottom: 8px !important; }
      .cert-card-brand { font-size: 17px !important; }
      .cert-card-count { font-size: 10.5px !important; padding: 3px 8px !important; }
      .cert-card-exams { margin: 4px -4px 8px !important; gap: 0 !important; }
      .cert-exam {
        padding: 11px 10px !important;
        gap: 8px !important;
        grid-template-columns: 1fr auto !important;
      }
      .cert-exam-code { font-size: 12px !important; opacity: 0.8; }
      .cert-exam-name { font-size: 14.5px !important; line-height: 1.3 !important; }
      .cert-exam-arrow { display: none !important; }
      .cert-card-cta { font-size: 13.5px !important; padding: 8px 0 !important; }

      /* Career promo cards: title + icon only */
      .careers-promo-card { padding: 18px !important; }
      .careers-promo-card h3 { font-size: 17px !important; margin: 8px 0 0 !important; }
      .careers-promo-cta { margin-top: 12px !important; }
      .careers-promo-cta-link { font-size: 14px !important; }

      /* FAQ: keep but tighten */
      .faq-item summary { font-size: 15.5px !important; padding: 16px 44px 16px 16px !important; min-height: 52px; }
      .faq-item .faq-answer { font-size: 14.5px !important; padding: 0 16px 14px !important; }

      /* App promo: one CTA, no feature list */
      .app-promo-features { display: none !important; }
      .app-promo-desc { font-size: 14.5px !important; margin: 4px 0 0 !important; }
      .app-promo-title { font-size: 22px !important; }

      /* Newsletter: tagline only */
      .newsletter-cta-inner h2 { font-size: 20px !important; margin: 0 !important; }
      .newsletter-cta-inner p { font-size: 14px !important; margin: 4px 0 12px !important; }
    }

    /* ═══════════════════════════════════════════════════════════════════
       MOBILE APP PROMPT — phone-only modal
       ═══════════════════════════════════════════════════════════════════ */
    .mobile-prompt { display: none; }
    @media (max-width: 767px) {
      .mobile-prompt {
        position: fixed;
        inset: 0;
        z-index: 99999;
        background: rgba(4, 8, 18, 0.78);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
        animation: cq-prompt-fade 0.25s ease both;
      }
      .mobile-prompt[hidden] { display: none !important; }
      .mobile-prompt-card {
        position: relative;
        width: 100%;
        max-width: 480px;
        background: linear-gradient(180deg, #0e1424 0%, #0a0f1d 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 22px 22px 0 0;
        padding: 34px 24px 26px;
        text-align: center;
        box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
        animation: cq-prompt-slide 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both;
        padding-bottom: calc(26px + env(safe-area-inset-bottom));
      }
      .mobile-prompt-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        border: none;
        color: #a8b6d1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
      }
      .mobile-prompt-close:active { background: rgba(255, 255, 255, 0.12); transform: scale(0.94); }
      .mobile-prompt-icon img {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.28);
      }
      .mobile-prompt h2 {
        font-size: 22px !important;
        font-weight: 700 !important;
        color: #f1f5fb !important;
        margin: 16px 0 6px !important;
        letter-spacing: -0.01em;
      }
      .mobile-prompt p {
        font-size: 14.5px !important;
        color: #a8b6d1 !important;
        line-height: 1.5 !important;
        margin: 0 0 22px !important;
        max-width: 320px;
        margin-left: auto !important;
        margin-right: auto !important;
      }
      .mobile-prompt-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        min-height: 54px;
        padding: 14px 20px;
        font-family: inherit;
        font-size: 16px;
        font-weight: 600;
        border-radius: 14px;
        border: none;
        text-decoration: none;
        cursor: pointer;
        margin-bottom: 10px;
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
      }
      .mobile-prompt-btn:active { transform: scale(0.985); }
      .mobile-prompt-btn-primary {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #fff;
        box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
      }
      .mobile-prompt-btn-secondary {
        background: transparent;
        color: #a8b6d1;
        border: 1px solid rgba(255, 255, 255, 0.12);
        margin-bottom: 0;
      }
      .mobile-prompt-btn-secondary:active { background: rgba(255, 255, 255, 0.04); }
    }
    @keyframes cq-prompt-fade { from { opacity: 0; } to { opacity: 1; } }
    @keyframes cq-prompt-slide { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
