/* ==========================================================================
   MTX Motorsport – Unterseiten (Software-Artikel, Kontakt, Rechtliches)
   Baut auf ui.css auf (Farben --h-*, .h-btn, .h-card, .h-eyebrow …).
   ========================================================================== */

/* ---------- Seitenkopf (Hero der Unterseiten) ---------- */
.p-hero,
.mtx-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 440px;
  margin-top: calc(var(--header-height) * -1);
  padding: calc(var(--header-height) + 72px) 0 88px;
  overflow: hidden;
  background: radial-gradient(circle at 85% 0%, rgba(204, 0, 0, 0.22), transparent 55%), #000;
}
.p-hero--compact { min-height: 0; padding: calc(var(--header-height) + 56px) 0 56px; }
.p-hero__img,
.mtx-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.p-hero__overlay,
.mtx-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.3) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, var(--h-bg) 100%);
}
.p-hero__content,
.mtx-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.p-hero__content > *,
.mtx-hero__content > * { max-width: 680px; }
.p-hero__title,
.mtx-hero__title {
  margin: 0 0 18px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: none;
  color: #fff;
}
.p-hero__title em { font-style: italic; color: var(--h-red); }
.p-hero__text,
.mtx-hero__text {
  margin: 0 0 32px;
  font-size: 1.12rem;
  line-height: 1.65;
  color: #d4d4d8;
}
.p-hero--compact .p-hero__text { margin-bottom: 0; }

/* Alte Hero-Klassen der Artikelseiten auf das neue Design abbilden */
.mtx-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-red);
}
.mtx-hero__label::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.mtx-hero__btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--h-red);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.mtx-hero__btn:hover { background: var(--h-red-hover); color: #fff; transform: translateY(-1px); }

.p-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--h-subtle);
}
.p-breadcrumb a { color: var(--h-muted); text-decoration: none; }
.p-breadcrumb a:hover { color: #fff; }
.p-breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #3f3f46; }

/* ---------- Artikel-Layout (Software, AGR, AdBlue) ---------- */
.mtx-page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; }
.mtx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.mtx-article { min-width: 0; padding: 24px 0 0; }
.mtx-article__section { padding: 36px 0; border-bottom: 1px solid var(--h-border); }
.mtx-article__section:first-child,
.p-facts + .mtx-article__section,
.p-notice + .mtx-article__section { padding-top: 0; }
.mtx-article__section:last-child { border-bottom: none; }
.mtx-article__section h2,
.mtx-img-text__content h2 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 18px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}
.mtx-article__section h2::before,
.mtx-img-text__content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 4px;
  background: var(--h-red);
}
.mtx-article__section p,
.mtx-img-text__content p {
  margin: 0 0 16px;
  font-size: 1.06rem;
  line-height: 1.85;
  color: #c4c4cc;
}
.mtx-article__section p:last-child { margin-bottom: 0; }
.mtx-article__section strong { color: #fff; }
.mtx-article__section ul {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
  padding: 0;
  list-style: none;
}
.mtx-article__section ul li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 48px;
  border-radius: var(--h-radius-sm);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  font-size: 1rem;
  line-height: 1.6;
  color: #d4d4d8;
}
.mtx-article__section ul li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--h-red-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23cc0000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.mtx-img-text { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.mtx-img-text img,
.mtx-full-img img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--h-border);
}
.mtx-full-img { margin: 28px 0 0; }
.mtx-full-img img { max-height: 460px; object-fit: cover; }
.mtx-img-text__caption,
.mtx-full-img__caption {
  margin: 10px 0 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  color: var(--h-subtle) !important;
  text-align: center;
}

