/* ===============================
   Globalne style formularza ankiety
   =============================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f6f8fb;
  --text: #222;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --error: #ef4444;
  --radius: 12px;
  --transition: 0.25s;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

/* Container */
.container {
  max-width: 980px;
  margin: 40px auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
  padding: 28px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.title {
  font-size: 22px;
  font-weight: 700;
}

.section-indicator {
  font-size: 14px;
  opacity: 0.7;
}

/* Progress bar */
.progress {
  height: 10px;
  background: #eef2f7;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 24px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width var(--transition);
  border-radius: 99px;
}

/* Headings */
h2, h3 {
  margin: 10px 0 14px;
  font-size: 18px;
}

/* Fields */
label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
}

input[type="text"],
input[type="date"],
textarea,
select {
  width: 96%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

/* Fieldset sections */
.fieldset {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #fafbff;
  margin: 10px 0;
}

/* Required mark */
.req::after {
  content: " *";
  color: var(--error);
  font-weight: 700;
}

/* Navigation buttons */
.nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

button {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #e5e7eb;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* Step visibility */
.step {
  display: none;
  animation: fade var(--transition) ease-out;
}

.step.active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Horizontal rule separation */
hr {
  border: none;
  border-bottom: 1px solid var(--border-light);
  margin: 16px 0;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 20px;
  }
  .title {
    font-size: 20px;
  }
  button {
    width: 100%;
  }
  .nav {
    flex-direction: column;
  }
}
