/*
 * FlowZen — mobile-polish.css
 * Patch cirúrgico baseado nos prints reais mobile do flowzen.com.br
 * Adicione DEPOIS do main.css. Não altera nada no desktop.
 *
 * Correções:
 *  1. Hero: mockup aparece no mobile (main.css coloca display:none)
 *  2. Hero: botões fullwidth elegantes
 *  3. Preview "Assim é o FlowZen": layout bonito no mobile
 *  4. Tabela comparativa: scroll horizontal + indicador arraste
 *  5. Footer: espaço maior no rodapé
 */

/* ═══════════════════════════════════════════════════════════
   1 + 2. HERO — MOCKUP + BOTÕES
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  /* Mostrar mockup (main.css: .hero-right{display:none}) */
  .hero-right {
    display: block !important;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0 22px;
  }

  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    align-items: start !important;
  }

  #hero {
    padding: 96px 0 60px;
    align-items: flex-start;
  }

  .hero-mockup {
    border-radius: 14px;
    box-shadow:
      0 0 0 1px rgba(174,111,240,.22),
      0 24px 60px rgba(0,0,0,.6),
      0 0 80px rgba(174,111,240,.10);
  }

  /* Sidebar some — inútil no mobile */
  .mkp-sidebar { display: none !important; }

  .mockup-body {
    height: auto;
    min-height: 195px;
    display: flex;
  }

  .mkp-main {
    flex: 1;
    width: 100%;
    padding: 13px;
    gap: 9px;
  }

  .mkp-kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mkp-kpi       { padding: 8px 7px; }
  .mkp-kpi-label { font-size: 7px; margin-bottom: 2px; }
  .mkp-kpi-val   { font-size: 14px; }
  .mkp-kpi-sub   { font-size: 8px; }

  .mkp-row { grid-template-columns: 1fr 1fr; gap: 6px; min-height: 85px; }
  .mkp-card       { padding: 8px; }
  .mkp-card-title { font-size: 7px; }

  /* Badges flutuantes reposicionados */
  .hero-badge-top {
    top: 4px; right: 8px; left: auto !important;
    padding: 8px 12px; border-radius: 11px;
  }
  .hero-badge-bot {
    bottom: 4px; left: 8px; right: auto !important;
    padding: 8px 12px; border-radius: 11px;
  }
  .badge-label { font-size: 10px; }
  .badge-val   { font-size: 12px; }
  .badge-dot   { width: 7px; height: 7px; }

  /* Glassmorphism nos badges */
  .hero-badge {
    background: rgba(14,14,20,.90);
    border: 1px solid rgba(174,111,240,.20);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
  }

  /* Animações dos badges */
  .hero-badge-top { animation: fzBadgeUp 5s ease-in-out infinite; }
  .hero-badge-bot { animation: fzBadgeDown 6s ease-in-out infinite; animation-delay: -2.5s; }

  @keyframes fzBadgeUp   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
  @keyframes fzBadgeDown { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }

  html, body { overflow-x: hidden; max-width: 100vw; }
  .hero-right, .hero-mockup, .preview-wrap { max-width: 100%; box-sizing: border-box; }
}

@media (max-width: 640px) {

  /* Botões fullwidth elegantes */
  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
  }
  .hero-actions .btn-cta,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 17px 20px;
    font-size: 15px;
    min-height: 54px;
    border-radius: 12px;
    touch-action: manipulation;
  }

  .hero-right  { max-width: 100%; padding: 16px 0 18px; }
  .mkp-kpis    { gap: 5px; }
  .mkp-kpi-val { font-size: 13px; }
  .mkp-row     { gap: 5px; min-height: 78px; }
  .mockup-body { min-height: 175px; }
}

@media (max-width: 400px) {
  .mkp-row        { grid-template-columns: 1fr; }
  .hero-badge-bot { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════
   3. PREVIEW "ASSIM É O FLOWZEN"
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  .preview-wrap {
    border-radius: 16px;
    border-color: rgba(174,111,240,.20);
    box-shadow:
      0 0 0 1px rgba(174,111,240,.12),
      0 24px 60px rgba(0,0,0,.55),
      0 0 80px rgba(174,111,240,.07);
  }

  /* Body: altura automática */
  .preview-body { height: auto !important; flex-direction: column; }

  .pv-sidebar { display: none !important; }

  .pv-main {
    width: 100%;
    padding: 16px;
    gap: 12px;
    flex: none;
    overflow: visible;
  }

  .pv-title  { font-size: 13px; }
  .pv-status { font-size: 10px; }

  /* KPIs 2x2 */
  .pv-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pv-kpi       { padding: 12px 10px; border-radius: 10px; }
  .pv-kpi-label { font-size: 8px; }
  .pv-kpi-val   { font-size: 20px; }

  /* Conteúdo empilha */
  .pv-content { grid-template-columns: 1fr; gap: 8px; flex: none; }

  .pv-panel       { padding: 12px; border-radius: 10px; }
  .pv-panel-title { font-size: 9px; }
  .pv-bars        { height: 60px; gap: 4px; }
  .pv-b           { border-radius: 3px 3px 0 0; }
  .pv-activity    { gap: 6px; }
  .pv-act-item    { padding: 8px 10px; border-radius: 8px; }
  .pv-act-dot     { width: 6px; height: 6px; }
  .pv-act-text    { font-size: 11px; white-space: normal; }
  .pv-act-time    { font-size: 10px; }
}

@media (max-width: 480px) {
  .pv-main    { padding: 13px; gap: 10px; }
  .pv-kpis    { gap: 6px; }
  .pv-kpi     { padding: 10px 8px; }
  .pv-kpi-val { font-size: 18px; }
  .pv-bars    { height: 50px; }
  .pv-act-text { font-size: 10px; }
}


/* ═══════════════════════════════════════════════════════════
   4. TABELA COMPARATIVA — scroll + indicador arraste
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  .comp-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 12px;
  }
  .comp-wrap::-webkit-scrollbar { display: none; }

  .comp-table { min-width: 540px; font-size: 12px; }

  .comp-table th,
  .comp-table td { padding: 10px 12px; white-space: nowrap; }

  .comp-table td:first-child,
  .comp-table th:first-child { white-space: normal; min-width: 150px; }

  /* Indicador arraste */
  .comp-wrap::after {
    content: '← arraste →';
    display: block;
    text-align: center;
    font-size: 10px;
    font-family: var(--f-mono, monospace);
    color: var(--dim, #4a4a62);
    padding: 9px 0 2px;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
}

@media (max-width: 480px) {
  .comp-wrap {
    margin: 0 -18px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .comp-table { min-width: 460px; }
  .comp-table th, .comp-table td { padding: 9px 10px; font-size: 11px; }
  .comp-table td:first-child { min-width: 130px; }
}


/* ═══════════════════════════════════════════════════════════
   5. FOOTER — espaço no rodapé
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .footer-top    { padding-top: 48px; padding-bottom: 48px; }
  .footer-bottom { padding-bottom: 28px !important; }
}

@media (max-width: 640px) {
  footer         { padding-bottom: 72px; }
  .footer-bottom { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important; }
}