/* "Auf einen Blick"-Fakten am Artikelanfang */
.p-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 36px;
}
.p-fact {
  padding: 16px 18px;
  border-radius: var(--h-radius-sm);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
}
.p-fact__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--h-subtle);
}
.p-fact__value { display: block; font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: #fff; }

/* Vergleichstabelle im Artikel */
.p-tabelle-wrap { margin: 8px 0 16px; overflow-x: auto; border-radius: var(--h-radius-sm); border: 1px solid var(--h-border); }
.p-tabelle { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.p-tabelle th, .p-tabelle td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--h-border); line-height: 1.5; }
.p-tabelle thead th { background: var(--h-surface-2); color: #fff; font-weight: 800; }
.p-tabelle tbody th { width: 28%; color: var(--h-muted); font-weight: 600; background: var(--h-surface); }
.p-tabelle td { color: #d4d4d8; background: var(--h-surface); }
.p-tabelle tr:last-child th, .p-tabelle tr:last-child td { border-bottom: none; }
.p-tabelle .is-plus { color: var(--h-green); font-weight: 700; }
.p-tabelle .is-minus { color: #ff6b6b; font-weight: 700; }

/* Hinweisboxen im Artikel */
.mtx-article .p-notice { margin: 0 0 36px; }
.p-notice--warn { background: rgba(234, 179, 8, 0.08); border-color: rgba(234, 179, 8, 0.45); }
.p-notice--warn svg { color: #facc15; }

/* Seitenleiste */
.mtx-sidebar__box {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--h-radius);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
}
.mtx-sidebar__title {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-muted);
}
.mtx-sidebar__nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.mtx-sidebar__nav + .mtx-sidebar__title { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--h-border); }
.mtx-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--h-radius-sm);
  border: 1px solid transparent;
  color: #c4c4cc;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.mtx-sidebar__link:hover { background: var(--h-surface-2); color: #fff; }
.mtx-sidebar__link.active { background: var(--h-red-soft); border-color: rgba(204, 0, 0, 0.45); color: #fff; }
.mtx-sidebar__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--h-surface-2);
  color: var(--h-red);
}
.mtx-sidebar__link-icon svg { width: 18px; height: 18px; }
.mtx-sidebar__link.active .mtx-sidebar__link-icon { background: var(--h-red); color: #fff; }
.mtx-sidebar__sep { display: none; }
.mtx-sidebar__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  background: var(--h-red);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.mtx-sidebar__cta:hover { background: var(--h-red-hover); color: #fff; }

/* ---------- Formularfelder (Kontakt + Konfigurator) ---------- */
.p-field { display: flex; flex-direction: column; gap: 8px; }
.p-field label,
.p-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--h-muted);
}
.p-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--h-border-strong);
  border-radius: var(--h-radius-sm);
  background: var(--h-surface-2);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.p-input { min-height: 130px; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.p-input::placeholder { color: #52525b; }
.p-input:hover { border-color: rgba(255, 255, 255, 0.3); }
.p-input:focus { outline: none; border-color: var(--h-red); box-shadow: 0 0 0 3px var(--h-red-soft); }
.p-form { display: grid; gap: 20px; }
.p-optional { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--h-subtle); }
.p-hint { margin: -8px 0 0; font-size: 0.85rem; color: var(--h-subtle); }
.p-input[type="date"] { color-scheme: dark; }
#kontakt-termin { display: grid; gap: 20px; }
#kontakt-termin[hidden] { display: none; }
.p-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.p-phone { display: flex; gap: 10px; }
.p-phone .h-select { width: 120px; flex-shrink: 0; }
.p-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.p-choice label { cursor: pointer; }
.p-choice input { position: absolute; opacity: 0; pointer-events: none; }
.p-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--h-border-strong);
  color: #d4d4d8;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.2s;
}
.p-choice span:hover { border-color: rgba(255, 255, 255, 0.35); }
.p-choice input:checked + span { background: var(--h-red-soft); border-color: var(--h-red); color: #fff; }
.p-choice input:focus-visible + span { outline: 3px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }
.p-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--h-muted);
}
.p-consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--h-red); }
.p-consent a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Erfolgsanzeige nach dem Absenden (Kontakt + Konfigurator) ---------- */
.k-success { padding: 24px 8px; text-align: center; }
.k-success:focus { outline: none; }
.k-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--h-green-soft);
  color: var(--h-green);
}
.k-success__icon svg { width: 36px; height: 36px; }
.k-success p { margin: 0 0 28px; font-size: 1.05rem; line-height: 1.7; color: var(--h-muted); }
.p-form .p-notice { margin: 0; }

