/* =====================================================================
   AUTOMAX — Dla brokerów w Polsce (Program Partnerski B2B)
   Arkusz stylów podstrony (system designu AUTOMAX + akcent B2B "steel")
   ===================================================================== */

*, *::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;
  --info-deep: #1d4ed8;
  --info-soft: rgba(36, 154, 243, 0.10);
  --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: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(36, 154, 243, 0.16) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.subpage-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -8%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(36, 154, 243, 0.06) 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: var(--info-soft);
  border: 1px solid rgba(36, 154, 243, 0.30);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #bfdbfe;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-bottom: 16px;
}

.hero-title-badge i { color: #60a5fa; }

.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: #60a5fa; }

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

.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

.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 Panelu Partnera (hero) ---- */
.partner-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: var(--text-main);
  box-shadow: var(--shadow-overlay);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.partner-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--info) 0%, var(--accent) 100%);
}

.partner-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.partner-card-crest {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.partner-card-head h2 { font-size: 16px; font-weight: 700; color: var(--primary); }
.partner-card-head p { font-size: 11px; color: var(--text-muted); }

.partner-perks { display: flex; flex-direction: column; gap: 14px; }

.partner-perk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.partner-perk i { color: var(--success); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.partner-perk strong { display: block; font-weight: 700; color: var(--primary); }
.partner-perk span { font-size: 11px; color: var(--text-muted); }

/* ===================== 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(--info-deep);
  margin-bottom: 10px;
}

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

/* ---- Korzyści (grid) ---- */
.perks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.perk-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-premium);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.perk-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(36, 154, 243, 0.4); }

.perk-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}

.perk-card:nth-child(3n+2) .perk-icon { background: rgba(36, 154, 243, 0.08); color: var(--accent); }
.perk-card:nth-child(3n) .perk-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.perk-card h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.perk-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ---- Dla kogo (audience) ---- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.audience-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
}

.audience-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: var(--info);
}
.audience-card:nth-child(2)::before { background: var(--accent); }
.audience-card:nth-child(3)::before { background: var(--success); }

.audience-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--primary);
  margin-bottom: 18px;
}

.audience-card h3 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.audience-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.audience-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.audience-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--bg-base);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

/* ---- Proces współpracy (timeline) ---- */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.flow-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  box-shadow: var(--shadow-premium);
  position: relative;
}

.flow-step-num {
  position: absolute;
  top: -13px;
  left: 22px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.flow-card:nth-child(2) .flow-step-num { background-color: var(--info); }
.flow-card:nth-child(3) .flow-step-num { background-color: var(--accent); }
.flow-card:nth-child(4) .flow-step-num { background-color: var(--success); }

.flow-card .flow-icon { font-size: 22px; color: var(--text-muted); margin: 10px 0 12px; }
.flow-card h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.flow-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

/* ---- Model rozliczeń (banner + przykład) ---- */
.margin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.margin-banner {
  background: linear-gradient(160deg, #20293b 0%, #141b29 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 154, 243, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.margin-banner h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; position: relative; }
.margin-banner h3 span { color: #60a5fa; }
.margin-banner p { font-size: 14px; color: #cbd5e1; line-height: 1.6; position: relative; }

.margin-tag {
  margin-top: 22px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
}
.margin-tag strong { font-size: 30px; font-weight: 700; color: #ffffff; }
.margin-tag span { font-size: 12px; color: #94a3b8; font-weight: 600; }

.calc-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-premium);
}

.calc-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-card h3 i { color: var(--info); }
.calc-card > p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 20px; }

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 13px;
}
.calc-row span { color: var(--text-muted); }
.calc-row strong { color: var(--primary); font-weight: 700; }
.calc-row.total {
  border-bottom: none;
  border-top: 2px solid var(--primary);
  margin-top: 8px;
  padding-top: 16px;
}
.calc-row.total span { color: var(--primary); font-weight: 700; }
.calc-row.total strong { color: var(--success); font-size: 18px; }
.calc-note { font-size: 11px; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }

/* ---- Filary zaufania ---- */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.legal-pillar-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;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.pillar-icon-wrapper i { font-size: 20px; color: var(--info); }
.legal-pillar-card:nth-child(2) .pillar-icon-wrapper i { color: var(--accent); }
.legal-pillar-card:nth-child(3) .pillar-icon-wrapper i { color: var(--success); }

.legal-pillar-card h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 12px; letter-spacing: -0.01em; }
.legal-pillar-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.pillar-footer-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--info-deep);
  background-color: var(--bg-base);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--info);
  display: inline-block;
}

/* ---- 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(--info); }

.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(--info-deep); }

.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: linear-gradient(160deg, #20293b 0%, #141b29 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 154, 243, 0.24);
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(36, 154, 243, 0.18) 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 h2 span { color: #60a5fa; }
.cta-band p { font-size: 14px; color: #cbd5e1; max-width: 580px; 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, filter 0.2s ease;
}

.btn-primary { background-color: var(--accent); color: #ffffff; }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.btn-blue { background-color: var(--info); color: #ffffff; }
.btn-blue:hover { background-color: var(--info-deep); 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 ---- */
.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; }
  .perks-grid { grid-template-columns: 1fr 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .margin-grid { grid-template-columns: 1fr; }
  .legal-grid { grid-template-columns: 1fr; }
}

@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; }
  .hero-cta-row { margin-bottom: 22px; }

  .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; }

  .partner-card { padding: 22px; }
  .partner-card-crest { width: 40px; height: 40px; font-size: 17px; }

  .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; }

  .perks-grid { grid-template-columns: 1fr; }
  .perk-card { padding: 24px; }
  .perk-icon { width: 44px; height: 44px; font-size: 18px; }

  .audience-card { padding: 24px; }
  .audience-card h3 { font-size: 16px; }

  .flow-grid { grid-template-columns: 1fr; gap: 16px; }
  .flow-card { padding: 26px 20px; }

  .margin-banner { padding: 26px; }
  .margin-banner h3 { font-size: 19px; }
  .margin-banner p { font-size: 12.5px; }
  .margin-tag strong { font-size: 24px; }
  .calc-card { padding: 24px; }

  .legal-pillar-card { padding: 22px; }
  .pillar-icon-wrapper { width: 42px; height: 42px; margin-bottom: 14px; }
  .pillar-icon-wrapper i { font-size: 18px; }
  .legal-pillar-card h3 { font-size: 15px; }
  .legal-pillar-card 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; }
}
