/* Estilos compartidos y ajustes responsive de SOLUTHINK. */
:root { --blue: #1D70B8; --navy: #152A4A; --ink: #172033; }
    html { scroll-padding-top: 88px; }
    body { overflow-x: hidden; }
    .eyebrow { letter-spacing: .16em; }
    .photo-card img { transition: transform .65s cubic-bezier(.2,.75,.25,1); }
    .photo-card:hover img { transform: scale(1.06); }
    .focus-ring:focus-visible { outline: 3px solid #65b8ff; outline-offset: 4px; }
    .bg-tech-grid {
      background-image: radial-gradient(rgba(29, 112, 184, 0.14) 1px, transparent 1px);
      background-size: 24px 24px;
    }
    .dropdown-menu {
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }
    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
    /* ================================================================
       AJUSTES RESPONSIVE - respetan el diseño original de SOLUTHINK
       No requieren recompilar output.css.
       ================================================================ */
    *, *::before, *::after { box-sizing: border-box; }
    img, svg, video { max-width: 100%; }
    main, main > section { min-width: 0; }
    /* Reserva la altura de la cabecera mientras carga el componente. */
    #site-navbar { min-height: 77px; }
    @media (min-width: 1024px) {
      #site-navbar { min-height: 110px; }
    }
    @media (min-width: 1024px) and (max-width: 1199px) {
      #site-navbar { min-height: 126px; }
      .slt-info-bar { min-height: 49px; }
    }

    #mainHeader nav { min-width: 0; }
    #mainHeader nav > a:first-child { min-width: 0; }
    #mainHeader nav > a:first-child > div:last-child { min-width: 0; }

    /* Los enlaces principales necesitan espacio: menú hamburguesa hasta 1023px. */
    .desktop-navigation, .header-cta { display: none !important; }
    .mobile-menu-toggle { display: inline-flex !important; }
    .mobile-menu-panel { display: none !important; }
    .mobile-menu-panel.is-open {
      display: block !important;
      animation: menuReveal .25s ease-out both;
    }
    @media (min-width: 1024px) {
      .desktop-navigation, .header-cta { display: flex !important; }
      .mobile-menu-toggle, .mobile-menu-panel { display: none !important; }
    }
    @keyframes menuReveal {
      from { opacity: 0; transform: translateY(-8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @media (max-width: 1023px) {
      .mobile-menu-panel {
        position: absolute;
        inset: 100% 0 auto;
        max-height: min(82dvh, calc(100dvh - 76px));
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
      }
    }

    /* El hero nunca debe forzar scroll horizontal. */
    #inicio .hero-badge { max-width: 100%; min-width: 0; }
    #inicio .hero-badge .eyebrow { min-width: 0; overflow-wrap: anywhere; }
    #inicio .hero-actions > a { min-width: 0; }
    #inicio .hero-actions > a > span { overflow-wrap: anywhere; }
    #inicio .hero-facts {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: clamp(.5rem, 3vw, 1rem);
    }
    #inicio .hero-facts > div { min-width: 0; }
    #inicio .hero-facts p { overflow-wrap: anywhere; }
    #inicio .hero-facts p:first-child {
      font-size: clamp(.9rem, 3.6vw, 1.5rem);
      line-height: 1.25;
    }
    #inicio .hero-image-wrap { isolation: isolate; }
    #inicio .hero-image-wrap .hero-picture {
      transform-origin: center center;
      animation: heroImageDrift 19s ease-in-out infinite alternate;
      will-change: transform;
    }
    #inicio .hero-status-card { animation: heroCardFloat 7s ease-in-out infinite; }
    #inicio .hero-badge-dot { animation: heroDotPulse 3.4s ease-in-out infinite; }
    @keyframes heroImageDrift {
      from { transform: scale(1.035) translate3d(0, 0, 0); }
      to   { transform: scale(1.10) translate3d(-1%, 0, 0); }
    }
    @keyframes heroCardFloat {
      0%, 100% { transform: translateY(0); }
      50%      { transform: translateY(-5px); }
    }
    @keyframes heroDotPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%      { opacity: .65; transform: scale(.83); }
    }
    .photo-card:focus-within img { transform: scale(1.045); }
    .photo-card a:focus-visible { outline: 2px solid #1D70B8; outline-offset: 3px; }
    .hero-actions a svg { flex-shrink: 0; transition: transform .25s ease; }
    @media (hover: hover) {
      .hero-actions a:hover svg { transform: translateY(3px); }
    }

    /* Textos largos: contacto, botones y formulario en celulares estrechos. */
    #contacto a[href^="mailto:"] { overflow-wrap: anywhere; word-break: break-word; }
    #contacto .contact-details > div > div:last-child { min-width: 0; }
    #contacto input, #contacto select, #contacto textarea { max-width: 100%; min-width: 0; }
    #contacto form, #contacto form > div { min-width: 0; }
    #contacto form button, #soluciones-resumen a, #nosotros-resumen a,
    #comparativa a { max-width: 100%; white-space: normal; text-align: center; }

    @media (max-width: 639px) {
      #inicio h1 { font-size: clamp(2rem, 9.3vw, 2.45rem); overflow-wrap: break-word; }
      #inicio .hero-actions { flex-direction: column; }
      #inicio .hero-actions > a { width: 100%; }
      #inicio .hero-image-wrap { min-height: 350px; }
      #contacto input, #contacto select, #contacto textarea { font-size: 16px; }
      #contacto form { padding: clamp(1rem, 5vw, 1.5rem); }
    }
    @media (max-width: 380px) {
      #inicio .hero-badge { gap: .45rem; padding: .375rem .625rem; }
      #inicio .hero-badge .eyebrow { font-size: .625rem; letter-spacing: .075em; }
      #inicio .hero-facts p:first-child { font-size: .92rem; }
      #inicio .hero-status-card { left: .75rem; right: .75rem; bottom: .75rem; padding: .85rem; }
      #inicio .hero-status-card p:last-child { font-size: .8rem; }
      #contacto .contact-details { padding: 1rem; }
    }
    @media (max-width: 767px) {
      /* AOS: solo desplazamiento vertical en móvil, no entradas laterales. */
      [data-aos="fade-right"]:not(.aos-animate),
      [data-aos="fade-left"]:not(.aos-animate) {
        transform: translate3d(0, 18px, 0);
      }
    }
    .aos-unavailable [data-aos] { opacity: 1 !important; transform: none !important; }

    /* ==================================================================
       PROPUESTA 2026: HERO FOTOGRAFICO INMERSIVO DE ANCHO COMPLETO
       - El original se conserva fuera de esta seccion.
       - Desktop: fotografia de fondo con transicion blanca lateral.
       - Movil: fotografia a todo ancho bajo el texto, sin tapar los CTA.
       - Compatible con el CSS compilado existente, sin recompilar Tailwind.
       ================================================================== */
    #inicio {
      position: relative;
      isolation: isolate;
      background-color: #fff;
    }
    #inicio .hero-layout {
      position: relative;
      z-index: 1;
    }
    #inicio .hero-content {
      position: relative;
      z-index: 2;
    }
    #inicio .hero-image-wrap {
      min-height: 0;
      height: 320px;
      width: 100%;
      margin: 0;
      border-radius: 0;
      box-shadow: none;
    }
    #inicio .hero-image-wrap .hero-picture {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 47%;
      opacity: 1;
    }
    #inicio .hero-image-tint {
      background: linear-gradient(0deg, rgba(16,31,55,.5) 0%, rgba(16,31,55,.04) 49%, transparent 77%);
    }
    #inicio .hero-status-card {
      z-index: 2;
    }
    @media (min-width: 640px) and (max-width: 1023px) {
      #inicio .hero-image-wrap { height: 400px; }
    }
    @media (min-width: 1024px) {
      #inicio {
        min-height: 650px;
        background-image: none;
      }
      #inicio .hero-layout {
        min-height: 650px;
        position: relative;
        grid-template-columns: 1.05fr .95fr;
      }
      #inicio .hero-content {
        min-width: 0;
      }
      #inicio .hero-image-wrap {
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(50% - 50vw);
        right: auto;
        z-index: 0;
        height: 100%;
        min-height: 100%;
        width: 100vw;
        max-width: none;
        margin: 0;
        border: 0;
      }
      #inicio .hero-image-wrap .hero-picture {
        object-position: 70% center;
      }
      #inicio .hero-image-tint {
        background: linear-gradient(90deg,
          #ffffff 0%,
          #ffffff 26%,
          rgba(255,255,255,.99) 32%,
          rgba(255,255,255,.94) 40%,
          rgba(255,255,255,.70) 50%,
          rgba(255,255,255,.25) 63%,
          rgba(16,31,55,.06) 81%,
          rgba(16,31,55,.18) 100%);
      }
      #inicio .hero-status-card {
        left: auto;
        right: clamp(22px, 5.5vw, 100px);
        bottom: 28px;
        width: min(310px, 29vw);
        max-width: none;
      }
    }
    @media (max-width: 639px) {
      #inicio .hero-image-wrap { height: clamp(300px, 88vw, 370px); }
      #inicio .hero-status-card {
        left: 16px;
        right: 16px;
        bottom: 16px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto !important; }
      #inicio .hero-image-wrap .hero-picture,
      #inicio .hero-status-card,
      #inicio .hero-badge-dot { animation: none !important; transform: none !important; }
      *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
      }
    }

