:root {
  --primary: #ba1d18;
  --primary-dark: #9a1814;
  --primary-light: #e63e39;
  --secondary: #113758;
  --secondary-dark: #0a2135;
  --secondary-light: #1e5a8c;
  --secondary-transparent: rgba(17, 55, 88, 0.8);
  --gray: #c3c3c3;
  --gray-light: #f0f0f0;
  --gray-dark: #888888;
  --white: #fff;
  --black: #222;
  --error: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
  --info: #3498db;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  background: linear-gradient(to bottom, #DFF3FF, #F2E8D5);
  background-attachment: fixed;      
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  color: var(--black);
  line-height: 1.5;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  width: 100%;
  max-width: 1400px;
}

/* Logo-Container */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
}

/* Form Container */
.form-container {
  width: 100%;
  background-color: var(--secondary-transparent);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 35px;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--gray);
  z-index: 1;
}

.step {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--gray);
  color: var(--white);
  font-weight: bold;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step.active {
  background-color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(186, 29, 24, 0.6);
}

.step-label {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-weight: bold;
  color: var(--white);
  font-size: 14px;
}

.step-number {
  /* Stelle sicher, dass die Nummer mittig im Kreis erscheint */
  display: inline-block;
}

/* Headings */
h1, h2, h3 {
  color: var(--white);
  text-align: center;
  margin-bottom: 25px;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

h2 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 15px;
  color: var(--primary);
  text-align: left;
}

h3 {
  font-size: 18px;
  text-align: left;
  color: var(--secondary-dark);
  margin-bottom: 15px;
}

/* Sections */
.section {
  background-color: var(--white);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.option-group {
  margin-bottom: 25px;
}

.option-group:last-child {
  margin-bottom: 0;
}

.option-title {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-weight: bold;
  color: var(--secondary);
  font-size: 16px;
}

/* Info Icon */
.info-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  background-color: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.info-icon:hover {
  background-color: var(--primary);
  transform: scale(1.1);
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--gray);
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(186, 29, 24, 0.2);
}

.form-group input.error {
  border-color: var(--error);
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 5px;
}

.required {
  color: var(--error);
}

.muted-text {
  color: var(--gray-dark);
  font-size: 14px;
  font-weight: normal;
}

/* Main Container - Zweispaltiges Layout */
.main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.left-column {
  flex: 1;
  min-width: 300px;
}

.right-column {
  flex: 1;
  min-width: 300px;
}

.address-group {
  display: flex;
  gap: 15px;
}

.address-group > div:first-child {
  flex: 0 0 30%;
}

.address-group > div:last-child {
  flex: 0 0 70%;
}

/* File Upload */
.file-upload-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.file-upload-btn {
  background-color: var(--secondary);
  color: var(--white);
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.file-upload-btn:hover {
  background-color: var(--secondary-light);
}

#file-name {
  color: var(--gray-dark);
  font-size: 14px;
}

.logo-preview {
  max-width: 150px;
  max-height: 100px;
  margin-top: 10px;
  border: 1px dashed var(--gray);
  padding: 5px;
  text-align: center;
  border-radius: 5px;
}

.logo-preview img {
  max-width: 100%;
  max-height: 90px;
}

/* Checkbox and Radio */
.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.columns-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.checkbox-container,
.radio-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
}

.checkbox-container input,
.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark,
.radio-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #fff;
  border: 2px solid var(--gray);
  transition: all 0.2s ease;
}

.checkmark {
  border-radius: 4px;
}

.radio-checkmark {
  border-radius: 50%;
}

.checkbox-container:hover input ~ .checkmark,
.radio-container:hover input ~ .radio-checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark,
.radio-container input:checked ~ .radio-checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after,
.radio-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after,
.radio-container input:checked ~ .radio-checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio-container .radio-checkmark:after {
  left: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-25%, -25%);
}

/* PDF Preview Container */
.preview-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--gray-light);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.pdf-preview {
  flex-grow: 1;
  max-height: 870px;
  margin-bottom: 20px;
  background-color: var(--white);
  border: 1px solid var(--gray);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pdf-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.preview-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.preview-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid var(--gray-light);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Buttons */
.btn-container {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-back {
  background-color: var(--gray);
}

.btn-back:hover {
  background-color: var(--gray-dark);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 14px;
}

.btn-secondary {
  background-color: var(--gray);
}

.btn-secondary:hover {
  background-color: var(--gray-dark);
}

.weiterbtn {
  
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* Summary */
.summary-container {
  padding: 20px;
  background-color: var(--gray-light);
  border-radius: 8px;
}

.summary-section {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--gray);
  padding-bottom: 15px;
}

.summary-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-section h3 {
  color: var(--secondary);
  font-size: 18px;
  margin-bottom: 10px;
}

.summary-section ul {
  padding-left: 20px;
}

.summary-section li {
  margin-bottom: 5px;
}

/* Text Links */
.text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Footer */
.foot-text-container {
  width: 100%;
  background-color: var(--secondary-transparent);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--white);
  font-size: 13px;
  text-align: center;
}

.footer-container {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.footer-container a {
  color: var(--gray-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-container a:hover {
  color: var(--primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background-color: var(--white);
  border-radius: 10px;
  padding: 25px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--secondary);
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: var(--primary);
}

.modal-title {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-light);
}

.modal-text {
  color: var(--black);
  line-height: 1.6;
}

.modal-text p {
  margin-bottom: 15px;
}

.modal-text ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.modal-text li {
  margin-bottom: 8px;
}

.modal-img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px 0;
}

.modal-img-container img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Fehler Styles */
.error-message {
  color: red;
  font-size: 0.8em;
  margin-top: 5px;
}

.address-error {
  color: red;
  font-size: 0.9em;
  margin-top: 10px;
  padding: 10px;
  background-color: #ffeeee;
  border-radius: 5px;
  margin-bottom: 10px;
}

input.error {
  border-color: red !important;
}

/* Responsive Anpassungen */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column;
  }
  
  .left-column, .right-column {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .form-container {
    padding: 20px;
  }
  
  .column {
    width: 100%;
  }
  
  h1 {
    font-size: 22px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .columns-2 {
    grid-template-columns: 1fr;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .address-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .address-group > div {
    width: 100%;
    flex: 1 1 100%;
  }
  
  .btn-container {
    flex-direction: column-reverse;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
  }
}


/* Ersetze den aktuellen .pdf-preview Stil mit diesem */
.pdf-preview {
  flex-grow: 1;
  position: relative;
  background-color: var(--white);
  border: 1px solid var(--gray);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  /* Verhältnis für DIN A4 (210:297 ~ 0.7071) einrichten */
  padding-bottom: calc(141.4% * 0.8); /* Etwas Platz für UI-Elemente */
}

.pdf-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Für Landscape-Bildschirme besser anpassen */
@media (min-width: 992px) and (min-height: 750px) {
  .preview-container {
    height: 60vh; /* Maximale Höhe im Verhältnis zur Bildschirmhöhe */
    max-height: 800px;
  }
  
  .pdf-preview {
    padding-bottom: 0; /* Feste Padding-Methode deaktivieren */
    height: calc(100% - 60px); /* Platz für Steuerelemente */
  }
}