/* Kontakt Section - Zweispaltig für Formular */
.contact-section {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 30px;
  /* KORREKTUR: rgba(20, 20, 20, 0.9) ersetzt durch Variable */
  background: var(--glass-dark);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  text-align: left;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Message Section - Einspaltig für Danke/Fehler Seiten */
.contact-message-section {
  max-width: 800px;
  width: 100%;
  margin: 40px auto;
  padding: 50px;
  /* KORREKTUR: rgba(20, 20, 20, 0.9) ersetzt durch Variable */
  background: var(--glass-dark);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  text-align: center; /* Alles zentriert */
  box-sizing: border-box;
}

.contact-message-section h1 {
  font-size: 48px;
  /* KORREKTUR: #fff ersetzt durch Variable */
  color: var(--text-main);
  margin-bottom: 20px;
  text-align: center; /* Explizit zentriert */
}

.contact-message-section h2 {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: normal;
  text-align: center; /* Explizit zentriert */
}

.contact-message-section p {
  font-size: 18px;
  /* KORREKTUR: #fff ersetzt durch Variable */
  color: var(--text-main);
  margin: 20px auto; /* Auto margins für Zentrierung */
  line-height: 1.6;
  text-align: center; /* Explizit zentriert */
  max-width: 600px; /* Begrenzte Breite für bessere Lesbarkeit */
}

.contact-message-section .back-link {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 32px;
  /* KORREKTUR: #238ad2 ersetzt durch Variable */
  background: linear-gradient(135deg, var(--primary) 0%, #1a6fa8 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(35, 138, 210, 0.3);
}

.contact-message-section .back-link:hover {
  /* KORREKTUR: #3da9f5 und #238ad2 ersetzt durch Variablen */
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(35, 138, 210, 0.5);
}

.contact-section h2 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: left;
  grid-column: 1 / -1;
}

/* Bild Container - richtet sich an Formular-Höhe aus */
.contact-image {
  position: relative;
  align-self: stretch;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.contact-image img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Formular */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
  /* KORREKTUR: #fff ersetzt durch Variable */
  color: var(--text-main);
}

.contact-form .required,
.form-hint .required {
  color: #ff5252;
}

/* Eingabefelder */
.contact-form input,
.contact-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #666;
  background-color: #fff;
  font-size: 16px;
  color: #3d3d3d;
  transition: border 0.3s ease, background 0.3s ease;
  box-sizing: border-box;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  /* KORREKTUR: #238ad2 ersetzt durch Variable */
  border-color: var(--primary);
  background-color: #fff;
}

/* Checkbox Label */
.checkbox-label {
  font-size: 14px;
  font-weight: normal;
  /* KORREKTUR: #ccc ersetzt durch Variable */
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.checkbox-label span {
  flex: 1;
  line-height: 1.4;
  word-wrap: break-word;
}

.checkbox-label a {
  /* KORREKTUR: #fff ersetzt durch Variable */
  color: var(--text-main);
  text-decoration: underline;
  display: inline;
  word-break: break-word;
}

/* Button */
.contact-form button {
  /* KORREKTUR: #0d4a70 ersetzt durch Variable (Hintergrundfarbe) */
  color: white;
  padding: 14px;
  font-size: 18px;
  font-weight: bold;
  background-color: var(--bg-light);
  border: solid 1px var(--primary);
  border-radius: 20px !important;
  cursor: pointer;
  transition: background 0.3s ease-in-out, transform 0.2s;
  width: 40%;
}

.contact-form button:hover {
  /* KORREKTUR: #238ad2 ersetzt durch Variable (Primärfarbe) */
  background-color: var(--primary);
  transform: translateY(-2px);
}

/* Pflichtfeld-Hinweis */
.form-hint {
  font-size: 14px;
  /* KORREKTUR: #fff ersetzt durch Variable */
  color: var(--text-main);
  margin-top: 10px;
  margin-bottom: -7px;
  text-align: right;
  font-style: italic;
}

/* Fehler / Erfolg Nachricht */
.contact-form .form-message {
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
}

.contact-form .form-message.success {
  background-color: rgba(0, 128, 0, 0.7);
  color: #fff;
}

.contact-form .form-message.error {
  background-color: rgba(255, 0, 0, 0.7);
  color: #fff;
}

/* Responsiv für Tablets */
@media (max-width: 992px) {
  .contact-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-image {
    order: 2;
  }
}

/* Responsiv für mobile Geräte */
@media (max-width: 768px) {
  .contact-section {
    margin: 30px 15px;
    padding: 25px 20px;
    grid-template-columns: 1fr;
  }
  
    .contact-section h2 {
    font-size: 24px;
  }
  
  .contact-message-section {
    margin: 30px 15px;
    padding: 40px 25px;
  }
  
  .contact-message-section h1 {
    font-size: 36px;
  }
  
  .contact-message-section h2 {
    font-size: 22px;
  }
  
  .contact-image img {
    max-height: 300px;
    object-fit: cover;
  }
}

/* Responsiv für kleine Displays */
@media (max-width: 375px) {
  .contact-section {
    margin: 20px 10px;
    padding: 20px 15px;
  }
  
  .contact-section h2 {
    font-size: 18px;
  }

  .contact-message-section {
    margin: 20px 10px;
    padding: 30px 20px;
  }
  
  .contact-message-section h1 {
    font-size: 28px;
  }
  
  .contact-message-section h2 {
    font-size: 18px;
  }
  
  .contact-message-section p {
    font-size: 16px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 14px;
    padding: 10px 12px;
  }

  .contact-form button {
    font-size: 16px;
    padding: 12px;
  }

  .checkbox-label {
    font-size: 13px;
  }
}