/* Ajustes para celular e tablet.
   As páginas usam estilos inline, por isso os seletores procuram trechos do atributo style
   e usam !important. As miniaturas de sites (dentro de container-type) ficam de fora:
   elas já se ajustam sozinhas ao tamanho. */

.m-menu-btn{display:none;}

@media (max-width: 960px){
  html,body{overflow-x:hidden;}

  /* Espaçamento lateral e vertical das seções */
  [style*="max-width:1200px"]{padding-left:20px !important;padding-right:20px !important;}
  [style*="padding:110px 40px"],[style*="padding:90px 40px"]{padding-top:64px !important;padding-bottom:64px !important;}
  [style*="padding:80px 40px"]{padding-top:56px !important;padding-bottom:56px !important;}
  [style*="padding:150px 40px"],[style*="padding:140px 40px"]{padding-top:110px !important;padding-bottom:40px !important;}
  [style*="padding:20px 40px 120px"],[style*="padding:30px 40px 120px"],[style*="padding:20px 40px 110px"],
  [style*="padding:10px 40px 100px"],[style*="padding:60px 40px 110px"]{padding-bottom:72px !important;}
  [style*="padding:80px 40px 40px"]{padding-top:56px !important;}

  /* Grades: 4 colunas viram 2; o resto vira 1 coluna */
  [style*="grid-template-columns:repeat(4"]:not([style*="container-type"] *){grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  [style*="grid-template-columns:repeat(3"]:not([style*="container-type"] *),
  [style*="grid-template-columns:repeat(2"]:not([style*="container-type"] *),
  [style*="grid-template-columns:1fr 1fr"]:not([style*="container-type"] *),
  [style*="grid-template-columns:1.2fr 1fr"]:not([style*="container-type"] *),
  [style*="grid-template-columns:1fr 420px"]:not([style*="container-type"] *),
  [style*="grid-template-columns:1fr 1.3fr"]:not([style*="container-type"] *){
    grid-template-columns:minmax(0,1fr) !important;gap:28px !important;
  }
  /* Rodapé: 2 colunas */
  [style*="grid-template-columns:1.4fr 1fr 1fr 1fr"]{grid-template-columns:1fr 1fr !important;gap:32px !important;}
  [style*="grid-template-columns:1.4fr 1fr 1fr 1fr"] > :first-child{grid-column:1 / -1;}

  /* Linhas de serviço (número | texto | etiqueta) */
  .row-card{grid-template-columns:44px minmax(0,1fr) !important;gap:16px 18px !important;padding:24px !important;}
  .row-card > :last-child{grid-column:2;justify-self:start;}

  /* Linha do "como trabalhamos" só faz sentido com 4 colunas lado a lado */
  .step-line,.step-line-fill{display:none !important;}

  /* Títulos */
  [style*="font-size:72px"]:not([style*="container-type"] *){font-size:44px !important;}
  [style*="font-size:56px"]:not([style*="container-type"] *){font-size:38px !important;}
  [style*="font-size:44px"]:not([style*="container-type"] *){font-size:32px !important;}
  [style*="font-size:38px"]:not([style*="container-type"] *){font-size:30px !important;}
  [style*="font-size:34px"]:not([style*="container-type"] *){font-size:27px !important;}
  [style*="font-size:32px"]:not([style*="container-type"] *),
  [style*="font-size:30px"]:not([style*="container-type"] *){font-size:25px !important;}

  /* Hero da página inicial */
  [style*="min-height:920px"]{min-height:0 !important;padding:120px 0 72px !important;}
  .rv.rv-3[style*="width:360px;height:360px"]{display:none !important;}

  /* Brilhos decorativos menores, para não alargarem a página */
  .glow[style*="width:520px"],.glow[style*="width:560px"]{width:320px !important;height:320px !important;}
  .glow[style*="width:960px"]{width:520px !important;height:520px !important;}

  /* Cards grandes de projeto */
  a.card[style*="padding:32px"]{padding:18px !important;}
  .card:hover{transform:none;}

  /* Botões quebram linha em vez de estourar */
  [style*="display:flex"]:has(> .btn-primary),[style*="display:flex"]:has(> .btn-ghost){flex-wrap:wrap;}

  /* ---------- Menu ---------- */
  .n-brand{left:20px !important;font-size:24px;}
  .n-brand.intro{animation-name:brandIntroM;}
  @keyframes brandIntroM{
    0%{left:50%;top:50%;transform:translate(-50%,-50%) scale(2.4);opacity:0;}
    20%{left:50%;top:50%;transform:translate(-50%,-50%) scale(2.4);opacity:1;}
    58%{left:50%;top:50%;transform:translate(-50%,-50%) scale(2.4);opacity:1;animation-timing-function:cubic-bezier(.76,0,.24,1);}
    100%{left:20px;top:34px;transform:translate(0,-50%) scale(1);opacity:1;}
  }
  [style*="height:68px"] > [style*="max-width:1200px"] > div:last-of-type{display:none !important;}
  [style*="height:68px"] nav{
    display:none !important;position:fixed;top:68px;left:0;right:0;
    flex-direction:column;align-items:stretch !important;gap:0 !important;
    background:#0B0C0E;border-bottom:1px solid rgba(255,255,255,.08);padding:8px 20px 20px;
  }
  body.menu-aberto [style*="height:68px"] nav{display:flex !important;}
  [style*="height:68px"] nav .n-link{font-size:17px;opacity:.85;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.06);}
  [style*="height:68px"] nav .n-link::after{display:none;}
  [style*="height:68px"] nav .n-link.active{color:#CC4148;}
  .m-menu-btn{
    display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin-right:-8px;
    background:none;border:0;color:#F5F3EE;cursor:pointer;
  }
  .m-menu-btn svg{width:26px;height:26px;}
  .m-cta{display:block;margin-top:16px;text-align:center;background:#CC4148;color:#fff;font-weight:600;padding:14px;border-radius:10px;}
}

@media (max-width: 600px){
  [style*="grid-template-columns:repeat(4"]:not([style*="container-type"] *){grid-template-columns:minmax(0,1fr) !important;}
  [style*="grid-template-columns:1.4fr 1fr 1fr 1fr"]{grid-template-columns:1fr !important;}
  [style*="font-size:72px"]:not([style*="container-type"] *){font-size:38px !important;}
  [style*="font-size:56px"]:not([style*="container-type"] *){font-size:34px !important;}
  [style*="font-size:19px"]:not([style*="container-type"] *),
  [style*="font-size:18px"]:not([style*="container-type"] *){font-size:16px !important;}
  .btn-primary[style*="padding:16px 30px"],.btn-ghost[style*="padding:16px 30px"]{padding:14px 22px !important;}
  form[style*="padding:40px"]{padding:24px !important;}
}
