/* =========================================================
   KONTAKT – LANDING PAGE
   Mobile First, isoliert & stabil
========================================================= */

/* -------------------------
   HERO
------------------------- */

.contact-hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-lg);
}

.contact-hero .lead {
  max-width: 60ch;
}

.contact-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

@media (min-width: 640px) {
  .contact-hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

/* -------------------------
   KONTAKTOPTIONEN
------------------------- */

.contact-options .card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-options .card p {
  flex-grow: 1;
  color: var(--muted);
}

.contact-options .button {
  align-self: flex-start;
}

/* -------------------------
   VERTRAUEN / STATS
------------------------- */

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat strong {
  font-size: 1rem;
}

.stat p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* -------------------------
   FORMULAR-BEREICH
------------------------- */

.contact-grid {
  display: grid;
  gap: var(--space-lg);
}

.contact-grid ol {
  padding-left: 1.2rem;
  margin-bottom: var(--space-sm);
}

.contact-grid ol li {
  margin-bottom: 0.4rem;
}

/* Formular-Container */
.contact-form {
  background: var(--surface);
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);

  width: 100%;
  max-width: 100%;
}

/* Datenschutz Link */
.contact-form .field--checkbox a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form .field--checkbox a:hover {
  text-decoration-thickness: 2px;
}

/* =========================================================
   KONTAKTFORMULAR – INPUT STYLING
   Dark & Light Mode
========================================================= */

/* Basis für alle Felder */
.contact-form input,
.contact-form textarea,
.contact-form select {
  appearance: none;
  font: inherit;

  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);

  background: var(--surface);
  color: var(--text);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

/* Hover */
.contact-form input:hover,
.contact-form textarea:hover,
.contact-form select:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

/* Focus (wichtig!) */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
  background: var(--surface);
}

/* Placeholder */
.contact-form ::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* Textarea Resize dezenter */
.contact-form textarea {
  resize: vertical;
}

/* -------------------------
   SELECT – Custom Pfeil
------------------------- */

.contact-form select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;

  padding-right: 42px;
}

//* =========================================================
   CHECKBOX – FINAL, GROß & SAUBER
========================================================= */

.contact-form .field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 100%;
}

/* Checkbox Box */
.contact-form .field--checkbox input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;

  border-radius: 7px;
  border: 2px solid var(--border);
  background: var(--surface);

  cursor: pointer;
  position: relative;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover */
.contact-form .field--checkbox input[type="checkbox"]:hover {
  border-color: var(--brand);
}

/* Checked State */
.contact-form .field--checkbox input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}

/* GROßER HAKEN */
.contact-form .field--checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

/* Focus (Accessibility) */
.contact-form .field--checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);
}

/* Label */
.contact-form .field--checkbox label {
  line-height: 1.45;
  font-weight: 500;
  cursor: pointer;
}

/* -------------------------
   ERROR STATE (optional)
------------------------- */

.contact-form .field.is-error input,
.contact-form .field.is-error textarea,
.contact-form .field.is-error select {
  border-color: #d45b5b;
}

.contact-form .field.is-error input:focus,
.contact-form .field.is-error textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, #d45b5b 30%, transparent);
}

/* -------------------------
   FORMULAR – RESET & BASIS
------------------------- */

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Normale Felder */
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Inputs */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* Hint */
.contact-form .hint {
  font-size: 0.85rem;
  color: var(--muted);
}

/* -------------------------
   CHECKBOX – FINAL & STABIL
------------------------- */

.contact-form .field--checkbox {
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;

  width: 100%;
  max-width: 100%;
}

/* Checkbox selbst */
.contact-form .field--checkbox input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
  width: unset !important;
}

/* Checkbox-Text */
.contact-form .field--checkbox label {
  display: block;
  width: 100%;
  max-width: 100%;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  line-height: 1.45;
  font-weight: 500;
}

/* -------------------------
   SUBMIT BUTTON
------------------------- */

.contact-form .button {
  width: 100%;
  margin-top: var(--space-xs);
}

@media (min-width: 640px) {
  .contact-form .button {
    width: auto;
    align-self: flex-start;
  }
}

/* -------------------------
   FAQ
------------------------- */

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] {
  box-shadow: var(--shadow);
}

details p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

/* -------------------------
   CTA-BAND
------------------------- */

.cta-band {
  margin-top: var(--space-lg);
}

.cta-band h2,
.cta-band p {
  margin: 0;
}

.cta-band p {
  opacity: 0.9;
}

/* -------------------------
   RESPONSIVE
------------------------- */

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .contact-hero {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .contact-form {
    padding: var(--space-lg);
  }
}
