/* ============================================================
   TechNova Digital - Laboratorio de entrenamiento (RFI/LFI)
   Sitio simulado; SOLO para entorno controlado / educacion
   ============================================================ */

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

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-soft: #eef0ff;
  --accent: #f59e0b;
  --bg: #f4f5fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --ok: #16a34a;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(31, 41, 55, .07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ---------- Cinta de laboratorio ---------- */
.lab-ribbon {
  background: #111827;
  color: #fbbf24;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 16px;
}
.lab-ribbon span { opacity: .85; color: #d1d5db; font-weight: 500; }

/* ---------- Barra de navegacion ---------- */
.navbar {
  background: linear-gradient(120deg, #312e81 0%, #4f46e5 60%, #7c3aed 100%);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(49, 46, 129, .35);
}
.navbar .brand {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  padding: 15px 0;
  letter-spacing: .5px;
}
.navbar .brand:hover { text-decoration: none; }
.navbar .brand span { color: var(--accent); }
.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.navbar nav ul li a {
  display: block;
  color: #e0e7ff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.navbar nav ul li a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}
.navbar nav ul li a.active {
  background: #fff;
  color: var(--primary);
}
.navbar .toolbar { display: flex; align-items: center; gap: 8px; }
.navbar .toolbar a.btn { padding: 6px 12px; color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.navbar .toolbar a.btn:hover { background: rgba(255,255,255,.15); }

/* ---------- Layout general ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
  flex: 1;
}

.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
  color: #fff;
  border-radius: 20px;
  padding: 56px 42px;
  margin-bottom: 32px;
  box-shadow: 0 12px 40px rgba(79, 70, 229, .35);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.hero h1 { font-size: 38px; line-height: 1.15; margin-bottom: 14px; position: relative; z-index: 1; }
.hero p { font-size: 17px; opacity: .92; max-width: 720px; position: relative; z-index: 1; }
.hero .chip {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid #eef0f7;
  transition: transform .15s, box-shadow .15s;
}
.grid > .card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(79, 70, 229, .12); }
.card h3 { margin-bottom: 10px; font-size: 18px; }
.card p { color: var(--muted); font-size: 14px; }
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card ul, .card ol { padding-left: 20px; }
.card li { margin: 6px 0; }

.section-title { font-size: 26px; margin: 36px 0 8px; }
.section-sub { color: var(--muted); margin-bottom: 20px; }

/* ---------- Botones / formularios ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #b91c1c; }

input[type=text], input[type=password], input[type=email], textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d7dbea;
  border-radius: 10px;
  font-size: 14px;
  margin: 6px 0 14px;
  font-family: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); border-color: transparent; }
label { font-size: 13px; font-weight: 600; color: #374151; }

/* ---------- Tablas ---------- */
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid #eef0f7; }
th { background: #eef0ff; color: var(--primary-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafaff; }

/* ---------- Codigo ---------- */
pre {
  background: #0f172a;
  color: #a5f3fc;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  margin: 12px 0;
  border: 1px solid #1e293b;
}
pre code { background: transparent; padding: 0; color: inherit; }
code { font-family: 'Cascadia Code', Consolas, 'Courier New', monospace; }
code.inline { background: #eef0ff; color: #4338ca; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* ---------- Alertas ---------- */
.alert { padding: 14px 16px; border-radius: 10px; font-size: 14px; margin: 14px 0; border-left: 4px solid; }
.alert.warn { background: #fffbeb; border-color: var(--accent); color: #92400e; }
.alert.info { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.alert.danger { background: #fef2f2; border-color: var(--bad); color: #991b1b; }
.alert.ok { background: #f0fdf4; border-color: var(--ok); color: #166534; }
.alert code.inline { background: rgba(0,0,0,.06); color: inherit; }

/* ---------- Blog ---------- */
.post { border-bottom: 1px solid #e5e7eb; padding: 18px 0; }
.post:last-child { border-bottom: none; }
.post h3 { margin-bottom: 6px; }
.post .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.post p { color: #374151; font-size: 15px; }

/* ---------- Footer ---------- */
footer {
  margin-top: 48px;
  background: #1e1b4b;
  color: #a5b4fc;
  text-align: center;
  padding: 26px 20px;
  font-size: 13px;
}
footer strong { color: #fff; }
footer .warn { color: var(--accent); }

/* ---------- Utilidades ---------- */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt { margin-top: 20px; }
.mb { margin-bottom: 20px; }
.small { font-size: 13px; }
.space-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 27px; }
  .navbar { padding: 0 14px; }
  .navbar nav ul { justify-content: center; }
  .navbar nav ul li a { padding: 8px 10px; font-size: 13px; }
}
