/* MalaPozyczka.pl — kierunek B „jasny fintech” (kanwa Claude Design, sierpień 2026).
   Mobile-first; desktop breakpoint ≥ 768 px. Bez dark mode. */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #161720;
  --t2: #34364a;
  --t3: #4a4d61;
  --muted: #676b80;
  --faint: #9093a6;
  --accent: #5551e5;
  --accent-text: #4a45d1;
  --accent-hover: #3b37b3;
  --tint: #ecebfc;
  --border: #e3e4ee;
  --sep: #eceef4;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --shadow-card: 0 1px 2px rgba(22, 23, 32, 0.04), 0 10px 30px rgba(22, 23, 32, 0.06);
  --shadow-flat: 0 1px 2px rgba(22, 23, 32, 0.04);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--ink);
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

@media (max-width: 767px) { .desktop-only { display: none !important; } }
@media (min-width: 768px) { .mobile-only { display: none !important; } }

/* ---------- Wspólny kontener ---------- */
.header-inner, .hero-inner, .sortbar-inner {
  max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px;
}

/* ---------- Nagłówek: samo logo ---------- */
.site-top { background: var(--bg); }
.header-inner { display: flex; align-items: center; padding-top: 16px; padding-bottom: 6px; }
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--ink); letter-spacing: -0.2px;
}
.logo span { color: var(--accent); }
.logo:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero-inner { padding-top: 10px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero-chip {
  align-self: flex-start; font-size: 12px; font-weight: 600;
  color: var(--accent-text); background: var(--tint); border-radius: 999px; padding: 5px 12px;
}
.hero-inner h1 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 30px; line-height: 1.15; letter-spacing: -0.5px;
}
.hero-inner p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 640px; }

@media (min-width: 768px) {
  .header-inner { padding-top: 22px; padding-bottom: 10px; }
  .logo { font-size: 20px; }
  .hero-inner { padding-top: 24px; padding-bottom: 28px; gap: 14px; }
  .hero-inner h1 { font-size: 42px; line-height: 1.1; letter-spacing: -1px; }
  .hero-inner p { font-size: 16px; }
}

