/* Responsive hardening shared by all pages. Loaded after embedded page CSS. */
html {
  width: 100%;
  overflow-x: hidden;
}

body {
  min-width: 0;
}

.container,
.nav-inner,
.hero-grid,
.svc-hero-grid,
.contact-grid,
.footer-grid,
.grid,
.grid-services,
.grid-4,
.benefit-grid,
.incluye-grid,
.cards-row,
.cta-card,
.diff-card,
.card,
.stat-card,
.panel,
.info-card,
.trust-card {
  min-width: 0;
}

p,
h1,
h2,
h3,
li,
a,
span,
label,
input,
textarea,
select,
button {
  overflow-wrap: anywhere;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
}

.btn,
.btn-nav,
.card-link,
.footer-cta {
  overflow-wrap: normal;
}

@media (max-width: 819px) {
  .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    gap: 0.75rem;
  }

  .logo {
    justify-self: start;
    min-width: 0;
    max-width: calc(100vw - 6.75rem);
  }

  .logo img {
    max-width: min(13.75rem, calc(100vw - 6.75rem));
  }

  .nav-links {
    display: none;
  }

  .nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.75rem;
  }

  .nav-right .btn-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
    flex: 0 0 auto;
  }

  .mobile-menu {
    left: auto;
    right: max(0.875rem, env(safe-area-inset-right));
    width: min(20rem, calc(100vw - 1.75rem));
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform-origin: top right;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: clamp(1rem, 5vw, 1.25rem);
  }

  .hero,
  .contact-hero,
  .svc-hero {
    min-height: auto;
  }

  .hero-grid,
  .svc-hero-grid,
  .contact-grid,
  .footer-grid,
  .diff-card,
  .cta-card {
    grid-template-columns: 1fr;
  }

  .grid,
  .grid-services,
  .grid-4,
  .benefit-grid,
  .incluye-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .stat-card,
  .benefit,
  .incluye-item,
  .info-card,
  .trust-card,
  .panel,
  .cta-card,
  .svc-cta,
  .diff-card {
    max-width: 100%;
  }

  .card,
  .benefit,
  .incluye-item {
    overflow: hidden;
  }

  .card {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-icon,
  .stat-icon,
  .diff-icon,
  .benefit-ic {
    flex-shrink: 0;
  }

  .section-divider {
    gap: 0.75rem;
    white-space: normal;
    text-align: center;
  }

  .section-divider::before,
  .section-divider::after {
    min-width: 1.5rem;
  }

  .hero::before {
    background-size: min(120vw, 36rem) auto;
    background-position: center top;
    opacity: 0.42;
  }

  .hero-copy,
  .hero-content,
  .svc-hero-copy,
  .contact-copy {
    max-width: 100%;
  }

  .svc-visual {
    min-height: 0;
  }

  .svc-visual-panel {
    width: min(100%, 20rem);
    border-radius: 1.25rem;
  }

  .form-card,
  .contact-form,
  .contact-side {
    min-width: 0;
    max-width: 100%;
  }

  .wa-fab {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .logo img {
    max-width: calc(100vw - 6.25rem);
  }

  .mobile-menu {
    right: 0.75rem;
    width: calc(100vw - 1.5rem);
  }

  .btn,
  .mobile-menu a,
  .footer-cta {
    width: 100%;
  }

  .cta-card {
    justify-items: stretch;
  }

  .card-icon {
    width: 3.75rem;
    height: 3.75rem;
  }
}
