/* ===========================================================
   HERO PILARES — Diseño premium con mesh gradient animado
   Referencia visual: Linear.app, Stripe, campañas premium
   =========================================================== */

/* ---------- Background y atmósfera ---------- */
.hero-pilares {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 5rem 0 3rem;
  background: #060610;
}

/* Mesh gradient animado — orbes difuminados que se mueven lentamente */
.hero-pilares-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Orbe 1: naranja/ámbar (partido) — centro superior */
.hero-pilares-bg::before {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  top: -25%;
  left: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 0, .18) 0%, rgba(204, 71, 0, .08) 40%, transparent 70%);
  filter: blur(80px);
  animation: orbFloat1 18s ease-in-out infinite alternate;
  will-change: transform;
}

/* Orbe 2: azul profundo (bandera) — inferior derecho */
.hero-pilares-bg::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  bottom: -20%;
  right: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 32, 159, .2) 0%, rgba(0, 20, 100, .08) 45%, transparent 70%);
  filter: blur(90px);
  animation: orbFloat2 22s ease-in-out infinite alternate;
  will-change: transform;
}

/* Grid sutil premium */
.hero-pilares-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Orbe 3: rojo profundo (bandera) — izquierda inferior */
.hero-pilares-grid::before {
  content: "";
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  bottom: -15%;
  left: -15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(206, 17, 38, .14) 0%, rgba(140, 10, 25, .06) 40%, transparent 70%);
  filter: blur(85px);
  animation: orbFloat3 20s ease-in-out infinite alternate;
  will-change: transform;
}

/* Orbe 4: naranja cálido suave — centro */
.hero-pilares-grid::after {
  content: "";
  position: absolute;
  width: 45vmax;
  height: 45vmax;
  top: 30%;
  left: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 60, .08) 0%, rgba(255, 90, 0, .03) 50%, transparent 70%);
  filter: blur(70px);
  animation: orbFloat4 15s ease-in-out infinite alternate;
  will-change: transform;
}

/* Grain/noise texture para premium feel */
.hero-pilares::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
}

/* Vignette superior e inferior */
.hero-pilares::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 6, 16, .7) 0%, transparent 15%),
    linear-gradient(0deg, rgba(6, 6, 16, .8) 0%, transparent 20%);
}

/* Animaciones de los orbes */
@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 12%) scale(1.1); }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10%, -8%) scale(1.05); }
}
@keyframes orbFloat3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12%, -6%) scale(1.08); }
}
@keyframes orbFloat4 {
  0%   { transform: translate(0, 0) scale(1); opacity: .6; }
  100% { transform: translate(-5%, 8%) scale(1.15); opacity: 1; }
}

/* ---------- Contenido ---------- */
.hero-pilares .hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}
@media (min-width: 640px) { .hero-pilares .hero-content { padding: 3rem 1.5rem; } }
@media (min-width: 1024px) { .hero-pilares .hero-content { padding: 4rem 2rem; } }

/* ---------- Lista de pilares en hero ---------- */
.hero-pilares-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}
@media (min-width: 640px) {
  .hero-pilares-list {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .hero-pilares-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 3rem;
  }
}

/* ---------- Cada pilar card ---------- */
.hero-pilares-list .pilar {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1),
              border-color .4s,
              box-shadow .4s,
              background .4s;
  text-align: left;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .3);
}
.hero-pilares-list .pilar:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 90, 0, .45);
  background: linear-gradient(135deg, rgba(255, 90, 0, .06) 0%, rgba(255, 255, 255, .03) 100%);
  box-shadow:
    0 12px 40px rgba(255, 90, 0, .12),
    0 0 0 1px rgba(255, 90, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* Número grande de fondo */
.hero-pilares-list .pilar-num-bg {
  position: absolute;
  top: -.5rem;
  right: -.25rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
  color: rgba(255, 255, 255, .03);
  user-select: none;
  pointer-events: none;
  transition: color .4s;
}
@media (min-width: 1024px) { .hero-pilares-list .pilar-num-bg { font-size: 4.5rem; } }
.hero-pilares-list .pilar:hover .pilar-num-bg {
  color: rgba(255, 90, 0, .15);
}

/* Cabecera del pilar */
.hero-pilares-list .pilar-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hero-pilares-list .pilar-num {
  width: 2rem; height: 2rem;
  border-radius: .5rem;
  background: rgba(255, 90, 0, .12);
  border: 1px solid rgba(255, 90, 0, .35);
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, monospace;
  font-size: .75rem;
  color: var(--mrd-orange);
  flex-shrink: 0;
}
.hero-pilares-list .pilar-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, rgba(255, 90, 0, .4), transparent);
}

/* Título */
.hero-pilares-list .pilar h3 {
  position: relative;
  z-index: 1;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}
@media (min-width: 1024px) { .hero-pilares-list .pilar h3 { font-size: 1rem; } }

/* Descripción */
.hero-pilares-list .pilar p {
  position: relative;
  z-index: 1;
  margin-top: .5rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, .55);
  line-height: 1.5;
}
@media (min-width: 1024px) { .hero-pilares-list .pilar p { font-size: .75rem; } }

/* Shine sweep en hover */
.hero-pilares-list .pilar::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  bottom: 0;
  width: 50%;
  background: linear-gradient(to right, transparent, rgba(255, 90, 0, .12), transparent);
  filter: blur(12px);
  opacity: 0;
  transition: opacity .3s, transform 1s;
}
.hero-pilares-list .pilar:hover::before {
  opacity: 1;
  transform: translateX(350%);
}

/* ---------- CTAs ---------- */
.hero-pilares .hero-ctas {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
@media (min-width: 640px) {
  .hero-pilares .hero-ctas {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

/* Botón outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .875rem 2rem;
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  background: transparent;
  transition: border-color .3s, background .3s, color .3s;
}
.btn-outline:hover {
  border-color: var(--mrd-orange);
  background: rgba(255, 90, 0, .08);
  color: var(--mrd-orange);
}

/* ---------- Animaciones de entrada ---------- */
.hero-pilares-list .pilar {
  opacity: 0;
  transform: translateY(20px);
  animation: pilarFadeIn .6s ease forwards;
}
.hero-pilares-list .pilar:nth-child(1) { animation-delay: .1s; }
.hero-pilares-list .pilar:nth-child(2) { animation-delay: .2s; }
.hero-pilares-list .pilar:nth-child(3) { animation-delay: .3s; }
.hero-pilares-list .pilar:nth-child(4) { animation-delay: .4s; }
.hero-pilares-list .pilar:nth-child(5) { animation-delay: .5s; }

@keyframes pilarFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive: en desktop 5 columnas, en tablet 2+3, en mobile stack ---------- */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-pilares-list {
    grid-template-columns: repeat(2, 1fr);
  }
  /* El 5to pilar ocupa las 2 columnas centrado */
  .hero-pilares-list .pilar:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
  }
}
