/* ==========================================================================
   PrimeBearing - Instytut Badań nad Ergonomią i Mobilnością Ruchu
   Polymorphic Stylesheet (Profile 2: H-P, Prefix: pb-*)
   ========================================================================== */

:root {
  --pb-bg: #fafafa;
  --pb-surface: #ffffff;
  --pb-surface-subtle: #f4f4f5;
  --pb-text-main: #18181b;
  --pb-text-secondary: #52525b;
  --pb-text-muted: #71717a;
  --pb-border: #e4e4e7;
  --pb-border-strong: #d4d4d8;
  
  --pb-amber-main: #f97316;
  --pb-amber-hover: #ea580c;
  --pb-amber-light: #fff7ed;
  --pb-amber-border: #ffedd5;
  --pb-amber-dark: #9a3412;

  --pb-dark-main: #18181b;
  --pb-dark-surface: #27272a;
  --pb-dark-border: #3f3f46;

  --pb-font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pb-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --pb-radius-sm: 6px;
  --pb-radius-md: 12px;
  --pb-radius-lg: 16px;
  --pb-radius-xl: 24px;
  --pb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --pb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --pb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--pb-font-body);
  background-color: var(--pb-bg);
  color: var(--pb-text-main);
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typografia */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pb-font-heading);
  color: var(--pb-text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.85rem; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1.2rem; color: var(--pb-text-secondary); }
p:last-child { margin-bottom: 0; }
a { color: var(--pb-text-main); text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { color: var(--pb-amber-hover); }

/* Layout Kontener */
.pb-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.pb-container-narrow {
  max-width: 860px;
}

/* Header & Nawigacja */
.pb-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pb-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.25s ease;
}

.pb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.pb-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.pb-brand-symbol {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--pb-dark-main) 0%, #27272a 100%);
  border: 1px solid var(--pb-dark-border);
  border-radius: var(--pb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pb-amber-main);
  box-shadow: var(--pb-shadow-sm);
  font-family: var(--pb-font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.pb-brand-info {
  display: flex;
  flex-direction: column;
}

.pb-brand-name {
  font-family: var(--pb-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pb-text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.pb-brand-name span {
  color: var(--pb-amber-main);
}

.pb-brand-tagline {
  font-size: 0.72rem;
  color: var(--pb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 2px;
}

.pb-nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pb-nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--pb-text-secondary);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color 0.2s ease;
}

.pb-nav-link:hover, .pb-nav-link.pb-active {
  color: var(--pb-text-main);
}

.pb-nav-link.pb-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--pb-amber-main);
  border-radius: 2px;
}

.pb-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pb-dark-main);
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--pb-radius-md);
  border: 1px solid var(--pb-dark-border);
  transition: all 0.2s ease;
}

.pb-nav-cta:hover {
  background: var(--pb-amber-hover);
  border-color: var(--pb-amber-hover);
  transform: translateY(-1px);
}

.pb-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--pb-border);
  padding: 0.5rem;
  border-radius: var(--pb-radius-md);
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--pb-text-main);
}

/* Menu Mobilne */
.pb-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 80px;
  background: #ffffff;
  z-index: 999;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--pb-border);
  overflow-y: auto;
}

.pb-mobile-menu.pb-open {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pb-mobile-menu .pb-nav-link {
  font-size: 1.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--pb-border);
  display: block;
}

/* Przyciski */
.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--pb-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--pb-radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 48px;
}

.pb-btn-primary {
  background: var(--pb-amber-main);
  color: #ffffff !important;
  border: 1px solid var(--pb-amber-main);
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

.pb-btn-primary:hover {
  background: var(--pb-amber-hover);
  border-color: var(--pb-amber-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
}

.pb-btn-outline {
  background: transparent;
  color: var(--pb-text-main) !important;
  border: 1px solid var(--pb-border-strong);
}

.pb-btn-outline:hover {
  background: var(--pb-surface-subtle);
  border-color: var(--pb-text-main);
}

.pb-btn-dark {
  background: var(--pb-dark-main);
  color: #ffffff !important;
  border: 1px solid var(--pb-dark-border);
}

.pb-btn-dark:hover {
  background: var(--pb-dark-surface);
}

/* Badge & Etykiety */
.pb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--pb-amber-light);
  color: var(--pb-amber-dark);
  border: 1px solid var(--pb-amber-border);
}