/* Protección frente a fallos de JS/CDN: el contenido nunca queda invisible. */
html:not(.aos-enabled) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}



/* ========================================================
   SOLUTHINK V5 — NAVEGACIÓN ANIMADA
   ======================================================== */

/* Indicador de carga para la navegación interna. */
.slt-v5-progress {
  position: fixed;
  z-index: 10000;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, #1d70b8, #65b8ff);
  box-shadow: 0 0 9px rgba(29, 112, 184, .55);
  transform: scaleX(.22);
  transform-origin: left;
}

.slt-v5-progress.is-completing {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  .slt-v5-progress {
    animation: sltProgressLoad var(--slt-load-duration, 3s) linear both;
  }

  .slt-v5-progress.is-completing {
    animation: sltProgressFinish 680ms ease-out both;
  }
}

@keyframes sltProgressLoad {
  from { transform: scaleX(.08); }
  to { transform: scaleX(.95); }
}

@keyframes sltProgressFinish {
  from { transform: scaleX(.95); }
  42% { transform: scaleX(1); opacity: 1; }
  to { transform: scaleX(1); opacity: 0; }
}

/* Primero se desvanece la página anterior; después entra la nueva. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition {
    background: #fff;
  }

  ::view-transition-old(root) {
    mix-blend-mode: normal;
    animation: sltPageOut 155ms ease-in both;
  }

  ::view-transition-new(root) {
    mix-blend-mode: normal;
    animation: sltPageIn 330ms ease-out 145ms both;
  }

  body.slt-v5-enter main {
    animation: sltPageIn 330ms ease-out both;
  }
}

@keyframes sltPageOut {
  to { opacity: 0; }
}

@keyframes sltPageIn {
  from { opacity: 0; }
}

/* ========================================================
   NAVEGACIÓN DE ESCRITORIO
   ======================================================== */

