
/* En pantallas especialmente bajas, el menú necesita desplazamiento aunque
   el submenú de Soluciones permanezca cerrado. */
@media (max-width: 1080px) and (max-height: 520px) {
  .horbath-home .hh-nav-check:checked ~ .hh-nav-links {
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .horbath-home .hh-nav-check:checked ~ .hh-nav-links::-webkit-scrollbar {
    width: 8px;
  }
}

@media (max-width: 767px) {
  /* Una sola caja de 86px para el header móvil en todas las páginas. */
  .horbath-home .hh-nav,
  body.datamind-v2 .horbath-home .hh-nav {
    height: 86px;
    min-height: 86px;
    max-height: 86px;
    padding: 0;
    box-sizing: border-box;
    animation: none;
  }

  .horbath-home .hh-nav-inner,
  body.datamind-v2 .horbath-home .hh-nav-inner {
    width: 100%;
    height: 86px;
    min-height: 86px;
    max-height: 86px;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .horbath-home .hh-nav-inner { padding-inline: 16px; }

  .horbath-home .hh-brand { left: 16px; }

  .horbath-home .hh-nav-cta { right: 16px; }

  .horbath-home .hh-nav-links {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr;
  }

  .horbath-home .hh-nav-links > a:nth-child(n),
  .horbath-home .hh-nav-links > a:nth-of-type(n),
  .horbath-home .hh-nav-solutions,
  .horbath-home .hh-lang-switch {
    grid-column: 1;
    grid-row: auto;
  }

  .horbath-home .hh-nav-solutions .hh-submenu {
    grid-template-columns: 1fr;
  }

  /* Hero del Inicio: escala y ritmo optimizados para pantallas pequeñas. */
  .horbath-home .hh-hero {
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100svh;
    padding: 86px 0 0;
    box-sizing: border-box;
  }

  .horbath-home .hh-hero.hh-dark-grid {
    background:
      linear-gradient(180deg, rgba(6, 21, 69, .62) 0%, rgba(6, 21, 69, .74) 48%, rgba(6, 21, 69, .84) 100%),
      url("../home/hero-fallback.webp") center / cover no-repeat,
      linear-gradient(135deg, #061545 0%, #0a226c 55%, #030a28 100%);
  }

  .horbath-home .hh-hero .hh-container {
    width: calc(100% - 40px);
    margin-inline: auto;
  }

  .horbath-home .hh-hero .hh-hero-grid {
    min-height: calc(100vh - 86px);
    min-height: calc(100svh - 86px);
    min-height: calc(100svh - 86px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 24px;
    box-sizing: border-box;
    transform: translateY(-14px);
  }

  .horbath-home .hh-hero .hh-eyebrow {
    margin-bottom: 22px;
    font-size: 17px;
  }

  .horbath-home .hh-hero .hh-title,
  .horbath-home .cw-hero h1 {
    max-width: none;
    font-size: 48px;
    line-height: 1.06;
  }

  .horbath-home .hh-hero .hh-lead,
  .horbath-home .cw-hero .cw-hero-lead {
    max-width: none;
    margin-top: 24px;
    font-size: 20px;
    line-height: 1.4;
  }

  /* CodeWorks contiene una entradilla más extensa: reforzamos el título y
     reducimos el cuerpo para conservar una jerarquía clara en 320–480 px. */
  .horbath-home .cw-hero h1 {
    font-size: 48px;
    line-height: 1.04;
  }

  .horbath-home .cw-hero .cw-hero-lead {
    margin-top: 28px;
    font-size: 20px;
    line-height: 1.48;
  }

  .horbath-home #nosotros-horbath {
    padding-top: 36px;
  }

  .horbath-home .hh-hero .hh-actions,
  .horbath-home .cw-hero .cw-actions {
    width: 100%;
    align-items: flex-start;
    gap: 12px;
    margin-top: 26px;
  }

  .horbath-home .hh-hero .hh-actions .hh-btn,
  .horbath-home .hh-hero .hh-actions .hh-btn-secondary,
  .horbath-home .cw-hero .cw-actions .hh-btn,
  .horbath-home .cw-hero .cw-actions .hh-btn-secondary {
    display: inline-flex;
    width: 240px;
    height: auto;
    max-width: 100%;
    min-height: 62px;
    padding-inline: 20px;
    font-size: 18px;
    font-weight: 800;
  }
}

@media (min-width: 340px) and (max-width: 480px) {
  .horbath-home .hh-hero {
    padding-top: 86px;
    padding-bottom: 0;
  }

  .horbath-home .hh-hero.hh-dark-grid {
    background:
      linear-gradient(180deg, rgba(6, 21, 69, .66) 0%, rgba(6, 21, 69, .77) 48%, rgba(6, 21, 69, .86) 100%),
      url("../home/hero-fallback.webp") 55% center / cover no-repeat,
      linear-gradient(135deg, #061545 0%, #0a226c 55%, #030a28 100%);
  }

  .horbath-home .hh-hero .hh-eyebrow {
    gap: 8px;
    margin-bottom: 18px;
  }

  .horbath-home .hh-hero .hh-eyebrow::before {
    width: 24px;
  }

  .horbath-home .hh-hero .hh-lead {
    max-width: 315px;
  }

  .horbath-home .hh-hero .hh-actions {
    margin-top: 22px;
  }

  .horbath-home .hh-hero .hh-actions .hh-btn,
  .horbath-home .hh-hero .hh-actions .hh-btn-secondary,
  .horbath-home .cw-hero .cw-actions .hh-btn,
  .horbath-home .cw-hero .cw-actions .hh-btn-secondary {
    width: 240px;
  }
}

/* Evita que el último carácter del título con degradado se recorte en tablet. */
@media (min-width: 481px) and (max-width: 1080px) {
  .horbath-home .hh-hero .hh-title {
    overflow: visible;
    padding-inline-end: .08em;
  }

  .horbath-home .hh-hero .hh-gradient-text {
    padding-inline-end: .08em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
}

@media (max-width: 339px) {
  .horbath-home .hh-hero .hh-hero-grid {
    min-height: calc(100svh - 86px);
    padding-top: 20px;
    padding-bottom: 20px;
    transform: translateY(-10px);
  }
}

/* Aprovecha el ancho extra de móviles grandes sin alterar 320/375 px. */
@media (min-width: 400px) and (max-width: 480px) {
  .horbath-home .hh-section {
    padding-block: 48px;
  }

  .horbath-home .hh-section-head {
    margin-bottom: 26px;
  }

  .horbath-home #nosotros-horbath {
    padding-top: 32px;
  }

  .horbath-home .hh-promise {
    min-height: 230px;
    padding-block: 20px;
  }

  .horbath-home .hh-promise-number {
    margin-bottom: 20px;
  }

  .horbath-home .hh-solution-card {
    min-height: 306px;
    padding-block: 20px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .horbath-home .hh-nav-links,
  .horbath-home .hh-nav-solutions .hh-submenu,
  .horbath-home .hh-nav-solutions .hh-submenu > a,
  .horbath-home .hh-nav-main-link::after {
    transition-duration: .01ms;
  }
}