.pb-badge-neutral {
  background: var(--pb-surface-subtle);
  color: var(--pb-text-secondary);
  border-color: var(--pb-border);
}

/* Sekcje */
.pb-section {
  padding: 4.5rem 0;
}

.pb-section-hero {
  padding: 4.5rem 0 3.5rem 0;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #fff7ed 0%, #fafafa 70%);
}

.pb-hero-centered {
  max-width: 900px;
  margin: 0 auto;
}

.pb-hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  margin: 1.5rem 0 1.25rem 0;
  letter-spacing: -0.03em;
}

.pb-hero-subtitle {
  font-size: 1.2rem;
  color: var(--pb-text-secondary);
  max-width: 760px;
  margin: 0 auto 2.25rem auto;
  line-height: 1.6;
}

.pb-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Karty i Siatki */
.pb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pb-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.pb-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  padding: 2rem;
  box-shadow: var(--pb-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.pb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pb-shadow-md);
  border-color: var(--pb-border-strong);
}

.pb-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--pb-radius-md);
  background: var(--pb-amber-light);
  border: 1px solid var(--pb-amber-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pb-amber-hover);
  margin-bottom: 1.5rem;
  font-size: 1.35rem;
}

.pb-card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.pb-card-text {
  font-size: 0.95rem;
  color: var(--pb-text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

/* Moduł Interaktywny (Kalkulator/Audyt) */
.pb-quiz-module {
  background: #ffffff;
  border: 1px solid var(--pb-border-strong);
  border-radius: var(--pb-radius-xl);
  padding: 2.75rem;
  box-shadow: var(--pb-shadow-lg);
  margin-top: 2rem;
  text-align: left;
}

.pb-quiz-header {
  border-bottom: 1px solid var(--pb-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.pb-quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pb-quiz-bar {
  flex-grow: 1;
  height: 6px;
  background: var(--pb-border);
  border-radius: 999px;
  overflow: hidden;
}

.pb-quiz-bar-fill {
  height: 100%;
  width: 25%;
  background: var(--pb-amber-main);
  transition: width 0.3s ease;
}

.pb-quiz-step-title {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.pb-quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.pb-quiz-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  background: var(--pb-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pb-quiz-option:hover {
  background: #ffffff;
  border-color: var(--pb-amber-main);
  box-shadow: var(--pb-shadow-sm);
}

.pb-quiz-option.pb-selected {
  background: var(--pb-amber-light);
  border-color: var(--pb-amber-main);
  color: var(--pb-dark-main);
}

.pb-quiz-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--pb-border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pb-quiz-option.pb-selected .pb-quiz-option-radio {
  border-color: var(--pb-amber-main);
}

.pb-quiz-option.pb-selected .pb-quiz-option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--pb-amber-main);
  border-radius: 50%;
}

.pb-quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--pb-border);
  padding-top: 1.5rem;
}

.pb-quiz-result {
  display: none;
}

.pb-quiz-result.pb-active {
  display: block;
}

.pb-result-card {
  background: var(--pb-surface-subtle);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.pb-score-meter {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.pb-score-number {
  font-family: var(--pb-font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--pb-dark-main);
  line-height: 1;
}

/* Tabele Porównawcze / Specyfikacji */
.pb-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  background: #ffffff;
  margin: 2rem 0;
  box-shadow: var(--pb-shadow-sm);
}

.pb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.pb-table th {
  background: var(--pb-surface-subtle);
  color: var(--pb-text-main);
  font-family: var(--pb-font-heading);
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pb-border);
}

.pb-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pb-border);
  color: var(--pb-text-secondary);
}

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

