/* =====================================================================
   AUTOMAX — Jak działa integracja z Manheim?
   Arkusz stylów podstrony (spójny z systemem designu AUTOMAX)
   ===================================================================== */

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

:root {
  --bg-base: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #1e293b;
  --accent: #249AF3;
  --accent-hover: #1d4ed8;
  --success: #10b981;
  --info: #249AF3;
  --border-color: #e8ebf091;
  --input-bg: #f1f5f9;

  --radius-sm: 5px;
  --radius-md: 5px;
  --radius-lg: 5px;

  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-overlay: 0 20px 40px rgba(0, 0, 0, 0.12);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-main);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button { font-family: inherit; border: none; outline: none; background: none; cursor: pointer; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== HERO ===================== */
.subpage-hero {
  background-color: var(--primary);
  color: #ffffff;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.subpage-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(36, 154, 243, 0.10) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.subpage-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -8%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(36, 154, 243, 0.07) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.hero-title-badge i { color: var(--info); }

.subpage-hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.subpage-hero h1 span { color: var(--accent); }

.subpage-hero .hero-lead {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 580px;
}

.trust-metrics {
  display: flex;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.metric-item h4 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.metric-item span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* ---- Karta przepływu danych (hero) ---- */
.flow-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text-main);
  box-shadow: var(--shadow-overlay);
  border: 1px solid var(--border-color);
  position: relative;
}

.flow-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-card-title i { color: var(--info); }

.flow-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.flow-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}

.flow-node-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background-color: var(--input-bg);
  color: var(--primary);
}

.flow-node:nth-child(1) .flow-node-icon { background-color: rgba(36, 154, 243, 0.10); color: var(--info); }
.flow-node:nth-child(3) .flow-node-icon { background-color: rgba(36, 154, 243, 0.10); color: var(--accent); }
.flow-node:nth-child(5) .flow-node-icon { background-color: rgba(16, 185, 129, 0.10); color: var(--success); }

.flow-node-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.flow-node-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.flow-connector {
  height: 18px;
  width: 2px;
  margin-left: 18px;
  background: linear-gradient(to bottom, var(--border-color), var(--border-color));
  position: relative;
}

.flow-connector::after {
  content: '';
  position: absolute;
  left: -2px;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

.flow-card-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.flow-card-foot i { color: var(--success); font-size: 16px; }

/* ===================== SEKCJE ===================== */
.section-spacing { padding: 80px 0; }

.section-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-header-center h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header-center p {
  font-size: 14px;
  color: var(--text-muted);
}

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--accent);
  margin-bottom: 10px;
}

.bg-muted-section {
  background-color: #f1f5f9;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ---- Proces (4 kroki) ---- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.process-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.process-step-num {
  position: absolute;
  top: -12px;
  left: 22px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.process-card:nth-child(3) .process-step-num { background-color: var(--accent); }

.process-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background-color: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--primary);
  margin: 14px 0 16px;
}

.process-card:nth-child(3) .process-card-icon { color: var(--accent); background-color: rgba(36, 154, 243, 0.08); }

.process-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.process-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Warstwy systemu (architektura) ---- */
.layers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.layer-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-premium);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.layer-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background-color: var(--input-bg);
  color: var(--primary);
}

.layer-card:nth-child(1) .layer-icon { background: rgba(36, 154, 243, 0.10); color: var(--info); }
.layer-card:nth-child(2) .layer-icon { background: rgba(36, 154, 243, 0.10); color: var(--accent); }
.layer-card:nth-child(3) .layer-icon { background: rgba(16, 185, 129, 0.10); color: var(--success); }
.layer-card:nth-child(4) .layer-icon { background: var(--input-bg); color: var(--primary); }

.layer-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.layer-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text-muted);
}

.layer-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.layer-body p strong { color: var(--primary); font-weight: 700; }

/* ---- Co synchronizujemy (feature grid) ---- */
.sync-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sync-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sync-item:hover { border-color: #cbd5e1; transform: translateY(-3px); }

.sync-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(36, 154, 243, 0.08);
  color: var(--info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 16px;
}

.sync-item h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.sync-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Oś czasu (cykl życia oferty) ---- */
.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}

.timeline-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  position: relative;
}

.timeline-step:last-child { margin-bottom: 0; }
.timeline-step:nth-child(even) { flex-direction: row-reverse; }

.timeline-content {
  width: calc(50% - 40px);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-premium);
  position: relative;
}

