/* ============================================================
   instrukcja-vss.css | Studio VSS.net - dokumentacja on-line
   SoftwareStudio Sp. z o.o. | Wersja 1.1 | 2026-05
   ============================================================ */

/* --- Reset i podstawy --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Nagłówek --- */
header {
  background: #3a4554;
  color: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

header img.logo {
  height: 36px;
  width: auto;
}

header a {
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  opacity: .95;
}

header a:hover { opacity: 1; text-decoration: underline; }

/* --- Wrapper główny --- */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* --- Sidebar nawigacyjny --- */
nav.sidebar {
  width: 268px;
  min-width: 268px;
  background: #f5f6f8;
  border-right: 1px solid #dde1e7;
  padding: 20px 0 40px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
}

nav.sidebar::-webkit-scrollbar { width: 4px; }
nav.sidebar::-webkit-scrollbar-thumb { background: #c5c9d1; border-radius: 2px; }

nav.sidebar .nav-section {
  margin-top: 20px;
  padding: 0 16px 4px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a9099;
}

nav.sidebar ul {
  list-style: none;
}

nav.sidebar ul li a {
  display: block;
  padding: 6px 20px 6px 20px;
  font-size: .875rem;
  color: #3a4554;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.4;
}

nav.sidebar ul li a:hover {
  background: #eaecf0;
  color: #ff6a13;
  border-left-color: #ff6a13;
}

nav.sidebar ul li a[aria-current="page"] {
  background: #fff3ec;
  color: #ff6a13;
  border-left-color: #ff6a13;
  font-weight: 600;
}

/* Podrzędne pozycje menu (poziom 2) */
nav.sidebar ul ul li a {
  padding-left: 36px;
  font-size: .84rem;
  color: #555;
}

/* Poziom 3 */
nav.sidebar ul ul ul li a {
  padding-left: 52px;
  font-size: .82rem;
  color: #666;
}

/* --- Obszar treści --- */
main {
  flex: 1;
  min-width: 0;
  padding: 32px 48px 60px;
  max-width: 900px;
}

/* --- Breadcrumbs --- */
nav.breadcrumb {
  margin-bottom: 24px;
}

nav.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: .8rem;
  color: #8a9099;
}

nav.breadcrumb ol li { display: flex; align-items: center; gap: 4px; }

nav.breadcrumb ol li + li::before {
  content: '›';
  color: #bbb;
  font-size: .9rem;
}

nav.breadcrumb ol li a {
  color: #ff6a13;
  text-decoration: none;
}

nav.breadcrumb ol li a:hover { text-decoration: underline; }

nav.breadcrumb ol li[aria-current="page"] { color: #555; font-weight: 500; }

/* --- Artykuł --- */
article h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1f2b;
  margin-bottom: 20px;
  line-height: 1.25;
  border-bottom: 2px solid #ff6a13;
  padding-bottom: 12px;
}

article h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #3a4554;
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 4px solid #ff6a13;
}

article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3a4554;
  margin: 24px 0 8px;
}

article h4 {
  font-size: .95rem;
  font-weight: 600;
  color: #555;
  margin: 18px 0 6px;
}

article p {
  margin-bottom: 14px;
  color: #333;
}

article ul, article ol {
  margin: 0 0 14px 22px;
  color: #333;
}

article ul li, article ol li { margin-bottom: 6px; }

