/* Ansible-SecAgent — Red Hat inspired theme */
:root {
  --rh-red:        #EE0000;
  --rh-red-dark:   #BE0000;
  --rh-red-deep:   #8A0000;
  --bg-base:       #151515;
  --bg-section:    #1f1f1f;
  --bg-card:       #2a2a2a;
  --bg-code:       #0d0d0d;
  --border:        #3a3a3a;
  --text-primary:  #f0f0f0;
  --text-secondary:#b0b0b0;
  --text-muted:    #707070;
  --accent:        #EE0000;
  --accent-soft:   rgba(238,0,0,0.12);
  --green-ok:      #5ea85e;
  --max-w:         1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(21,21,21,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; color: var(--text-primary);
  text-decoration: none;
}
.nav-logo .logo-mark {
  width: 28px; height: 28px;
  background: var(--rh-red);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff;
}
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.88rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--rh-red); }

/* lang switcher */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 3px; cursor: pointer; transition: all 0.2s;
}
.lang-btn.active, .lang-btn:hover {
  border-color: var(--rh-red); color: var(--rh-red);
}

/* ── SECTIONS ── */
section { padding: 5rem 2rem; }
section:nth-child(even) { background: var(--bg-section); }
.container { max-width: var(--max-w); margin: 0 auto; }

h2.section-title {
  font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem;
  color: var(--text-primary);
}
h2.section-title span { color: var(--rh-red); }
.section-lead {
  font-size: 1.05rem; color: var(--text-secondary);
  margin-bottom: 2.5rem; max-width: 700px;
}

/* ── HERO ── */
#hero {
  background: linear-gradient(160deg, #1a0000 0%, #2a0505 40%, var(--bg-base) 100%);
  padding: 7rem 2rem 6rem;
  position: relative; overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(238,0,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid rgba(238,0,0,0.3);
  border-radius: 20px; padding: 3px 12px;
  font-size: 0.75rem; color: var(--rh-red);
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge.blue {
  background: rgba(64,120,200,0.12); border-color: rgba(64,120,200,0.3);
  color: #6fa3e8;
}
#hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
#hero h1 span { color: var(--rh-red); }
.hero-sub {
  font-size: 1.2rem; color: var(--text-secondary);
  max-width: 620px; margin-bottom: 2rem; line-height: 1.7;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2.5rem;
}
.hero-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 12px;
  font-size: 0.82rem; color: var(--text-secondary);
  font-family: monospace;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.65rem 1.4rem; border-radius: 4px;
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s; cursor: pointer;
  border: none;
}
.btn-primary { background: var(--rh-red); color: #fff; }
.btn-primary:hover { background: var(--rh-red-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--rh-red); color: var(--rh-red); }

/* ── DIAGRAM / ASCII ── */
.diagram, .arch-diagram {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rh-red);
  border-radius: 6px;
  padding: 1.5rem 2rem;
  font-family: 'Courier New', monospace; font-size: 0.88rem;
  color: #c9d1d9; overflow-x: auto; white-space: pre; line-height: 1.8;
  margin: 1.5rem 0;
}
.diagram .hl, .c-relay { color: var(--rh-red); font-weight: bold; }
.c-agent  { color: #6fa3e8; }
.c-nats   { color: #e8a56f; }
.c-ansible{ color: var(--green-ok); }
.c-arrow  { color: var(--text-muted);  }

/* ── WARNING BLOCK ── */
.warning-block {
  background: rgba(238,0,0,0.06); border: 1px solid rgba(238,0,0,0.2);
  border-left: 4px solid var(--rh-red);
  border-radius: 6px; padding: 1.2rem 1.5rem; margin-top: 2rem;
}
.warning-block h4 { font-size: 0.95rem; color: var(--rh-red); margin-bottom: 0.4rem; }
.warning-block p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── PROBLEM GRID ── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 1.4rem;
}
.problem-card .icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.problem-card h4 {
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 0.4rem; color: var(--text-primary);
}
.problem-card h3 {
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 0.5rem; color: var(--text-primary);
}
.problem-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.problem-quote {
  font-style: italic; font-size: 0.82rem;
  color: var(--text-muted);
  border-left: 2px solid var(--rh-red);
  padding-left: 0.7rem; margin-top: 0.75rem;
}

/* ── DEPLOY MODES ── */
.deploy-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.deploy-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.4rem;
}
.deploy-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.deploy-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── COMPATIBILITY TABLE ── */
.compat-table {
  width: 100%; border-collapse: collapse; margin-top: 1.5rem;
  font-size: 0.875rem;
}
.compat-table th {
  text-align: left; padding: 0.6rem 1rem;
  background: var(--bg-card); color: var(--text-muted);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.compat-table td {
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.compat-table tr:last-child td { border-bottom: none; }
.compat-table td:first-child { color: var(--text-primary); font-weight: 600; }
.ok { color: var(--green-ok); font-weight: 700; }
.ko { color: var(--rh-red); font-weight: 700; }

/* ── SECURITY ── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.sec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 1.5rem;
  position: relative; overflow: hidden;
}
.sec-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rh-red);
}
.sec-card h4 {
  font-size: 1rem; font-weight: 600; margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 8px;
}
.sec-card h4 .tag {
  font-size: 0.7rem; background: var(--accent-soft);
  color: var(--rh-red); border-radius: 3px;
  padding: 1px 6px; font-weight: 700; letter-spacing: 0.03em;
}
.sec-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── FEATURES ── */
.version-block { margin-bottom: 2.5rem; }
.version-label {
  display: inline-block;
  background: var(--rh-red); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  padding: 2px 10px; border-radius: 3px;
  margin-bottom: 0.8rem; letter-spacing: 0.05em;
}
.feature-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}
.feature-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.875rem; color: var(--text-secondary); padding: 0.4rem 0;
}
.feature-list li::before {
  content: '✓'; color: var(--green-ok); font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

/* ── ROADMAP ── */
.roadmap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 1.4rem;
}
.roadmap-card .phase-label {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.4rem;
}
.roadmap-card h4 { font-size: 0.95rem; margin-bottom: 0.6rem; }
.roadmap-card ul { list-style: none; }
.roadmap-card ul li {
  font-size: 0.83rem; color: var(--text-secondary);
  padding: 0.2rem 0; display: flex; align-items: center; gap: 6px;
}
.roadmap-card ul li::before { content: '→'; color: var(--text-muted); }

/* ── MANAGEMENT ── */
.mgmt-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.mgmt-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.4rem;
}
.mgmt-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--rh-red); }
.mgmt-card p { font-size: 0.825rem; color: var(--text-secondary); margin-bottom: 0.6rem; }

