/* Contact page (ct-) and legal pages (lg-). Loads after site.css, home.css and blog.css. Flex only. */

/* ---------- Shared hero (extends .bl-hero) ---------- */
.ct-hero .bl-hero__lead, .lg-hero .bl-hero__lead { max-width: 42rem; }
.lg-hero__meta { margin: 18px 0 0; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--text-leise); }

/* ---------- Contact ---------- */
.ct-main { padding-block: 56px 88px; }
.ct-row { display: flex; align-items: flex-start; gap: 32px; }
.ct-form-col { flex: 1 1 0; min-width: 0; }
.ct-aside { flex: 0 0 360px; min-width: 0; }

.ct-card {
  padding: 36px 40px; background: #fff; border: 1px solid var(--hm-line); border-radius: 18px;
  box-shadow: 0 30px 60px -40px rgba(13, 36, 55, .45);
}
.ct-card__title { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: var(--navy); }
.ct-card__note { display: flex; align-items: center; margin: 10px 0 28px; font-size: .9375rem; color: var(--text-leise); }
.ct-card__note::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 4px rgba(34, 160, 107, .15); }

/* form fields: static form (.ct-form) and WPForms (.wpforms-*) share one look */
.ct-form, .ct-card .wpforms-field-container { display: flex; flex-wrap: wrap; column-gap: 16px; }
.ct-field, .ct-card .wpforms-field { flex: 1 1 100%; min-width: 0; margin: 0; padding: 0 0 18px; }
.ct-field--half, .ct-card .wpforms-field.iot-half { flex-basis: calc(50% - 8px); }
.ct-field label, .ct-card .wpforms-field-label {
  display: block; margin: 0 0 7px; font-size: .875rem; font-weight: 600; line-height: 1.3; color: var(--navy);
}
.ct-field label span, .ct-card .wpforms-required-label { color: var(--wasser); }
.ct-field input, .ct-field select, .ct-field textarea,
.ct-card .wpforms-field input[type=text], .ct-card .wpforms-field input[type=email], .ct-card .wpforms-field input[type=tel],
.ct-card .wpforms-field select, .ct-card .wpforms-field textarea {
  display: block; width: 100%; max-width: none; height: auto; margin: 0; padding: 13px 15px;
  font: inherit; font-size: 1rem; line-height: 1.4; color: var(--navy);
  background: #f7fafc; border: 1.5px solid var(--hm-line); border-radius: 10px; box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.ct-field textarea, .ct-card .wpforms-field textarea { min-height: 150px; resize: vertical; }
.ct-field select, .ct-card .wpforms-field select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007da9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 18px;
}
.ct-field input:hover, .ct-field select:hover, .ct-field textarea:hover,
.ct-card .wpforms-field input:hover, .ct-card .wpforms-field select:hover, .ct-card .wpforms-field textarea:hover { border-color: var(--hm-line-strong); }
.ct-field input:focus, .ct-field select:focus, .ct-field textarea:focus,
.ct-card .wpforms-field input:focus, .ct-card .wpforms-field select:focus, .ct-card .wpforms-field textarea:focus {
  outline: none; background-color: #fff; border-color: var(--wasser); box-shadow: 0 0 0 4px rgba(0, 125, 169, .14);
}
.ct-card .wpforms-field input.wpforms-error, .ct-card .wpforms-field textarea.wpforms-error, .ct-card .wpforms-field select.wpforms-error { border-color: #d64545; }
.ct-card label.wpforms-error, .ct-card em.wpforms-error { display: block; margin-top: 6px; font-size: .8125rem; font-style: normal; color: #c03a3a; }

.ct-privacy { flex: 1 1 100%; margin: 4px 0 22px; font-size: .8125rem; line-height: 1.55; color: var(--text-leise); }
.ct-privacy a { color: var(--wasser); }
.ct-submit, .ct-card .wpforms-submit-container { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; }
.ct-card button.wpforms-submit {
  display: inline-flex; align-items: center; justify-content: center; height: auto; padding: 14px 28px;
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; color: #fff;
  background: var(--wasser); border: 0; border-radius: 999px; cursor: pointer; transition: background-color .2s ease;
}
.ct-card button.wpforms-submit:hover, .ct-card button.wpforms-submit:focus { background: var(--wasser-dunkel); }
.ct-card .wpforms-submit-spinner { margin-left: 12px; }
.ct-card .wpforms-confirmation-container-full {
  margin: 0; padding: 22px 24px; color: var(--navy); background: #eef8f3; border: 1px solid #b9e2cc; border-radius: 12px;
}
.ct-card .wpforms-confirmation-container-full p { margin: 0; }
.ct-card .wpforms-container { margin: 0; }
.ct-card .wpforms-hidden, .ct-card .wpforms-field-hidden { display: none !important; }
.ct-card .wpforms-screen-reader-element {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.ct-card .wpforms-submit-spinner { width: 24px; height: 24px; }

/* desktop: the form card is as tall as the contact column next to it, the message box grows into the extra space */
@media (min-width: 1001px) {
  .ct-row { align-items: stretch; }
  .ct-form-col { display: flex; flex-direction: column; }
  .ct-card { flex: 1 1 auto; display: flex; flex-direction: column; }
  .ct-form, .ct-card .wpforms-container, .ct-card .wpforms-form { flex: 1 1 auto; display: flex; flex-direction: column; }
  .ct-form, .ct-card .wpforms-field-container {
    flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto 1fr; column-gap: 16px;
  }
  .ct-form > *, .ct-card .wpforms-field-container > * { grid-column: 1 / -1; }
  .ct-form > .ct-field--half, .ct-card .wpforms-field-container > .iot-half { grid-column: auto; }
  .ct-field:has(textarea), .ct-card .wpforms-field-textarea { display: flex; flex-direction: column; }
  .ct-field textarea, .ct-card .wpforms-field-textarea textarea { flex: 1 1 auto; }
  .ct-card .wpforms-submit-container { flex: 0 0 auto; }
}

/* aside */
.ct-direct { padding: 30px 30px 26px; color: #fff; background: var(--navy); border-radius: 18px; }
.ct-direct .hm-eyebrow { margin-bottom: 8px; }
.ct-direct__title { margin: 0 0 20px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.ct-link {
  display: flex; align-items: center; margin: 0 0 10px; padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  color: #fff; text-decoration: none; transition: background-color .2s ease, border-color .2s ease;
}
.ct-link:hover { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); }
.ct-link__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 14px; border-radius: 50%; background: var(--wasser); }
.ct-link__icon svg { width: 18px; height: 18px; }
.ct-link__text { display: flex; flex-direction: column; min-width: 0; }
.ct-link__label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hm-on-dark); }
.ct-link__value { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }

.ct-offices { margin-top: 18px; }
.ct-office { display: flex; margin: 0 0 12px; padding: 20px 22px; background: #fff; border: 1px solid var(--hm-line); border-radius: 14px; }
.ct-office__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-right: 14px; border-radius: 50%; background: var(--blau-flaeche); color: var(--wasser); }
.ct-office__icon svg { width: 18px; height: 18px; }
.ct-office h3 { margin: 0 0 4px; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wasser); }
.ct-office p { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--navy); }

