:root {
  --navy: #0A2342;
  --green: #1DB954;
  --slate: #334155;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--slate);
  font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px;display:flex;align-items:center;justify-content:space-between;}
.container2 { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid #e5e7eb;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 14px 0; }

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), #0b3a5f);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

@media(min-width: 900px) { nav.primary { display: flex; } }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.btn.secondary { background: var(--green); color: var(--navy); }

.hero {
  position: relative;
  background: linear-gradient(135deg, #eef2f7, #ffffff);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media(min-width:980px) {
  .hero .wrap {
    grid-template-columns: 1.2fr .8fr;
    padding: 72px 0;
  }
}

.kicker { color: var(--navy); font-weight: 700; letter-spacing: .3px; }

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  margin: 8px 0 10px;
}

p.lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 18px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 20px -12px rgba(2, 6, 23, .15);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media(min-width:800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.section { padding: 54px 0; }
.section.alt { background: var(--bg-alt); }

h2 {
  font-size: clamp(22px, 3.2vw, 32px);
  margin: 0 0 14px;
  color: var(--navy);
}

h3 {
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 18px 0 8px;
  color: var(--navy);
}

ul.check {
  padding-left: 0;
  list-style: none;
  margin: 10px 0;
}

ul.check li {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.tick {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--green);
  display: grid;
  place-items: center;
  color: var(--navy);
  font-weight: 900;
  font-size: 14px;
  flex: 0 0 22px;
}

.muted { color: var(--muted); }

.faq details {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
  background: #fff;
}

.faq summary { cursor: pointer; font-weight: 700; }

footer {
  border-top: 1px solid #e5e7eb;
  padding: 28px 0;
  color: #475569;
  background: #fff;
  text-align: center;
}

.small { font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e6f8ee;
  color: #14532d;
  font-weight: 700;
}

.note { font-size: 13px; color: #64748b; }

.cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  justify-content: center;
}
.cta .btn { border: 0; }

.split { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media(min-width:980px) { .split { grid-template-columns: 1fr 1fr; } }

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: #0b3a5f10;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 2px 6px;
}

/* --- DODATKOWE ELEMENTY DLA ARTYKUŁÓW I TABEL --- */

article { padding: 40px 0; }
article p { margin-bottom: 16px; }



/* === MENU RESPONSYWNE Z ANIMACJĄ (DZIAŁAJĄCE) === */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 28px;
  position: relative;
  z-index: 1000;
}

