* {
  box-sizing: border-box;
}

.features {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 8vw, 140px) 0;
  background:
    radial-gradient(circle at 74% 45%, rgba(0, 242, 209, 0.11) 0%, transparent 42%),
    radial-gradient(circle at 20% 15%, rgba(80, 120, 255, 0.08) 0%, transparent 38%),
    linear-gradient(180deg, #020309 0%, #000 100%);
}

.container {
  width: min(1560px, calc(100% - 64px));
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 90px);
  align-items: center;
}

/* =========================================
   CONTENT
========================================= */

.feature-content {
  position: relative;
  z-index: 1;
  text-align: justify;
}

.feature-content::before {
  content: "";
  position: absolute;
  inset: -70px -60px -60px -60px;
  z-index: -1;
  background:
    radial-gradient(circle at 42% 46%, rgba(0, 242, 209, 0.035) 0%, transparent 56%);
  filter: blur(1px);
  pointer-events: none;
}

.feature-content h2 {
  max-width: 760px;
  margin: 0 0 28px;
  color: #fff;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-align: left;
}

.feature-subtitle {
  max-width: 720px;
  margin: 0 0 34px;
  color: #00e7cf;
  line-height: 1.5;
  text-align: justify;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 42px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, .92);
  line-height: 1.45;
  text-align: justify;
}

.check-icon {
  width: 23px;
  height: 23px;
  margin-top: 3px;
  border-radius: 50%;
  background: #33e1cf;
  color: #00110f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

/* CTA de la sección. Comparte forma con `.btn-primary` del hero —enlace del
   ancho de su contenido, no barra a todo lo ancho como los CTA de las páginas
   de marca— así que usa exactamente su mismo tratamiento: relleno plano,
   halo en vez de sombra proyectada y el mismo levantamiento al pasar el
   cursor. Antes era el único botón del sitio con degradado diagonal que
   viraba a azul, y además salía subrayado por ser un `<a>` sin reset. */
.btn-primary-rounded {
  display: inline-flex;
  align-items: center;
  /* Centrado también en horizontal: en ≤768px la regla de abajo lo pasa a
     `width: 100%` y sin esto el texto quedaría pegado a la izquierda. Es el
     mismo trío que usa `.hero-btns a`. */
  justify-content: center;
  border: 0;
  cursor: pointer;
  padding: 14px 40px;
  border-radius: 50px;
  background: #33ccbb;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(51, 204, 187, 0.22);
  transition:
    background-color var(--nx-dur-media) var(--nx-ease),
    transform var(--nx-dur-media) var(--nx-ease);
}

/* La flecha va separada igual que en el resto de CTA del sitio. */
.btn-primary-rounded span {
  margin-left: 8px;
}

.btn-primary-rounded:hover {
  background: #2bb3a4;
  transform: translateY(-2px);
}

/* =========================================
   VISUAL
========================================= */

.network-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  margin-left: auto;
  border-radius: clamp(20px, 2vw, 28px);
  padding: clamp(26px, 3vw, 44px);
}

.network-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(0, 242, 209, .12), transparent 60%);
  opacity: .7;
  pointer-events: none;
}

/* =========================================
   GRID
========================================= */

.network-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));

  gap: 0;
  align-items: center;
  justify-items: center;
}

/* ALINEACIONES */

#n1,
#n4,
#n7 {
  justify-self: start;
}

#n2,
#n5,
#n8 {
  justify-self: center;
}

#n3,
#n6,
#n9 {
  justify-self: end;
}

/* =========================================
   CARDS (todas blancas por defecto)
========================================= */

.card {
  position: relative;
  z-index: 3;
  width: clamp(52px, 4.2vw, 64px);
  height: clamp(52px, 4.2vw, 64px);
  border: 1.8px solid rgba(255, 255, 255, .86);
  border-radius: 10px;

  background:
    linear-gradient(180deg, rgba(4, 12, 16, .98), rgba(0, 0, 0, .96));

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  transition: border-color .35s var(--nx-ease), box-shadow .35s var(--nx-ease), transform .35s var(--nx-ease);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 231, 207, .08), transparent 62%),
    #020309;
}