.ct-next { margin-top: 18px; padding: 24px 24px 8px; background: var(--hm-strip); border-radius: 14px; }
.ct-next h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.ct-next ol { margin: 0; padding: 0; list-style: none; }
.ct-next li { display: flex; padding: 0 0 16px; font-size: .9375rem; line-height: 1.5; color: var(--text); }
.ct-next__num { flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 12px; border-radius: 50%; background: var(--wasser); color: #fff; font-size: .8125rem; font-weight: 700; }

/* ---------- Contact: FAQ (questions are <details> elements, as written by the WordPress Details block) ---------- */
.ct-faq { padding-block: 80px 96px; background: var(--hm-strip); }
.ct-faq__head { max-width: 46rem; margin-bottom: 36px; }
.ct-faq__head .bl-hero__lead { margin-top: 12px; }
.ct-faq__row { display: flex; align-items: flex-start; gap: 32px; }
.ct-faq__list { flex: 1 1 0; min-width: 0; }
.ct-faq__list details {
  margin: 0 0 12px; background: #fff; border: 1px solid var(--hm-line); border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ct-faq__list details:hover { border-color: var(--hm-line-strong); }
.ct-faq__list details[open] { border-color: var(--hm-line-strong); box-shadow: 0 24px 48px -36px rgba(13, 36, 55, .45); }
.ct-faq__list summary {
  position: relative; display: flex; align-items: center; min-height: 64px; padding: 18px 64px 18px 24px;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: var(--navy); cursor: pointer; list-style: none;
  border-radius: 14px; transition: color .2s ease;
}
.ct-faq__list summary::-webkit-details-marker { display: none; }
.ct-faq__list summary:hover { color: var(--wasser); }
.ct-faq__list summary:focus-visible { outline: 2px solid var(--wasser); outline-offset: 2px; }
.ct-faq__list summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: var(--blau-flaeche) no-repeat center / 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007da9' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform .25s ease, background-color .2s ease;
}
.ct-faq__list details[open] > summary { color: var(--navy); }
.ct-faq__list details[open] > summary::after {
  transform: rotate(180deg); background-color: var(--wasser);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}
.ct-faq__list details > :not(summary) { max-width: 64rem; margin: 0; padding: 0 24px 0; font-size: 1rem; line-height: 1.7; color: #33495b; }
.ct-faq__list details > :not(summary) + :not(summary) { padding-top: 12px; }
.ct-faq__list details > :last-child:not(summary) { padding-bottom: 22px; }
.ct-faq__list details[open] > :not(summary) { animation: ct-faq-in .28s ease both; }
@keyframes ct-faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ct-faq__list a { color: var(--wasser); }

@media (prefers-reduced-motion: reduce) {
  .ct-faq__list details[open] > :not(summary) { animation: none; }
  .ct-faq__list summary::after { transition: none; }
}

/* ---------- Legal pages ---------- */
.lg-main { padding-block: 56px 88px; }
.lg-row { display: flex; align-items: flex-start; gap: 56px; }
.lg-toc { position: sticky; top: 100px; flex: 0 0 250px; }
.lg-toc__inner { padding: 22px 22px 14px; background: var(--hm-strip); border-radius: 14px; }
.lg-toc__title { margin: 0 0 12px; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wasser); }
.lg-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.lg-toc li { counter-increment: toc; margin: 0 0 8px; }
.lg-toc a { display: flex; font-size: .875rem; line-height: 1.4; color: var(--text); text-decoration: none; }
.lg-toc a::before { content: counter(toc, decimal-leading-zero); flex: none; width: 28px; font-weight: 600; color: var(--wasser); }
.lg-toc a:hover, .lg-toc a.is-active { color: var(--wasser); }
.lg-content { flex: 1 1 0; min-width: 0; }

.lg-body { max-width: 48rem; font-size: 1rem; line-height: 1.75; color: #33495b; counter-reset: lg; }
.lg-body > :first-child { margin-top: 0; }
.lg-body h2 {
  display: flex; align-items: baseline; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--hm-line);
  font-size: 1.375rem; font-weight: 700; line-height: 1.3; color: var(--navy); scroll-margin-top: 100px;
}
.lg-body > h2:first-child { padding-top: 0; border-top: 0; }
.lg-body--numbered h2 { counter-increment: lg; }
.lg-body--numbered h2::before { content: counter(lg, decimal-leading-zero); flex: none; width: 44px; font-size: 1rem; color: var(--wasser); }
.lg-body h3 { margin: 26px 0 8px; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; color: var(--navy); }
.lg-body p { margin: 0 0 14px; }
.lg-body a { color: var(--wasser); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.lg-body strong { color: var(--navy); }
.lg-body ul { margin: 0 0 16px; padding: 0; list-style: none; }
.lg-body ul li { position: relative; padding: 0 0 6px 22px; }
.lg-body ul li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--wasser); }