/* ---------- Filtry ---------- */
.sortbar-inner {
  display: flex; gap: 8px; align-items: center; padding-bottom: 16px;
  /* jedna linia zawsze; na wąskich ekranach pigułki przewijają się poziomo */
  overflow-x: auto; scrollbar-width: none;
}
.sortbar-inner::-webkit-scrollbar { display: none; }
.sort-label { display: flex; align-items: center; color: var(--faint); flex: none; padding-right: 2px; }
.pill {
  background: var(--surface); border: 1px solid var(--border); color: var(--t3);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  white-space: nowrap; flex: none;
}
.pill:hover { border-color: var(--accent); color: var(--accent-text); }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-filter { color: var(--accent-text); }
.pill-filter.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Karty ofert ---------- */
.offers {
  max-width: 1120px; margin: 0 auto; padding: 0 16px 4px;
  display: flex; flex-direction: column; gap: 14px;
}
.offer-card {
  background: var(--surface); border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card);
}
.card-badge { display: flex; }
.card-badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tint); color: var(--accent-text); border-radius: 999px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 700;
}
.card-main { display: flex; flex-direction: column; gap: 14px; }
.card-id { display: flex; align-items: center; gap: 12px; }
.logo-tile {
  width: 46px; height: 46px; border-radius: 14px; background: var(--bg);
  flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.logo-img {
  width: 100%; height: 100%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.names { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.names .bank { font-size: 12.5px; color: var(--muted); }
.names .name { font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  background: var(--bg); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.tile-label { font-size: 11px; color: var(--muted); }
.tile-val { font-size: 15px; font-weight: 700; }
.cta-col { display: flex; flex-direction: column; gap: 8px; }
.cta {
  display: block; text-align: center; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 14px; font-size: 15px; font-weight: 700;
}
.cta:hover { background: var(--accent-hover); color: #fff; }

@media (min-width: 768px) {
  .offer-card { padding: 22px 24px; }
  .card-main { flex-direction: row; align-items: center; gap: 24px; }
  .card-id { flex: 1; min-width: 0; }
  .logo-tile { width: 56px; height: 56px; border-radius: 16px; }
  .names { gap: 4px; }
  .names .bank { font-size: 13px; }
  .names .name { font-size: 18px; }
  .metrics { width: 430px; flex: none; gap: 10px; }
  .tile { padding: 11px 12px; }
  .tile-val { font-size: 15.5px; }
  .cta-col { width: 210px; flex: none; }
  .cta { padding: 13px; font-size: 14.5px; }
}

/* ---------- Pasek szczegółów / porównywarki ---------- */
.card-bar { display: flex; align-items: stretch; border-top: 1px solid var(--sep); margin: 0 -18px -18px; }
.details-toggle, .cmp-toggle {
  flex: 1; background: none; border: 0; padding: 13px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-text);
}
.details-toggle:hover, .cmp-toggle:hover { background: var(--bg); }
.cmp-toggle.on { background: var(--tint); font-weight: 700; }
.vsep { width: 1px; background: var(--sep); flex: none; }
@media (min-width: 768px) { .card-bar { margin: 0 -24px -22px; } }

/* ---------- Szczegóły oferty ---------- */
.card-details { border-top: 1px solid var(--sep); padding-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.card-details h3 {
  margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}
.det-steps { display: flex; flex-direction: column; gap: 8px; }
.step-row { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--t2); }
.step-row .tick { color: var(--accent); font-weight: 800; flex: none; }
.det-fees { display: flex; flex-direction: column; }
.det-fees h3 { padding-bottom: 8px; }
.fee-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--sep); font-size: 14px;
}
.fee-l { flex: 1; min-width: 0; }
.fee-label { color: var(--muted); }
.fee-note { font-size: 12px; line-height: 1.45; color: var(--faint); margin-top: 2px; }
.fee-val { font-weight: 700; flex: none; }
.det-cols { display: flex; flex-direction: column; gap: 14px; }
.transfer-note { font-size: 11.5px; line-height: 1.5; color: var(--faint); }
@media (min-width: 768px) {
  .det-cols { flex-direction: row; gap: 40px; }
  .det-steps, .det-fees { flex: 1; min-width: 0; align-self: flex-start; }
}

/* ---------- Pusta lista ---------- */
.empty-wrap { max-width: 1120px; margin: 0 auto; padding: 12px 16px; }
.empty-card {
  background: var(--surface); border-radius: 20px; padding: 28px 22px;
  text-align: center; box-shadow: var(--shadow-flat);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.empty-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.empty-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 460px; }
.btn-green {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 22px; font-size: 14px; font-weight: 700;
}
.btn-green:hover { background: var(--accent-hover); }
.btn-link { display: inline-block; }
.btn-link:hover { color: #fff; }

/* ---------- Sekcje treści / strony CMS ---------- */
.seo-wrap, .geo-wrap, .page-wrap, .faq-wrap, .author-wrap {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px 4px;
}
.page-card {
  background: var(--surface); border-radius: 20px; padding: 22px 20px;
  font-size: 14px; line-height: 1.6; color: var(--muted); box-shadow: var(--shadow-flat);
}
.page-card p { margin: 0 0 12px; }
.page-card p:last-child { margin-bottom: 0; }
.page-card h2 {
  margin: 20px 0 8px; font-family: var(--font-display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.3px; color: var(--ink);
}
.page-card h2:first-child { margin-top: 0; }
.page-card h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.page-card ul, .page-card ol { margin: 0 0 12px; padding-left: 20px; }
.page-card li { margin-bottom: 6px; }
.page-card code { background: var(--bg); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.seo-card { }
@media (min-width: 768px) { .page-card { padding: 26px 28px; } }

/* ---------- FAQ ---------- */
.faq-wrap { display: flex; flex-direction: column; gap: 10px; padding-top: 26px; }
.faq-wrap h2 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 20px; letter-spacing: -0.3px;
}
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-flat); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; text-align: left; padding: 16px 18px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.faq-icon { color: var(--muted); font-weight: 600; flex: none; }
.faq-a { padding: 0 18px 16px; font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (min-width: 768px) { .faq-wrap h2 { font-size: 22px; } }

/* ---------- Sekcje geo (miasta / województwa / litery) ---------- */
.geo-wrap .page-card { color: var(--muted); }
.geo-wrap h2 { margin-bottom: 10px; }
.geo-cities, .geo-provinces { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-cities a, .geo-provinces a {
  background: var(--surface); border: 1px solid var(--border); color: var(--t2);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.geo-cities a:hover, .geo-provinces a:hover { border-color: var(--accent); color: var(--accent-text); }
.geo-cities.cols {
  display: grid; gap: 4px 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.geo-cities.cols a {
  background: none; border: none; border-radius: 0; padding: 3px 0;
  font-size: 13.5px; font-weight: 500; color: var(--accent-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.geo-cities.cols a:hover { color: var(--accent-hover); text-decoration: underline; }
.geo-letters { display: flex; flex-wrap: wrap; gap: 6px; }
.geo-letters a {
  min-width: 34px; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 7px 4px;
  font-size: 13px; font-weight: 700; color: var(--t3);
}
.geo-letters a:hover { border-color: var(--accent); color: var(--accent-text); }
.geo-letters a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* .page-card p wygrywałoby specyficznością i zerowało górny margines */
.page-card .geo-more { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.pager {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  margin-top: 14px; font-size: 13px; color: var(--faint);
}

/* ---------- Stopka ---------- */
.disclaimer {
  max-width: 1120px; margin: 0 auto; padding: 22px 20px 30px;
  font-size: 12px; line-height: 1.55; color: var(--faint);
}
.disclaimer a { font-weight: 600; }
@media (min-width: 768px) { .disclaimer { font-size: 12.5px; max-width: 1120px; } }

/* ---------- Porównywarka ---------- */
.cmp-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); box-shadow: 0 -6px 24px rgba(22, 23, 32, 0.1);
}
.cmp-bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
}
.cmp-count { font-size: 13.5px; font-weight: 600; color: var(--t2); flex: 1; }
.cmp-clear {
  background: none; border: 0; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.cmp-clear:hover { color: var(--ink); }
.cmp-go {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 22px; font-size: 14px; font-weight: 700;
}
.cmp-go:hover { background: var(--accent-hover); }
.cmp-go:disabled { background: var(--border); color: var(--faint); cursor: default; }

.cmp-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.cmp-backdrop { position: absolute; inset: 0; background: rgba(22, 23, 32, 0.45); }
.cmp-sheet {
  position: relative; background: var(--surface); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 960px; max-height: 86vh; overflow-y: auto; padding: 18px 16px 20px;
}
.cmp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; }
.cmp-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.cmp-close { background: none; border: 0; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.cmp-close:hover { color: var(--ink); }
.cmp-cols { display: flex; gap: 12px; overflow-x: auto; align-items: stretch; }
.cmp-col {
  flex: 1; min-width: 200px; background: var(--bg); border-radius: 16px; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.cmp-logo { height: 44px; display: flex; align-items: center; }
.cmp-logo .logo-img { width: 110px; height: 40px; background-position: left center; }
.cmp-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.cmp-k { font-size: 11px; color: var(--muted); margin-top: 4px; }
.cmp-v { font-size: 14px; font-weight: 700; }
.cmp-v.big { font-size: 17px; color: var(--accent-text); }
.cmp-sub { font-size: 11px; color: var(--faint); }
.cmp-cta {
  margin-top: auto; display: block; text-align: center; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 11px; font-size: 13.5px; font-weight: 700;
}
.cmp-cta:hover { background: var(--accent-hover); color: #fff; }
@media (min-width: 768px) {
  .cmp-modal { align-items: center; padding: 24px; }
  .cmp-sheet { border-radius: 20px; padding: 22px 24px 24px; }
}

/* ---------- Boxy informacyjne na stronie miasta ---------- */
.city-boxes { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .city-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.amount-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.amount-chips span {
  background: var(--bg); border-radius: 999px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--t3);
}