.card img {
  width: clamp(28px, 2.4vw, 36px);
  height: clamp(28px, 2.4vw, 36px);
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.card picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card picture img {
  display: block;
}

.card.wide {
  width: 100%;
  justify-content: center;
  padding: 0;
}

.card.wide img {
  width: auto;
  height: clamp(22px, 2.2vw, 30px);
  max-width: 78%;
  filter: brightness(0) invert(1);
}

.card.wide picture {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* card central (logo): se mantiene siempre encendida en teal */
.card.center {
  width: 100%;
  height: clamp(56px, 4.4vw, 66px);
  border-color: #00e7cf;
  box-shadow:
    0 0 12px rgba(0, 231, 207, .8),
    0 0 26px rgba(0, 231, 207, .24),
    inset 0 0 12px rgba(0, 231, 207, .10);
}

.card.center img {
  width: clamp(92px, 8.5vw, 132px);
  height: auto;
  filter: none;
}

/* =========================================
   ESTADOS ACTIVOS (al ser tocados por el rayo)
========================================= */

/* Default activo: TEAL */
.card.active {
  border-color: #00e7cf;
  transform: scale(1.045);
  box-shadow:
    0 0 12px rgba(0, 231, 207, .9),
    0 0 26px rgba(0, 231, 207, .28),
    inset 0 0 12px rgba(0, 231, 207, .12);
}

/* n3 activo: ROSADO */
#n3.active {
  border-color: #ff4fd8;
  box-shadow:
    0 0 12px rgba(255, 79, 216, .9),
    0 0 28px rgba(255, 79, 216, .3),
    inset 0 0 12px rgba(255, 79, 216, .12);
}

/* n7 activo: AZUL */
#n7.active {
  border-color: #42b9ff;
  box-shadow:
    0 0 12px rgba(66, 185, 255, .9),
    0 0 28px rgba(66, 185, 255, .3),
    inset 0 0 12px rgba(66, 185, 255, .12);
}

/* =========================================
   LINES
========================================= */

.lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.ray {
  stroke: #00e7cf;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  filter:
    drop-shadow(0 0 6px rgba(0, 231, 207, .85))
    drop-shadow(0 0 16px rgba(0, 231, 207, .35));
}

.ray.active {
  animation: rayMove .75s linear forwards;
}

/* Rayo que llega a n3 → ROSADO */
.ray.pink {
  stroke: #ff4fd8;
  filter:
    drop-shadow(0 0 6px rgba(255, 79, 216, .85))
    drop-shadow(0 0 16px rgba(255, 79, 216, .35));
}

/* Rayo que llega a n7 → AZUL */
.ray.blue {
  stroke: #42b9ff;
  filter:
    drop-shadow(0 0 6px rgba(66, 185, 255, .85))
    drop-shadow(0 0 16px rgba(66, 185, 255, .35));
}

@keyframes rayMove {
  0% {
    opacity: 1;
    stroke-dashoffset: 520;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: 0;
  }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1200px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 70px;
  }

  .feature-content {
    text-align: center;
  }

  .feature-content h2,
  .feature-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .feature-list {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .feature-list li {
    text-align: left;
  }

  .network-panel {
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 32px, 1560px);
  }

  .btn-primary-rounded {
    width: 100%;
    padding: 16px 24px;
  }

  .network-panel {
    max-width: 520px;
    padding: 24px;
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  .network-panel {
    padding: 18px;
  }

  .card.wide {
    width: clamp(52px, 4.2vw, 64px);
    height: clamp(52px, 4.2vw, 64px);
  }

  .card.wide picture {
    width: 100%;
    height: 100%;
  }

  .card.wide img,
  .card.wide picture img {
    width: clamp(28px, 2.4vw, 36px);
    height: clamp(28px, 2.4vw, 36px);
    max-width: none;
    object-fit: contain;
  }

  .card.center {
    width: clamp(118px, 32vw, 128px);
  }
}

