/**
 * Pagina "Secciones" — rejilla de celdas tipo pack de bateria.
 * Diseno de Toni (neb-grid-celdas.html), adaptado a plantilla WordPress.
 * Todo va scopeado bajo .neb-secciones para no afectar al resto del tema.
 */

.neb-secciones {
  --neb-black: #0D0D0D;
  --neb-off-white: #F2F0EB;
  --neb-acid: #C8FF00;
  --neb-orange: #FF4D1A;
  --neb-muted: #6B6B6B;
  --neb-border: #2A2A2A;
  --neb-card-bg: #161616;

  background: var(--neb-black);
  color: var(--neb-off-white);
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 3rem 1.5rem;
  display: flex;
  justify-content: center;
}

.neb-secciones *,
.neb-secciones *::before,
.neb-secciones *::after { box-sizing: border-box; }

.neb-secciones .wrap { width: 100%; max-width: 900px; }

.neb-secciones .eyebrow {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neb-acid);
  margin: 0 0 0.75rem;
}

.neb-secciones h1 {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 2.5rem;
  color: var(--neb-off-white);
}

/* --- carcasa de la bateria --- */
.neb-secciones .battery-pack {
  position: relative;
  border: 3px solid var(--neb-border);
  border-radius: 14px;
  background: #111;
  padding: 14px;
}
.neb-secciones .battery-pack::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 13px;
  background: var(--neb-border);
  border-radius: 5px 5px 0 0;
}

.neb-secciones .pack-fill {
  position: absolute;
  left: 3px; right: 3px; bottom: 3px;
  height: 3%;
  border-radius: 0 0 11px 11px;
  background: rgba(255, 77, 26, 0.20);
  animation: neb-packcharge 22s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes neb-packcharge {
  0%    { height: 3%;   background: rgba(255, 77, 26, 0.20); }
  11.9% { height: 20%;  background: rgba(255, 77, 26, 0.20); }
  12%   { height: 20%;  background: rgba(200, 255, 0, 0.11); }
  60%   { height: 100%; background: rgba(200, 255, 0, 0.11); }
  85%   { height: 100%; background: rgba(200, 255, 0, 0.11); }
  96.9% { height: 20%;  background: rgba(200, 255, 0, 0.11); }
  97%   { height: 20%;  background: rgba(255, 77, 26, 0.20); }
  100%  { height: 3%;   background: rgba(255, 77, 26, 0.20); }
}

.neb-secciones .cells {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* --- celda (ahora es un enlace) --- */
.neb-secciones .cell {
  position: relative;
  background: rgba(22, 22, 22, 0.88);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  border-radius: 6px;
  padding: 1.4rem 1.1rem 1.1rem;
  min-height: 128px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.25s;
  text-decoration: none;
  color: inherit;
}
.neb-secciones .cell:hover { background: rgba(28, 28, 28, 0.95); }
.neb-secciones .cell:focus-visible {
  outline: 2px solid var(--neb-acid);
  outline-offset: 2px;
}

.neb-secciones .cell .trace {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
}
.neb-secciones .cell .trace rect {
  fill: none;
  stroke: var(--neb-acid);
  stroke-width: 2;
  stroke-dasharray: 60 1000;
  stroke-dashoffset: 0;
  opacity: 0;
}
.neb-secciones .cell:hover .trace rect {
  opacity: 1;
  animation: neb-run 1.4s linear infinite;
  filter: drop-shadow(0 0 4px var(--neb-acid));
}
@keyframes neb-run {
  to { stroke-dashoffset: -1060; }
}

.neb-secciones .cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--neb-border);
  border-radius: 6px;
  pointer-events: none;
}

.neb-secciones .cell-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.neb-secciones .cell-title {
  display: block;
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.neb-secciones .cell:hover .cell-title,
.neb-secciones .cell:focus-visible .cell-title { color: var(--neb-acid); }

.neb-secciones .cell-bottom { display: block; }

.neb-secciones .sub {
  display: block;
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #8A8A8A;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.neb-secciones .idx {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
  color: #3A3A3A;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.neb-secciones .mini {
  display: block;
  width: 30px;
  height: 15px;
  border: 1.5px solid #3A3A3A;
  border-radius: 2px;
  position: relative;
}
.neb-secciones .mini::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 7px;
  background: #3A3A3A;
  border-radius: 0 2px 2px 0;
}
.neb-secciones .mini i {
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 0;
  background: var(--neb-acid);
  border-radius: 1px;
}
.neb-secciones .cell:hover .mini,
.neb-secciones .cell:focus-visible .mini { border-color: var(--neb-acid); }
.neb-secciones .cell:hover .mini::after,
.neb-secciones .cell:focus-visible .mini::after { background: var(--neb-acid); }
.neb-secciones .cell:hover .mini i,
.neb-secciones .cell:focus-visible .mini i { animation: neb-fill 1.6s ease-in-out infinite; }
@keyframes neb-fill {
  0%   { width: 0; }
  70%  { width: 88%; }
  100% { width: 88%; opacity: 0.25; }
}

.neb-secciones .foot {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6B6B;
  margin-top: 1.25rem;
  text-align: center;
}

.neb-secciones .neb-secciones-empty {
  grid-column: 1 / -1;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--neb-orange);
  text-align: center;
  padding: 2rem 0;
}

@media (max-width: 640px) {
  .neb-secciones { padding: 2rem 1rem; }
  .neb-secciones h1 { font-size: 1.9rem; margin-bottom: 1.75rem; }
  .neb-secciones .cells { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .neb-secciones .pack-fill,
  .neb-secciones .cell:hover .trace rect,
  .neb-secciones .cell:hover .mini i,
  .neb-secciones .cell:focus-visible .mini i { animation: none; }
}
