/* Base */
* { box-sizing: border-box; }
html, body { width: 100%; }
body { overflow-x: hidden; }

.site-main {
  background: #f6f8fc;
}

/* Wrap */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Hero */
.form-hero {
  padding: 28px 0 14px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .hero-card { grid-template-columns: 1fr; }
}

.hero-left {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.06);
}

.kicker {
  display: inline-flex;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
  margin: 0 0 10px;
}

.title {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.subtitle {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
  max-width: 64ch;
}

.hero-badges {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 14px;
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
}

.badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* Price box */
.hero-right .price-box {
  height: 100%;
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.price-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.price-label {
  font-weight: 800;
  color: rgba(226, 232, 240, 0.78);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price-value {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
}

.price-rows {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 10px;
}

.price-rows .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.92);
}

.price-hint {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.55;
}

/* Main grid */
.form-section {
  padding: 18px 0 80px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 0.42fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Cards */
.form-card {
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.side-card {
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.side-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.steps {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.7;
  font-size: 14px;
}

.info {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(2, 6, 23, 0.06);
  display: grid;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #334155;
}

.info a { color: #2563eb; text-decoration: none; font-weight: 800; }
.info a:hover { text-decoration: underline; }

.tip {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 650;
}

/* Blocks */
.block {
  padding: 18px;
  border-top: 1px solid rgba(2, 6, 23, 0.06);
}

.block:first-child {
  border-top: 0;
}

.block-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.step {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.block h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
}

.block p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
}

/* Fields */
.field {
  display: grid;
  gap: 8px;
}

.field label,
.field .label {
  font-size: 13px;
  color: #0f172a;
  font-weight: 800;
}

.req {
  color: #ef4444;
  font-weight: 900;
}

.hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  border: 1px solid rgba(2, 6, 23, 0.10);
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.field.is-bad input,
.field.is-bad textarea {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.error {
  min-height: 16px;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 750;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* Choices */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 23, 0.10);
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: transform .05s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.chip:hover {
  border-color: rgba(37, 99, 235, 0.40);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.chip input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.chip .sub {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.chip-wide {
  min-width: 210px;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .chip-wide { width: 100%; min-width: 0; }
}

/* Checks */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: #f8fafc;
}

.check input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.consents {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: #ffffff;
}

.cons-title {
  font-weight: 900;
  color: #0f172a;
  font-size: 13px;
}

/* File */
.filebox {
  border-radius: 18px;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.filebox input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.filebtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.10);
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
  color: #1d4ed8;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.filebtn:hover {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.fileicon { font-size: 18px; }

.filesub {
  margin-left: auto;
  font-weight: 800;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 520px) {
  .filesub { display: none; }
}

.filenames {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
  word-break: break-word;
}

/* Submit */
.submitbar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: #0b1220;
  color: #e5e7eb;
}

.sum-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  font-weight: 900;
}

.sum-price {
  font-size: 26px;
  font-weight: 950;
  color: #ffffff;
}

.sum-note {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.70);
  font-weight: 800;
}

.btn {
  border: 0;
  background: #2563eb;
  color: #ffffff;
  font-weight: 950;
  letter-spacing: 0.02em;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .05s ease, filter .15s ease, opacity .15s ease;
  min-width: 160px;
}

.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.72; cursor: not-allowed; }

.status {
  margin-top: 12px;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.status.ok { color: #166534; font-weight: 850; }
.status.bad { color: #b91c1c; font-weight: 850; }

/* === ALIGN FIX: równe kolumny w grid-2 / grid-3 === */

/* 1) Każde pole w gridzie ma się rozciągać i mieć wspólny "szkielet" */
.grid-2,
.grid-3 {
  align-items: start;
}

.grid-2 > .field,
.grid-3 > .field {
  align-content: start;
  grid-auto-rows: min-content;
}

/* 2) Dla pól typu "Płeć" i "Kontynuacja" wyrównujemy kontrolki */
.field .choices {
  min-height: 48px; /* stała wysokość rzędu */
  align-items: center;
}

/* 3) Chipsy (radio) — stała wysokość i wyśrodkowanie */
.chip {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

/* 4) Check (kontynuacja) — wygląda i ma wysokość jak chipsy */
.check {
  min-height: 48px;
  padding: 12px 14px;
  align-items: center;
}

/* 5) Żeby "Kontynuacja" nie miała innego marginesu/oddechu niż "Płeć" */
.field .label,
.field label {
  line-height: 1.2;
}

.field .error {
  margin-top: -2px; /* żeby error nie rozpychał nadmiernie */
}

/* 6) Jeśli chcesz, żeby checkbox wyglądał bardziej jak chip */
.field .check {
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.10);
}

.field .check:hover {
  border-color: rgba(37, 99, 235, 0.40);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