/* ---------- Kontaktseite ---------- */
.p-contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.p-contact__list { display: grid; gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.p-contact__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--h-radius);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s;
}
a.p-contact__item:hover { border-color: rgba(204, 0, 0, 0.6); color: inherit; }
.p-contact__label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--h-subtle); }
.p-contact__sub { display: block; margin-top: 2px; font-size: 0.85rem; color: var(--h-muted); }
.p-contact__value { display: block; margin-top: 2px; font-size: 1.02rem; font-weight: 600; line-height: 1.5; color: #fff; }
.p-notice {
  display: flex;
  gap: 14px;
  padding: 20px;
  border-radius: var(--h-radius);
  background: var(--h-red-soft);
  border: 1px solid rgba(204, 0, 0, 0.4);
}
.p-notice svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--h-red); }
.p-notice p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #e4e4e7; }
.p-notice strong { color: #fff; }
.p-notice a { color: #fff; font-weight: 700; }
.p-form-card {
  padding: 36px;
  border-radius: var(--h-radius);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
  box-shadow: var(--h-shadow);
}
.p-form-card__title { margin: 0 0 6px; font-family: 'Inter', sans-serif; font-size: 1.4rem; font-weight: 800; color: #fff; }
.p-form-card__sub { margin: 0 0 28px; font-size: 0.95rem; color: var(--h-muted); }

/* ---------- Partnerwerkstätten ---------- */
.p-standorte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.p-standort {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-radius: var(--h-radius);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
}
.p-standort h3 { margin: 0 0 2px; font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 800; color: #fff; }
.p-standort p { margin: 0; font-size: 0.88rem; color: var(--h-muted); }
.p-contact__sub a { color: #fff; text-decoration: underline; text-decoration-color: var(--h-red); text-underline-offset: 3px; }
@media (max-width: 1024px) { .p-standorte { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .p-standorte { grid-template-columns: 1fr; } }

/* ---------- Rechtliches ---------- */
.mtx-legal {
  max-width: 880px;
  margin: 0 auto 96px;
  padding: 44px 48px;
  border-radius: var(--h-radius);
  background: var(--h-surface);
  border: 1px solid var(--h-border);
}
.mtx-legal h1 { display: none; }
.mtx-legal h2 {
  margin: 36px 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}
.mtx-legal h3 { margin: 24px 0 10px; font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700; color: #fff; }
.mtx-legal p,
.mtx-legal li { font-size: 1rem; line-height: 1.85; color: #c4c4cc; }
.mtx-legal p { margin: 0 0 14px; }
.mtx-legal strong { color: #fff; }
.mtx-legal ul { padding-left: 22px; }
.mtx-legal li::marker { color: var(--h-red); }
.mtx-legal a { color: #fff; text-decoration: underline; text-decoration-color: var(--h-red); text-underline-offset: 3px; }
.mtx-legal a:hover { color: var(--h-red); }
.mtx-legal hr { margin: 32px 0; border: none; border-top: 1px solid var(--h-border); }
.mtx-legal__notice {
  margin-bottom: 32px;
  padding: 16px 20px;
  border-radius: var(--h-radius-sm);
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #facc15;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .mtx-layout { grid-template-columns: 1fr; gap: 24px; }
  .p-facts { grid-template-columns: repeat(2, 1fr); }
  .mtx-sidebar__box { position: static; margin-top: 0; }
  .p-contact { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 749px) {
  .mtx-hero, .p-hero { min-height: 0; padding: calc(var(--header-height) + 48px) 0 56px; }
  .mtx-hero__overlay, .p-hero__overlay { background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.8) 60%, var(--h-bg) 100%); }
  .mtx-hero__content, .p-hero__content { padding: 0 16px; }
  .mtx-hero__btn { width: 100%; justify-content: center; }
  .mtx-page-wrap { padding: 0 16px 64px; }
  .mtx-img-text { grid-template-columns: 1fr; gap: 24px; }
  .p-form__row { grid-template-columns: 1fr; }
  .p-form-card { padding: 24px 20px; }
  .mtx-legal { margin: 0 16px 64px; padding: 28px 20px; }
}