@media (min-width: 1024px) {

  #mainHeader .desktop-navigation {
    gap: clamp(.85rem, 1.6vw, 1.75rem);
  }

  #mainHeader .desktop-navigation > a,
  #mainHeader .desktop-navigation .dropdown > a {
    position: relative;
    transition: color .22s ease;
  }

  /* Línea azul animada */

  #mainHeader .desktop-navigation > a::after,
  #mainHeader .desktop-navigation .dropdown > a::after {

    content: '';

    position: absolute;

    left: 0;
    right: 0;
    bottom: -8px;

    height: 2px;

    border-radius: 5px;

    background: #1D70B8;

    transform: scaleX(0);

    transition: transform .25s
      cubic-bezier(.22, 1, .36, 1);
  }

  #mainHeader .desktop-navigation > a:hover::after,
  #mainHeader .desktop-navigation > a:focus-visible::after,
  #mainHeader .desktop-navigation .dropdown:hover > a::after,
  #mainHeader .desktop-navigation .dropdown:focus-within > a::after,
  #mainHeader .desktop-navigation a.is-active::after {

    transform: scaleX(1);
  }

  /* Página actual */

  #mainHeader .desktop-navigation a[aria-current="page"] {
    color: #152A4A;
  }

  /* Desplegable de Servicios */

  #mainHeader .dropdown-menu {

    pointer-events: none;

    transform: translateY(8px) scale(.985);
  }

  #mainHeader .dropdown:hover .dropdown-menu,
  #mainHeader .dropdown:focus-within .dropdown-menu {

    pointer-events: auto;

    transform: translateY(0) scale(1);
  }

  /* Evita el corte al mover el cursor */

  #mainHeader .dropdown-menu::before {

    content: '';

    position: absolute;

    left: 0;
    right: 0;
    top: -12px;

    height: 13px;
  }

  /* Animación de flecha */

  #mainHeader .dropdown > a svg {
    transition: transform .24s ease;
  }

  #mainHeader .dropdown:hover > a svg {
    transform: rotate(180deg);
  }
}

/* ========================================================
   MENÚ MÓVIL
   ======================================================== */

#mobileMenu > a.is-active {

  color: #1D70B8;

  background: rgba(29,112,184,.08);

  font-weight: 700;
}

/* Las fotos a sangre siguen el ancho útil, incluso con barra de desplazamiento. */
@media (width < 64rem) {
  main :is(.services-immersive-grid, .about-immersive-grid, .quality-immersive-grid, .contact-immersive-grid) {
    --hero-gutter: calc(var(--spacing, .25rem) * 5);
  }

  main :is(.services-immersive-grid, .about-immersive-grid, .quality-immersive-grid, .contact-immersive-grid)
    > :is(.services-immersive-photo, .about-immersive-photo, .quality-immersive-photo, .contact-immersive-photo) {
    width: calc(100% + 2 * var(--hero-gutter));
    margin-inline: calc(-1 * var(--hero-gutter));
  }
}

@media (40rem <= width < 64rem) {
  main :is(.services-immersive-grid, .about-immersive-grid, .quality-immersive-grid, .contact-immersive-grid) {
    --hero-gutter: calc(var(--spacing, .25rem) * 8);
  }
}
