/* =========================================================
   LOCAL FIX — Responsive overrides (Webflow-free)
   ========================================================= */

/* =========================================================
   APP DESIGN ALIGNMENT — Design token overrides
   ========================================================= */
:root {
  /* Radii — app uses ~24px cards */
  --_sizes---card--card-radius: 1.5rem;
  --_sizes---radius--xl-radius: 1.5rem;

  /* Spacing — more breathing room */
  --_sizes---card--card-padding: 2.5rem;
  --_sizes---card--card-padding-sm: 2rem;

  /* Shadows — app-style soft shadows */
  --app-shadow-card: 0 4px 20px -2px rgba(0, 12, 86, 0.08);
  --app-shadow-card-hover: 0 8px 30px -4px rgba(0, 12, 86, 0.14);

  /* Section bg — soft blue instead of gray */
  --_colors---core-neutral-color--neutral-secondary: #f0f4ff;
}

/* Ensure all headings are always visible */
h1, h2, h3,
.heading_primary,
.heading_secondary,
.heading_tertiary,
.heading_hero,
.heading_primarytitulo,
.subheading,
.eyebrow {
  visibility: visible !important;
}

/* =========================================================
   APP ALIGNMENT: Card shadows
   ========================================================= */
.card,
.cardhome,
.cardtop {
  box-shadow: var(--app-shadow-card) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.card:hover,
.cardhome:hover,
.cardtop:hover {
  box-shadow: var(--app-shadow-card-hover) !important;
  transform: translateY(-2px);
}

/* No shadow on cards over dark backgrounds */
.card.on-accent-primary,
.cardhome.on-accent-primary {
  box-shadow: none !important;
}
.card.on-accent-primary:hover,
.cardhome.on-accent-primary:hover {
  box-shadow: none !important;
  transform: none;
}

/* White cards on colored sections */
.card.on-secondary,
.cardhome.on-secondary {
  background-color: #fff !important;
}

/* Inner card body radius matches outer */
.card_body,
.card_body-copy-copy {
  border-radius: var(--_sizes---card--card-radius) !important;
}

/* App-style soft gradient on offering cards */
.card_body-copy-copy {
  background: linear-gradient(180deg, #f0f1f3 0%, #eaf2f0 50%, #e4f0ee 100%) !important;
}

/* Slider cards */
.brix---card-testimonial-v13 {
  box-shadow: var(--app-shadow-card) !important;
  border: none !important;
}

/* =========================================================
   APP ALIGNMENT: Spacing — more breathing room
   ========================================================= */
.w-layout-grid {
  grid-row-gap: 24px !important;
  grid-column-gap: 24px !important;
}

.grid_2-col-copy {
  gap: 20px !important;
  height: auto !important;
  width: min(80%, 100%) !important;
}

.card_body_small {
  padding: 1.75rem !important;
}

/* =========================================================
   APP ALIGNMENT: Section backgrounds — unified soft blue
   ========================================================= */
.sectionfunciones,
.sectionfunciones.is-secondary,
.section-soluciones,
.brix---section-overflow-hidden {
  background-color: #e8f4fb !important;
}

/* Remove fixed pixel heights — let content determine height */
.sectionlarge,
.sectionfunciones.is-secondary {
  height: auto !important;
}

.section.is-accent-primary {
  height: auto !important;
  padding-bottom: 4rem !important;
}

/* Contact: reduce gap between hero and FAQ */
.section-copy.is-accent {
  padding-bottom: 3rem !important;
}

/* Reduce excessive gaps */
.gap-xxlarge {
  gap: 3rem !important;
}

/* Store badges */
.store-badges {
  display: flex !important;
  gap: 16px !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.store-badge img {
  height: 48px !important;
  width: auto !important;
  transition: transform 0.2s ease !important;
  border-radius: 0 !important;
  overflow: visible !important;
  object-fit: contain !important;
}

.store-badge:hover img {
  transform: scale(1.05);
}

@media screen and (max-width: 767px) {
  .store-badges {
    flex-direction: row !important;
    gap: 12px !important;
  }
  .store-badge img {
    height: 40px !important;
  }
}

/* Nav bar — taller */
.nav_container {
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
}

/* 2. Logo — fix aspect ratio
   Original: 933×434px (ratio 2.15:1)
   .nav_logo-icon has align-self:stretch + display:flex, and
   .image-2 has flex:1 — together they stretch the logo vertically.
   Fix: constrain the container and let the image keep its ratio. */
.nav_logo-icon {
  align-self: center !important;
  height: auto !important;
  width: 130px !important;
}

/* Uniform spacing logo → nav items — all pages */
.nav_logo {
  margin-right: 40px !important;
}

img.image-2 {
  width: 130px !important;
  height: auto !important;
  flex: none !important;
  object-fit: contain !important;
  aspect-ratio: 933 / 434 !important;
}

/* =========================================================
   NAVBAR — Redesign: white, sticky, border on scroll
   ========================================================= */
.nav.is-inverse {
  background: #fff !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  border-bottom: 1px solid transparent !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.nav.is-inverse.nav--scrolled {
  border-bottom-color: rgba(6, 11, 43, 0.08) !important;
  box-shadow: 0 1px 12px rgba(6, 11, 43, 0.04) !important;
}

.nav_link,
.nav_link .w-dropdown-toggle div,
.nav_link div {
  color: #3a3f5c !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  transition: color 0.2s ease !important;
}

.nav_link:hover,
.nav_link:hover div {
  color: #060B2B !important;
}

/* CTA Button in navbar */
.nav-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  padding: 10px 24px !important;
  background: #0A1F8F !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.15s ease !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

.nav-cta-btn:hover {
  background: #0D2AB3 !important;
  transform: translateY(-1px) !important;
}

.nav_container.w-nav {
  display: flex !important;
  align-items: center !important;
}

.nav_container .nav_menu.w-nav-menu {
  float: none !important;
  flex: 1 !important;
}

.nav-cta-btn {
  position: relative !important;
  z-index: 10 !important;
}

/* Mobile CTA inside hamburger menu */
.nav-cta-mobile-item {
  display: none !important;
}

.nav-cta-mobile {
  display: block;
  background: #0A1F8F;
  color: #fff !important;
  text-align: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.2s ease;
}

.nav-cta-mobile:hover {
  background: #0D2AB3;
}

@media screen and (max-width: 991px) {
  .nav-cta-btn {
    display: none !important;
  }

  .nav-cta-mobile-item {
    display: block !important;
  }
}

/* =========================================================
   DEAD LINKS — disable placeholder links
   ========================================================= */
a[href="#"],
a[href$="#"] {
  pointer-events: none !important;
  opacity: 0.4 !important;
  cursor: default !important;
  text-decoration: none !important;
}

/* =========================================================
   HERO — Two-column, dark navy, large bottom-anchored phone
   ========================================================= */
header.overflow_hidden.section-3.hero-redesign {
  background: #060B2B !important;
  background-image: none !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  position: relative !important;
  overflow: visible !important;
}

/* Kill all Webflow heights inside hero */
header.hero-redesign .container.is-small,
header.hero-redesign .header,
header.hero-redesign .ix_hero-intro-down-scale-3d {
  height: auto !important;
  top: auto !important;
}

/* Dot grid */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

/* Two-column wrapper */
.hero-content-wrap {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  position: relative;
  z-index: 2;
  min-height: max(600px, 80vh);
}

/* ---- Left column: 55% ---- */
.hero-left {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 80px 4% 100px 8%;
  text-align: left !important;
}

.hero-left .heading_primarytitulo {
  font-size: clamp(2.2rem, 3.5vw, 3.8rem) !important;
  line-height: 1.08 !important;
  color: #fff !important;
  letter-spacing: -0.02em;
  text-align: left !important;
}

.hero-left .bold-text-24,
.hero-left .bold-text-26 {
  color: #fff !important;
}

/* Cyan accent on "TRULY EMBODIES" */
.hero-gradient-text {
  color: #2ECFFF !important;
  -webkit-text-fill-color: #2ECFFF !important;
}

/* Subtitle — muted blue-gray, left-aligned */
.hero-sub {
  color: #8892b0 !important;
  font-size: 1.1rem !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
  max-width: 460px !important;
  margin: 0 !important;
  text-align: left !important;
}

/* Store badge pills */
.hero-store-badges {
  display: flex;
  gap: 12px;
  margin-top: 0.75rem;
  justify-content: flex-start;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 4px;
  transition: border-color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}

.hero-badge-pill:hover {
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-2px);
}

.hero-badge-pill img {
  height: 44px !important;
  width: auto !important;
  border-radius: 8px;
}

/* ---- Right column: 45%, phone anchored bottom-right ---- */
.hero-right {
  flex: 0 0 45%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  min-height: 100%;
}

/* Cobalt glow behind phone — in the dark section */
.hero-phone-glow {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26,90,255,0.25) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Phone image — large, mostly inside hero, slight bleed below */
.hero-phone-img {
  height: 72vh;
  width: auto;
  max-height: 700px;
  min-height: 420px;
  position: relative;
  z-index: 4;
  margin-bottom: -15vh;
  filter: none;
  will-change: transform;
}

/* Wave divider — sits behind the phone (z-index 3 < phone 4) */
.hero-wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.hero-wave-divider svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* =========================================================
   HERO — Responsive
   ========================================================= */

/* Medium desktop */
@media screen and (max-width: 1279px) and (min-width: 992px) {
  .hero-content-wrap {
    min-height: max(520px, 70vh);
  }

  .hero-left {
    padding: 60px 3% 80px 6%;
  }

  .hero-phone-img {
    height: 65vh;
    min-height: 360px;
    max-height: 550px;
    margin-bottom: -12vh;
  }

  .hero-phone-glow {
    width: 320px;
    height: 320px;
  }

  .sectionfunciones.is-secondary {
    padding-top: calc(10vh + 40px) !important;
  }
}

/* Tablet — stack, center, phone smaller */
@media screen and (max-width: 991px) {
  header.hero-redesign {
    overflow: hidden !important;
  }

  .hero-content-wrap {
    flex-direction: column !important;
    min-height: auto;
    align-items: center !important;
  }

  .hero-left {
    flex: none;
    width: 100%;
    padding: 40px 7% 24px 7%;
    text-align: center !important;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-left .heading_primarytitulo {
    text-align: center !important;
    font-size: clamp(1.6rem, 6.5vw, 2.4rem) !important;
  }

  .hero-sub {
    text-align: center !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    font-size: 0.95rem !important;
  }

  .hero-store-badges {
    justify-content: center;
  }

  .hero-badge-pill {
    padding: 2px;
    border-radius: 10px;
  }

  .hero-badge-pill img {
    height: 38px !important;
  }

  .hero-right {
    flex: none;
    width: 50%;
    max-width: 200px;
    justify-content: center;
    min-height: auto;
    margin: 0 auto;
  }

  .hero-phone-img {
    height: auto;
    width: 100%;
    min-height: auto;
    max-height: none;
    margin-bottom: -30px;
  }

  .hero-phone-glow {
    width: 180px;
    height: 180px;
  }

  .sectionfunciones.is-secondary {
    padding-top: 60px !important;
  }
}

/* Mobile portrait */
@media screen and (max-width: 479px) {
  .hero-left {
    padding: 32px 6% 20px 6%;
    gap: 0.6rem;
  }

  .hero-left .heading_primarytitulo {
    font-size: clamp(1.4rem, 7vw, 1.9rem) !important;
  }

  .hero-sub {
    font-size: 0.88rem !important;
  }

  .hero-badge-pill img {
    height: 34px !important;
  }

  .hero-right {
    width: 45%;
    max-width: 170px;
  }

  .hero-phone-img {
    margin-bottom: -24px;
  }

  .sectionfunciones.is-secondary {
    padding-top: 80px !important;
  }
}

/* =========================================================
   CONTACT PAGE — match home dark navy palette
   ========================================================= */
.section-copy.is-accent {
  background: #060B2B !important;
  color: #fff !important;
}

.section-copy.is-accent .eyebrow {
  color: #2ECFFF !important;
}

.section-copy.is-accent .heading_contacto,
.section-copy.is-accent .heading_contacto strong {
  color: #fff !important;
}

.section-copy.is-accent .subheading p,
.section-copy.is-accent .rich-text p {
  color: #8892b0 !important;
}

.section-copy.is-accent .heading_small {
  color: #fff !important;
}

.section-copy.is-accent .text-color_secondary {
  color: #8892b0 !important;
}

.section-copy.is-accent .text-link.is-secondary.on-accent-primary {
  color: #2ECFFF !important;
}

.section-copy.is-accent .icon.is-large.is-background {
  background: rgba(46, 207, 255, 0.1) !important;
  color: #2ECFFF !important;
}

/* Contact FAQ section */
.section.contactqa {
  background: #F0F4FA !important;
}

/* =========================================================
   DEMO PAGE
   ========================================================= */
.demo-hero {
  background: #060B2B;
  padding: 100px 5% 60px;
  text-align: center;
}

.demo-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.demo-title {
  color: #fff !important;
  font-size: clamp(1.8rem, 4vw, 2.8rem) !important;
  line-height: 1.15 !important;
  margin-bottom: 1rem;
}

.demo-subtitle {
  color: #8892b0 !important;
  font-size: 1.05rem !important;
  line-height: 1.6;
}

.demo-form-section {
  background: #F0F4FA;
  padding: 60px 5% 80px;
  display: flex;
  justify-content: center;
}

.demo-form {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #060B2B;
}

.demo-optional {
  font-weight: 400;
  color: #8892b0;
}

.demo-field input,
.demo-field select {
  padding: 12px 16px;
  border: 1px solid #d0d5e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #060B2B;
  transition: border-color 0.2s ease;
  outline: none;
  -webkit-appearance: none;
}

.demo-field input:focus,
.demo-field select:focus {
  border-color: #2ECFFF;
  box-shadow: 0 0 0 3px rgba(46,207,255,0.12);
}

.demo-field input::placeholder {
  color: #a0a8c0;
}

.demo-submit {
  margin-top: 0.5rem;
  padding: 14px 32px;
  background: #0A1F8F;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.demo-submit:hover {
  background: #0D2AB3;
  transform: translateY(-1px);
}

/* Success state */
.demo-success {
  text-align: center;
  max-width: 480px;
  padding: 40px 20px;
}

.demo-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0A1F8F;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.demo-success h2 {
  color: #060B2B !important;
  font-size: 1.5rem !important;
  margin-bottom: 0.5rem;
}

.demo-success p {
  color: #8892b0;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.demo-back-link {
  color: #0A1F8F;
  font-weight: 600;
  text-decoration: none;
}

.demo-back-link:hover {
  text-decoration: underline;
}

/* =========================================================
   "El primer ecosistema" section — Redesign
   ========================================================= */
.sectionfunciones.is-secondary {
  background-color: #F0F4FA !important;
  padding-top: calc(12vh + 40px) !important;
  position: relative !important;
}

.heading_primary-copy .text-span,
.heading_primary-copy .text-span strong {
  color: #2ECFFF !important;
  -webkit-text-fill-color: #2ECFFF !important;
}

/* =========================================================
   RESPONSIVE — Global
   ========================================================= */

/* Prevent horizontal overflow on all screen sizes */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
}

/* All images scale within their container */
img {
  max-width: 100% !important;
  height: auto !important;
}

/* Sections don't bleed past viewport */
section, .section, [class*="section"] {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* =========================================================
   RESPONSIVE — Large desktop (≥1920px)
   ========================================================= */
@media screen and (min-width: 1920px) {
  .w-container {
    max-width: 1280px !important;
  }

  /* Override Webflow fixed heights */
  header.overflow_hidden.section-3 {
    height: auto !important;
  }

  .ix_hero-intro-down-scale-3d.is-step-1-hero-intro-down-scale-3d {
    height: auto !important;
  }

  .nav_logo-icon {
    width: 130px !important;
    height: auto !important;
  }

  .nav.is-inverse {
    height: auto !important;
    min-height: 70px !important;
  }

  .nav_container {
    height: auto !important;
  }

  .nav_link {
    height: auto !important;
  }

  .hero-phone-img {
    height: 75vh;
    max-height: 780px;
    margin-bottom: -18vh;
  }

  .hero-phone-glow {
    width: 500px;
    height: 500px;
  }

  .hero-left {
    padding-left: 12% !important;
  }

  .sectionfunciones.is-secondary {
    padding-top: calc(14vh + 40px) !important;
  }
}

/* =========================================================
   RESPONSIVE — Tablet (≤991px)
   ========================================================= */
@media screen and (max-width: 991px) {
  /* Nav: hamburger menu — fully managed by responsive.js */
  .nav_menu.w-nav-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    padding: 1rem !important;
    z-index: 999 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
  }

  .nav_menu.w-nav-menu.nav-open {
    display: block !important;
  }

  .nav_mobile-menu-button.w-nav-button {
    display: flex !important;
  }

  /* Containers: fluid width on tablet */
  .container, .container.is-small, .w-container {
    width: 90% !important;
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Grid: collapse multi-column to single column */
  .w-layout-grid {
    grid-template-columns: 1fr !important;
  }

  [class*="grid_2-col"],
  [class*="grid_3-col"],
  [class*="grid_4-col"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  /* Cards full width */
  .card,
  .cardhome,
  .card.on-secondary,
  .card.on-accent-primary,
  .cardhome.on-secondary {
    width: 100% !important;
  }
}

/* =========================================================
   RESPONSIVE — Mobile landscape (≤767px)
   ========================================================= */
@media screen and (max-width: 767px) {

  /* --- SCALE: Override CSS variables for mobile proportions --- */
  :root {
    --_sizes---card--card-radius: 1.25rem !important;
    --_sizes---card--card-padding: 2rem !important;
    --_sizes---card--card-padding-sm: 1.5rem !important;
    --_typography---h1-heading--h1-size: 2.2rem !important;
    --_typography---h2-heading--h2-size: 1.6rem !important;
    --_typography---h3-heading--h3-size: 1.25rem !important;
    --_typography---h4-heading--h4-size: 1.1rem !important;
    --_sizes---section--section-padding-vertical: 3rem !important;
    --_sizes---spacing--3x: 1.5rem !important;
    --_sizes---spacing--4x: 2rem !important;
    --_sizes---spacing--5x: 2.5rem !important;
    --_sizes---spacing--8x: 3rem !important;
  }

  /* --- GLOBAL MOBILE CENTERING --- */
  body {
    text-align: center !important;
  }

  .container, .container.is-small, .w-container,
  .solutions-grid, .grid_2-col-copy,
  .card, .cardhome, .cardtop,
  .brix---card-testimonial-v13,
  .button-group, .header,
  h1, h2, h3, h4, p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Grids: center items */
  .w-layout-grid,
  .solutions-grid,
  .grid_2-col-copy,
  [class*="grid_"] {
    justify-items: center !important;
  }

  /* Flex containers: center */
  .flex_vertical, .flex_horizontal,
  .button-group, .card_body, .card_body_small,
  .card_body-copy-copy, .brix---mg-bottom-24px {
    align-items: center !important;
    justify-content: center !important;
  }

  /* Reduce hero padding */
  .header, [class*="hero"], [class*="header"] {
    padding-top: 60px !important;
    padding-bottom: 32px !important;
  }

  /* Stack flex rows */
  [class*="flex"]:not([class*="flex-col"]):not([class*="align"]) {
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Typography — aggressive scale-down */
  h1, .heading_hero, .heading_primarytitulo {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem) !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
  h2, .heading_primary, .heading_primary-copy {
    font-size: clamp(1.25rem, 4.5vw, 1.6rem) !important;
    line-height: 1.25 !important;
  }
  h3, .heading_secondary, .heading_small {
    font-size: clamp(1rem, 3.5vw, 1.25rem) !important;
    line-height: 1.3 !important;
  }
  h4, .heading_tertiary {
    font-size: clamp(0.95rem, 3vw, 1.1rem) !important;
  }

  /* Body text and subheadings */
  p, .paragraph_large, .quote, .carta, .subheading, .subheading-2 {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }

  .superscript, .subscript, sub, sup {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    float: none !important;
    text-align: center !important;
    display: inline !important;
  }

  .eyebrow {
    font-size: 0.75rem !important;
  }

  /* Horizontal padding for content blocks */
  .w-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* --- FIX: Cards — full width on mobile --- */
  .card, .cardhome,
  .card.on-secondary,
  .cardhome.on-secondary,
  .card.on-accent-primary {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Logo smaller on mobile landscape */
  .nav_logo-icon, img.image-2 {
    width: 100px !important;
  }

  /* --- FIX: Bento grid — centered single column --- */
  .grid_2-col-copy {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Containers: centered with breathing room */
  .container, .container.is-small, .w-container {
    width: 90% !important;
    max-width: 90% !important;
  }

  .solutions-grid {
    width: 90% !important;
    max-width: 90% !important;
    box-sizing: border-box !important;
  }

  /* --- FIX: Section funciones — auto height --- */
  .sectionfunciones.is-secondary {
    height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* --- FIX: All sections — reduce vertical padding --- */
  section, .section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .brix---section-overflow-hidden {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* --- FIX: Button group — center properly --- */
  .button-group {
    align-items: center !important;
    width: 100% !important;
  }
  .button-group.is-align-center {
    align-items: center !important;
    justify-content: center !important;
    display: flex !important;
  }

  /* --- FIX: CTA buttons — centered --- */
  .w-button,
  .button.on-accent-primary,
  .button-copy.on-accent-primary,
  .buttonsaber.on-accent-primary {
    width: auto !important;
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    text-align: center !important;
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
  }

  /* Text buttons (Ver más, Explorar, Leer) */
  .text-button {
    font-size: 0.85rem !important;
  }

  /* Hero handled by hero responsive rules above */

  header.overflow_hidden.section-3 .margin-bottom_medium {
    margin-bottom: 0 !important;
  }

  /* --- FIX: Footer grid --- */
  .grid_6-col {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  /* Footer logo: full width row */
  .footer .grid_6-col > .ix-link-wrapper {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-bottom: 1rem !important;
  }

  .footer .image-3 {
    max-width: 200px !important;
    margin: 0 auto !important;
  }

  /* (containers handled above) */

  /* --- FIX: Accordion spacing --- */
  .accordion_toggle-transparent {
    padding: 12px 8px !important;
  }

  /* --- FIX: Icon sizes --- */
  .icon {
    width: 24px !important;
    height: 24px !important;
  }
  .icon.is-medium {
    width: 28px !important;
    height: 28px !important;
  }

  /* --- FIX: Rich text blocks --- */
  .rich-textblue, .rich-text {
    height: auto !important;
  }

  /* --- FIX: Margin helpers too big on mobile --- */
  .margin-bottom_medium {
    margin-bottom: 1rem !important;
  }
  .margin-top_medium {
    margin-top: 1rem !important;
  }
}

/* =========================================================
   RESPONSIVE — Mobile portrait (≤479px)
   ========================================================= */
@media screen and (max-width: 479px) {

  :root {
    --_sizes---card--card-radius: 1.25rem !important;
    --_sizes---card--card-padding: 1.5rem !important;
    --_sizes---card--card-padding-sm: 1.25rem !important;
  }

  /* Even smaller typography for small phones */
  h1, .heading_hero, .heading_primarytitulo {
    font-size: clamp(1.3rem, 6vw, 1.7rem) !important;
  }
  h2, .heading_primary, .heading_primary-copy {
    font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
  }
  h3, .heading_secondary, .heading_small {
    font-size: clamp(0.95rem, 4vw, 1.15rem) !important;
  }

  p, .paragraph_large, .quote, .carta, .subheading, .subheading-2 {
    font-size: 0.85rem !important;
  }

  .superscript, .subscript, sub, sup {
    font-size: 0.8rem !important;
  }

  /* Buttons: full width on small phones */
  .w-button,
  .button.on-accent-primary,
  .button-copy.on-accent-primary,
  .buttonsaber.on-accent-primary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  /* Remove fixed heights — use real viewport height from JS */
  [style*="height: 100vh"] {
    height: auto !important;
    min-height: calc(var(--vh, 1vh) * 100) !important;
  }

  /* Tables scroll horizontally */
  table {
    display: block !important;
    overflow-x: auto !important;
  }

  /* Reduce section spacing further */
  section, .section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Logo compact */
  img.image-2 {
    width: 80px !important;
  }
  .nav_logo-icon {
    width: 80px !important;
  }

  /* Hero handled by hero responsive rules above */

  /* Subtitle */
  .subheading-2 {
    width: 100% !important;
  }

  /* Cards — even narrower on small phones */
  .card, .cardhome,
  .card.on-secondary,
  .cardhome.on-secondary,
  .card.on-accent-primary {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Footer — two columns, logo on top */
  .grid_6-col {
    grid-template-columns: 1fr 1fr !important;
    text-align: center !important;
  }

  .footer .grid_6-col > .ix-link-wrapper {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-bottom: 1rem !important;
  }

  .footer .image-3 {
    max-width: 180px !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Accordion text */
  .paragraph_large {
    font-size: 0.9rem !important;
  }

  /* Gap reductions */
  .gap-medium {
    gap: 8px !important;
  }
  .gap-xsmall {
    gap: 6px !important;
  }
}

/* =========================================================
   RESPONSIVE — Intermediate tablet (768px–991px)
   Fills the gap between mobile and desktop breakpoints.
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 991px) {
  /* Two-column grids stay 2 columns on tablets */
  [class*="grid_2-col"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Keep nav logo smaller on tablets */
  .nav_logo-icon, img.image-2 {
    width: 90px !important;
  }
}

/* =========================================================
   RESPONSIVE — Safe area padding (notched devices)
   Works when viewport-fit=cover is set by responsive.js
   ========================================================= */
@supports (padding: env(safe-area-inset-bottom)) {
  footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
  }

  .nav, .w-nav {
    padding-left: calc(1rem + env(safe-area-inset-left)) !important;
    padding-right: calc(1rem + env(safe-area-inset-right)) !important;
  }
}

/* =========================================================
   DROPDOWN — JS handles open/close, original CSS handles style
   ========================================================= */
@media screen and (max-width: 991px) {
  .mega-nav_dropdown-list.w--open {
    position: relative !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .mega-nav_dropdown-list-wrapper,
  .mega-nav_dropdown-list-wrapper.w--open {
    padding: 0.5rem 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  .mega-nav_dropdown-list-wrapper .grid_3-col,
  .mega-nav_dropdown-list-wrapper .w-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
}

/* =========================================================
   ACCORDION — app-aligned styling
   ========================================================= */
.accordion_icon {
  transition: transform 0.3s ease !important;
}

.accordion.is-transparent {
  border-radius: 0 !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(0, 12, 86, 0.08) !important;
  transition: background-color 0.2s ease !important;
}

.accordion.is-transparent:hover {
  background-color: rgba(240, 244, 255, 0.6) !important;
}

/* =========================================================
   APP ALIGNMENT: Typography — bolder headings like app
   ========================================================= */
.heading_primary,
.heading_hero,
.heading_primarytitulo {
  font-weight: 600 !important;
}

.heading_secondary,
.heading_primary-copy {
  font-weight: 500 !important;
}

/* =========================================================
   SOLUTIONS GRID — 4 equal cards, responsive
   ========================================================= */
.solutions-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 40px 5% !important;
}

/* All cards same size */
.solutions-grid .brix---slide-item-mg {
  display: flex !important;
}

.solutions-grid .brix---card-testimonial-v13 {
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  padding: 40px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Tablet: 2 columns */
@media screen and (max-width: 991px) {
  .solutions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    padding: 32px 5% !important;
  }
}

/* Mobile landscape: single column */
@media screen and (max-width: 767px) {
  .solutions-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 24px 4% !important;
  }
  .solutions-grid .brix---card-testimonial-v13 {
    padding: 24px 16px !important;
  }
}

/* Mobile portrait: 1 column */
@media screen and (max-width: 479px) {
  .solutions-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 24px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .solutions-grid .brix---card-testimonial-v13 {
    min-height: auto !important;
    padding: 24px 20px !important;
    text-align: center !important;
  }
}

/* (solution card centering handled by global mobile centering) */

/* =========================================================
   UTILITY — breakpoint classes & body scroll lock
   ========================================================= */
body[style*="overflow: hidden"] {
  position: relative !important;
}
