/* =========================================================
   MD TRADE – Home Modern Layer
   Wird NUR auf home.php geladen -> automatisch auf die
   Startseite beschraenkt. Verbessert Hero, Lesbarkeit und
   bindet das Hero-Kontaktformular + Livechat ein.
   ========================================================= */

:root {
  --hm-accent: #ff4a26;
  --hm-accent-2: #ff7a45;
  --hm-ink: #0d1a1c;
  --hm-muted: #55636b;
  --hm-line: #e7ecee;
  --hm-soft: #f5f8f9;
  --hm-radius: 18px;
  --hm-shadow: 0 24px 60px rgba(6, 20, 24, 0.18);
  --hm-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Globale Lesbarkeit (nur Home) ---------- */
body {
  font-family: var(--hm-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.block-feature-fourteen p,
.block-feature-fourteen li {
  font-size: 1.06rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
}
.block-feature-fourteen h3,
.block-feature-fourteen h4 {
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.block-feature-fourteen h4 {
  margin-top: 2.2rem;
  margin-bottom: 0.6rem;
  color: #fff;
}
.block-feature-fourteen ul li {
  margin-bottom: 0.5rem;
}
.block-feature-fourteen .border-container {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--hm-accent);
  border-radius: 14px;
  padding: 26px 30px;
  background: rgba(255, 255, 255, 0.04);
  margin: 34px 0;
}

/* Info-Karten etwas moderner */
.card-style-eight {
  border-radius: 16px;
  padding: 26px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  height: 100%;
}
.card-style-eight:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 74, 38, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.card-style-eight h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}
.card-style-eight p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  margin: 0;
}
.card-style-eight i {
  color: var(--hm-accent) !important;
}

.card-style-eleven {
  border-radius: 16px;
  padding: 28px 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 20, 24, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.card-style-eleven:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(6, 20, 24, 0.14);
}
/* Weisse Karten: Text dunkel, damit lesbar (nicht weiss auf weiss) */
.card-style-eleven p {
  color: #46545b;
}
.card-style-eleven p.fw-500,
.card-style-eleven p.fs-24 {
  color: var(--hm-ink);
}

/* Accordion (FAQ) lesbarer */
.accordion-style-three .accordion-button {
  font-weight: 600;
  border-radius: 12px !important;
}
.accordion-style-three .accordion-body p {
  line-height: 1.8;
}

/* ---------- HERO ---------- */
.hm-hero {
  position: relative;
  padding: 170px 0 120px;
  overflow: hidden;
}
@media (max-width: 991px) {
  .hm-hero { padding: 130px 0 70px; }
}

.hm-hero-inner { position: relative; z-index: 2; }

.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 74, 38, 0.16);
  border: 1px solid rgba(255, 74, 38, 0.45);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hm-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hm-accent);
  box-shadow: 0 0 0 0 rgba(255, 74, 38, 0.7);
  animation: hm-pulse 2s infinite;
}
@keyframes hm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 74, 38, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 74, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 74, 38, 0); }
}

.hm-hero-title {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  margin: 0 0 22px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.hm-hero-title .hl {
  position: relative;
  color: transparent;
  background: linear-gradient(100deg, var(--hm-accent), var(--hm-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.hm-hero-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.18rem;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 0 34px;
}

.hm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin-bottom: 30px;
}
.hm-stat b {
  display: block;
  color: #fff;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}
.hm-stat span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.hm-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hm-trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
}
.hm-trust i { color: var(--hm-accent); }

/* ---------- Hero Formular-Karte ---------- */
.hm-form-card {
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
  padding: 30px 30px 26px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
@media (max-width: 991px) {
  .hm-form-card { margin-top: 44px; }
}

.hm-form-head { margin-bottom: 18px; }
.hm-form-head h2 {
  color: var(--hm-ink);
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.hm-form-head p {
  color: var(--hm-muted);
  font-size: 0.96rem;
  margin: 0;
  line-height: 1.55;
}

.hm-field { margin-bottom: 14px; }
.hm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .hm-row { grid-template-columns: 1fr; gap: 0; } }

.hm-field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--hm-ink);
  margin-bottom: 6px;
}
.hm-field label .req { color: var(--hm-accent); }

.hm-field input,
.hm-field textarea {
  width: 100%;
  border: 1.5px solid var(--hm-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--hm-ink);
  background: #fbfcfc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 46px;
}
.hm-field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.hm-field input::placeholder,
.hm-field textarea::placeholder { color: #9aa6ab; }
.hm-field input:focus,
.hm-field textarea:focus {
  outline: none;
  border-color: var(--hm-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 74, 38, 0.12);
}
.hm-field.hm-invalid input,
.hm-field.hm-invalid textarea { border-color: #e23b2a; box-shadow: 0 0 0 4px rgba(226, 59, 42, 0.1); }

.hm-hint {
  font-size: 0.78rem;
  color: var(--hm-muted);
  margin-top: 5px;
}
.hm-hint.hm-important {
  color: #b23214;
  background: #fff3ef;
  border: 1px solid #ffd8cc;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.hm-counter { float: right; font-variant-numeric: tabular-nums; }
.hm-counter.over { color: #e23b2a; font-weight: 700; }

/* Upload */
.hm-upload {
  position: relative;
  border: 1.6px dashed #c8d2d6;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: #fbfcfc;
}
.hm-upload:hover, .hm-upload.hm-drag {
  border-color: var(--hm-accent);
  background: #fff6f3;
}
.hm-upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.hm-upload .hm-up-ic { font-size: 1.4rem; color: var(--hm-accent); }
.hm-upload .hm-up-txt { font-size: 0.9rem; color: var(--hm-muted); margin-top: 4px; }
.hm-upload .hm-up-txt b { color: var(--hm-ink); }
.hm-file-list { list-style: none; padding: 0; margin: 10px 0 0; }
.hm-file-list li {
  font-size: 0.82rem; color: var(--hm-ink);
  background: #eef3f4; border-radius: 8px;
  padding: 5px 10px; margin-top: 6px;
  display: flex; align-items: center; gap: 7px; justify-content: space-between;
}

/* Consent */
.hm-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.82rem; color: var(--hm-muted); line-height: 1.5;
  margin: 6px 0 16px;
}
.hm-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--hm-accent); flex: none; }
.hm-consent a { color: var(--hm-accent); text-decoration: underline; }

/* Submit */
.hm-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px 22px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, var(--hm-accent), var(--hm-accent-2));
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 12px 26px rgba(255, 74, 38, 0.32);
}
.hm-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(255, 74, 38, 0.4); }
.hm-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.hm-submit .spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.45); border-top-color: #fff;
  animation: hm-rot 0.7s linear infinite; display: none;
}
.hm-submit.loading .spin { display: inline-block; }
.hm-submit.loading .label { opacity: 0.85; }
@keyframes hm-rot { to { transform: rotate(360deg); } }

.hm-form-foot {
  text-align: center;
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--hm-muted);
}
.hm-form-foot a { color: var(--hm-ink); font-weight: 600; }

/* Erfolg */
.hm-success {
  display: none;
  text-align: center;
  padding: 20px 6px;
}
.hm-success.show { display: block; }
.hm-success .ic {
  width: 66px; height: 66px; border-radius: 50%;
  background: #e9f9ef; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 16px;
}
.hm-success h3 { color: var(--hm-ink); font-weight: 800; margin-bottom: 8px; }
.hm-success p { color: var(--hm-muted); line-height: 1.6; }