/* ── QUICKSTART / CODE BLOCKS ── */
.quickstart-steps { display: flex; flex-direction: column; gap: 1.5rem; }
.qs-step { display: flex; gap: 1.2rem; align-items: flex-start; }
.qs-num {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--rh-red); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; margin-top: 2px;
}
.qs-step h4 { font-size: 0.92rem; margin-bottom: 0.4rem; }

pre, code { font-family: 'Courier New', monospace; }
pre.code-block, .install-panel pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 5px; padding: 1rem 1.2rem;
  font-size: 0.82rem; color: #c9d1d9;
  overflow-x: auto; white-space: pre; line-height: 1.7;
  margin-top: 0.6rem;
}
.comment { color: #6e7681; }
.cmd     { color: #f0f0f0; }
.c-ok    { color: var(--green-ok); }

/* install tabs */
.install-tabs { display: flex; gap: 4px; margin-bottom: 0; }
.tab-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-bottom: none; color: var(--text-muted); font-size: 0.82rem;
  padding: 5px 14px; border-radius: 5px 5px 0 0; cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--bg-code); border-color: var(--border); color: var(--text-primary); }
.install-panel { display: none; }
.install-panel.active { display: block; }

/* ── STATS BAR ── */
.stats-bar {
  background: var(--rh-red-deep);
  padding: 2rem;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 3rem;
}
.stat { text-align: center; }
.stat .val { font-size: 2rem; font-weight: 800; color: #fff; }
.stat .lbl { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* ── FOOTER ── */
footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--rh-red); }
footer .footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
footer .footer-brand { font-weight: 600; color: var(--text-secondary); margin-bottom: 0.3rem; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  section { padding: 3.5rem 1rem; }
  .hero-cta { flex-direction: column; }
  .stats-bar { gap: 1.5rem; }
  .compat-table { font-size: 0.78rem; }
}
