/* Service detail pages (/dienstleistungen/…/): service list left, content right. Hero from legal.css (.mlg-hero). */
.msd { --msd-primary: #0A1B65; --msd-accent: #FD7E14; --msd-text: #3B4256; --msd-muted: #6B7290; --msd-line: #E8EBF4; --msd-soft: #F4F6FC; background: var(--msd-soft); }
.msd .mlg-hero { padding-bottom: 104px; }
.msd .mlg-hero p { max-width: 760px; }

.msd-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: -64px; padding-bottom: 88px; }

/* Sidebar */
.msd-aside { position: sticky; top: 96px; z-index: 2; display: flex; flex-direction: column; gap: 18px; }
.msd-nav { padding: 18px 12px 12px; border: 1px solid var(--msd-line); border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(10, 27, 101, .08); }
.msd .msd-nav-title { margin: 0 0 6px; padding: 0 10px; color: var(--msd-muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.msd .msd-nav ul + .msd-nav-title { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--msd-line); }
.msd .msd-nav ul { margin: 0; padding: 0; list-style: none; }
.msd .msd-nav li { margin: 0; }
.msd .msd-nav a {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px;
    color: var(--msd-primary); font-size: 14.5px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: background .15s ease, color .15s ease;
}
.msd .msd-nav a > span:not(.msd-nav-icon) { flex: 1; }
.msd .msd-nav a > svg { width: 15px; height: 15px; opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
.msd .msd-nav a:hover { background: var(--msd-soft); color: var(--msd-primary); }
.msd .msd-nav a:hover > svg { opacity: .5; transform: none; }
.msd-nav-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--msd-soft); color: var(--msd-primary); transition: background .15s ease, color .15s ease; }
.msd-nav-icon svg { width: 18px; height: 18px; }
.msd .msd-nav a[aria-current="page"] { background: linear-gradient(90deg, #FFF1E6, #fff); color: var(--msd-primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--msd-accent); }
.msd .msd-nav a[aria-current="page"] .msd-nav-icon { background: var(--msd-accent); color: #fff; }
.msd .msd-nav a[aria-current="page"] > svg { opacity: 1; transform: none; color: var(--msd-accent); }

.msd-contact { position: relative; overflow: hidden; padding: 22px 22px 20px; border-radius: 18px; background: linear-gradient(160deg, #0A1B65, #071450); color: #C3CAE6; }
.msd-contact::after { content: ""; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 126, 20, .35), transparent 70%); pointer-events: none; }
.msd .msd-contact h2 { margin: 0 0 6px; color: #fff; font-family: inherit; font-size: 17px; font-weight: 700; }
.msd .msd-contact p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.msd .msd-contact-link { display: flex; align-items: center; gap: 9px; padding: 6px 0; color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.msd .msd-contact-link:hover { color: #FFB37A; }
.msd-contact-link svg { width: 16px; height: 16px; color: var(--msd-accent); }
.msd .msd-contact-btn {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 11px 16px; border-radius: 999px;
    background: linear-gradient(90deg, var(--msd-accent), #FF5A36); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none;
}
.msd .msd-contact-btn:hover { color: #fff; filter: brightness(1.05); }
.msd-contact-btn svg { width: 16px; height: 16px; }

/* Main column */
.msd-main { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.msd-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.msd-hl { padding: 22px 20px 20px; border: 1px solid var(--msd-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(10, 27, 101, .08); }
.msd-hl-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 10px; background: #FFF1E6; color: #E8590C; }
.msd-hl-icon svg { width: 18px; height: 18px; stroke-width: 2.4; }
.msd .msd-hl h2 { margin: 0 0 6px; color: var(--msd-primary); font-family: inherit; font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.msd .msd-hl p { margin: 0; color: var(--msd-text); font-size: 14px; line-height: 1.55; }

.msd-block { padding: 36px 40px; border: 1px solid var(--msd-line); border-radius: 18px; background: #fff; }
.msd-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--msd-accent); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.msd-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--msd-accent); }
.msd .msd-block > h2 { margin: 8px 0 12px; color: var(--msd-primary); font-family: inherit; font-size: 27px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.msd-text { max-width: 760px; color: var(--msd-text); font-size: 16px; line-height: 1.75; }
.msd .msd-text p { margin: 0 0 14px; }
.msd .msd-text ul, .msd .msd-text ol { margin: 0 0 14px; padding-left: 22px; }
.msd .msd-text li::marker { color: var(--msd-accent); }
.msd .msd-text h3 { margin: 18px 0 8px; color: var(--msd-primary); font-family: inherit; font-size: 18px; }
.msd .msd-text a { color: var(--msd-primary); font-weight: 600; text-decoration-color: var(--msd-accent); }
.msd .msd-text strong { color: var(--msd-primary); }

/* Feature / plan / reference cards */
.msd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.msd-cards.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.msd-card { padding: 20px 20px 18px; border-radius: 14px; background: var(--msd-soft); }
.msd-card-icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: #fff; color: #067647; box-shadow: 0 4px 12px rgba(10, 27, 101, .08); }
.msd-card-icon svg { width: 16px; height: 16px; stroke-width: 2.6; }
.msd .msd-card h3 { margin: 0 0 6px; color: var(--msd-primary); font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.35; }
.msd .msd-card p { margin: 0 0 6px; color: var(--msd-text); font-size: 14px; line-height: 1.6; }
.msd .msd-card p:last-child { margin-bottom: 0; }
.msd .is-plans .msd-card { border: 1px solid var(--msd-line); background: #fff; }
.msd .is-plans .msd-card h3 { font-size: 19px; }
.msd .is-plans .msd-card p + p { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--msd-line); color: var(--msd-primary); font-weight: 600; }
.msd .is-refs .msd-card { position: relative; padding-left: 52px; }
.msd .is-refs .msd-card::before { content: ""; position: absolute; left: 20px; top: 22px; width: 18px; height: 18px; border-radius: 6px; background: linear-gradient(135deg, var(--msd-accent), #FF5A36); }
.msd .is-refs .msd-card p { color: var(--msd-muted); font-size: 13.5px; }

.msd-images { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.msd .msd-images img { display: block; width: 100%; height: 240px; object-fit: cover; border-radius: 14px; }

/* Products (Vereine) */
.msd-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.msd .msd-product { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--msd-line); border-radius: 14px; background: #fff; color: var(--msd-primary); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.msd .msd-product:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(10, 27, 101, .1); color: var(--msd-primary); }
.msd .msd-product img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; background: var(--msd-soft); }
.msd .msd-product span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.msd-product svg { width: 15px; height: 15px; flex: none; color: var(--msd-accent); }

/* Process */
.msd .msd-steps { margin: 24px 0 0; padding: 0; list-style: none; }
.msd .msd-steps li { position: relative; display: flex; gap: 18px; margin: 0; padding: 0 0 22px; }
.msd .msd-steps li:last-child { padding-bottom: 0; }
.msd .msd-steps li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 6px; width: 2px; background: var(--msd-line); }
.msd-step-no { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--msd-accent), #FF5A36); color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 8px 18px rgba(253, 126, 20, .25); }
.msd .msd-steps h3 { margin: 9px 0 6px; color: var(--msd-primary); font-family: inherit; font-size: 17.5px; font-weight: 700; line-height: 1.35; }
.msd-step-time { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--msd-soft); color: var(--msd-primary); font-size: 12.5px; font-weight: 600; }
.msd-step-time svg { width: 13px; height: 13px; }
.msd .msd-steps p { margin: 0 0 8px; color: var(--msd-text); font-size: 15px; line-height: 1.65; }
.msd .msd-steps img { display: none; }

/* FAQ */
.msd-faq { margin-top: 20px; border-top: 1px solid var(--msd-line); }
.msd-faq details { border-bottom: 1px solid var(--msd-line); }
.msd .msd-faq summary {
    position: relative; padding: 18px 44px 18px 0; color: var(--msd-primary); font-size: 16.5px; font-weight: 600; line-height: 1.45; cursor: pointer; list-style: none;
}
.msd-faq summary::-webkit-details-marker { display: none; }
.msd-faq summary::after {
    content: ""; position: absolute; right: 4px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
    background: var(--msd-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1B65' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform .2s ease, background-color .2s ease;
}
.msd-faq details[open] summary::after { transform: rotate(45deg); background-color: #FFF1E6; }
.msd .msd-faq summary:hover { color: var(--msd-accent); }
.msd-faq-a { padding: 0 44px 18px 0; color: var(--msd-text); font-size: 15px; line-height: 1.7; }
.msd .msd-faq-a p { margin: 0 0 10px; }
.msd .msd-faq-a p:last-child { margin: 0; }

.msd-raw { margin-top: 22px; }

.msd a:focus-visible, .msd summary:focus-visible { outline: 2px solid var(--msd-accent); outline-offset: 3px; }

@media (max-width: 1100px) {
    .msd-highlights { grid-template-columns: 1fr; }
    .msd-cards { grid-template-columns: 1fr 1fr; }
    .msd-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    /* list on top as horizontal chips, contact box after the content */
    .msd-layout { display: flex; flex-direction: column; gap: 20px; }
    .msd-aside { display: contents; }
    .msd-nav { order: 0; position: relative; z-index: 2; width: 100%; padding: 14px 12px; }
    .msd-main { order: 1; width: 100%; }
    .msd-contact { order: 2; width: 100%; }
    .msd .msd-nav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .msd .msd-nav ul::-webkit-scrollbar { display: none; }
    .msd .msd-nav a { white-space: nowrap; padding: 6px 12px 6px 6px; border: 1px solid var(--msd-line); }
    .msd .msd-nav a > svg { display: none; }
    .msd .msd-nav-icon { width: 28px; height: 28px; }
    .msd .msd-nav ul + .msd-nav-title { margin-top: 10px; padding-top: 10px; }
}
@media (max-width: 640px) {
    .msd .mlg-hero { padding-bottom: 84px; }
    .msd-layout { margin-top: -56px; padding-bottom: 56px; }
    .msd-block { padding: 26px 20px; }
    .msd .msd-block > h2 { font-size: 23px; }
    .msd-cards, .msd-cards.is-4, .msd-images { grid-template-columns: 1fr; }
    .msd .msd-images img { height: 200px; }
    .msd-products { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .msd * { transition: none !important; } }
.msd-images:has(> img:only-child) { grid-template-columns: 1fr; }
.msd .msd-images img:only-child { height: 320px; }
