/*===============================
  Reset & Global Styles
===============================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.3;
  color: #333;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

a {
  color: #004A7F;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #007ACC;
  text-decoration: underline;
}

ul, li {
  list-style: none;
}

/*===============================
  Layout Containers
===============================*/
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/*===============================
  Typography
===============================*/
h1, h2, h3 {
  font-weight: 600;
  color: #004A7F;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

h2 {
  font-size: 1.8em;
}

h3 {
  font-size: 1.2em;
  margin-top: 1.2em;
}

p {
  margin-bottom: 1.3rem;
  font-size: 1.05em;
}

/*===============================
  Navbar Styles
===============================*/
header {
  background-color: #ffffff;
  border-bottom: 2px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4em;
  font-weight: 600;
  color: #004A7F;
  margin-left: 200px;
}

.logo img {
  max-height: 50px;
  width: auto;
}

.logo span {
  font-weight: 400;
  font-size: 24px;
  color: #007ACC;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu li a {
  font-weight: 500;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-menu li a:hover {
  background-color: #f0f8ff;
  color: #007ACC;
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #004A7F;
  cursor: pointer;
}

/*===============================
  Hero Section
===============================*/
.hero {
  background: linear-gradient(135deg, #004A7F 0%, #007ACC 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-logo {
  width: 120px;
  height: auto;
  flex-shrink: 0;
}

.hero-text {
  text-align: center;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-left: 70px;
}

.hero-text h2 {
  font-size: 2em;
  margin: 0;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.hero-text p {
  white-space: nowrap;
  opacity: 0.95;
  font-size: 1.3em;
  margin: 0;
}

.cta-button {
  background: linear-gradient(45deg, #007ACC, #66b3ff);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  align-self: center;
  margin-top: 0.5rem;
  margin-left: -70px;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 122, 204, 0.4);
  color: white;
}

/* Responsywność */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .cta-button {
    align-self: center;
  }

  .hero-text h2,
  .hero-text p {
    white-space: normal;
    font-size: 1.3em;
  }
}

/*===============================
  FORMULARZ – WIELOSTOPNIOWY PROCES (3 KROKI)
===============================*/
.form-section {
  max-width: 900px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


.form-header {
  background: linear-gradient(135deg, #004A7F 0%, #007ACC 100%);
  color: #fff;
  padding: 2.5rem 2rem;
  text-align: center;
}

.form-header h2 {
  margin-bottom: 0.5rem;
  font-size: 2.2em;
  color: white;
}



/* Pasek postępu (3 kroki: 33.33% każdy) */
.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #66b3ff;
  width: 33.33%; /* ZMIENIONE: z 16.67% na 33.33% dla 3 kroków */
  transition: width 0.4s ease;
}

/* Step Indicators (3 kroki) */
.form-steps {
  display: flex;
  justify-content: space-between;
  background: #f7f7f7;
  padding: 1.2rem;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
  gap: 0.0rem;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
  min-width: 120px;
  font-size: 0.9em;
}

.step-indicator:hover {
  transform: scale(1.05);
}

.step-indicator.active {
  font-weight: 600;
  color: #007ACC;
}

.step-indicator.completed {
  color: #28a745;
}

.step-number {
  display: inline-block;
  background: #007ACC;
  color: #fff;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  line-height: 35px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.step-indicator.completed .step-number {
  background: #28a745;
}

.step-indicator.active .step-number {
  background: #007ACC;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.3);
}

/* Form Content */
.form-content {
  padding: 1rem;
  min-height: 500px;
}

.form-content section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.form-content section.active {
  display: block;
}

/* Step Titles */
.step-title {
  text-align: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.step-title i {
  font-size: 2.2rem;
  color: #007ACC;
  display: block;
  margin-bottom: 0.2rem;
}

.step-title h3 {
  color: #004A7F;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}

.step-title p {
  color: #666;
  font-size: 1rem;
  margin: 0.2rem 0 0 0;
}

/* Input Groups */
.input-group {
  margin-bottom: 0.8rem;
}

.input-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
}

.input-field:focus {
  outline: none;
  border-color: #007ACC;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.input-field:invalid {
  border-color: #dc3545;
}

.input-field:valid {
  border-color: #28a745;
}

.input-hint {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

.error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Consent Section */
.consent-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.consent-label:last-child {
  margin-bottom: 0;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #007ACC;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.consent-label input[type="checkbox"] {
  display: none;
}

.consent-label input[type="checkbox"]:checked + .custom-checkbox {
  background-color: #007ACC;
}

.consent-label input[type="checkbox"]:checked + .custom-checkbox::after {
  content: '✓';
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.consent-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
}

/* Radio Button Options */
.options-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.option label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-weight: normal;
}

.custom-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #007ACC;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.option input[type="radio"] {
  display: none;
}

.option input[type="radio"]:checked + label .custom-radio {
  background-color: #007ACC;
}

.option input[type="radio"]:checked + label .custom-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

.option-label {
  font-size: 1rem;
  color: #333;
}

/* File Upload Styling */
.upload-sections {
  display: grid;
  gap: 1.5rem;
}

.file-upload {
  border: 2px dashed #007ACC;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.file-upload:hover {
  border-color: #004A7F;
  background-color: #e3f2fd;
}

.file-upload.required {
  border-color: #dc3545;
}

.file-upload.required:hover {
  border-color: #c82333;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.upload-instructions {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.uploaded-files {
  margin-top: 0.5rem;
}

.uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #e3f2fd;
  border-radius: 5px;
  margin-bottom: 0.5rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-remove {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Questions Container */
.questions-container {
  display: grid;
  gap: 0.0rem;
}

.question-row {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #007ACC;
}

.question-row.alt-bg {
  background: #fff;
  border-left-color: #f8f9fa;
}

.question-text {
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.question3-row .options-container {
  justify-content: flex-start;
}

.question3-options {
  display: flex;
  gap: 2rem;
}

/* Navigation Buttons */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.nav-button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-button.primary {
  background: #007ACC;
  color: white;
}

.nav-button.primary:hover {
  background: #004A7F;
  transform: translateY(-2px);
}

.nav-button.secondary {
  background: #6c757d;
  color: white;
}

.nav-button.secondary:hover {
  background: #545b62;
  transform: translateY(-2px);
}

.nav-button.success {
  background: #28a745;
  color: white;
}

.nav-button.success:hover {
  background: #1e7e34;
  transform: translateY(-2px);
}

.nav-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading and Success States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.loading-spinner i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.loading-spinner p {
  font-size: 1.2rem;
  margin: 0;
}

.success-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.success-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  margin: 1rem;
}

.success-content i {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 1rem;
}

.success-content h3 {
  color: #004A7F;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.success-content p {
  color: #666;
  margin-bottom: 1.5rem;
}

.case-id {
  background: #e3f2fd;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #004A7F;
}

/* Footer */
.footer {
  background: #004A7F;
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.footer-section a {
  color: #66b3ff;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
}




/* Animation keyframes */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .logo {
    margin-left: 0;
    font-size: 1.2em;
  }
  
  .form-steps {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-indicator {
    min-width: auto;
  }
  
  .options-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Pokaż progress bar (odwrócenie ukrycia) */
  .progress-track,
  .progress-container,
  .progress-bar,
  .progress-fill {
    display: block !important; /* Pokazuje pasek postępu */
  }

  .progress-track {
    margin-top: 0.5rem; /* Mniejszy odstęp na mobile */
    height: 6px; /* Lekko cieńszy dla mobile */
  }

  /* Ukryj opisy kroków */
  .form-steps {
    display: none !important; /* Całkowicie ukrywa pasek z tekstami kroków */
  }
