/* ============================================================
   NetSoft Soluções — Responsividade global
   Retrofit sobre estilos inline (usa !important para sobrepor).
   Breakpoints: 920px (tablet) e 640px (celular).
   ============================================================ */

/* Rede de segurança contra rolagem horizontal.
   NÃO usar overflow-x:hidden em html/body — isso força overflow-y:auto e
   quebra a rolagem vertical. Os wrappers de cada página já têm overflow-x:hidden.
   overflow-x:clip clipa sem criar contêiner de scroll (não afeta o scroll vertical). */
html { overflow-x: clip; }
img { max-width: 100%; }
/* Placeholders de imagem nunca ultrapassam a coluna */
image-slot { max-width: 100%; }

/* ==================== TABLET (<= 920px) ==================== */
@media (max-width: 920px) {

  /* Padding lateral dos contêineres principais */
  [style*="1220px"] { padding-left: 26px !important; padding-right: 26px !important; }

  /* Grades por contagem */
  [style*="repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="repeat(5"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="repeat(6"] { grid-template-columns: repeat(3, 1fr) !important; }

  /* Grades de 2 colunas por proporção -> empilham */
  [style*="0.95fr"],
  [style*="1.1fr"],
  [style*="1.15fr"],
  [style*="0.85fr"],
  [style*="1.3fr"],
  [style*="1.2fr 1.4fr"],
  [style*="1.4fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* Espaçamentos de grade menores */
  [style*="gap: 60px"], [style*="gap:60px"] { gap: 40px !important; }
  [style*="gap: 56px"], [style*="gap:56px"] { gap: 36px !important; }

  /* Navegação: quebra e centraliza */
  nav[style] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    row-gap: 12px !important;
    gap: 16px !important;
  }
  nav[style] > div[style] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 14px 18px !important;
  }

  /* Tipografia — títulos grandes */
  [style*="font-size: 88px"], [style*="font-size:88px"] { font-size: 46px !important; }
  [style*="font-size: 68px"], [style*="font-size:68px"] { font-size: 40px !important; }
  [style*="font-size: 66px"], [style*="font-size:66px"] { font-size: 40px !important; }
  [style*="font-size: 54px"], [style*="font-size:54px"] { font-size: 36px !important; }
  [style*="font-size: 44px"], [style*="font-size:44px"] { font-size: 32px !important; }
  [style*="font-size: 42px"], [style*="font-size:42px"] { font-size: 31px !important; }
  [style*="font-size: 40px"], [style*="font-size:40px"] { font-size: 30px !important; }
  [style*="font-size: 38px"], [style*="font-size:38px"] { font-size: 29px !important; }
}

/* ==================== CELULAR (<= 640px) ==================== */
@media (max-width: 640px) {

  /* Todas as grades empilham em 1 coluna.
     minmax(0,1fr) impede que conteúdo largo (ex.: image-slot 480px) estique a coluna. */
  [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  /* Filhos de grid/flex podem encolher abaixo do tamanho do conteúdo */
  [style*="grid-template-columns"] > * { min-width: 0 !important; }

  /* Padding lateral mais enxuto */
  [style*="1220px"] { padding-left: 18px !important; padding-right: 18px !important; }

  /* Reduz paddings verticais grandes das seções */
  [style*="padding: 84px 0 96px"],
  [style*="padding: 88px 0 96px"],
  [style*="padding: 66px 0 96px"],
  [style*="padding: 84px 0 84px"],
  [style*="padding: 80px 0"],
  [style*="padding: 88px 0"],
  [style*="padding: 84px 0"] { padding-top: 52px !important; padding-bottom: 56px !important; }

  /* Hero: menos respiro no rodapé */
  [style*="70px 40px 130px"] { padding: 42px 18px 96px !important; }
  [style*="66px 0 72px"] { padding: 40px 0 52px !important; }

  /* Blocos internos com padding 40/48px */
  [style*="padding: 48px"] { padding: 28px !important; }
  [style*="padding:48px"] { padding: 28px !important; }
  [style*="padding: 40px"] { padding: 26px !important; }
  [style*="padding: 56px 60px"] { padding: 34px 26px !important; }

  /* Tipografia — reduz mais no celular */
  [style*="font-size: 88px"], [style*="font-size:88px"] { font-size: 38px !important; }
  [style*="font-size: 68px"], [style*="font-size:68px"] { font-size: 34px !important; }
  [style*="font-size: 66px"], [style*="font-size:66px"] { font-size: 33px !important; }
  [style*="font-size: 54px"], [style*="font-size:54px"] { font-size: 30px !important; }
  [style*="font-size: 44px"], [style*="font-size:44px"] { font-size: 27px !important; }
  [style*="font-size: 42px"], [style*="font-size:42px"] { font-size: 26px !important; }
  [style*="font-size: 40px"], [style*="font-size:40px"] { font-size: 26px !important; }
  [style*="font-size: 38px"], [style*="font-size:38px"] { font-size: 25px !important; }
  [style*="font-size: 36px"], [style*="font-size:36px"] { font-size: 25px !important; }
  [style*="font-size: 34px"], [style*="font-size:34px"] { font-size: 24px !important; }
  [style*="font-size: 32px"], [style*="font-size:32px"] { font-size: 23px !important; }
  [style*="font-size: 30px"], [style*="font-size:30px"] { font-size: 22px !important; }
  [style*="font-size: 28px"], [style*="font-size:28px"] { font-size: 21px !important; }

  /* Parágrafos hero um pouco menores */
  [style*="font-size: 20px"], [style*="font-size:20px"] { font-size: 16.5px !important; }
  [style*="font-size: 18px"], [style*="font-size:18px"] { font-size: 15.5px !important; }

  /* Botões e CTAs largura total ficam melhores centralizados */
  [style*="56px 60px"] { text-align: center; }
}

/* Galeria de telas (loteamentos): cards um pouco menores no celular */
@media (max-width: 640px) {
  .tl-card { width: clamp(230px, 78vw, 300px) !important; }
}

/* ============================================================
   MENU MOBILE PREMIUM
   ============================================================ */

/* Hambúrguer e overlay escondidos por padrão (desktop) */
.nsf-hamburger { display: none; }

.nsf-menu {
  position: fixed; inset: 0; z-index: 12000; overflow: hidden;
  background: radial-gradient(120% 90% at 82% 8%, #1E63C8 0%, #0E2A66 42%, #0A1430 78%);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.nsf-menu.nsf-open { opacity: 1; visibility: visible; pointer-events: auto; }

/* Efeito de fundo igual ao hero */
.nsf-menu-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(23,160,218,0) 20%, rgba(23,160,218,0.42) 45%, rgba(46,100,232,0.18) 68%, rgba(23,160,218,0) 90%);
  background-size: 260% 260%;
  animation: nsfGrad 14s ease-in-out infinite alternate;
}
.nsf-menu-blob { position: absolute; border-radius: 50%; filter: blur(20px); pointer-events: none; }
.nsf-blob1 { top: -140px; right: -110px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(23,160,218,0.55), transparent 62%); animation: nsfDrift 16s ease-in-out infinite alternate; }
.nsf-blob2 { bottom: -180px; left: -140px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(46,100,232,0.4), transparent 65%); animation: nsfDrift 20s ease-in-out infinite alternate-reverse; }
@keyframes nsfGrad { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes nsfDrift { 0% { transform: translate(0,0); } 100% { transform: translate(-30px,22px); } }
@keyframes nsfReveal { to { opacity: 1; transform: translateY(0); } }

.nsf-menu-logo { position: absolute; top: 24px; left: 24px; z-index: 3; height: 34px; width: auto; }

.nsf-menu-close {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: #fff; font-size: 19px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.nsf-menu-close:hover { background: rgba(255,255,255,0.26); }

.nsf-menu-links {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0 24px;
}
.nsf-menu-links a {
  color: #E7F0FB; font-family: 'Poppins', system-ui, sans-serif; font-weight: 700;
  font-size: 26px; letter-spacing: -0.01em; padding: 11px 20px; border-radius: 12px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.3,1), background .2s ease, color .2s ease;
}
.nsf-menu.nsf-open .nsf-menu-links a { opacity: 1; transform: translateY(0); }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(1) { transition-delay: .05s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(2) { transition-delay: .10s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(3) { transition-delay: .15s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(4) { transition-delay: .20s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(5) { transition-delay: .25s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(6) { transition-delay: .30s; }
.nsf-menu.nsf-open .nsf-menu-links a:nth-child(7) { transition-delay: .36s; }
.nsf-menu-links a:hover, .nsf-menu-links a:active { color: #fff; background: rgba(255,255,255,0.09); }
.nsf-menu-links a.nsf-menu-cta {
  margin-top: 16px; background: #2E64E8; color: #fff; padding: 15px 44px;
  box-shadow: 0 16px 34px rgba(46,100,232,0.45);
}
.nsf-menu-links a.nsf-menu-cta:hover { background: #1743B0; color: #fff; }

.nsf-menu-foot {
  position: absolute; bottom: 32px; left: 0; right: 0; z-index: 2; text-align: center;
  display: flex; flex-direction: column; gap: 6px; color: #9BD8F5; font-size: 13.5px;
  font-family: 'Poppins', system-ui, sans-serif;
}
.nsf-menu-foot a { color: #fff; font-weight: 600; text-decoration: none; }

/* ---- Ativação no mobile ---- */
@media (max-width: 820px) {
  /* Topbar não aparece no mobile */
  .nsf-topbar { display: none !important; }

  /* Some com os itens de nav do desktop; mantém logo + hambúrguer.
     nav:not(.nsf-menu-links) protege os links do overlay do menu mobile. */
  nav:not(.nsf-menu-links) > *:not(.nsf-logo):not(.nsf-hamburger) { display: none !important; }

  /* Nav em linha única (sobrepõe o wrap dos breakpoints anteriores) */
  nav[style] { flex-wrap: nowrap !important; justify-content: space-between !important; align-items: center !important; }

  /* Mostra o hambúrguer */
  .nsf-hamburger {
    display: inline-flex !important; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 44px; padding: 0 11px; margin: 0; background: transparent; border: none;
    border-radius: 12px; cursor: pointer;
  }
  .nsf-hamburger span { display: block; height: 2.5px; width: 100%; border-radius: 3px; background: #0E2A66; transition: .3s ease; }
  /* No hero (index) a nav fica sobre o azul -> hambúrguer branco */
  #home .nsf-hamburger span { background: #fff; }
}
