/* W2SAT — regras globais responsivas
 * Desktop (≥1025px): não sobrescrever layout legado GreatPages
 * Tablet (641–1024px): contenção de overflow
 * Mobile (≤640px): ajustes compactos
 */

/* --- Base segura (todas as telas) --- */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.w2sat-shell {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  box-sizing: border-box;
}

/* --- Desktop: layout legado intacto --- */
@media (min-width: 1025px) {
  #site {
    min-width: 980px;
    overflow-x: hidden;
  }

  /* Restaura container GreatPages — NÃO forçar width 100% */
  .centralizar {
    position: relative;
    width: 960px;
    max-width: none;
    margin: 0 auto;
    padding-inline: 0;
    box-sizing: border-box;
  }

  .gpc-b {
    width: 100%;
  }
}

/* --- Tablet: evitar overflow sem achatar desktop --- */
@media (min-width: 641px) and (max-width: 1024px) {
  #site {
    overflow-x: clip;
  }

  #gpc-lgpd {
    width: 98%;
  }
}

/* --- Mobile --- */
@media (max-width: 640px) {
  #site {
    min-width: 0;
    overflow-x: clip;
  }

  .gpc-b,
  .gpc-e {
    max-width: 100%;
    box-sizing: border-box;
  }

  .gpc-b .centralizar {
    width: 100%;
    max-width: 100%;
    padding-inline: var(--container-padding);
  }

  #gpc-lgpd {
    width: 96%;
  }

  #gpc-lgpd.botoes,
  #gpc-lgpd.botao {
    grid-template-columns: minmax(0, 100%);
  }

  .float {
    right: 12px;
    bottom: 12px;
    padding: 12px 14px;
    font-size: 12px;
    max-width: calc(100vw - 24px);
  }

  .float span:not(.float-icon) {
    display: none;
  }

  /* CTAs customizadas — content-box legado estoura a viewport */
  .w2sat-hero-button,
  .w2sat-app-button {
    box-sizing: border-box;
    max-width: 100%;
  }

  #w2sat-hero-redesign .w2sat-hero-cta,
  #w2sat-app-redesign .w2sat-app-cta {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Blocos legados GreatPages — conter overflow horizontal */
  .gpc-b .centralizar {
    overflow-x: clip;
  }

  .gpc-b .gpc-e.e_imagem,
  .gpc-b .gpc-e.e_slider {
    max-width: 100%;
  }

  .gsi {
    max-width: 100%;
    overflow: hidden;
  }

  /* Cookie banner — compacto no mobile pequeno */
  #gpc-lgpd {
    padding: 16px 36px 16px 16px;
    grid-row-gap: 12px;
  }

  #gpc-lgpd_texto {
    font-size: 13px;
    line-height: 1.35;
  }

  /* Espaço para o botão flutuante WhatsApp */
  #site {
    padding-bottom: 72px;
  }

  /* FAQ + Sobre — bloco legado 27867f */
  #b_2590947_1_1747219906682475c27867f {
    height: auto !important;
    min-height: auto !important;
    overflow: visible;
    padding: 40px 0 48px;
  }

  #b_2590947_1_1747219906682475c27867f > .centralizar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    height: auto !important;
    min-height: auto !important;
    overflow: visible;
    position: relative;
  }

  #b_2590947_1_1747219906682475c27867f .gpc-e {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin: 0;
    transform: none !important;
    box-sizing: border-box;
  }

  #e_2590947_1_1747219906682475c28c4a6439071715 {
    order: 1;
    text-align: center;
    padding: 0 4px;
  }

  #e_2590947_1_1747219906682475c28c4a6439071715 h2 {
    margin: 0;
    line-height: 1.15 !important;
    font-size: 28px !important;
  }

  #e_2590947_1_1747219906682475c28c607061661510 {
    order: 2;
    padding: 0 2px;
  }

  #e_2590947_1_1747219906682475c28c607061661510 .gac {
    width: 100%;
  }

  #e_2590947_1_1747219906682475c28c607061661510 .gac-item {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
  }

  #e_2590947_1_1747219906682475c28c607061661510 .gac-item:last-of-type {
    margin-bottom: 0;
  }

  #e_2590947_1_1747219906682475c28c607061661510 .gac-item_cabecalho {
    padding: 14px 16px;
  }

  #e_2590947_1_1747219906682475c28c607061661510 .gac-item_cabecalho_titulo {
    font-size: 14px !important;
    line-height: 1.35 !important;
    width: calc(100% - 28px);
  }

  #e_2590947_1_1747219906682475c28e1ac014762666 {
    order: 3;
    padding: 4px 2px;
    margin-top: 4px;
  }

  #e_2590947_1_1747219906682475c28e1ac014762666 a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 52px;
    padding: 14px 18px !important;
    box-sizing: border-box;
  }

  #e_2590947_1_174722755921640019 {
    order: 4;
    left: auto !important;
    overflow: visible;
    padding: 0;
  }

  #e_2590947_1_174722755921640019 .c.imagem {
    width: 100% !important;
    height: auto !important;
  }

  #e_2590947_1_174722755921640019 .imagem_fundo {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 220px;
    aspect-ratio: 400 / 383;
    padding-top: 0 !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat;
    left: auto !important;
  }

  #e_2590947_1_1747219906682475c28cf5a818467327 {
    display: none !important;
  }

  #e_2590947_1_1747219906682475c28d0f1183371257 {
    order: 5;
    margin-top: 8px;
    text-align: left;
    padding: 18px 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    background: rgba(0, 0, 0, 0.88);
  }

  #e_2590947_1_1747219906682475c28d0f1183371257 h1 {
    margin: 0;
    font-size: 22px !important;
    line-height: 1.2 !important;
  }

  #e_2590947_1_1747219906682475c28d429074613952 {
    order: 6;
    padding: 10px 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: none;
    border-radius: 0 0 16px 16px;
    background: rgba(0, 0, 0, 0.88);
    margin-bottom: 8px;
  }

  #e_2590947_1_1747219906682475c28d429074613952 p {
    margin: 0;
    line-height: 1.52 !important;
    font-size: 14px !important;
  }
}

/* Botão flutuante — desktop/tablet */
@media (min-width: 641px) {
  .float {
    right: clamp(16px, 2vw, 24px);
    bottom: clamp(16px, 2vw, 24px);
    padding: clamp(10px, 1.5vw, 14px) clamp(14px, 2vw, 20px);
    font-size: clamp(13px, 1.2vw, 14px);
    max-width: none;
    box-sizing: border-box;
  }
}
