/*
Theme Name: CyberTest
Theme URI: https://cybertest.officeassistant.bg
Description: Тъмна кибер тема за платформа за обучение и тест на киберсигурност – закони, инструменти, лаборатории и правила за законно тестване.
Author: CyberTest
Version: 1.0.0
Text Domain: cybertest
License: GPL-2.0-or-later
*/

:root {
  --bg: #05070a;
  --bg-2: #0a0f14;
  --panel: #0c1218;
  --line: #15303a;
  --text: #cfd8dc;
  --muted: #7d8f99;
  --green: #00ff9c;
  --cyan: #00e5ff;
  --red: #ff3b5c;
  --amber: #ffb000;
  --radius: 4px;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, Consolas, monospace;
  --sans: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  min-height: 100vh;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0, rgba(0,0,0,0.18) 1px, transparent 1px, transparent 3px);
  z-index: 999;
  opacity: 0.35;
}

a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus { color: var(--green); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--mono); color: #fff; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; color: var(--green); }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
code { background: #0b1a20; color: var(--green); padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--green); color: #000; padding: 8px 12px; z-index: 1000; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.brand { font-family: var(--mono); font-weight: 700; color: #fff; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; color: #fff; }
.brand .dot { width: 10px; height: 10px; background: var(--green); box-shadow: 0 0 12px var(--green); border-radius: 50%; animation: pulse 2s infinite; }
.brand .accent { color: var(--green); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 6px 12px; font-family: var(--mono); font-size: .85rem;
  color: var(--text); border: 1px solid transparent; border-radius: var(--radius);
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a {
  color: var(--green); border-color: var(--line); background: rgba(0,255,156,.05); text-decoration: none;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; position: relative; }
.hero .eyebrow { font-family: var(--mono); color: var(--green); font-size: .9rem; margin-bottom: 12px; }
.hero .eyebrow::before { content: "> "; color: var(--cyan); }
.hero h1 span { color: var(--green); text-shadow: 0 0 18px rgba(0,255,156,.45); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }

.terminal {
  background: #03060a; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 229, 255, .08), inset 0 0 40px rgba(0,0,0,.6);
  overflow: hidden; font-family: var(--mono); font-size: .9rem;
}
.terminal-bar { background: #0b141a; padding: 8px 12px; display: flex; gap: 6px; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.terminal-bar i:nth-child(1) { background: var(--red); }
.terminal-bar i:nth-child(2) { background: var(--amber); }
.terminal-bar i:nth-child(3) { background: var(--green); }
.terminal-body { padding: 16px; line-height: 1.8; color: var(--text); white-space: pre-wrap; }
.terminal-body .p { color: var(--green); }
.terminal-body .c { color: var(--muted); }
.terminal-body .ok { color: var(--green); }
.terminal-body .warn { color: var(--amber); }
.terminal-body .hi { color: var(--cyan); }
.cursor { display: inline-block; width: 9px; height: 1em; background: var(--green); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  font-family: var(--mono); font-size: .9rem; border-radius: var(--radius);
  border: 1px solid var(--green); color: #000; background: var(--green); cursor: pointer;
}
.btn:hover { color: #000; box-shadow: 0 0 18px rgba(0,255,156,.45); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { color: var(--green); background: rgba(0,255,156,.08); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); background: rgba(10,15,20,.6); }
.stat { padding: 22px 16px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--mono); font-size: 1.8rem; color: var(--green); }
.stat span { color: var(--muted); font-size: .85rem; }

/* ---------- Sections & cards ---------- */
section.block { padding: 64px 0; }
section.block + section.block { border-top: 1px solid rgba(21,48,58,.6); }
.section-head { margin-bottom: 28px; max-width: 70ch; }
.section-head .tag { font-family: var(--mono); color: var(--cyan); font-size: .85rem; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; background: linear-gradient(180deg, var(--panel), #090e13);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--green); transform: translateY(-2px); }
.card::before, .card::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid var(--green); opacity: .7;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card p { color: var(--muted); font-size: .95rem; }
.card .meta { font-family: var(--mono); font-size: .75rem; color: var(--cyan); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; display: block; }
.card ul { padding-left: 1.1em; margin: .4em 0 0; color: var(--muted); font-size: .92rem; }
.card li { margin-bottom: .3em; }

.badge { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); margin: 0 4px 6px 0; }
.badge.free { color: var(--green); border-color: rgba(0,255,156,.4); }
.badge.paid { color: var(--amber); border-color: rgba(255,176,0,.4); }
.badge.opensrc { color: var(--cyan); border-color: rgba(0,229,255,.4); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .8rem; color: var(--green); background: #09131a; text-transform: uppercase; letter-spacing: .06em; }
td { color: var(--muted); }
td strong { color: var(--text); }
tr:last-child td { border-bottom: 0; }

.alert {
  border: 1px solid rgba(255,59,92,.5); background: rgba(255,59,92,.06); border-left: 4px solid var(--red);
  padding: 16px 18px; border-radius: var(--radius); margin: 24px 0; color: var(--text);
}
.alert strong { color: var(--red); font-family: var(--mono); }
.note { border-left: 4px solid var(--cyan); background: rgba(0,229,255,.05); padding: 14px 18px; border-radius: var(--radius); margin: 20px 0; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 16px 16px 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 16px; top: 14px;
  font-family: var(--mono); font-size: 1.2rem; color: var(--green);
}
.steps li strong { color: var(--text); }

/* ---------- Pages ---------- */
.page-hero { padding: 56px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.page-hero p { color: var(--muted); max-width: 70ch; }
.crumb { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.content { max-width: 78ch; }
.content h2 { margin-top: 1.8em; color: #fff; }
.content h3 { color: var(--green); margin-top: 1.4em; }
.content ul { padding-left: 1.2em; }
.content li { margin-bottom: .4em; }
.toc { font-family: var(--mono); font-size: .9rem; border: 1px dashed var(--line); padding: 16px 20px; border-radius: var(--radius); margin-bottom: 28px; }
.toc a { display: block; padding: 2px 0; }

.law-item { border-left: 2px solid var(--cyan); padding: 4px 0 4px 18px; margin: 0 0 22px; }
.law-item .ref { font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.law-item h3 { color: #fff; font-size: 1.02rem; font-family: var(--sans); }
.law-item p { color: var(--muted); margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #03060a; padding: 36px 0 44px; margin-top: 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 22px; grid-template-columns: 2fr 1fr 1fr; }
.site-footer h4 { font-size: .9rem; color: var(--green); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; font-family: var(--mono); font-size: .78rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 40px 0 36px; }
  .main-nav ul { gap: 2px; }
  .main-nav a { padding: 5px 8px; font-size: .8rem; }
  .terminal { font-size: .8rem; }
  table { font-size: .85rem; }
  th, td { padding: 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
