/* ==========================================================
   SEG SISTEMAS — MOBILE GLOBAL
   Ajustes compartilhados para todas as páginas públicas.
   Carregado depois do CSS principal para padronizar 360–900px.
   ========================================================== */



/* ---------- Imagens externas: fallback visual seguro ---------- */
.seg-image-fallback-wrap {
  position: relative !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,175,55,.12), transparent 34%),
    linear-gradient(145deg, #0f172a, #172033) !important;
  overflow: hidden !important;
}

.seg-image-fallback-wrap::after {
  content: "Imagem temporariamente indisponível";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 18px;
  color: rgba(255,255,255,.78);
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: .02em;
  pointer-events: none;
}

.seg-image-fallback-wrap::before {
  content: "SEG";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.16);
  font-size: clamp(2.1rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: .12em;
  pointer-events: none;
}

.seg-image-broken {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Wrapper padrão para tabelas largas em telas pequenas. */
.table-mobile-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-radius: 12px;
}

.table-mobile-hint {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #7c8798;
  font-size: .78rem;
  line-height: 1.3;
}

.table-mobile-hint i { color: #a67f0c; }

@media (max-width: 900px) {
  html {
    scroll-padding-top: 112px;
  }

  body {
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
  }

  main,
  main section,
  main .container,
  main [class*="grid"],
  main [class*="wrapper"],
  main [class*="content"] {
    min-width: 0;
  }

  main img,
  main video,
  main svg,
  main iframe {
    max-width: 100%;
  }

  /* ---------- Tipografia e respiro ---------- */
  .container {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .section-title {
    margin-bottom: 34px !important;
  }

  .section-title span {
    font-size: .74rem !important;
    letter-spacing: .12em !important;
  }

  .section-title h2,
  main h2 {
    overflow-wrap: anywhere;
  }

  .section-title h2 {
    font-size: clamp(1.75rem, 7vw, 2.15rem) !important;
    line-height: 1.14 !important;
  }

  /* Em telas pequenas, justificado abre buracos grandes entre palavras. */
  .feature-text p,
  .content-text p,
  .brand-content p,
  .incendio-intro p,
  .incendio-card-text,
  .faq-item p {
    text-align: left !important;
  }

  /* ---------- Heros das páginas internas ---------- */
  .service-hero,
  .hero-internal,
  .incendio-hero {
    height: auto !important;
    min-height: 430px !important;
    padding-top: 94px !important;
    padding-bottom: 54px !important;
    background-attachment: scroll !important;
    background-position: center center !important;
    display: flex !important;
    align-items: center !important;
  }

  .service-hero-content,
  .incendio-hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 0 !important;
  }

  .service-hero h1,
  .hero-internal h1,
  .incendio-hero h1 {
    max-width: 100% !important;
    font-size: clamp(2rem, 8.5vw, 2.65rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em !important;
    margin-bottom: 14px !important;
    overflow-wrap: anywhere;
  }

  .service-hero p,
  .hero-internal p,
  .incendio-hero p {
    max-width: 100% !important;
    font-size: .98rem !important;
    line-height: 1.58 !important;
    margin-top: 12px !important;
  }

  .breadcrumb,
  .hero-breadcrumb,
  .incendio-breadcrumb {
    font-size: .72rem !important;
    letter-spacing: .11em !important;
    line-height: 1.45 !important;
  }

  .btn-action-hero,
  .service-hero .btn,
  .hero-internal .btn {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* ---------- Seções de conteúdo ---------- */
  .details-section,
  .content-section,
  .incendio-details,
  .incendio-gallery,
  .faq-section,
  .stats-section,
  .testimonials-section,
  .timeline-section,
  .director-quote,
  .final-cta,
  .partners-strip {
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }

  .details-grid,
  .content-grid,
  .incendio-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .sidebar-card,
  .incendio-sidebar {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    max-width: none !important;
    padding: 24px 20px !important;
    border-radius: 14px !important;
  }

  /* ---------- Blocos imagem + texto ---------- */
  .feature-block,
  .brand-block {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    margin-bottom: 48px !important;
    align-items: start !important;
  }

  .feature-block.reverse,
  .content-grid.grid-reverse {
    direction: ltr !important;
  }

  .feature-block.reverse > *,
  .content-grid.grid-reverse > * {
    direction: ltr !important;
  }

  .feature-img,
  .feature-img-container,
  .brand-img-container,
  .img-frame,
  .pro-slider {
    width: 100% !important;
    min-width: 0 !important;
    height: clamp(205px, 58vw, 270px) !important;
    max-height: 270px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .feature-img img,
  .feature-img-container img,
  .brand-img-container img,
  .img-frame img,
  .pro-slider img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .feature-text h3,
  .brand-title-area h3 {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
    align-items: flex-start !important;
  }

  .feature-text p,
  .brand-content p {
    font-size: .96rem !important;
    line-height: 1.68 !important;
  }

  .agro-highlight,
  .tech-highlight,
  .economy-highlight,
  .profit-highlight,
  .panic-highlight,
  .security-highlight,
  .authority-box,
  .testimonial-box,
  .info-box,
  .quote-box {
    padding: 22px 18px !important;
    border-radius: 14px !important;
  }

  /* ---------- Tabelas ---------- */
  .comparison-table,
  .economy-table,
  .risk-table,
  .roi-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    font-size: .86rem !important;
  }

  .comparison-table th,
  .comparison-table td,
  .economy-table th,
  .economy-table td,
  .risk-table th,
  .risk-table td,
  .roi-table th,
  .roi-table td {
    min-width: 150px;
    padding: 12px 10px !important;
  }



  /* ---------- Comparativos em mobile ---------- */
  .comparison-section {
    margin-top: 44px !important;
    min-width: 0 !important;
  }

  .comparison-section > h3 {
    font-size: 1.18rem !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
  }

  .mobile-table-hint {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px !important;
    color: #7c8798;
    font-size: .78rem !important;
    line-height: 1.3 !important;
  }

  .mobile-table-hint i {
    color: #a67f0c;
  }

  .comparison-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-radius: 12px;
  }

  .comparison-scroll .comparison-table {
    display: table !important;
    width: 720px !important;
    min-width: 720px !important;
    max-width: none !important;
    margin: 0 !important;
    table-layout: fixed;
    overflow: visible !important;
  }

  .comparison-scroll .comparison-table th,
  .comparison-scroll .comparison-table td {
    min-width: 0 !important;
    width: 240px !important;
    padding: 12px 11px !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    vertical-align: middle !important;
  }

  .comparison-scroll .comparison-table th:first-child,
  .comparison-scroll .comparison-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
  }

  .comparison-scroll .comparison-table th:first-child {
    z-index: 4;
    background: #0f172a !important;
  }

  .comparison-scroll .comparison-table td:first-child {
    background: #ffffff !important;
    box-shadow: 8px 0 14px -14px rgba(15,23,42,.45);
  }

  /* Pânico silencioso: mantém a ilustração inteira e sem recortes no celular. */
  .panic-visual {
    height: 230px !important;
    min-height: 230px !important;
    max-height: 230px !important;
    padding: 16px !important;
  }

  .panic-visual__phone {
    width: 112px !important;
    height: 202px !important;
    padding: 7px !important;
    border-radius: 23px !important;
  }

  .panic-visual__speaker {
    width: 32px !important;
    margin-bottom: 6px !important;
  }

  .panic-visual__screen {
    height: 174px !important;
    border-radius: 16px !important;
    gap: 6px !important;
  }

  .panic-visual__shield {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .panic-visual__button {
    width: 52px !important;
    height: 52px !important;
    border-width: 6px !important;
    font-size: 1rem !important;
  }

  .panic-visual__label {
    right: 12px !important;
    bottom: 12px !important;
    padding: 7px 9px !important;
    font-size: .64rem !important;
  }

  /* ---------- Grids / cards ---------- */
  .stats-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  .testimonials-grid,
  .process-steps,
  .redundancy-grid,
  .incendio-cards,
  .tech-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .incendio-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .incendio-gallery-item {
    height: 150px !important;
  }

  .incendio-card,
  .testimonial-card,
  .process-card,
  .tech-item {
    min-width: 0 !important;
  }

  .incendio-card-body,
  .testimonial-card,
  .process-card {
    padding: 22px 18px !important;
  }

  /* ---------- Página Empresa ---------- */
  .trust-bar {
    padding: 26px 0 !important;
  }

  .trust-item h3 {
    font-size: 1.65rem !important;
  }

  .quote-text {
    font-size: 1.05rem !important;
    line-height: 1.65 !important;
  }

  .director-info {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .signature {
    margin-left: 0 !important;
  }

  .final-cta h2 {
    font-size: 1.85rem !important;
    line-height: 1.16 !important;
  }

  .final-cta p {
    font-size: .98rem !important;
    margin-bottom: 26px !important;
  }

  .partners-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
    align-items: center !important;
  }

  .partners-grid img {
    max-width: 100% !important;
    height: 34px !important;
    object-fit: contain !important;
  }

  /* ---------- Portaria / timeline / apps ---------- */
  .sub-feature-list,
  .app-feature,
  .timeline-step {
    min-width: 0 !important;
  }

  .app-feature {
    gap: 14px !important;
  }

  .app-icon,
  .step-icon {
    flex: 0 0 auto !important;
  }

  .timeline-step {
    padding-left: 0 !important;
  }

  /* ---------- Formulários e contato ---------- */
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  .form-control,
  input,
  select,
  textarea {
    font-size: 16px !important; /* evita zoom automático no iPhone */
  }

  .contact-details,
  .contact-form-area {
    padding: 28px 20px !important;
  }

  /* ---------- Footer ---------- */
  footer,
  .site-footer {
    padding-top: 52px !important;
    padding-bottom: 28px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    margin-bottom: 36px !important;
  }

  .footer-col h4 {
    margin-bottom: 16px !important;
  }

  .footer-col ul li {
    margin-bottom: 12px !important;
  }

  .footer-legal {
    text-align: left !important;
    font-size: .84rem !important;
    padding-top: 20px !important;
  }
}

@media (max-width: 640px) {
  .service-hero,
  .hero-internal,
  .incendio-hero {
    min-height: 390px !important;
    padding-top: 82px !important;
    padding-bottom: 42px !important;
  }

  .service-hero h1,
  .hero-internal h1,
  .incendio-hero h1 {
    font-size: clamp(1.85rem, 9.4vw, 2.3rem) !important;
  }

  .details-section,
  .content-section,
  .incendio-details,
  .incendio-gallery,
  .faq-section,
  .stats-section,
  .testimonials-section,
  .timeline-section,
  .director-quote,
  .final-cta,
  .partners-strip {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .feature-block,
  .brand-block {
    margin-bottom: 38px !important;
  }

  .stats-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stat-item h3,
  .trust-item h3 {
    font-size: 1.65rem !important;
  }

  .stat-item p,
  .trust-item span {
    font-size: .72rem !important;
    line-height: 1.35 !important;
  }

  .incendio-gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .incendio-gallery-item {
    height: 190px !important;
  }

  .comparison-table,
  .economy-table,
  .risk-table,
  .roi-table {
    font-size: .8rem !important;
  }

  .sidebar-card,
  .incendio-sidebar {
    padding: 20px 16px !important;
  }

  .comparison-scroll .comparison-table {
    width: 660px !important;
    min-width: 660px !important;
  }

  .comparison-scroll .comparison-table th,
  .comparison-scroll .comparison-table td {
    width: 220px !important;
    font-size: .78rem !important;
    line-height: 1.45 !important;
  }

  .panic-visual {
    height: 215px !important;
    min-height: 215px !important;
    max-height: 215px !important;
  }

}

@media (max-width: 390px) {
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .service-hero h1,
  .hero-internal h1,
  .incendio-hero h1 {
    font-size: 1.9rem !important;
  }

  .section-title h2 {
    font-size: 1.65rem !important;
  }

  .feature-img,
  .feature-img-container,
  .brand-img-container,
  .img-frame,
  .pro-slider {
    height: 205px !important;
  }
}


/* ==========================================================
   MOBILE FINAL — refinamentos de leitura, tabelas e respiro
   ========================================================== */
@media (max-width: 900px) {
  .table-mobile-hint { display: flex; }

  .table-mobile-wrap .comparison-table,
  .table-mobile-wrap .economy-table,
  .table-mobile-wrap .risk-table,
  .table-mobile-wrap .roi-table {
    display: table !important;
    width: 720px !important;
    min-width: 720px !important;
    max-width: none !important;
    table-layout: fixed;
    overflow: visible !important;
    margin: 0 !important;
  }

  .table-mobile-wrap .comparison-table th,
  .table-mobile-wrap .comparison-table td,
  .table-mobile-wrap .economy-table th,
  .table-mobile-wrap .economy-table td,
  .table-mobile-wrap .risk-table th,
  .table-mobile-wrap .risk-table td,
  .table-mobile-wrap .roi-table th,
  .table-mobile-wrap .roi-table td {
    width: 240px !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    vertical-align: middle !important;
  }

  .table-mobile-wrap table th:first-child,
  .table-mobile-wrap table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
  }

  .table-mobile-wrap table th:first-child {
    background: #0f172a !important;
    color: #fff !important;
    z-index: 5 !important;
  }

  .table-mobile-wrap table td:first-child {
    background: #fff !important;
    box-shadow: 8px 0 14px -14px rgba(15,23,42,.5);
  }

  /* Evita que cards e listas fiquem com altura/padding de desktop. */
  .feature-text ul,
  .diff-list,
  .benefits-list,
  .service-list {
    font-size: .93rem !important;
    line-height: 1.6 !important;
  }

  .feature-text li,
  .diff-list li,
  .benefits-list li,
  .service-list li {
    margin-bottom: 10px !important;
  }

  .roi-section,
  .comparison-section {
    margin-top: 42px !important;
  }

  .roi-section > h3,
  .comparison-section > h3,
  main h3[style*="margin-top: 60px"],
  main h3[style*="margin-top:60px"] {
    font-size: 1.22rem !important;
    line-height: 1.3 !important;
  }

  /* Não deixa qualquer mídia externa produzir alt-text solto/overflow. */
  main img {
    display: block;
    height: auto;
  }
}

@media (max-width: 640px) {
  .table-mobile-wrap .comparison-table,
  .table-mobile-wrap .economy-table,
  .table-mobile-wrap .risk-table,
  .table-mobile-wrap .roi-table {
    width: 660px !important;
    min-width: 660px !important;
  }

  .table-mobile-wrap .comparison-table th,
  .table-mobile-wrap .comparison-table td,
  .table-mobile-wrap .economy-table th,
  .table-mobile-wrap .economy-table td,
  .table-mobile-wrap .risk-table th,
  .table-mobile-wrap .risk-table td,
  .table-mobile-wrap .roi-table th,
  .table-mobile-wrap .roi-table td {
    width: 220px !important;
    font-size: .78rem !important;
    line-height: 1.45 !important;
  }
}
