/* ============================================================
   Prowizja Calculator — HipotekaAI
   /kalkulator-prowizja-bankowa
   ============================================================ */

/* ----- HERO ----- */
.prowizja-hero {
  background: linear-gradient(135deg, #1E88E5 0%, #8B5CF6 100%);
  color: #fff;
  padding: 64px 0 48px;
  text-align: center;
}
.prowizja-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.prowizja-hero .lead {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.prowizja-hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.prowizja-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ----- MAIN CALCULATOR CARD ----- */
.prowizja-calc-section {
  background: #f0f4ff;
  padding: 48px 0 56px;
}
.prowizja-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(30,136,229,0.1);
  overflow: hidden;
}
.prowizja-card-header {
  background: linear-gradient(135deg, #f0f4ff 0%, #f8f6ff 100%);
  padding: 28px 32px 24px;
  border-bottom: 1px solid #e2e8f0;
}
.prowizja-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 6px;
}
.prowizja-card-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}
.prowizja-card-body {
  padding: 28px 32px;
}

/* ----- COMMON PARAMETERS ROW ----- */
.prowizja-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8B5CF6;
  margin: 24px 0 14px;
}
.prowizja-form-group {
  margin-bottom: 20px;
}
.prowizja-form-label {
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.prowizja-form-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}
.prowizja-form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: #1E3A5F;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.prowizja-form-input:focus {
  border-color: #1E88E5;
  box-shadow: 0 0 0 3px rgba(30,136,229,0.12);
}
.prowizja-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
  margin-top: 10px;
  cursor: pointer;
}
.prowizja-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E88E5, #8B5CF6);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(30,136,229,0.3);
}
.prowizja-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E88E5, #8B5CF6);
  cursor: pointer;
  border: 2px solid #fff;
}
.prowizja-value-display {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E88E5;
  margin-top: 6px;
  text-align: right;
}

