/* =============================================
   POLARIE — Mobile Fixes
   Criado: 2026-09-02
   Escopo: max-width 860px
   ============================================= */

/* ── NAV MOBILE ── */
@media(max-width:860px){

  /* Menu overlay ocupa tela toda mas com scroll */
  .nav-center{
    display:none;
    position:fixed;
    top:68px;
    left:0;right:0;bottom:0;
    background:rgba(5,13,26,.98);
    backdrop-filter:blur(20px);
    flex-direction:column;
    align-items:stretch;
    padding:16px 0;
    gap:0;
    overflow-y:auto;
    z-index:999;
  }
  .nav-center.open{display:flex;z-index:999}

  /* Links e botões de dropdown */
  .nav-link,
  .nav-dd-btn{
    font-size:1rem;
    padding:14px 20px;
    width:100%;
    text-align:left;
    border-radius:0;
    justify-content:space-between;
  }

  /* Dropdown dentro do menu fixo — expande por max-height */
  .nav-dd-menu{
    position:static;
    background:rgba(255,255,255,.04);
    backdrop-filter:none;
    border:none;
    border-radius:0;
    margin:0;
    padding:0;
    min-width:unset;
    /* escondido por max-height */
    max-height:0;
    overflow:hidden;
    opacity:1;
    visibility:visible;
    transform:none;
    transition:max-height .3s ease;
  }
  .nav-dd.open .nav-dd-menu{
    max-height:400px;
  }

  /* Itens do dropdown */
  .nav-dd-item{
    padding:12px 20px 12px 32px;
    border-radius:0;
    border-bottom:1px solid rgba(255,255,255,.04);
  }
  .nav-dd-item .ddi-name{font-size:.9rem}
  .nav-dd-item .ddi-desc{font-size:.75rem}

  /* Remove hover que não funciona em touch */
  .nav-dd:hover .nav-dd-menu{
    max-height:0;
  }
  .nav-dd.open:hover .nav-dd-menu{
    max-height:400px;
  }
}

/* ── TABELAS DE COMPARAÇÃO — scroll horizontal ── */
@media(max-width:768px){

  /* Wrapper para scroll */
  .comp-table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:16px;
    margin-top:48px;
  }
  .comp-table{
    margin-top:0;
    min-width:560px;
    font-size:.72rem;
  }
  .comp-table th,
  .comp-table td{
    padding:10px 10px;
  }

  /* Grids internos das demos — sem scroll lateral */
  .db-cards{grid-template-columns:repeat(2,1fr)!important}
  .fc-cards{grid-template-columns:repeat(2,1fr)!important}
  .dre-totals{grid-template-columns:repeat(2,1fr)!important}
  .nf-totals{grid-template-columns:repeat(2,1fr)!important}
  .conc-formats{grid-template-columns:1fr!important}

  /* NF list — scroll horizontal */
  .nf-list{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .nf-list-header,
  .nf-list-row{min-width:480px}

  /* DRE row */
  .dre-row{min-width:360px}
  .dre-table{overflow-x:auto;-webkit-overflow-scrolling:touch}

  /* Seções */
  .sec{padding:64px 16px}
  .hero{padding:80px 16px 56px}
  .cta-sec{padding:64px 16px}

  /* Botões hero em coluna */
  .h-actions{flex-direction:column;align-items:center}
  .btn-p,.btn-g{width:100%;max-width:300px;justify-content:center}
}

@media(max-width:480px){
  .footer-top{grid-template-columns:1fr!important}
  .nums{grid-template-columns:repeat(2,1fr)}
  .nbox{padding:28px 16px}
  .plans{grid-template-columns:1fr!important}
  .combo-grid{grid-template-columns:1fr!important}
  .grid3,.grid2{grid-template-columns:1fr!important}
}

/* ── TABELA EMPILHADA EM CARDS NO MOBILE ── */
@media(max-width:768px){

  /* Remove o wrapper de scroll — não precisa mais */
  div[style*="overflow-x:auto"]{
    overflow-x:visible;
    margin-top:32px;
  }

  .comp-table{
    display:block;
    min-width:unset;
    width:100%;
    font-size:.85rem;
  }
  .comp-table thead{display:none}
  .comp-table tbody{display:flex;flex-direction:column;gap:12px}
  .comp-table tr{
    display:grid;
    grid-template-columns:1fr;
    background:#fff;
    border:1.5px solid #e5e7eb;
    border-radius:14px;
    overflow:hidden;
    padding:0;
  }
  .comp-table tr:nth-child(even) td{background:#fff}

  /* Primeira célula = título da linha */
  .comp-table td:first-child{
    background:#0a0f1a!important;
    color:#F7FAFC!important;
    font-weight:700;
    font-size:.78rem;
    letter-spacing:.04em;
    padding:12px 16px;
    text-align:left!important;
    border-bottom:none;
  }

  /* Demais células mostram label via data-label */
  .comp-table td:not(:first-child){
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 16px;
    text-align:left!important;
    border-bottom:1px solid #f3f4f6;
    font-weight:500;
  }
  .comp-table td:not(:first-child)::before{
    content:attr(data-label);
    font-size:.72rem;
    font-weight:600;
    color:#9ca3af;
    text-transform:uppercase;
    letter-spacing:.06em;
    flex-shrink:0;
    margin-right:12px;
  }
  .comp-table td.hcol{
    background:#eff6ff!important;
    color:#0070f3!important;
  }
  .comp-table td.hcol::before{
    color:#0070f3;
  }
  .comp-table tr:last-child td{border-bottom:none}
}
