﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ==========================================================================
   PRACOWNIA - Zaawansowany System Zarządzania i Ochrony Pracowni Szkolnej
   Oficjalny Arkusz Stylów (Nowoczesny Dark-Tech UI)
   ========================================================================== */

:root {
  /* eMKi Brand Core - emki.eu */
  --bg-main: #120303;               /* rgba(18, 3, 3, 1) - emki --varcolor1 */
  --bg-secondary: #1a0f0f;
  --bg-card: #221515;
  --bg-card-hover: #2b1b1b;
  --bg-surface: #261717;
  --bg-elevated: #332020;

  --accent-cyan: #ef8f61;           /* emki --varcolor3/4 (warm coral/terracotta) */
  --accent-blue: #932120;           /* emki --varcolor2 (crimson/burgundy) */
  --accent-purple: #b32a29;         /* jasniejszy bordowy */
  --accent-green: #3c763d;          /* emki green */
  --accent-amber: #f0ad4e;          /* emki amber */
  --accent-red: #d9534f;            /* emki red */

  --gradient-primary: linear-gradient(135deg, #ef8f61 0%, #932120 100%);
  --gradient-card: linear-gradient(180deg, rgba(38, 22, 22, 0.75) 0%, rgba(24, 14, 14, 0.85) 100%);
  --gradient-glow: radial-gradient(circle, rgba(239, 143, 97, 0.16) 0%, rgba(0, 0, 0, 0) 70%);

  --text-main: #ffffff;
  --text-muted: #c9cdd4;
  --text-subtle: #8e95a0;
  --text-accent: #ef8f61;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: #ef8f61;
  --border-card: #363636;           /* emki --fixedcolor2 */

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 12px 30px -5px rgba(0, 0, 0, 0.75);
  --shadow-cyan: 0 0 20px rgba(239, 143, 97, 0.3);
  --shadow-purple: 0 0 20px rgba(147, 33, 32, 0.35);

  --radius-sm: 5px;                 /* emki --borderradiussm */
  --radius-md: 8px;                 /* emki --borderradius */
  --radius-lg: 16px;
  --radius-full: 30px;              /* emki --borderradiuslg */

  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, "Fira Code", "Courier New", Courier, monospace;

  --header-height: 76px;
}

/* Reset i bazy */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Subtelne tło siatki */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* Kontenery */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Nawigacja górna (Sticky Header) */
.navbar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 143, 97, 0.4);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  background: rgba(239, 143, 97, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(239, 143, 97, 0.3);
  border-radius: var(--radius-full);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-task-quick {
  background: linear-gradient(135deg, rgba(239, 143, 97, 0.15) 0%, rgba(147, 33, 32, 0.2) 100%);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-task-quick:hover {
  background: var(--accent-cyan);
  color: #0b0f17;
  box-shadow: var(--shadow-cyan);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(239, 143, 97, 0.12) 0%, rgba(179, 42, 41, 0.06) 50%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-pill-badge {
  background: var(--accent-green);
  color: #052e16;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
}

.hero-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.22rem;
  color: var(--text-muted);
  max-width: 840px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 143, 97, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(239, 143, 97, 0.5);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Kluczowe filary pod Hero */
.hero-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.pillar-card {
  background: rgba(22, 32, 50, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pillar-card:hover {
  background: rgba(28, 41, 64, 0.85);
  border-color: rgba(239, 143, 97, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: inline-block;
}

.pillar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.pillar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Główny Layout (Sidebar TOC + Content) */
.main-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* Pasek boczny / Spis treści (Sticky TOC) */
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) transparent;
}

.toc-sidebar::-webkit-scrollbar {
  width: 5px;
}
.toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 4px;
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-accent);
  margin-bottom: 14px;
  padding-left: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc-group {
  margin-bottom: 18px;
}

.toc-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 6px 8px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.toc-menu {
  list-style: none;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding-left: 12px;
}

.toc-link.active {
  background: rgba(239, 143, 97, 0.1);
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  font-weight: 600;
}

.toc-tag {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-subtle);
}

.toc-link.active .toc-tag {
  background: rgba(239, 143, 97, 0.2);
  color: var(--accent-cyan);
}

/* Zawartość Główna */
.main-content {
  min-width: 0;
}

.doc-section {
  margin-bottom: 75px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 12px;
  background: rgba(239, 143, 97, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(239, 143, 97, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Architektura */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.arch-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.arch-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.arch-card-icon.server {
  background: rgba(239, 143, 97, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(239, 143, 97, 0.3);
}

.arch-card-icon.agent {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.arch-card-icon.network {
  background: rgba(179, 42, 41, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(179, 42, 41, 0.3);
}

.arch-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.arch-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.arch-card-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.arch-features {
  list-style: none;
}

.arch-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.arch-features li strong {
  color: var(--text-main);
}

.arch-features li::before {
  content: "✔";
  color: var(--accent-green);
  font-weight: 900;
  margin-top: 1px;
}

/* Callout Banner */
.callout-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(147, 33, 32, 0.3);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.callout-icon {
  font-size: 2rem;
  line-height: 1;
}

.callout-body h4 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.callout-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* UI Preview Mockups */
.ui-mockup-wrapper {
  margin: 24px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(239, 143, 97, 0.15);
  background: #0d131f;
  position: relative;
}

.ui-mockup-header {
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-dot.red { background: #ef4444; }
.window-dot.yellow { background: #f59e0b; }
.window-dot.green { background: #10b981; }

.mockup-caption {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.ui-mockup-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.ui-mockup-img:hover {
  transform: scale(1.008);
}

/* Zakładki Showcase */
.tab-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.tab-showcase:hover {
  border-color: rgba(239, 143, 97, 0.25);
  box-shadow: var(--shadow-lg);
}

.tab-header {
  padding: 22px 26px;
  background: rgba(30, 41, 59, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tab-number {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(239, 143, 97, 0.15);
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 143, 97, 0.3);
}

.tab-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
}

.tab-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.tab-badge.highlight {
  background: rgba(179, 42, 41, 0.15);
  color: #c084fc;
  border-color: rgba(179, 42, 41, 0.3);
}

.tab-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.tab-body {
  padding: 26px;
}

.tab-intro {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Feature Highlight Box */
.feature-highlight-box,\n.och-i-ach-box {
  background: linear-gradient(135deg, rgba(239, 143, 97, 0.08) 0%, rgba(179, 42, 41, 0.08) 100%);
  border: 1px solid rgba(239, 143, 97, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.highlight-tag,\n.och-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 10px;
  background: var(--gradient-primary);
  color: #0b0f17;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.highlight-title,\n.och-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.highlight-desc,\n.och-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Akcje i Przyciski */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.action-item {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.action-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

.action-btn-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(239, 143, 97, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.action-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Podsystemy Specjalne */
.subsystems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.subsystem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.subsystem-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-cyan);
}

.subsystem-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.subsystem-badge.cyan {
  background: rgba(239, 143, 97, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(239, 143, 97, 0.3);
}

.subsystem-badge.purple {
  background: rgba(179, 42, 41, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(179, 42, 41, 0.3);
}

.subsystem-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.subsystem-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.subsystem-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.subsystem-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.subsystem-details {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.subsystem-detail-item {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsystem-detail-item span {
  color: var(--text-main);
  font-weight: 600;
}

/* Katalog Zadań & Wyszukiwarka */
.tasks-header-card {
  background: linear-gradient(135deg, rgba(22, 32, 50, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(239, 143, 97, 0.25);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
}

.search-box {
  position: relative;
  margin: 20px 0 16px 0;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.05rem;
  font-family: inherit;
  transition: all 0.25s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(239, 143, 97, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-subtle);
  pointer-events: none;
}

.category-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--accent-cyan);
  color: #0b0f17;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(239, 143, 97, 0.35);
}

/* Karty Zadań */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.task-card:hover {
  border-color: rgba(239, 143, 97, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle);
}

.task-category.lesson {
  background: rgba(147, 33, 32, 0.15);
  color: #60a5fa;
}

.task-category.security {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.task-category.admin {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.task-icon {
  font-size: 1.4rem;
}

.task-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.task-need {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.task-steps {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.task-step-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: 6px;
}

.task-step-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.task-tab-ref {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.task-tab-ref strong {
  color: var(--text-main);
}

.task-jump-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.task-jump-link:hover {
  color: #fff;
  transform: translateX(3px);
}

/* Wymagania i Kompatybilność */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.specs-table th,
.specs-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.specs-table th {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Stopka */
.footer {
  background: #080b11;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  margin-top: 80px;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand span {
  color: var(--text-muted);
  font-weight: 600;
}

.footer-note {
  font-size: 0.85rem;
}


/* ==========================================================================
   Wersja Mobilna (Pionowa) - Drawer, Hamburger, Pływający FAB, Touch UI
   ========================================================================== */

/* Przycisk Hamburger w Navbarze */
.btn-mobile-toggle {
  display: none;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  padding: 10px 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transition: all 0.25s ease;
  z-index: 1001;
}

.btn-mobile-toggle:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--accent-cyan);
}

.hamburger-bar {
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-mobile-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--accent-cyan);
}
.btn-mobile-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.btn-mobile-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--accent-cyan);
}

/* Tło przyciemniające (Backdrop) */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Szuflada Mobilna (Off-Canvas Drawer) */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  height: 100dvh;
  background: #0f1624;
  border-right: 1px solid rgba(239, 143, 97, 0.25);
  z-index: 1995;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 35px rgba(0, 0, 0, 0.75);
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 24, 39, 0.9);
}

.btn-mobile-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mobile-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.mobile-drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) transparent;
}

.mobile-nav-group {
  margin-bottom: 22px;
}

.mobile-nav-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-accent);
  padding: 4px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(239, 143, 97, 0.1);
  color: var(--accent-cyan);
  padding-left: 16px;
}

.mobile-nav-link.highlight {
  background: linear-gradient(90deg, rgba(239, 143, 97, 0.15) 0%, rgba(147, 33, 32, 0.1) 100%);
  border: 1px solid rgba(239, 143, 97, 0.3);
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Pływające Przyciski na Dole Ekranu (FAB) */
.mobile-fab-container {
  position: fixed;
  bottom: 20px;
  right: 18px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 1500;
}

.mobile-fab {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-fab-menu {
  background: linear-gradient(135deg, #ef8f61 0%, #932120 100%);
  color: #0b0f17;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 18px rgba(239, 143, 97, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  gap: 8px;
}

.btn-fab-menu:hover,
.btn-fab-menu:active {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(239, 143, 97, 0.65);
}

.btn-fab-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  border: 1px solid var(--border-active);
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.btn-fab-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-fab-top:hover {
  background: var(--accent-cyan);
  color: #0b0f17;
}


/* Responsywność dla Tabletów i Telefonów */
@media (max-width: 1024px) {
  .container {
    padding: 0 26px;
  }
  .main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .toc-sidebar {
    display: none;
  }
  .btn-mobile-toggle {
    display: flex;
  }
  .mobile-fab-container {
    display: flex;
  }
  .hero-title {
    font-size: 2.6rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .btn-task-quick {
    display: none;
  }
  
  .container {
    padding: 0 22px; /* bezpieczny, elegancki margines od brzegu ekranu telefonu */
  }
  
  .hero {
    padding: 45px 0 35px 0;
  }

  .hero-pill {
    font-size: 0.78rem;
    padding: 5px 12px;
    margin-bottom: 18px;
  }

  .hero-title {
    font-size: 2.05rem;
    letter-spacing: -0.6px;
    line-height: 1.24;
    margin-bottom: 16px;
    word-break: break-word;
  }

  .hero-desc {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 28px;
    line-height: 1.6;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.96rem;
  }

  .hero-pillars {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pillar-card {
    padding: 18px 16px;
  }

  .main-layout {
    padding-top: 20px;
    padding-bottom: 60px;
    gap: 28px;
  }

  .doc-section {
    margin-bottom: 54px;
  }

  .section-badge {
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 1.7rem;
    line-height: 1.25;
    letter-spacing: -0.5px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
    word-break: break-word;
  }

  .section-desc {
    font-size: 1.02rem;
    color: #cbd5e1; /* wyraźniejszy, czytelny tekst na ciemnym tle */
    line-height: 1.65;
    margin-bottom: 24px;
  }

  .arch-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .arch-card {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  .callout-banner {
    padding: 18px 16px;
    margin: 22px 0;
    flex-direction: column;
    gap: 12px;
  }

  /* Karty Zakładek na Telefonie */
  .tab-showcase {
    margin-bottom: 28px;
    border-radius: var(--radius-md);
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 12px;
  }

  .tab-title-wrap {
    width: 100%;
  }

  .tab-name {
    font-size: 1.3rem;
  }

  .tab-body {
    padding: 20px 16px;
  }

  .tab-intro {
    font-size: 0.98rem;
    color: #f1f5f9;
  }

  .feature-highlight-box,
  .och-i-ach-box {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  .highlight-title,
  .och-title {
    font-size: 1.1rem;
  }

  .actions-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .subsystems-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .subsystem-card {
    padding: 22px 18px;
  }

  /* Wyszukiwarka Zadań i Przewijane Filtry */
  .tasks-header-card {
    padding: 22px 16px;
  }

  .search-input {
    padding: 14px 16px 14px 44px;
    font-size: 0.96rem;
  }

  .category-filters {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    font-size: 0.84rem;
    padding: 8px 15px;
  }

  .tasks-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .task-card {
    padding: 20px 18px;
  }

  /* Tabela Wymagań z Poziomym Przewijaniem */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }

  .specs-table {
    min-width: 580px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
}

/* Wąskie ekrany smartfonów (<= 420px) */
@media (max-width: 420px) {
  .container {
    padding: 0 18px;
  }
  .section-title {
    font-size: 1.55rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .brand-text {
    font-size: 1.15rem;
  }
  .brand-badge {
    display: none;
  }
  .task-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .task-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* ==================== EMKI BRANDING EXTENSIONS ==================== */
.brand-emki-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-emki-logo {
  height: 44px;
  width: auto;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 440px;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--emki-coral);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 18px rgba(239, 143, 97, 0.4);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fab-btn.scroll-top {
  background: #1e1212;
  border: 1px solid var(--border-card);
  color: var(--emki-coral);
  opacity: 0;
  pointer-events: none;
}

.fab-btn.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}
/* ==================== BREADCRUMBS (EMKI.EU STYLE) ==================== */
.breadcrumbs-bar {
  background: rgba(18, 3, 3, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 0;
  font-size: 0.82rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--emki-coral);
}

.breadcrumbs .divider {
  color: rgba(239, 143, 97, 1);
  font-weight: 600;
  margin: 0 4px;
}

.breadcrumbs .active {
  color: var(--text-main);
  font-weight: 600;
}