.menu-toggle .bar {
  width: 100%;
  height: 4px;
  background-color: var(--navy);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media(min-width:900px) {
  .menu-toggle { display: none; }
}

nav.primary {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 70px;
  right: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 20px -8px rgba(2,6,23,.15);
  z-index: 999;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.25s ease;
}

nav.primary.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

nav.primary a {
  display: block;
  padding: 10px 0;
  text-align: right;
  font-weight: 700;
  color: var(--navy);
border-bottom: 1px solid rgba(2, 6, 23, 0.08);
/*  border-bottom: 1px solid #f1f5f9;  delikatne oddzielenie linków */
}

nav.primary a:last-child {
  border-bottom: none;
}


nav.primary a.btn {
  text-align: center;
  margin-top: 10px;
}

@media(min-width:900px) {
  nav.primary {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 18px;
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}





/* === TRYB CIEMNY (Dark Mode) Motofinanse.pl === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F1A;
    --bg-alt: #101726;
    --navy: #E0E8FF;
    --green: #1DB954;
    --slate: #D4DAE5;
    --muted: #9CA3AF;
  }

  body {
    background: var(--bg);
    color: var(--slate);
  }

  header.site-header {
    background: rgba(12, 18, 30, 0.95);
    border-bottom: 1px solid #1f2937;
  }

  .logo {
    background: linear-gradient(135deg, #1DB954, #15A34A);
    color: #0A2342;
  }

  nav.primary {
    background: #0F172A;
    border-color: #1e293b;
    box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  }

  nav.primary a {
    color: #E0E8FF;
  }

  nav.primary a.btn {
    background: var(--green);
    color: #0A2342;
  }

  nav.primary a.btn:hover {
    background: #17a84d;
  }

  .menu-toggle .bar {
    background-color: #E0E8FF;
  }

  footer {
    background: #0F172A;
    color: #A1AECF;
    border-top: 1px solid #1E293B;
  }

  .card {
    background: #162033;
    border-color: #1E293B;
    color: #E2E8F0;
  }

  .faq details {
    background: #1E293B;
    border-color: #334155;
  }

  .note {
    color: #9CA3AF;
  }

  .tick {
    background: var(--green);
    color: #0A2342;
  }

  a { color: var(--green); }
  a:hover { color: #21c75c; }

  table {
    background: #0F172A;
    color: #E2E8F0;
    border-color: #1E293B;
  }

  table th {
    background: #1E293B;
    color: #E2E8F0;
  }

  input, textarea {
    background: #1E293B;
    border: 1px solid #334155;
    color: #E2E8F0;
  }

  .btn {
    background: var(--green);
    color: #0A2342;
  }

  .btn.secondary {
    background: #21c75c;
    color: #0A2342;
  }
}


/* === RESPONSYWNA TABELA (Motofinanse.pl) === */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  border-radius: 12px;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 500px;
  border: 1px solid #e5e7eb;
  text-align: center;
  font-size: 15px;
  border-radius: 12px;
  overflow: hidden;
}

table th {
  background: #f1f5f9;
  color: var(--navy);
  font-weight: 900;
  padding: 10px;
}

table td {
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  color: var(--slate);
}

table tr:nth-child(even) td {
  background: #f9fafb;
}

@media (prefers-color-scheme: dark) {
  table {
    background: #0F172A;
    color: #E2E8F0;
    border-color: #1E293B;
  }
  table th {
    background: #1E293B;
    color: #E2E8F0;
  }
  table td {
    border-color: #334155;
  }
  .table-wrap::-webkit-scrollbar-thumb {
    background: #475569;
  }
  table tr:nth-child(even) td {
    background: #1A2235; /* ciemniejszy wiersz dla kontrastu */
  }
  table tr:nth-child(odd) td {
    background: #0F172A; /* tło bazowe */
  }
}


@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(135deg, #1a2235, #27324a) !important;
  }
}

/* === SEPARATOR MIĘDZY LINKAMI MENU === */
nav.primary a {
  position: relative;
}

/* Separator dla wszystkich oprócz ostatniego linku */
nav.primary a:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  opacity: 0.6;
  font-weight: 400;
  line-height: 1;
}


/* Ukryj separator w menu mobilnym */
@media (max-width: 900px) {
  nav.primary a::after { display: none; }

nav.primary {
    right: 10px;
    top: 60px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 10px 20px;
  }
  nav.primary a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: 16px;
  }

}

/* Tryb ciemny automatyczny i manualny */
@media (prefers-color-scheme: dark) {
  nav.primary a:not(:last-child)::after {
    color: #cbd5e1;
    opacity: 0.5;
  }
}
body.dark nav.primary a:not(:last-child)::after {
  color: #cbd5e1;
  opacity: 0.5;
}


/* ===========================
   STOPKA
   =========================== */

.site-footer {
  padding: 1.5rem 1rem 2rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.site-footer__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__copy {
  margin: 0 0 0.35rem;
}

.site-footer__nav {
  display: inline-flex;
  gap: 1.25rem;
}

.site-footer__link {
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  position: relative;
}

/* delikatny separator kreską pionową */
.site-footer__link + .site-footer__link::before {
  content: "";
  position: absolute;
  left: -0.7rem;
  top: 50%;
  width: 1px;
  height: 0.9rem;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.8);
}

.site-footer__link:hover {
  color: #16a34a;             /* zielony akcent jak w nagłówkach */
  text-decoration: underline;
}

/* na bardzo małych ekranach linki pod sobą */
@media (max-width: 240px) {
  .site-footer__nav {
    flex-direction: column;
    gap: 0.4rem;
  }

  .site-footer__link + .site-footer__link::before {
    display: none;
  }
}