article strong { color: #1a1f2b; }
article em { color: #555; }

article a {
  color: #ff6a13;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,106,19,.3);
  transition: border-color .15s, color .15s;
}

article a:hover {
  color: #cc5510;
  border-bottom-color: #cc5510;
}

/* --- Tabele --- */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: .9rem;
}

article table th {
  background: #3a4554;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

article table td {
  padding: 9px 14px;
  border-bottom: 1px solid #e0e3e8;
  color: #333;
  vertical-align: top;
}

article table tr:nth-child(even) td { background: #f9fafb; }
article table tr:hover td { background: #fff3ec; }

/* --- Obrazki (ogólne) --- */
article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border: 1px solid #dde1e7;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ══════════════════════════════════════════════════════════════════
   Zrzuty ekranu systemu — figure z img[loading="lazy"]
   Celuje wyłącznie w nowe screenshoty (nie infografiki SVG,
   nie placeholdery z loading="eager").
   Struktura HTML:
     <figure><img loading="lazy"><figcaption>...</figcaption></figure>
     <p>Opis ekranu...</p>
   ══════════════════════════════════════════════════════════════════ */

/* — Górna karta: figure z obrazkiem — */
article figure:has(img[loading="lazy"]):not(.infografika) {
  margin: 40px 0 0;
  border: 1px solid #c4cad4;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.11), 0 1px 4px rgba(0,0,0,.05);
  background: #fff;
}

/* — Zerowanie ogólnych styli img (override zasad z "article img") — */
article figure:has(img[loading="lazy"]):not(.infografika) img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* — Pasek podpisu (figcaption) — ciemny pasek pod screenshotem — */
article figure:has(img[loading="lazy"]):not(.infografika) figcaption {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 18px 12px;
  background: #2b3545;
  color: #9daab8;
  font-size: .8rem;
  font-style: italic;
  line-height: 1.6;
  border-top: 3px solid #ff6a13;
}

/* — Ikona ◉ przed podpisem — */
article figure:has(img[loading="lazy"]):not(.infografika) figcaption::before {
  content: '◉';
  color: #ff6a13;
  font-style: normal;
  font-size: .72rem;
  margin-top: .18em;
  flex-shrink: 0;
}

/* — Panel opisu (p bezpośrednio po figure) — dolna część karty — */
article figure:has(img[loading="lazy"]):not(.infografika) + p {
  margin: 0 0 44px;
  padding: 8px 18px 16px;
  background: #f4f7fc;
  border: 1px solid #c4cad4;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  font-size: .875rem;
  color: #3a4a5c;
  line-height: 1.78;
}

/* — Etykieta "Opis ekranu" nad treścią opisu — */
article figure:has(img[loading="lazy"]):not(.infografika) + p::before {
  content: 'Opis ekranu';
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #ff6a13;
  margin-bottom: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid #dde4ee;
  font-style: normal;
}

/* — Responsywność — */
@media (max-width: 768px) {
  article figure:has(img[loading="lazy"]):not(.infografika) {
    margin-top: 28px;
    border-radius: 8px 8px 0 0;
  }
  article figure:has(img[loading="lazy"]):not(.infografika) figcaption {
    font-size: .78rem;
    padding: 9px 14px 10px;
  }
  article figure:has(img[loading="lazy"]):not(.infografika) + p {
    margin-bottom: 32px;
    border-radius: 0 0 8px 8px;
    padding: 8px 14px 14px;
    font-size: .84rem;
  }
}

/* --- Nawigacja między stronami --- */
nav.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #e0e3e8;
  gap: 16px;
}

nav.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f5f6f8;
  border: 1px solid #dde1e7;
  border-radius: 6px;
  color: #3a4554;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
  max-width: 48%;
}

nav.page-nav a:hover {
  background: #fff3ec;
  border-color: #ff6a13;
  color: #ff6a13;
}

nav.page-nav a.prev::before { content: '←'; }
nav.page-nav a.next::after  { content: '→'; }

/* --- Stopka --- */
footer {
  background: #3a4554;
  color: #c8cdd6;
  text-align: center;
  padding: 16px 24px;
  font-size: .8rem;
}

footer a { color: #ff6a13; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ============================================================
   Hamburger button (widoczny tylko mobile)
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-right: 14px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   Karty nawigacyjne (.nav-cards) – strona główna instrukcji
   ============================================================ */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0 36px;
}

.nav-card {
  border: 1px solid #dde1e7;
  border-radius: 6px;
  padding: 20px 20px 16px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-card:hover {
  box-shadow: 0 4px 14px rgba(255,106,19,.14);
  border-color: #ff6a13;
}

.nav-card-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 9px;
  border-radius: 12px;
  background: #fff3ec;
  color: #ff6a13;
  align-self: flex-start;
  margin-bottom: 2px;
}

.nav-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #3a4554;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  border-bottom: none;
}

.nav-card-title:hover {
  color: #ff6a13;
  text-decoration: none;
  border-bottom: none;
}

.nav-card-desc {
  font-size: .85rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}

.nav-card-links {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #eef0f3;
  padding-top: 10px;
}

.nav-card-links li::before {
  content: "→ ";
  color: #ff6a13;
  font-size: .78rem;
}

.nav-card-links a {
  font-size: .82rem;
  color: #3a4554;
  text-decoration: none;
  border-bottom: none;
}

.nav-card-links a:hover {
  color: #ff6a13;
  text-decoration: underline;
  border-bottom: none;
}

/* ============================================================
   Media query - widok mobilny (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  .layout { flex-direction: column; }

  /* Pokaż przycisk hamburgera */
  .nav-toggle {
    display: flex;
  }

  /* Sidebar jako rozwijany overlay od góry */
  nav.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: calc(100vh - 60px);
    border-right: none;
    border-bottom: 3px solid #ff6a13;
    z-index: 99;
    overflow-y: auto;
    /* Stan zamknięty: wysunięty ponad ekran */
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .26s ease, opacity .22s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
  }

  nav.sidebar.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  main {
    padding: 20px 16px 40px;
  }

  article h1 { font-size: 1.35rem; }
  article h2 { font-size: 1.05rem; }

  nav.page-nav { flex-direction: column; gap: 10px; }
  nav.page-nav a { max-width: 100%; width: 100%; justify-content: center; }

  /* nav-cards mobile */
  .nav-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0 28px;
  }
}