.timeline-step:nth-child(odd) .timeline-content::before {
  content: '';
  position: absolute;
  top: 24px;
  right: -7px;
  width: 12px;
  height: 12px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.timeline-step:nth-child(even) .timeline-content::before {
  content: '';
  position: absolute;
  top: 24px;
  left: -7px;
  width: 12px;
  height: 12px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.timeline-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 4px solid var(--bg-base);
  z-index: 2;
}

.timeline-step:nth-child(2) .timeline-badge { background-color: var(--info); }
.timeline-step:nth-child(3) .timeline-badge { background-color: var(--accent); }
.timeline-step:nth-child(4) .timeline-badge { background-color: var(--success); }

.step-num-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Banner techniczny ---- */
.tech-banner {
  background-color: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.tech-banner::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -5%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(36, 154, 243, 0.14) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.tech-banner-info { position: relative; z-index: 1; }

.tech-banner-info h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.tech-banner-info h2 span { color: var(--accent); }

.tech-banner-info p {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.6;
}

.tech-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tech-stat {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
}

.tech-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 6px;
}

.tech-stat span { font-size: 11px; color: #94a3b8; }

/* ---- FAQ ---- */
.faq-wrapper { max-width: 820px; margin: 0 auto; }

.accordion-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-item.active { border-color: var(--primary); }

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  transition: background-color 0.2s ease;
}

.accordion-header:hover { background-color: var(--input-bg); }

.accordion-header i {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.active .accordion-header i { transform: rotate(180deg); color: var(--primary); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
}

.accordion-content {
  padding: 0 24px 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.accordion-item.active .accordion-content { padding-top: 4px; }

/* ---- CTA ---- */
.cta-band {
  background-color: var(--primary);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(36, 154, 243, 0.12) 0%, rgba(30, 41, 59, 0) 60%);
  pointer-events: none;
}

.cta-band h2 {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  position: relative;
  letter-spacing: -0.02em;
}

.cta-band p {
  font-size: 14px;
  color: #cbd5e1;
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.btn-primary { background-color: var(--accent); color: #ffffff; }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

.btn-ghost { background-color: rgba(255, 255, 255, 0.08); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { background-color: rgba(255, 255, 255, 0.14); }

/* ---- Animacja wejścia (scroll reveal) ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===================== RWD ===================== */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .layers-grid { grid-template-columns: 1fr; }
  .sync-grid { grid-template-columns: 1fr 1fr; }
  .tech-banner { grid-template-columns: 1fr; gap: 24px; }

  .timeline-container::before { left: 24px; }
  .timeline-step, .timeline-step:nth-child(even) { flex-direction: column; align-items: flex-end; }
  .timeline-content { width: calc(100% - 60px); }
  .timeline-badge { left: 24px; top: 0; transform: translateX(-50%); }
  .timeline-step:nth-child(odd) .timeline-content::before,
  .timeline-step:nth-child(even) .timeline-content::before {
    left: -7px; right: auto; top: 12px;
    border: none; border-bottom: 1px solid var(--border-color); border-left: 1px solid var(--border-color);
  }
}

@media (max-width: 767px) {
  .container { padding: 0 16px; }

  .subpage-hero { padding: 36px 0 44px; }
  .subpage-hero h1 { font-size: 24px; margin-bottom: 14px; line-height: 1.2; }
  .subpage-hero .hero-lead { font-size: 13px; margin-bottom: 22px; }
  .hero-title-badge { font-size: 9px; padding: 4px 10px; margin-bottom: 12px; }

  .trust-metrics { gap: 16px; flex-wrap: wrap; }
  .metric-item { width: calc(50% - 8px); }
  .metric-item h4 { font-size: 18px; }
  .metric-item span { font-size: 10px; }

  .flow-card { padding: 20px; }
  .flow-card-title { font-size: 14px; }
  .flow-node-icon { width: 34px; height: 34px; font-size: 13px; }

  .section-spacing { padding: 48px 0; }
  .section-header-center { margin-bottom: 28px; }
  .section-header-center h2 { font-size: 20px; }
  .section-header-center p { font-size: 12px; }

  .process-grid { grid-template-columns: 1fr; gap: 16px; }
  .process-card { padding: 24px 18px; }

  .layer-card { padding: 22px; gap: 16px; flex-direction: column; }
  .layer-icon { width: 44px; height: 44px; font-size: 17px; }
  .layer-body h3 { font-size: 15px; }
  .layer-body p { font-size: 12px; }

  .sync-grid { grid-template-columns: 1fr; }

  .tech-banner { padding: 24px; }
  .tech-banner-info h2 { font-size: 20px; }
  .tech-stats { grid-template-columns: 1fr 1fr; }

  .timeline-content { padding: 16px; width: calc(100% - 44px); }
  .timeline-container::before { left: 16px; }
  .timeline-badge { width: 32px; height: 32px; font-size: 12px; left: 16px; border-width: 3px; }
  .timeline-step { margin-bottom: 24px; }
  .timeline-content h3 { font-size: 14px; }
  .timeline-content p { font-size: 12px; }

  .accordion-header { padding: 16px; font-size: 12px; }
  .accordion-content { padding: 0 16px 16px; font-size: 12px; }

  .cta-band { padding: 32px 20px; }
  .cta-band h2 { font-size: 20px; }
  .cta-band p { font-size: 12px; }
  .btn { width: 100%; justify-content: center; }
}
