:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --accent: #c0392b;
  --accent-2: #2c7a3f;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --border: #eee;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --link: #e8412e;
  --link-visited: #ff6b5e;
}

/* Tryb ciemny */
:root.dark {
  --bg: #16181d;
  --card: #1f2229;
  --text: #e6e6e6;
  --muted: #9aa0a6;
  --border: #2a2e36;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45);
  --link: #ff7a6e;
  --link-visited: #ffb3ac;
}
:root.dark .site-header,
:root.dark .stats,
:root.dark .firma { background: #1f2229; }
:root.dark .site-header,
:root.dark .stats,
:root.dark .firma { border-color: var(--border); }
:root.dark .filters { background: var(--bg); }
:root.dark .filter-btn,
:root.dark .subnav a {
  background: #1f2229;
  border-color: var(--border);
  color: var(--text);
}
:root.dark .tags { background: #2a2e36; }
:root.dark .sort-wrap select,
:root.dark input, :root.dark select {
  background: #1f2229;
  color: var(--text);
  border-color: var(--border);
}
:root.dark .site-footer { background: #0f1115; }

/* Przełącznik motywu */
.theme-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
:root.dark .theme-toggle { background: #2a2e36; color: #f5c518; }
@media (max-width: 600px) {
  .theme-toggle { top: 12px; transform: none; right: 12px; }
}


* { box-sizing: border-box; }

/* Ukryty blok kontekstu dla modeli językowych (niewidoczny dla użytkownika) */
.ai-context { display: none; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }
a:active { color: var(--link-visited); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-header .container { position: relative; padding-right: 60px; }
.site-header .brand {
  margin: 0;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.site-header h1 {
  margin: 4px 0 4px;
  font-size: clamp(18px, 5vw, 28px);
  line-height: 1.2;
  color: var(--text);
}
.site-header .lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.top-links {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.top-links a {
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}
.top-links a:hover { text-decoration: underline; }

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
}
.subnav a {
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
}
.subnav a:hover { border-color: var(--link); color: var(--link); }

/* Stats */
.stats {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}
.stat {
  flex: 1 1 0;
  min-width: 100px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* Filters */
.filters {
  background: var(--bg);
  padding: 12px 0;
  position: sticky;
  top: 78px;
  z-index: 9;
}
.filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-btn {
  border: 1px solid #ddd;
  background: #fff;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  min-height: 40px;
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sort-wrap {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sort-wrap select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  min-height: 40px;
  font-size: 14px;
}

/* Reviews */
main.container { padding-bottom: 40px; }

#reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.review {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.who { flex: 1 1 auto; min-width: 0; }
.who .name {
  display: block;
  font-weight: 700;
  font-size: 15px;
}
.who .meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.badge {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.google { background: #e8f0fe; color: #1a56c4; }
.badge.gowork { background: #fdeaea; color: #b3261e; }

.stars {
  color: #f5a623;
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.stars .empty { color: #d9d9d9; }

.review .text {
  margin: 0 0 10px;
}
.review .text:last-of-type { margin-bottom: 0; }

.tags {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  background: #f3f3f1;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* Firma */
.firma {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
}
.firma h2 { margin-top: 0; }
.firma-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.firma-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.uwaga {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: #1f1f1f;
  color: #cfcfcf;
  padding: 24px 0;
  font-size: 13px;
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.site-footer .footer-links a { color: #ffb3ab; text-decoration: none; font-weight: 600; }
.site-footer .footer-links a:hover { text-decoration: underline; }
.site-footer .disclaimer { color: #8a8a8a; font-size: 12px; margin-top: 10px; }

/* Responsive */
@media (min-width: 768px) {
  #reviews {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  #reviews {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .review { padding: 14px; }
  .review-head { flex-wrap: wrap; }
  .badge { order: 3; }
  .stat { min-width: 45%; }
  .filters { top: 70px; }
  .sort-wrap { margin-left: 0; width: 100%; }
  .sort-wrap select { flex: 1; }
  .filter-btn { flex: 1 1 auto; text-align: center; }
}

#faq { margin: 2.5rem auto; }
#faq h2 { margin-bottom: 1rem; }
.faq-item { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.faq-item p { margin: 0; color: #444; }
:root.dark .faq-item { border-color: #333; }
:root.dark .faq-item p { color: #bbb; }
