/* Menú responsive compartido por todas las páginas Horbath. */
@keyframes hh-shared-header-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

.horbath-home {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow-x: clip !important;
}

/* Geometría y tipografía únicas del header para todas las páginas. */
@media (min-width: 1081px) {
  .horbath-home .hh-nav {
    height: 76px !important;
    min-height: 76px !important;
  }

  .horbath-home .hh-nav-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: min(100% - 72px, 1200px) !important;
    height: 76px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    gap: 28px !important;
  }

  .horbath-home .hh-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: max-content !important;
  }

  .horbath-home .hh-brand-logo {
    display: block !important;
    width: auto !important;
    height: 42px !important;
  }

  .horbath-home .hh-brand-prod {
    padding-left: 14px !important;
    border-left: 1px solid rgba(255, 255, 255, .22) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .horbath-home .hh-brand-prod b {
    color: #38d5ff !important;
  }

  .horbath-home .hh-nav-links {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 28px !important;
  }

  .horbath-home .hh-nav-links > a,
  .horbath-home .hh-nav-main-link {
    color: #c6d1ff !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
  }

  .horbath-home .hh-nav-cta {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .horbath-home .hh-nav-cta .hh-btn {
    min-height: 44px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
  }
}

/* El Hero del Inicio usa la misma presencia de CTA que las páginas de solución. */
@media (min-width: 768px) {
  .horbath-home .hh-hero .hh-actions .hh-btn,
  .horbath-home .cw-hero .cw-actions .hh-btn,
  .horbath-home .th-hero .th-actions .hh-btn {
    min-height: 58px !important;
    padding-inline: 30px !important;
    font-size: 17px !important;
  }

  .horbath-home .hh-hero .hh-actions .hh-btn-primary,
  .horbath-home .cw-hero .cw-actions .hh-btn-primary,
  .horbath-home .th-hero .th-actions .hh-btn-primary {
    min-width: 210px !important;
  }

  .horbath-home .hh-hero .hh-actions .hh-btn-secondary,
  .horbath-home .cw-hero .cw-actions .hh-btn-secondary,
  .horbath-home .th-hero .th-actions .hh-btn-secondary {
    min-width: 275px !important;
  }
}

/* Compatibilidad entre las clases históricas de idioma del Home y soluciones. */
/* CodeWorks conserva la misma escala del Hero principal en tablet y laptop. */
@media (min-width: 768px) and (max-width: 1199px) {
  .horbath-home .cw-hero h1 {
    font-size: 58px !important;
    line-height: 1.02 !important;
  }

  .horbath-home .cw-hero .cw-hero-lead {
    font-size: 21px !important;
    line-height: 1.48 !important;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .horbath-home .cw-hero h1 {
    font-size: 40px !important;
    line-height: 1.1 !important;
  }

  .horbath-home .cw-hero .cw-hero-lead {
    font-size: 20px !important;
    line-height: 1.48 !important;
  }
}

.horbath-home .hh-lang-switch a.is-selected,
.horbath-home .hh-lang-switch a.is-active {
  color: #061545 !important;
  background: #38d5ff !important;
}

/* Enlace global preparado para la futura página de Carreras. */
.horbath-home .hh-nav-careers[aria-disabled="true"] {
  cursor: default;
  opacity: .7;
}

.horbath-home .hh-nav-careers[aria-disabled="true"]:hover {
  color: #c6d1ff !important;
}

/* Página de solución activa dentro del menú compartido. */
.horbath-home .hh-nav-links .hh-submenu a[aria-current="page"] {
  color: #fff !important;
  border-color: rgba(56, 212, 254, .7) !important;
  background: linear-gradient(90deg, rgba(56, 212, 254, .18), rgba(11, 72, 232, .16)) !important;
  box-shadow: inset 3px 0 0 #38d4fe, 0 8px 24px rgba(56, 212, 254, .12) !important;
}

.horbath-home .hh-nav-solutions.is-current-solution > .hh-nav-main-link {
  color: #fff !important;
}

@media (max-width: 1080px) {
  html {
    background: #061545;
  }

  .horbath-home {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  .horbath-home .hh-brand-prod,
  .horbath-home .hh-nav-cta .hh-btn {
    display: none !important;
  }

  /* The desktop active-page underline is intentionally absent in tablet and mobile menus. */
  .horbath-home .hh-nav-links > a[aria-current="page"]::after,
  .horbath-home .hh-nav-solutions.is-current-solution > .hh-nav-main-link::before {
    display: none !important;
  }

  .horbath-home .hh-nav {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    transition: background-color .32s ease, box-shadow .32s ease, backdrop-filter .32s ease !important;
    transform: none !important;
    animation: hh-shared-header-enter .75s cubic-bezier(.16, 1, .3, 1) .04s both !important;
  }

  .horbath-home .hh-nav.scrolled {
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    border: 0 !important;
    border-bottom: 0 !important;
    transform: none !important;
    background: rgba(6, 21, 69, .96) !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px) !important;
    transition: none !important;
  }

  .horbath-home .hh-nav::before,
  .horbath-home .hh-nav::after,
  .horbath-home .hh-nav-inner::before,
  .horbath-home .hh-nav-inner::after {
    border: 0 !important;
    box-shadow: none !important;
  }

  .horbath-home .hh-nav-inner {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: 86px !important;
    min-height: 86px !important;
    box-sizing: border-box;
    padding: 14px 24px;
    transform: none !important;
    animation: none !important;
  }

  .horbath-home .hh-brand,
  .horbath-home .hh-nav-cta {
    position: relative !important;
    top: auto !important;
    margin-block: 0 !important;
    align-self: center !important;
    transform: none !important;
  }

  .horbath-home .hh-brand {
    position: absolute !important;
    top: 50% !important;
    left: 24px !important;
    right: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    transform: translateY(-50%) !important;
  }

  .horbath-home .hh-nav-cta {
    position: absolute !important;
    top: 50% !important;
    left: auto !important;
    right: 24px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
  }

  .horbath-home .hh-brand-logo {
    display: block !important;
    height: 56px !important;
    max-height: 56px !important;
    margin: 0 !important;
    transform: none !important;
  }

  .horbath-home .hh-nav-burger {
    display: flex !important;
    margin: 0 !important;
    transform: none !important;
  }

  .horbath-home .hh-nav-links {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    left: 24px !important;
    right: 24px !important;
    z-index: 100;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: auto !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: hidden !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: opacity .18s ease, visibility 0s linear .18s,
      transform .18s ease, background-color 0s linear .18s !important;
    contain: paint;
  }

  .horbath-home .hh-nav-check:checked ~ .hh-nav-links {
    max-height: min(720px, calc(100svh - 112px)) !important;
    padding: 14px !important;
    border-color: rgba(255, 255, 255, .16) !important;
    background: rgba(6, 21, 69, .985) !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(56, 212, 254, .22) transparent;
    clip-path: inset(0 round 18px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .26) !important;
    pointer-events: auto !important;
    transform: none !important;
    transition: opacity .18s ease, visibility 0s linear 0s,
      transform .18s ease, background-color 0s linear 0s !important;
  }

  .horbath-home .hh-nav-check:checked ~ .hh-nav-links.needs-scroll {
    overflow-y: auto !important;
    scrollbar-width: thin;
  }

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

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

  .horbath-home .hh-nav-check:checked ~ .hh-nav-links::-webkit-scrollbar-track {
    margin-block: 18px;
    background: transparent;
  }

  .horbath-home .hh-nav-check:checked ~ .hh-nav-links::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(56, 212, 254, .22);
    background-clip: content-box;
  }

  .horbath-home .hh-nav-links > a,
  .horbath-home .hh-nav-main-link {
    display: flex !important;
    align-items: center !important;
    min-height: 46px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, .06) !important;
  }

  .horbath-home .hh-nav-links > a:nth-child(1) { grid-column: 1; grid-row: 1; }
  .horbath-home .hh-nav-links > a:nth-child(2) { grid-column: 2; grid-row: 1; }
  .horbath-home .hh-nav-links > a:nth-child(3) { grid-column: 1; grid-row: 2; }
  .horbath-home .hh-nav-links > a:nth-of-type(4) { grid-column: 2; grid-row: 2; }

  .horbath-home .hh-nav-careers {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  .horbath-home .hh-nav-solutions {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    width: 100% !important;
  }

  .horbath-home .hh-nav-solutions::before {
    display: none !important;
  }

  .horbath-home .hh-nav-main-link {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .horbath-home .hh-nav-solutions .hh-submenu {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    justify-self: stretch !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border-width: 1px !important;
    border-color: transparent !important;
    opacity: 0 !important;
    visibility: visible !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    transform-origin: top center;
    transition: max-height .46s cubic-bezier(.22, 1, .36, 1), margin-top .42s cubic-bezier(.22, 1, .36, 1),
      padding-top .42s cubic-bezier(.22, 1, .36, 1), padding-bottom .42s cubic-bezier(.22, 1, .36, 1),
      opacity .32s ease, border-color .2s ease !important;
  }

  /* En pantallas táctiles el enlace conserva el foco después del toque.
     Neutralizamos la posición de escritorio para que el panel cierre recto. */
  .horbath-home .hh-nav-solutions:hover .hh-submenu,
  .horbath-home .hh-nav-solutions:focus-within .hh-submenu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    inline-size: 100% !important;
    opacity: 0 !important;
    visibility: visible !important;
    pointer-events: none !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
  }

  .horbath-home .hh-nav-solutions.is-open .hh-submenu {
    max-height: 260px !important;
    margin-top: 8px !important;
    padding: 8px !important;
    border-width: 1px !important;
    border-color: rgba(255, 255, 255, .14) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    transition: max-height .46s cubic-bezier(.22, 1, .36, 1), margin-top .42s cubic-bezier(.22, 1, .36, 1),
      padding-top .42s cubic-bezier(.22, 1, .36, 1), padding-bottom .42s cubic-bezier(.22, 1, .36, 1),
      opacity .32s ease, border-color .2s ease !important;
  }

  .horbath-home .hh-nav-solutions:not(.is-open) .hh-submenu {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .horbath-home .hh-nav-solutions .hh-submenu > a {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transform: none !important;
    transition: border-color .25s ease, background-color .25s ease !important;
  }

  .horbath-home .hh-nav-solutions.is-open .hh-submenu > a {
    opacity: 1 !important;
    transform: none !important;
  }

  .horbath-home .hh-nav-solutions .hh-nav-main-link::after,
  .horbath-home .hh-nav-solutions:hover .hh-nav-main-link::after,
  .horbath-home .hh-nav-solutions:focus-within .hh-nav-main-link::after {
    transform: rotate(45deg) translateY(-2px) !important;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1) !important;
  }

  .horbath-home .hh-nav-solutions.is-open .hh-nav-main-link::after,
  .horbath-home .hh-nav-solutions.is-open:hover .hh-nav-main-link::after,
  .horbath-home .hh-nav-solutions.is-open:focus-within .hh-nav-main-link::after {
    transform: rotate(225deg) translate(-2px, -1px) !important;
  }

  .horbath-home .hh-lang-switch {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 6px 14px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, .06) !important;
  }
}

/* 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 !important;
    scrollbar-width: thin !important;
  }

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

@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 !important;
    min-height: 86px !important;
    max-height: 86px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    animation: none !important;
  }

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

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

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

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

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

  .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 !important;
    grid-row: auto !important;
  }

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

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

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

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

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

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

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

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

  /* 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 !important;
    line-height: 1.04 !important;
  }

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

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

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

  .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 !important;
    width: 240px !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 62px !important;
    padding-inline: 20px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
  }
}

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

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

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

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

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

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

  .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 !important;
  }
}

/* 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 !important;
    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) !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    transform: translateY(-10px) !important;
  }
}

/* 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 !important;
  }

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

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

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

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

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

}

@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 !important;
  }
}