/* ── Alfabetyczny spis treści ─────────────────────────────────────── */
.index-controls {
  margin: 24px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.index-search-wrap {
  position: relative;
  max-width: 480px;
}
.index-search-input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  font-size: .95rem;
  font-family: inherit;
  border: 1.5px solid #dde1e7;
  border-radius: 6px;
  color: #222;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.index-search-input:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 3px rgba(0,86,179,.12);
}
.index-search-input::placeholder { color: #aab0b8; }
.index-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: .85rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 50%;
  transition: color .12s, background .12s;
}
.index-search-clear:hover { color: #0056b3; background: #e8f0fb; }
.alpha-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.alpha-btn {
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 700;
  font-family: inherit;
  color: #3a4554;
  background: #f5f6f8;
  border: 1.5px solid #dde1e7;
  border-radius: 4px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  letter-spacing: .04em;
  line-height: 1.6;
}
.alpha-btn:hover {
  background: #e8f0fb;
  border-color: #0056b3;
  color: #0056b3;
}
.alpha-btn.active {
  background: #0056b3;
  border-color: #0056b3;
  color: #fff;
}
.index-list { margin-top: 8px; }
.alpha-group { margin-bottom: 32px; }
.alpha-heading {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0056b3 0%, #003f8a 100%);
  padding: 4px 16px;
  border-radius: 4px;
  margin: 0 0 12px;
  min-width: 40px;
  text-align: center;
  letter-spacing: .06em;
}
.index-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.index-entry {
  background: #f9fafb;
  border: 1px solid #e8ebf0;
  border-left: 3px solid transparent;
  border-radius: 5px;
  padding: 10px 14px;
  transition: background .12s, border-color .12s;
}
.index-entry:hover {
  background: #f0f5ff;
  border-left-color: #0056b3;
  border-color: #c8d9f5;
}
.index-entry a {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  color: #1a1f2b;
  border: none;
  margin-bottom: 4px;
  line-height: 1.3;
  text-decoration: none;
  transition: color .12s;
}
.index-entry a:hover { color: #0056b3; }
.index-entry-desc {
  display: block;
  font-size: .78rem;
  color: #6a737d;
  line-height: 1.5;
}
.index-no-results {
  padding: 24px 20px;
  text-align: center;
  color: #888;
  font-size: .9rem;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px dashed #dde1e7;
  margin: 8px 0 20px;
}
.alpha-group[hidden], .index-entry[hidden] { display: none; }
@media (max-width: 768px) {
  .index-search-wrap { max-width: 100%; }
  .index-entries { grid-template-columns: 1fr; }
  .alpha-btn { padding: 4px 10px; font-size: .75rem; }
}
