/* ==========================================================================
   WHANAU - CAMPAÑA "NUEVAS FUNCIONALIDADES ERP"
   Popup de bienvenida + botón CTA en la sección SOLUCIONES.
   Archivo propio: Adobe Muse no lo pisa al re-exportar.

   Dos particularidades del sitio Muse que condicionan este archivo:
     1) No hay reset de box-sizing -> todo lo propio se declara border-box.
     2) site_global.css trae  a:link{color:#0000FF}  (especificidad 0,1,1),
        así que TODAS las reglas del botón usan la terna
        a.wh-cta / a.wh-cta:link / a.wh-cta:visited, también dentro de las
        media queries. Si no, el estado :link le gana al breakpoint.
   ========================================================================== */

.wh-cta-wrap,
.wh-cta-wrap *,
.wh-popup,
.wh-popup * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* ==========================================================================
   1. BOTÓN CTA (sección SOLUCIONES)
   ========================================================================== */

.wh-cta-wrap {
  width: 100%;
  margin-top: 42px;
  text-align: center;
  position: relative;
  z-index: 200;
}

a.wh-cta,
a.wh-cta:link,
a.wh-cta:visited {
  display: inline-block;
  max-width: 92%;
  padding: 19px 48px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee 0%, #00b4e6 55%, #00a3e0 100%);
  color: #001035;
  font-family: '__Raleway Thin_5', Raleway, 'Trebuchet MS', Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  transform-origin: center center;
  box-shadow:
    0 0 0 4px rgba(34, 211, 238, 0.16),
    0 12px 32px rgba(0, 10, 40, 0.42),
    0 0 36px rgba(34, 211, 238, 0.45);
  animation: wh-cta-pulse 2.8s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.wh-cta__inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.wh-cta__icon,
.wh-cta__arrow {
  flex: 0 0 auto;
  display: block;
}

.wh-cta__arrow {
  transition: transform 0.25s ease;
}

a.wh-cta:hover,
a.wh-cta:focus {
  background: linear-gradient(90deg, #67e8f9 0%, #22d3ee 55%, #00b4e6 100%);
  color: #001035;
  transform: translateY(-3px);
  animation-play-state: paused;
  box-shadow:
    0 0 0 6px rgba(34, 211, 238, 0.22),
    0 18px 40px rgba(0, 10, 40, 0.5),
    0 0 54px rgba(34, 211, 238, 0.7);
}

a.wh-cta:hover .wh-cta__arrow,
a.wh-cta:focus .wh-cta__arrow {
  transform: translateX(5px);
}

a.wh-cta:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

a.wh-cta:active {
  transform: translateY(-1px);
}

@keyframes wh-cta-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(34, 211, 238, 0.16),
      0 12px 32px rgba(0, 10, 40, 0.42),
      0 0 36px rgba(34, 211, 238, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(34, 211, 238, 0.06),
      0 12px 32px rgba(0, 10, 40, 0.42),
      0 0 52px rgba(34, 211, 238, 0.62);
  }
}

/* ==========================================================================
   2. POPUP DE NOVEDADES
   ========================================================================== */

.wh-popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: rgba(0, 8, 28, 0.84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* El body de Muse arranca en visibility:hidden hasta que inicializa;
   el popup se declara visible por su cuenta. */
.wh-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wh-popup__card {
  position: relative;
  width: 100%;
  max-width: 680px;
  transform: scale(0.94) translateY(14px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-popup.is-open .wh-popup__card {
  transform: scale(1) translateY(0);
}

a.wh-popup__link,
a.wh-popup__link:link,
a.wh-popup__link:visited {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.35),
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(34, 211, 238, 0.28);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

a.wh-popup__link:hover,
a.wh-popup__link:focus {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.6),
    0 34px 80px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(34, 211, 238, 0.42);
}

a.wh-popup__link:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 4px;
}

.wh-popup__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 74vh;
  object-fit: contain;
  background: #001035;
}

.wh-popup__close {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 2;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.55);
  background: #001035;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.wh-popup__close:hover,
.wh-popup__close:focus {
  background: #22d3ee;
  border-color: #ffffff;
  color: #001035;
  transform: rotate(90deg);
}

.wh-popup__close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.wh-popup__hint {
  margin: 16px 0 0;
  text-align: center;
  font-family: '__Raleway Thin_5', Raleway, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.wh-popup__dismiss {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wh-popup__dismiss:hover,
.wh-popup__dismiss:focus {
  color: #ffffff;
}

/* Bloqueo del scroll de fondo mientras el popup está abierto */
html.wh-popup-open,
html.wh-popup-open body {
  overflow: hidden;
}

/* ==========================================================================
   3. RESPONSIVE
   Cada breakpoint repite la terna de selectores para no perder contra :link.
   ========================================================================== */

@media screen and (max-width: 1100px) {
  a.wh-cta,
  a.wh-cta:link,
  a.wh-cta:visited {
    padding: 17px 38px;
    font-size: 18px;
    letter-spacing: 1.4px;
  }
  .wh-popup__card {
    max-width: 560px;
  }
}

@media screen and (max-width: 640px) {
  .wh-cta-wrap {
    margin-top: 34px;
  }
  /* En pantallas chicas el CTA pasa a bloque centrado: objetivo táctil grande. */
  a.wh-cta,
  a.wh-cta:link,
  a.wh-cta:visited {
    display: block;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    padding: 17px 20px;
    font-size: 15px;
    letter-spacing: 1.1px;
  }
  .wh-cta__inner {
    display: flex;
    gap: 10px;
  }
  .wh-popup {
    padding: 24px 16px;
  }
  .wh-popup__card {
    max-width: 100%;
  }
  .wh-popup__img {
    max-height: 70vh;
  }
  .wh-popup__close {
    top: -13px;
    right: -5px;
    width: 42px;
    height: 42px;
    font-size: 23px;
  }
}

@media screen and (max-width: 360px) {
  a.wh-cta,
  a.wh-cta:link,
  a.wh-cta:visited {
    padding: 16px 14px;
    font-size: 14px;
    letter-spacing: 0.4px;
  }
  .wh-cta__icon {
    display: none;
  }
  .wh-cta__inner {
    gap: 8px;
  }
}

/* Respeto por quienes piden menos movimiento */
@media (prefers-reduced-motion: reduce) {
  a.wh-cta,
  a.wh-cta:link,
  a.wh-cta:visited,
  .wh-cta__arrow,
  .wh-popup,
  .wh-popup__card,
  a.wh-popup__link,
  .wh-popup__close {
    animation: none !important;
    transition: none !important;
  }
  .wh-popup__card {
    transform: none;
  }
}
