/* =========================
   HERO
========================= */

.home-hero {
  position: relative;
  isolation: isolate;
  height: clamp(540px, calc(100svh - 84px), 620px);
  padding: 32px 0 36px;
  color: #ffffff;
  background-color: #07102f;
  background-image:
    linear-gradient(
      90deg,
      rgba(5, 8, 30, 0.46) 0%,
      rgba(8, 16, 58, 0.26) 38%,
      rgba(20, 20, 90, 0.08) 66%,
      rgba(20, 20, 90, 0.02) 100%
    ),
    var(--hero-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(0, 4, 18, 0.26) 0%,
      rgba(0, 4, 18, 0.10) 18%,
      transparent 42%,
      transparent 68%,
      rgba(0, 4, 18, 0.08) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 4, 18, 0.18) 0%,
      transparent 22%,
      transparent 74%,
      rgba(0, 4, 18, 0.16) 100%
    ),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 72% 72%, rgba(255, 255, 255, 0.06), transparent 24%);
}

.home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 70px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.12));
}

/* Oculta elementos viejos si todavía existen en hero.php */
.hero-glow,
.home-visual-card {
  display: none;
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.14fr);
  gap: 28px;
  align-items: center;
  height: 100%;
}

.home-hero-content {
  position: relative;
  z-index: 3;
}

.home-hero-content .eyebrow {
  min-height: 32px;
  padding: 0 14px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 1.1px;
  background: rgba(14, 24, 82, 0.42);
  border-color: rgba(190, 197, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 34px rgba(20, 33, 120, 0.18);
  backdrop-filter: blur(16px);
}

.home-hero-content h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(42px, 5.05vw, 68px);
  line-height: 0.95;
  letter-spacing: -2.2px;
  color: #ffffff;
}

.home-hero-content h1 .gradient-text {
  background: linear-gradient(
    135deg,
    #dce2ff 0%,
    #aeb9ff 24%,
    #7e6dff 56%,
    #f05cff 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 8px 20px rgba(95, 84, 255, 0.18));
}

.home-hero-content p {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.92);
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* Base premium para botones del Hero */
.home-hero-actions .btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.1px;
  transform: translateY(0);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background-position 0.35s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.home-hero-actions .btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.30) 42%,
      transparent 70%
    );
  transform: translateX(-120%);
  transition:
    transform 0.55s ease,
    opacity 0.25s ease;
}

.home-hero-actions .btn:hover {
  transform: translateY(-3px);
}

.home-hero-actions .btn:hover::before {
  opacity: 1;
  transform: translateX(120%);
}

.home-hero-actions .btn:active {
  transform: translateY(-1px) scale(0.99);
}

.home-hero-actions .btn:focus-visible {
  outline: 3px solid rgba(222, 226, 255, 0.75);
  outline-offset: 4px;
}

/* Botón principal: más fuerte, brillante y publicitario */
.home-hero-actions .btn-primary {
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(135deg, #213fff 0%, #5f58ff 42%, #a94fff 72%, #ec5cff 100%);
  background-size: 140% 140%;
  background-position: 0% 50%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 18px 40px rgba(35, 55, 255, 0.38),
    0 0 34px rgba(174, 78, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -10px 22px rgba(31, 25, 122, 0.18);
}

.home-hero-actions .btn-primary:hover {
  background-position: 100% 50%;
  box-shadow:
    0 24px 54px rgba(35, 55, 255, 0.48),
    0 0 44px rgba(236, 92, 255, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -10px 24px rgba(31, 25, 122, 0.16);
}

/* Botón secundario: glass oscuro con borde azul/lavanda más visible */
.home-hero-actions .btn-secondary {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(5, 10, 42, 0.58), rgba(45, 48, 140, 0.28)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(211, 216, 255, 0.56);
  box-shadow:
    0 16px 36px rgba(3, 7, 28, 0.28),
    0 0 24px rgba(106, 105, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.home-hero-actions .btn-secondary:hover {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(22, 42, 255, 0.28), rgba(202, 85, 255, 0.20)),
    rgba(255, 255, 255, 0.07);
  border-color: rgba(235, 238, 255, 0.82);
  box-shadow:
    0 20px 48px rgba(3, 7, 28, 0.30),
    0 0 32px rgba(129, 120, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.home-hero-visual {
  position: relative;
  z-index: 2;
  min-height: 440px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-visual-image {
  position: relative;
  z-index: 2;
  width: min(108%, 760px);
  max-height: 505px;
  object-fit: contain;
  right: 0;
  bottom: auto;
  transform: translateY(-22px);
  filter: drop-shadow(0 30px 58px rgba(0, 0, 0, 0.34));
}

/* =========================
   HERO RESPONSIVE
========================= */

@media (max-width: 1100px) {
  .home-hero {
    height: auto;
    min-height: auto;
    padding: 54px 0 56px;
  }

  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.94fr);
    gap: 18px;
    height: auto;
    min-height: 430px;
  }

  .home-hero-content h1 {
    max-width: 560px;
    font-size: clamp(36px, 5.2vw, 58px);
  }

  .home-hero-content p {
    max-width: 470px;
    font-size: 15px;
  }

  .home-hero-visual {
    min-height: 370px;
  }

  .hero-visual-image {
    width: min(108%, 630px);
    max-height: 415px;
    right: 0;
    bottom: auto;
    transform: translateY(-16px);
  }
}

@media (max-width: 900px) {
  .home-hero {
    padding: 64px 0 64px;
    background-position: center center;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    text-align: center;
  }

  .home-hero-content h1 {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(40px, 9vw, 62px);
    letter-spacing: -1.7px;
  }

  .home-hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero-actions {
    justify-content: center;
  }

  .home-hero-visual {
    min-height: 350px;
    justify-content: center;
  }

  .hero-visual-image {
    width: min(100%, 560px);
    max-height: 390px;
    transform: none;
  }
}

@media (max-width: 560px) {
  .home-hero {
    height: auto;
    padding: 42px 0 44px;
    background-image:
      linear-gradient(
        180deg,
        rgba(5, 8, 30, 0.60) 0%,
        rgba(9, 13, 55, 0.34) 52%,
        rgba(15, 18, 70, 0.14) 100%
      ),
      var(--hero-bg);
    background-position: center center;
  }

  .home-hero-content .eyebrow {
    min-height: 34px;
    padding: 0 13px;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .home-hero-content h1 {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1;
  }

  .home-hero-content p {
    font-size: 16px;
    line-height: 1.65;
  }

  .home-hero-actions {
    flex-direction: column;
    margin-top: 26px;
  }

  .home-hero-actions .btn {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
  }

  .home-hero-visual {
    min-height: 265px;
    justify-content: center;
  }

  .hero-visual-image {
    width: min(118%, 470px);
    max-height: 300px;
    transform: none;
  }
}