/* Log Manager — ajustes globais e responsividade
   Carregado por último no <head>, depois do CSS de cada página. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  overflow-x: hidden;
  max-width: 100%;
}

img, svg, video, canvas { max-width: 100%; }
img { height: auto; }

/* Evita que tabelas/blocos largos estourem a viewport no celular */
@media (max-width: 900px) {
  [style*="max-width:1280px"],
  [style*="max-width: 1280px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ---------- Home: a única página sem breakpoints próprios ---------- */
@media (max-width: 980px) {
  html[data-page="index"] [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  html[data-page="index"] [style*="grid-template-columns"] > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  html[data-page="index"] h1 { font-size: clamp(30px, 8vw, 46px) !important; line-height: 1.08 !important; }
  html[data-page="index"] h2 { font-size: clamp(24px, 6.4vw, 34px) !important; line-height: 1.12 !important; }
  html[data-page="index"] h3 { font-size: clamp(17px, 4.6vw, 20px) !important; }
}

/* ---------- Ajustes de telefone, válidos para todas as páginas ---------- */
@media (max-width: 620px) {
  h1 { font-size: clamp(28px, 8.4vw, 40px) !important; line-height: 1.1 !important; }
  h2 { font-size: clamp(23px, 6.8vw, 31px) !important; line-height: 1.14 !important; }

  /* Botões e CTAs ocupam a largura, com altura de toque confortável */
  a[style*="border-radius:999px"][style*="height:50px"],
  a[style*="border-radius: 999px"][style*="height: 50px"] {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* Cartões e blocos com padding generoso ficam mais compactos */
  [style*="padding:32px"], [style*="padding: 32px"] { padding: 22px !important; }
  [style*="padding:30px"], [style*="padding: 30px"] { padding: 20px !important; }

  /* Mocks de painel dentro de molduras seguem em escala, sem quebrar colunas */
  [style*="aspect-ratio"] [style*="grid-template-columns"] {
    grid-template-columns: revert !important;
  }
}

/* ---------- Cabeçalho no celular ----------
   Logo + CTA + hambúrguer não cabem em 390px: o CTA sai e o menu fica alcançável.
   O mesmo link continua disponível dentro do menu e nas seções da página. */
@media (max-width: 620px) {
  header a[href$="#rastrear"] { display: none !important; }
  header button[aria-label="Menu"] { margin-left: auto; }
}

/* Blocos com largura fixa em px viram fluidos no celular */
@media (max-width: 900px) {
  [style*="width:520px"], [style*="width: 520px"],
  [style*="width:560px"], [style*="width: 560px"],
  [style*="width:586px"], [style*="width: 586px"],
  [style*="width:612px"], [style*="width: 612px"],
  [style*="width:620px"], [style*="width: 620px"],
  [style*="width:640px"], [style*="width: 640px"],
  [style*="width:720px"], [style*="width: 720px"],
  [style*="width:760px"], [style*="width: 760px"],
  [style*="width:880px"], [style*="width: 880px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Faixas de logos: menor no celular */
@media (max-width: 620px) {
  .lm-chip { width: 148px !important; height: 68px !important; }
  .lm-logo { height: 34px !important; }
}

/* Respeita quem pediu menos movimento */
@media (prefers-reduced-motion: reduce) {
  .lm-track, .lm-track-rev { animation: none !important; }
}