.pb-table tr:hover td {
  background: rgba(249, 115, 22, 0.03);
}

/* Callout Box / Cytat Akcentny */
.pb-callout {
  background: #ffffff;
  border-left: 4px solid var(--pb-amber-main);
  border-radius: 0 var(--pb-radius-md) var(--pb-radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--pb-shadow-sm);
  border-top: 1px solid var(--pb-border);
  border-right: 1px solid var(--pb-border);
  border-bottom: 1px solid var(--pb-border);
}

.pb-callout-quote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--pb-text-main);
  margin-bottom: 0.5rem;
}

.pb-callout-author {
  font-size: 0.85rem;
  color: var(--pb-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Formularz Kontaktowy */
.pb-form {
  background: #ffffff;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-xl);
  padding: 2.5rem;
  box-shadow: var(--pb-shadow-md);
}

.pb-form-group {
  margin-bottom: 1.4rem;
}

.pb-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--pb-text-main);
}

.pb-input, .pb-textarea, .pb-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--pb-border-strong);
  border-radius: var(--pb-radius-md);
  font-family: var(--pb-font-body);
  font-size: 0.95rem;
  color: var(--pb-text-main);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pb-input:focus, .pb-textarea:focus, .pb-select:focus {
  outline: none;
  border-color: var(--pb-amber-main);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.pb-textarea {
  min-height: 130px;
  resize: vertical;
}

.pb-honeypot {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

/* Footer */
.pb-footer {
  background: var(--pb-dark-main);
  color: #a1a1aa;
  padding: 5rem 0 2.5rem 0;
  margin-top: auto;
  border-top: 1px solid var(--pb-dark-border);
}

.pb-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.pb-footer-title {
  color: #ffffff;
  font-family: var(--pb-font-heading);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pb-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pb-footer-link {
  color: #a1a1aa;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pb-footer-link:hover {
  color: #ffffff;
}

.pb-footer-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #a1a1aa;
  margin-bottom: 1rem;
}

.pb-footer-meta-box {
  background: var(--pb-dark-surface);
  border: 1px solid var(--pb-dark-border);
  border-radius: var(--pb-radius-md);
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #a1a1aa;
}

.pb-footer-disclaimer {
  border-top: 1px solid var(--pb-dark-border);
  padding-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #71717a;
}

.pb-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Cookie Consent Banner */
.pb-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 580px;
  background: rgba(24, 24, 27, 0.97);
  backdrop-filter: blur(8px);
  color: #f4f4f5;
  padding: 1.5rem;
  border-radius: var(--pb-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--pb-shadow-lg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pb-cookie-title {
  font-family: var(--pb-font-heading);
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 600;
}

.pb-cookie-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #d4d4d8;
}

.pb-cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pb-cookie-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  border-radius: var(--pb-radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.pb-cookie-btn-accept {
  background: var(--pb-amber-main);
  color: #ffffff;
}

.pb-cookie-btn-accept:hover {
  background: var(--pb-amber-hover);
}

.pb-cookie-btn-decline {
  background: transparent;
  color: #d4d4d8;
  border: 1px solid #52525b;
}

.pb-cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Obrazki */
.pb-img-responsive {
  width: 100%;
  height: auto;
  border-radius: var(--pb-radius-lg);
  object-fit: cover;
}

/* Media Queries */
@media (max-width: 992px) {
  .pb-nav-desktop, .pb-nav-cta { display: none; }
  .pb-mobile-toggle { display: inline-flex; }
  .pb-hero-title { font-size: 2.5rem; }
  .pb-grid-3 { grid-template-columns: 1fr; }
  .pb-grid-2 { grid-template-columns: 1fr; }
  .pb-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .pb-hero-title { font-size: 2rem; }
  .pb-footer-grid { grid-template-columns: 1fr; }
  .pb-quiz-module { padding: 1.5rem; }
  .pb-cookie-banner { bottom: 1rem; left: 1rem; right: 1rem; }
}