/* ----- VARIANT COLUMNS ----- */
.prowizja-variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 640px) {
  .prowizja-variants { grid-template-columns: 1fr; }
}
.prowizja-variant-panel {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  background: #fafbfc;
  transition: border-color 0.2s;
}
.prowizja-variant-panel:hover {
  border-color: #bfdbfe;
}
.prowizja-variant-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}
.prowizja-variant-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.prowizja-variant-dot-a { background: #1E88E5; }
.prowizja-variant-dot-b { background: #8B5CF6; }
.prowizja-variant-label-a { color: #1E88E5; }
.prowizja-variant-label-b { color: #8B5CF6; }

/* ----- CALCULATE BUTTON ----- */
.prowizja-btn-calculate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1E88E5, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}
.prowizja-btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.35);
}

/* ----- RESULTS ----- */
.prowizja-results {
  margin-top: 32px;
  display: none;
}
.prowizja-results.visible {
  display: block;
}

/* Winner banner */
.prowizja-winner-banner {
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.prowizja-winner-banner.winner-a {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #1E88E5;
}
.prowizja-winner-banner.winner-b {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 2px solid #8B5CF6;
}
.prowizja-winner-banner.winner-tie {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #059669;
}
.prowizja-winner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.winner-a .prowizja-winner-icon { background: #1E88E5; }
.winner-b .prowizja-winner-icon { background: #8B5CF6; }
.winner-tie .prowizja-winner-icon { background: #059669; }
.prowizja-winner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 3px;
}
.prowizja-winner-subtitle {
  font-size: 0.87rem;
  color: #64748b;
  line-height: 1.4;
}

/* Comparison table */
.prowizja-compare-wrap {
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 28px;
}
.prowizja-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.prowizja-compare-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}
.prowizja-compare-table th.col-label { background: #64748b; }
.prowizja-compare-table th.col-a { background: #1E88E5; text-align: right; }
.prowizja-compare-table th.col-b { background: #8B5CF6; text-align: right; }
.prowizja-compare-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #374151;
}
.prowizja-compare-table tr:last-child td {
  border-bottom: none;
}
.prowizja-compare-table tr:nth-child(even) td {
  background: #fafbfc;
}
.prowizja-compare-table td.col-val {
  text-align: right;
  font-weight: 600;
  color: #1E3A5F;
}
.prowizja-compare-table tr.prowizja-row-total td {
  font-weight: 800;
  font-size: 0.95rem;
  background: #f0f4ff;
}
.prowizja-compare-table td.prowizja-winner-cell {
  color: #059669;
  font-weight: 800;
}
.prowizja-compare-table td.prowizja-loser-cell {
  color: #94a3b8;
}

/* Break-even highlight */
.prowizja-breakeven-box {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1.5px solid #fb923c;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.prowizja-breakeven-icon {
  color: #ea580c;
  flex-shrink: 0;
  margin-top: 2px;
}
.prowizja-breakeven-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 4px;
}
.prowizja-breakeven-desc {
  font-size: 0.87rem;
  color: #7c3e0d;
  line-height: 1.5;
}

/* ----- SVG CHART ----- */
.prowizja-chart-section {
  margin-bottom: 28px;
}
.prowizja-chart-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 12px;
}
.prowizja-chart-wrap {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
}
.prowizja-chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}
.prowizja-chart-legend {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.prowizja-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}
.prowizja-legend-line {
  width: 24px;
  height: 3px;
  border-radius: 2px;
}

/* ----- DISCLAIMER ----- */
.prowizja-disclaimer {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.6;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #e2e8f0;
  margin-top: 16px;
}

/* ----- EDU SECTION ----- */
.prowizja-edu-section {
  padding: 56px 0;
  background: #fff;
}
.prowizja-edu-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-top: 36px;
  margin-bottom: 12px;
}
.prowizja-edu-section h2:first-child {
  margin-top: 0;
}
.prowizja-edu-section p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 12px;
}
.prowizja-edu-definition {
  background: linear-gradient(135deg, #f0f4ff, #f5f3ff);
  border-left: 4px solid #1E88E5;
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin-bottom: 24px;
  color: #374151;
  line-height: 1.7;
  font-size: 0.97rem;
}
.prowizja-formula-box {
  background: #1E3A5F;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 16px 22px;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  margin: 16px 0;
}

/* ----- EXAMPLE BOX (replaces formula-box) ----- */
.prowizja-example-box {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 14px;
  padding: 22px 24px;
  margin: 16px 0 24px;
}
.prowizja-example-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93rem;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 18px;
}
.prowizja-example-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prowizja-example-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.prowizja-example-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1E88E5;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.prowizja-example-step-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 3px;
}
.prowizja-example-step-val {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}
.prowizja-example-step-result {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-left: -14px;
  padding-left: calc(14px + 14px);
}
.prowizja-example-step-note {
  font-size: 0.82rem;
  color: #065f46;
  margin-top: 4px;
  line-height: 1.5;
}

/* ----- FAQ SECTION ----- */
.prowizja-faq-section {
  padding: 56px 0;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8f6ff 100%);
}
.prowizja-faq-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 8px;
}
.prowizja-faq-lead {
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 32px;
}
.prowizja-faq-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.prowizja-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  font-weight: 700;
  color: #1E3A5F;
  cursor: pointer;
  user-select: none;
  gap: 12px;
  font-size: 0.97rem;
  transition: background 0.15s;
}
.prowizja-faq-question:hover {
  background: #f8fafc;
}
.prowizja-faq-chevron {
  flex-shrink: 0;
  color: #8B5CF6;
  transition: transform 0.25s;
}
.prowizja-faq-question[aria-expanded="true"] .prowizja-faq-chevron {
  transform: rotate(180deg);
}
.prowizja-faq-answer {
  display: none;
  padding: 0 22px 18px;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.75;
  border-top: 1px solid #f1f5f9;
}

/* ----- FINAL CTA ----- */
.prowizja-final-cta {
  background: linear-gradient(135deg, #1E88E5 0%, #8B5CF6 100%);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.prowizja-final-cta h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.prowizja-final-cta p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.prowizja-cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-prowizja-cta-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #1E88E5;
  border-radius: 12px;
  padding: 14px 26px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-prowizja-cta-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: #1565C0;
}
.btn-prowizja-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  padding: 14px 26px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}
.btn-prowizja-cta-outline:hover {
  transform: translateY(-2px);
  border-color: #fff;
  color: #fff;
}

@media (max-width: 767px) {
  .prowizja-card-body { padding: 20px; }
  .prowizja-card-header { padding: 20px; }
  .prowizja-compare-table { font-size: 0.8rem; }
  .prowizja-compare-table td, .prowizja-compare-table th { padding: 9px 10px; }
}