/* label/value list (company data, addresses) */
.lg-body ul.lg-facts { margin: 0 0 20px; padding: 6px 22px; background: #fff; border: 1px solid var(--hm-line); border-radius: 14px; }
.lg-body ul.lg-facts li { display: flex; padding: 11px 0; border-bottom: 1px solid var(--hm-line); }
.lg-body ul.lg-facts li:last-child { border-bottom: 0; }
.lg-body ul.lg-facts li::before { display: none; }
.lg-body ul.lg-facts strong { flex: 0 0 13.5rem; padding-right: 16px; font-weight: 600; }

/* downloadable document (terms & conditions) */
.lg-doc {
  display: flex; align-items: center; gap: 18px; margin: 8px 0 20px; padding: 22px 24px;
  background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; box-shadow: 0 24px 48px -36px rgba(13, 36, 55, .45);
}
.lg-doc__icon {
  position: relative; flex: none; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 64px; border-radius: 12px; background: var(--blau-flaeche); color: var(--wasser);
}
.lg-doc__icon svg { width: 30px; height: 30px; }
.lg-doc__icon span {
  position: absolute; bottom: -6px; right: -8px; padding: 2px 6px; border-radius: 6px;
  background: #d64545; color: #fff; font-size: .625rem; font-weight: 700; letter-spacing: .06em;
}
.lg-doc__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.lg-doc__text strong { font-size: 1.0625rem; line-height: 1.35; color: var(--navy); }
.lg-doc__text span { margin-top: 3px; font-size: .875rem; color: var(--text-leise); }
.lg-doc__actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.lg-body .lg-doc a.hm-btn { text-decoration: none; }
.lg-body .lg-doc a.hm-btn--fill { color: #fff; }
.lg-body .lg-doc a.hm-btn--line { color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .ct-row { flex-wrap: wrap; }
  .ct-form-col, .ct-aside { flex: 1 1 100%; }
  .ct-aside__inner { display: flex; flex-wrap: wrap; gap: 16px; }
  .ct-aside__inner > * { flex: 1 1 300px; min-width: 0; }
  .ct-offices, .ct-next { margin-top: 0; }
  .lg-row { flex-wrap: wrap; }
  .lg-row { gap: 32px; }
  .lg-toc { position: static; flex: 1 1 100%; }
  .lg-content { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .ct-main, .lg-main { padding-block: 36px 64px; }
  .ct-faq { padding-block: 56px 64px; }
  .ct-faq__list summary { min-height: 58px; padding: 16px 58px 16px 18px; font-size: 1rem; }
  .ct-faq__list summary::after { right: 16px; }
  .ct-faq__list details > :not(summary) { padding-left: 18px; padding-right: 18px; }
  .ct-card { padding: 26px 20px; border-radius: 16px; }
  .ct-field--half, .ct-card .wpforms-field.iot-half { flex-basis: 100%; }
  .ct-direct { padding: 24px 20px 18px; }
  .lg-body h2 { margin-top: 36px; padding-top: 22px; font-size: 1.25rem; }
  .lg-body--numbered h2::before { width: 36px; }
  .lg-body ul.lg-facts { padding: 4px 16px; }
  .lg-body ul.lg-facts li { flex-direction: column; }
  .lg-body ul.lg-facts strong { flex: none; padding: 0 0 2px; }
  .lg-doc { flex-wrap: wrap; padding: 20px; }
  .lg-doc__text { flex-basis: calc(100% - 74px); }
  .lg-doc__actions { width: 100%; }
}
