/* Rational Innovation — iOS / Android / telemóvel */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}
body {
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
  -webkit-tap-highlight-color: rgba(235, 103, 27, 0.18);
}
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg, iframe {
  max-width: 100%;
  height: auto;
}
iframe { border: 0; }
table { max-width: 100%; }
input, select, textarea, button {
  font-size: 16px;
  max-width: 100%;
}
button, a, [role="button"], .seo-faq-q, .faq-q, .cat-filter {
  touch-action: manipulation;
}
.seo-cta, .user-portal, .btn, .btn-primary, .compat-cta {
  white-space: normal;
}

#navbar {
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-left: max(4%, env(safe-area-inset-left, 0px));
  padding-right: max(4%, env(safe-area-inset-right, 0px));
}
body.has-fixed-nav {
  padding-top: calc(88px + env(safe-area-inset-top, 0px));
}

.esl-compare-wrap,
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.cat-hero, .cat-toolbar, .cat-grid, .prod {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-filter {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .hero { min-height: 100svh; min-height: 100dvh; }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.6rem) !important; }
  .hero-content { padding-left: 5%; padding-right: 5%; max-width: 100%; }
  .cta-buttons { width: 100%; }
  .cta-buttons .btn, .cta-buttons a { width: 100%; justify-content: center; min-height: 48px; }

  .seo-hero { padding: 48px 0 40px; }
  .seo-hero h1 { font-size: clamp(1.55rem, 7vw, 2.4rem); }
  .seo-hero .lead { font-size: 1rem; }
  .seo-cta { min-height: 48px; justify-content: center; }

  .seo-hub { padding: 56px 0; }
  .seo-hub-grid { grid-template-columns: 1fr; }

  section { padding-left: 4%; padding-right: 4%; }

  .novos-grid, .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  }

  .services-grid-modern { grid-template-columns: 1fr !important; }

  .nav-dropdown-menu {
    left: 0 !important;
    transform: none !important;
    min-width: 0 !important;
  }
}

@media (max-width: 768px) {
  .trust-grid { grid-template-columns: 1fr 1fr !important; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .features-wrapper,
  .features-grid-right,
  .etiquetas-container,
  .prod-grid,
  .about-container,
  .hero-inner { grid-template-columns: 1fr !important; }

  .process-grid,
  .projetos-grid-ri { grid-template-columns: 1fr !important; }
  .projetos-item-ri:first-child { grid-column: span 1 !important; }

  .etiqueta-features-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .seo-grid,
  .seo-hero-grid,
  .seo-cards,
  .seo-footer-content { grid-template-columns: 1fr !important; }
  .seo-sidebar { position: static !important; }
  .seo-hero-media { order: -1; max-height: 220px; aspect-ratio: 16/10; }

  .footer-content,
  .seo-footer-content { grid-template-columns: 1fr !important; gap: 1.75rem !important; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .quote-form button, .btn-primary, .btn-ghost {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .models-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 6px; max-width: 100%; }
  .model-tab { flex: 0 0 auto; min-height: 44px; }

  .acessorios-carousel-container { padding: 0 40px; max-width: 100%; }

  .seo-faq-item.open .seo-faq-a,
  .faq-item.open .faq-a { max-height: none; }

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

  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(1.5rem, 8.5vw, 2.15rem) !important; }
  .trust-grid { grid-template-columns: 1fr !important; }
  .etiqueta-features-grid { grid-template-columns: 1fr 1fr !important; }
  .novos-grid, .cat-grid, .seo-cases-grid {
    grid-template-columns: 1fr !important;
  }
  .seo-wrap, .cat-hero, .prod, .cat-toolbar, .cat-grid { padding-left: 4%; padding-right: 4%; }
  .esl-kpi { grid-template-columns: 1fr !important; }
  .cat-hero h1 { font-size: clamp(1.45rem, 7vw, 2rem); }
}

@media (max-width: 380px) {
  .etiqueta-features-grid { grid-template-columns: 1fr !important; }
}

@supports (padding: max(0px)) {
  #navbar.scrolled {
    padding-top: max(.7rem, env(safe-area-inset-top, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
