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

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

.container,
.nav-inner,
.hero-grid,
.svc-hero-grid,
.contact-grid,
.footer-grid,
.grid,
.grid-services,
.grid-4,
.benefit-grid,
.incluye-grid,
.cards-row,
.hero-ctas,
.svc-btn-row,
.btn-row,
.submit-row,
.cta-card,
.cta-text,
.diff-card,
.diff-item,
.card,
.card-body,
.stat-card,
.panel,
.form-grid,
.field,
.info-card,
.info-row,
.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);
  }

  .nav,
  main,
  section,
  footer {
    max-width: 100%;
  }

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

  .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%;
  }

  .hero-ctas,
  .svc-btn-row,
  .btn-row,
  .submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .cta-text,
  .card-body,
  .diff-text,
  .info-copy,
  .trust-list,
  .footer-contact .item > div {
    min-width: 0;
    max-width: 100%;
  }

  .cta-btn,
  .submit-row .btn,
  .submit-row .btn-primary {
    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,
  .cta-btn {
    width: 100%;
  }

  .hero-ctas .btn,
  .svc-btn-row .btn,
  .btn-row .btn {
    flex: 1 1 100%;
  }

  .cta-card,
  .submit-row {
    justify-items: stretch;
  }

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

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

  .card-icon,
  .diff-icon,
  .info-icon {
    justify-self: start;
  }
}

/* Banner image edge feathering across pages. */
.hero-art img {
  -webkit-mask-image:
    radial-gradient(ellipse 88% 84% at 50% 50%, #000 28%, rgba(0,0,0,0.86) 48%, rgba(0,0,0,0.34) 76%, transparent 100%) !important;
          mask-image:
    radial-gradient(ellipse 88% 84% at 50% 50%, #000 28%, rgba(0,0,0,0.86) 48%, rgba(0,0,0,0.34) 76%, transparent 100%) !important;
  filter: drop-shadow(0 0 44px rgba(59,130,246,0.22)) !important;
}

.problemas-art img {
  -webkit-mask-image: none !important;
          mask-image: none !important;
  filter: none !important;
}

.hero::before {
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.42) 12%, #000 28%, #000 72%, rgba(0,0,0,0.42) 88%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.42) 12%, #000 28%, #000 72%, rgba(0,0,0,0.42) 88%, transparent 100%) !important;
  -webkit-mask-composite: source-in !important;
          mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.42) 12%, #000 28%, #000 72%, rgba(0,0,0,0.42) 88%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.42) 12%, #000 28%, #000 72%, rgba(0,0,0,0.42) 88%, transparent 100%) !important;
          mask-composite: intersect !important;
}

/* Solutions tab cards: icon centered above left-aligned copy. */
.soluciones .card {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: left;
}

.soluciones .card-icon {
  margin-inline: auto;
}

.soluciones .card-body {
  width: 100%;
}

.soluciones .card-body h3 {
  text-align: left;
}

.soluciones .card-body p {
  text-align: left;
  hyphens: auto;
}

.soluciones .card-link {
  justify-self: start;
}

/* Keep mobile navigation as one closed bar plus one opened panel. */
.mobile-menu {
  display: none !important;
}

.mobile-menu.is-open {
  display: flex !important;
}

@media (max-width: 819px) {
  .mobile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: auto;
    right: max(0.875rem, env(safe-area-inset-right));
    box-sizing: border-box;
    max-width: calc(100vw - 1.75rem);
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
