/* ============================================================
   gennie-intel.css v3.0 — Rich cards + KPIs + severity indicators
   Fecha: 2026-05-14 · Opus (Claude.ai Web)
   Page: 46873 /zdu/gennie/
   
   UPGRADE v1.0 → v3.0:
   · KPI strip with severity, CVE count, sector count, IOC placeholder
   · CVSS badge with color-coded border
   · Severity dot indicator
   · Compliance ref badges (NIST, ISO, CIS, CNBV)
   · Hero chip badges with canonical colors
   · Threat actor badge (red)
   · CVE reference line with monospace ID
   · Brief text restored (truncated 180 chars)
   · Bottom metadata row (compliance + heroes + actor)
   
   DEPLOY: CC sube a /wp-content/themes/qma-child/css/gennie-intel.css
   Enqueue condicional a page 46873 en functions.php
   ============================================================ */

/* ── Grid layout ───────────────────────────────────────────── */
#gennie-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 900px) {
  #gennie-intel-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Card base ─────────────────────────────────────────────── */
.gn-card {
  display: flex;
  flex-direction: column;
  background: var(--zdu-card, #111927);
  border: 1px solid var(--zdu-border, rgba(45,212,191,0.08));
  border-radius: 8px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.gn-card:hover {
  border-color: rgba(45,212,191,0.28);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.gn-card * { min-width: 0; }

/* ── Meta row ──────────────────────────────────────────────── */
.gn-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.gn-type {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Severity dot */
.gn-sev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* AP Score badge */
.gn-ap {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  font-family: "SF Mono","Fira Code",monospace;
  color: #0D1321;
  background: #2DD4BF;
  white-space: nowrap;
}
.gn-ap-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* CVSS badge */
.gn-cvss {
  font-size: 11px;
  font-weight: 700;
  font-family: "SF Mono","Fira Code",monospace;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* KEV flag */
.gn-kev {
  display: inline-flex;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Title ─────────────────────────────────────────────────── */
.gn-h {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 0 0 4px;
}
.gn-card:hover .gn-h { color: #2DD4BF; }

/* ── CVE ref line ──────────────────────────────────────────── */
.gn-cve-ref {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.gn-cve-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}
.gn-cve-id {
  font-size: 12px;
  font-weight: 600;
  font-family: "SF Mono","Fira Code",monospace;
  color: #94a3b8;
}

/* ── Brief ─────────────────────────────────────────────────── */
.gn-b {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ── KPI strip ─────────────────────────────────────────────── */
.gn-kpi-strip {
  display: flex;
  gap: 1px;
  background: rgba(45,212,191,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.gn-kpi {
  flex: 1;
  background: var(--zdu-card, #111927);
  padding: 8px 10px;
  text-align: center;
  min-width: 0;
}
.gn-kpi--dim { opacity: 0.4; }
.gn-kpi-val {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gn-kpi-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  margin-top: 2px;
  white-space: nowrap;
}

/* ── Sectors ───────────────────────────────────────────────── */
.gn-secs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.gn-sector {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(45,212,191,0.06);
  border: 1px solid rgba(45,212,191,0.12);
  color: #2DD4BF;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.gn-sector--more {
  background: rgba(148,163,184,0.06);
  border-color: rgba(148,163,184,0.12);
  color: #64748b;
}

/* ── Bottom row: compliance + heroes + actor ───────────────── */
.gn-card-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148,163,184,0.06);
}

/* Compliance ref badges */
.gn-comply {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  background: rgba(209,223,72,0.06);
  border: 1px solid rgba(209,223,72,0.15);
  color: #D1DF48;
  border-radius: 2px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Hero chip badges */
.gn-hero-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  background: transparent;
  border: 1px solid;
  border-radius: 2px;
  letter-spacing: .04em;
  text-transform: lowercase;
  white-space: nowrap;
}

/* Threat actor badge */
.gn-actor-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
  border-radius: 2px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ── Read-more CTA ─────────────────────────────────────────── */
.gn-readmore {
  display: inline-block;
  margin-top: auto;
  padding: 10px 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: #2DD4BF;
  letter-spacing: .02em;
  transition: color 0.2s ease;
}
.gn-card:hover .gn-readmore { color: #5EEAD4; }

/* ── Counters ──────────────────────────────────────────────── */
.gn-counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(45,212,191,0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}
.gn-counter {
  background: var(--zdu-surface, #111927);
  padding: 20px 24px;
  border-top: 3px solid transparent;
}
.gn-counter:first-child { border-top-color: rgba(45,212,191,0.5); }
.gn-counter--accent { border-top-color: rgba(45,212,191,0.7); }
.gn-counter--violet { border-top-color: rgba(167,139,250,0.6); }
.gn-counter--red { border-top-color: rgba(239,68,68,0.5); }
.gn-counter-num {
  font-size: 2rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.gn-counter-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .gn-counters { grid-template-columns: repeat(2, 1fr); }
  .gn-counter { padding: 16px; }
  .gn-counter-num { font-size: 1.5rem; }
}

/* ── Tabs + Controls ───────────────────────────────────────── */
.gn-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gn-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.gn-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.gn-tab:hover { color: #94a3b8; border-color: rgba(148,163,184,0.25); }
.gn-tab--active { color: #0D1321; background: #2DD4BF; border-color: #2DD4BF; }

.gn-sector-wrap { display: flex; align-items: center; gap: 8px; }
.gn-sector-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}
#gn-sector {
  padding: 6px 12px;
  font-size: 13px;
  color: #cbd5e1;
  background: var(--zdu-card, #111927);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 6px;
  cursor: pointer;
}
#gn-sector:focus { outline: 2px solid rgba(45,212,191,0.4); outline-offset: 1px; }

/* ── Loading / Empty ───────────────────────────────────────── */
.gn-loading, .gn-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
  font-size: 14px;
}
.gn-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  background: #2DD4BF;
  border-radius: 50%;
  margin-right: 8px;
  animation: gn-pulse-k 1.5s ease-in-out infinite;
}
@keyframes gn-pulse-k {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.3; transform:scale(1.4); }
}

/* ── Feed footer ───────────────────────────────────────────── */
.gn-feed-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,0.06);
  text-align: center;
}
.gn-feed-footer-meta { font-size: 13px; color: #64748b; margin-bottom: 16px; }
.gn-feed-footer-meta strong { color: #94a3b8; }

/* ── Locked teaser ─────────────────────────────────────────── */
.gn-locked-section { position: relative; margin-top: 32px; }
.gn-locked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.gn-locked-card {
  height: 180px;
  background: linear-gradient(135deg, rgba(167,139,250,0.04), rgba(45,212,191,0.02));
  border: 1px solid rgba(167,139,250,0.08);
  border-radius: 8px;
}
.gn-locked-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background: rgba(13,19,33,0.7);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 32px;
}
.gn-locked-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: #0D1321; background: #c4b5fd;
  border-radius: 6px; text-decoration: none;
  transition: background 0.2s;
}
.gn-locked-cta:hover { background: #a78bfa; }

/* ============================================================
   v3.1 PATCH — AP Score dominant layout
   Fecha: 2026-05-14
   Aditivo. No reemplaza nada del v3.0.
   ============================================================ */

/* ── Card header: flex layout (title left, AP right) ──────── */
.gn-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.gn-card-header-left {
  flex: 1;
  min-width: 0;
}

/* ── Card as div (clickable via data-href) ────────────────── */
.gn-card--link {
  cursor: pointer;
}

/* ── AP Score DOMINANT block ──────────────────────────────── */
.gn-ap-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 88px;
  min-height: 88px;
  background: rgba(45,212,191,0.06);
  border: 1px solid rgba(45,212,191,0.15);
  border-radius: 10px;
  padding: 10px 8px 8px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.gn-ap-block:hover {
  background: rgba(45,212,191,0.12);
  border-color: rgba(45,212,191,0.35);
}

.gn-ap-num {
  display: block;
  font-size: 26px;
  font-weight: 900;
  font-family: "SF Mono","Fira Code","Menlo",monospace;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #2DD4BF;
}

.gn-ap-tag {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 4px;
}

.gn-ap-method {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #2DD4BF;
  margin-top: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gn-ap-block:hover .gn-ap-method {
  opacity: 1;
}

/* Dim variant (no AP Score available) */
.gn-ap-block--dim {
  opacity: 0.3;
  border-color: rgba(148,163,184,0.08);
  background: rgba(148,163,184,0.03);
}
.gn-ap-block--dim .gn-ap-num {
  color: #475569;
  font-size: 22px;
}

/* ── Responsive: stack header on narrow cards ─────────────── */
@media (max-width: 480px) {
  .gn-card-header {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .gn-ap-block {
    width: 100%;
    min-height: auto;
    flex-direction: row;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
  }
  .gn-ap-num { font-size: 22px; }
  .gn-ap-method { opacity: 1; }
}

/* ── Hide old inline AP badge if any legacy renders it ─────── */
.gn-card-header .gn-meta .gn-ap { display: none; }
