/* Projects page (/projekte/). Hero comes from legal.css (.mlg-hero); everything else is scoped to .mpj. */
.mpj { --mpj-primary: #0A1B65; --mpj-accent: #FD7E14; --mpj-text: #3B4256; --mpj-muted: #6B7290; --mpj-line: #E8EBF4; --mpj-soft: #F4F6FC; }
.mpj *, .mpj *::before, .mpj *::after { box-sizing: border-box; }
.mpj [hidden] { display: none !important; }

.mpj .mlg-hero { padding-bottom: 132px; }   /* room for the toolbar that overlaps the hero */
.mpj-list { padding: 0 0 96px; scroll-margin-top: 70px; }

/* Toolbar: search + categories */
.mpj-toolbar {
    position: relative; z-index: 2; margin: -92px 0 28px; padding: 20px; border: 1px solid var(--mpj-line); border-radius: 18px;
    background: #fff; box-shadow: 0 18px 50px rgba(10, 27, 101, .10);
}
.mpj-search { position: relative; margin-bottom: 16px; }
.mpj-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--mpj-muted); pointer-events: none; }
.mpj .mpj-search input {
    width: 100%; height: 52px; margin: 0; padding: 0 16px 0 48px; border: 1.5px solid var(--mpj-line); border-radius: 12px;
    background: var(--mpj-soft); color: var(--mpj-primary); font: 500 16px/1.2 "Inter", system-ui, sans-serif; box-shadow: none; outline: none;
    transition: border-color .15s ease, background .15s ease;
}
.mpj .mpj-search input::placeholder { color: var(--mpj-muted); font-weight: 400; }
.mpj .mpj-search input:focus { border-color: var(--mpj-primary); background: #fff; }
.mpj-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mpj-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.mpj .mpj-filters button,
.mpj .mpj-filters button:hover,
.mpj .mpj-filters button:focus {
    appearance: none; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 14px;
    border: 1.5px solid var(--mpj-line); border-radius: 999px; background: #fff; background-image: none; box-shadow: none; cursor: pointer;
    color: var(--mpj-primary); font: 600 14px/1.2 "Inter", system-ui, sans-serif; letter-spacing: normal; text-transform: none;
}
.mpj .mpj-filters button:hover { border-color: var(--mpj-primary); }
.mpj .mpj-filters button[aria-pressed="true"] { background: var(--mpj-primary); border-color: var(--mpj-primary); color: #fff; }
.mpj-filters button span { padding: 1px 7px; border-radius: 999px; background: var(--mpj-soft); color: var(--mpj-muted); font-size: 12px; }
.mpj-filters button[aria-pressed="true"] span { background: rgba(255, 255, 255, .18); color: #fff; }

.mpj .mpj-count { margin: 0 0 18px; color: var(--mpj-muted); font-size: 14.5px; }

/* Cards */
.mpj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mpj .mpj-card {
    display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--mpj-line); border-radius: 18px; background: #fff;
    color: inherit; text-decoration: none; box-shadow: 0 10px 30px rgba(10, 27, 101, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mpj .mpj-card:hover { transform: translateY(-4px); border-color: #D6DBEA; box-shadow: 0 22px 50px rgba(10, 27, 101, .12); color: inherit; }
.mpj-card-img { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: #EEF3FC; }
.mpj-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.mpj .mpj-card:hover .mpj-card-img img { transform: scale(1.04); }
.mpj-card-img.is-illustration img { object-fit: contain; padding: 14px; }   /* square product illustrations: show uncropped */
.mpj-card-img svg { width: 54px; height: 54px; color: var(--mpj-primary); opacity: .5; }
.mpj-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.mpj-badge { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: #FFF1E6; color: #C2570A; font-size: 12px; font-weight: 700; }
.mpj-badge.is-project { background: #E8ECFA; color: var(--mpj-primary); }
.mpj .mpj-card h3 { margin: 0; color: var(--mpj-primary); font-family: inherit; font-size: 19px; font-weight: 700; line-height: 1.3; }
.mpj .mpj-card p { margin: 0; color: var(--mpj-text); font-size: 15px; line-height: 1.6; }
.mpj-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--mpj-line); }
.mpj-price { color: var(--mpj-primary); font-size: 18px; font-weight: 700; white-space: nowrap; }
.mpj-price del { margin-right: 6px; color: var(--mpj-muted); font-size: 14px; font-weight: 500; }
.mpj-price.is-request { color: var(--mpj-muted); font-size: 14px; font-weight: 600; }
.mpj-more { display: inline-flex; align-items: center; gap: 6px; color: var(--mpj-primary); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.mpj-more svg { width: 16px; height: 16px; transition: transform .2s ease; }
.mpj .mpj-card:hover .mpj-more { color: var(--mpj-accent); }
.mpj .mpj-card:hover .mpj-more svg { transform: translateX(4px); }

.mpj-empty { padding: 48px 24px; border: 1.5px dashed var(--mpj-line); border-radius: 18px; text-align: center; }
.mpj .mpj-empty p { margin: 0 0 14px; color: var(--mpj-text); font-size: 16px; }
.mpj .mpj-empty button,
.mpj .mpj-empty button:hover {
    appearance: none; padding: 10px 18px; border: 1.5px solid var(--mpj-primary); border-radius: 999px; background: #fff; background-image: none;
    color: var(--mpj-primary); font: 600 14.5px/1.2 "Inter", system-ui, sans-serif; cursor: pointer; text-transform: none;
}
.mpj .mpj-empty button:hover { background: var(--mpj-primary); color: #fff; }

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

@media (max-width: 1000px) { .mpj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .mpj .mlg-hero { padding-bottom: 96px; }
    .mpj-toolbar { margin-top: -64px; padding: 16px; }
    .mpj-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
    .mpj-filters::-webkit-scrollbar { display: none; }
    .mpj-filters button { flex: none; }
    .mpj-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mpj * { transition: none !important; } }
