/* ÄNGie Mitgliedspraxen: Liste + Karte + Detail-Popup (Farben aus dem Theme, mit Ersatzwerten) */
.mm, .mm-dialog {
  --mm-navy: var(--navy-900, #0B2238); --mm-ink: var(--ink, #1B2A39); --mm-slate: var(--slate, #4A5B6C);
  --mm-green: var(--green-brand, #B0CB1F); --mm-green-600: var(--green-600, #4D6F12); --mm-green-700: var(--green-700, #3F5C0E);
  --mm-sage: var(--sage-50, #F5F8EC); --mm-sage-100: var(--sage-100, #ECF2DA); --mm-line: var(--line, rgba(11,34,56,.11)); --mm-line-strong: var(--line-strong, rgba(11,34,56,.18));
}
.mm { margin-top: 32px; }
.mm-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.mm-stats div { font-size: .875rem; color: var(--mm-slate); }
.mm-stats strong { display: block; font-family: var(--font-head, inherit); font-size: 1.75rem; font-weight: 800; color: var(--mm-navy); line-height: 1.1; }
.mm-wrap { display: grid; grid-template-columns: 400px 1fr; margin-top: 24px; height: 620px; border: 1px solid var(--mm-line); border-radius: var(--r-lg, 12px); overflow: hidden; background: var(--surface, #fff); box-shadow: 0 30px 60px -44px rgba(11,34,56,.4); }
.mm-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--mm-line); }
.mm-search { padding: 16px; border-bottom: 1px solid var(--mm-line); position: relative; }
.mm-search svg { position: absolute; left: 30px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--mm-slate); pointer-events: none; }
.mm-search input { width: 100%; font: inherit; font-size: .9688rem; padding: 12px 14px 12px 42px; border-radius: var(--r-sm, 8px); border: 1.5px solid var(--mm-line-strong); background: var(--bg, #FBFCFD); color: var(--mm-ink); }
.mm-search input:focus { outline: none; border-color: var(--mm-green-600); background: #fff; box-shadow: 0 0 0 4px rgba(176,203,31,.25); }
.mm-count { padding: 10px 18px; font-size: .8125rem; color: var(--mm-slate); border-bottom: 1px solid var(--mm-line); background: var(--mm-sage); }
.entry-content ul.mm-list, .mm-list { list-style: none !important; margin: 0; padding: 0 !important; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.mm-list li { margin: 0 !important; }
.mm-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--mm-line); background: none; cursor: pointer; font: inherit; color: inherit; transition: background-color .2s; }
.mm-item.is-active { background: var(--mm-sage); }
@media (hover: hover) { .mm-item:hover { background: var(--mm-sage); } }
.mm-item.is-active { box-shadow: inset 3px 0 0 var(--mm-green); }
.mm-item:focus-visible { outline: 3px solid rgba(176,203,31,.6); outline-offset: -3px; }
.mm-ava, .pp-ava { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--mm-sage-100); display: grid; place-items: center; }
.mm-ava img, .pp-ava img { width: 100%; height: 100%; object-fit: cover; }
.mm-ava.is-initials, .pp-ava.is-initials { font: 700 .8125rem/1 var(--font-head, inherit); color: var(--mm-green-700); letter-spacing: .02em; }
.mm-text { display: flex; flex-direction: column; min-width: 0; }
.mm-name { font-weight: 600; color: var(--mm-navy); line-height: 1.35; }
.mm-spec { font-size: .8438rem; color: var(--mm-slate); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mm-town { align-self: start; margin-top: 2px; font-size: .75rem; font-weight: 600; color: var(--mm-green-700); background: var(--mm-sage-100); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.mm-empty { padding: 28px 18px; color: var(--mm-slate); font-size: .9375rem; }
.mm-map { position: relative; min-height: 0; background: var(--mm-sage); }
.mm-canvas { position: absolute; inset: 0; }
.mm-consent { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 32px; background: radial-gradient(600px 400px at 60% 40%, var(--blue-50, #EEF4FA), transparent 70%), var(--mm-sage); }
.mm-consent[hidden] { display: none; }
.mm-consent h3 { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--mm-navy); }
.mm-consent p { font-size: .875rem; color: var(--mm-slate); max-width: 44ch; margin: 8px auto 0; line-height: 1.55; }
.mm-consent .btn { margin-top: 18px; border: 0; cursor: pointer; }
.mm-consent label { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; font-size: .8125rem; color: var(--mm-slate); cursor: pointer; }
.mm-consent input { accent-color: var(--mm-green-600); width: 16px; height: 16px; }

/* Pins & Kartenfenster */
.aengie-pin { background: none; border: 0; }
.aengie-pin .pin { position: relative; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--navy-900, #0B2238); border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(11,34,56,.55); transition: transform .2s, background-color .2s; }
.aengie-pin .pin::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--green-brand, #B0CB1F); }
.aengie-pin .num { position: absolute; top: -8px; right: -10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--green-brand, #B0CB1F); color: var(--navy-900, #0B2238); font: 800 .75rem/1 var(--font-head, inherit); border: 2px solid #fff; box-shadow: 0 3px 8px -2px rgba(11,34,56,.4); }
.aengie-pin.is-hot .pin { transform: rotate(-45deg) scale(1.18); background: var(--green-600, #4D6F12); }
.mm .leaflet-container { font-family: var(--font-body, inherit); background: var(--mm-sage); }
.mm .leaflet-tile-pane { filter: saturate(.55) contrast(.96) brightness(1.03); }
.mm .leaflet-popup-content-wrapper { border-radius: var(--r-lg, 12px); box-shadow: 0 24px 48px -20px rgba(11,34,56,.45); padding: 0; }
.mm .leaflet-popup-content { margin: 0; width: 300px !important; max-height: 340px; overflow-y: auto; }
.pp-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--mm-line); background: var(--mm-sage); border-radius: 12px 12px 0 0; }
.pp-head strong { display: block; font-family: var(--font-head, inherit); color: var(--mm-navy); font-size: .9688rem; }
.pp-head span { font-size: .8125rem; color: var(--mm-slate); }
.pp-m { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--mm-line); }
.pp-m:last-child { border-bottom: 0; }
.pp-m .pp-ava { width: 36px; height: 36px; }
.pp-m i { display: block; font-style: normal; font-size: .8125rem; color: var(--mm-slate); line-height: 1.45; margin-top: 2px; }
.pp-m a { display: inline-block; margin-top: 4px; font-size: .8125rem; color: var(--mm-green-700); font-weight: 600; text-decoration: none; }
.pp-open { padding: 0; border: 0; background: none; font: 700 .9375rem/1.3 var(--font-body, inherit); color: var(--mm-navy); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(176,203,31,.8); text-underline-offset: 3px; }
@media (hover: hover) { .pp-open:hover { color: var(--mm-green-700); } }

/* Detail-Popup */
.mm-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 32px); overscroll-behavior: contain; padding: 0; border: 0; border-radius: var(--r-lg, 14px); background: #fff; color: var(--mm-ink); box-shadow: 0 40px 80px -30px rgba(11,34,56,.6); overflow: auto; }
.mm-dialog::backdrop { background: rgba(8,25,42,.42); -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1); }
.mm-dialog[open] { animation: mm-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes mm-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mm-dialog[open] { animation: none; } }
/* Schließen-Knopf bleibt beim Scrollen im Popup oben rechts sichtbar */
.mm-dlg-close { position: sticky; top: 12px; z-index: 3; margin: 12px 12px -56px auto; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--mm-navy); cursor: pointer; box-shadow: 0 4px 12px -4px rgba(11,34,56,.35); }
.mm-dlg-close svg { width: 18px; height: 18px; }
@media (hover: hover) { .mm-dlg-close:hover { background: var(--mm-sage); } }
.mm-dlg-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; }
.mm-dlg-photo { background: var(--mm-sage-100); min-height: 100%; }
.mm-dlg-photo img { width: 100%; height: 100%; min-height: 460px; object-fit: cover; object-position: center 20%; display: block; }
.mm-dlg-photo.is-initials { display: grid; place-items: center; min-height: 380px; background: radial-gradient(240px 240px at 30% 20%, #fff, transparent 70%), var(--mm-sage-100); }
.mm-dlg-photo.is-initials span { font: 800 3rem/1 var(--font-head, inherit); color: var(--mm-green-700); opacity: .8; }
.mm-dlg-body { padding: 40px 44px 36px; }
.mm-dlg-eyebrow { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mm-green-700); }
.mm-dlg-body h3 { margin: 6px 40px 0 0; font-family: var(--font-head, inherit); font-size: 1.75rem; line-height: 1.25; color: var(--mm-navy); }
.mm-dlg-spec { margin: 8px 0 0; font-weight: 600; color: var(--mm-green-700); line-height: 1.45; }
.mm-dlg-praxis { margin: 10px 0 0; color: var(--mm-ink); }
.mm-dlg-addr { margin: 12px 0 0; color: var(--mm-slate); line-height: 1.6; }
.mm-dlg-links { display: grid; gap: 6px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--mm-line); }
.mm-dlg-links a { display: inline-flex; align-items: center; gap: 10px; color: var(--mm-navy); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) { .mm-dlg-links a:hover { color: var(--mm-green-700); } }
.mm-dlg-links a::before { content: ""; flex: none; width: 16px; height: 16px; background: var(--mm-green-600); -webkit-mask: var(--mm-i) center / contain no-repeat; mask: var(--mm-i) center / contain no-repeat; }
.mm-dlg-links .l-tel { --mm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E"); }
.mm-dlg-links .l-mail { --mm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); }
.mm-dlg-links .l-web { --mm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
.mm-dlg-links .l-route { --mm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.mm-dlg-map { margin-top: 18px; padding: 11px 18px; border: 1.5px solid var(--mm-line-strong); border-radius: 10px; background: #fff; font: 600 .9375rem/1 var(--font-body, inherit); color: var(--mm-navy); cursor: pointer; transition: border-color .2s, background .2s; }
@media (hover: hover) { .mm-dlg-map:hover { border-color: var(--mm-green-600); background: var(--mm-sage); } }
.mm-dlg-more { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--mm-line); }
.mm-dlg-more p { margin: 0 0 8px; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-slate); }
.mm-dlg-more ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mm-dlg-more li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; margin: 0; }
.mm-dlg-more button { padding: 0; border: 0; background: none; font: 600 .9375rem/1.4 var(--font-body, inherit); color: var(--mm-navy); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(176,203,31,.8); text-underline-offset: 3px; }
.mm-dlg-more span { font-size: .8125rem; color: var(--mm-slate); }

@media (max-width: 900px) {
  .mm-wrap { grid-template-columns: 1fr; height: auto; }
  .mm-side { border-right: 0; border-bottom: 1px solid var(--mm-line); }
  .mm-list { max-height: 440px; }
  .mm-map { height: 420px; }
}
@media (max-width: 600px) {
  .mm-dlg-grid { grid-template-columns: 1fr; }
  .mm-dlg-photo img { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
  .mm-dlg-photo.is-initials { min-height: 160px; }
  .mm-dlg-body { padding: 24px 22px 22px; }
  .mm-stats { gap: 22px; }
}

/* Kopf, Filter & Ansichten */
.mm-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.mm-switch { display: inline-flex; padding: 4px; border: 1px solid var(--mm-line); border-radius: 12px; background: #fff; }
.mm-switch button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 9px; background: none; font: 600 .9375rem/1 var(--font-body, inherit); color: var(--mm-slate); cursor: pointer; transition: background .2s, color .2s; }
.mm-switch svg { width: 17px; height: 17px; }
.mm-switch button[aria-pressed="true"] { background: var(--mm-navy); color: #fff; }
@media (hover: hover) { .mm-switch button:not([aria-pressed="true"]):hover { background: var(--mm-sage); color: var(--mm-navy); } }
.mm-filter { margin-top: 24px; display: grid; gap: 14px; }
.mm-filter .mm-search { padding: 0; border: 0; max-width: 520px; }
.mm-filter .mm-search svg { left: 14px; }
.mm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--mm-line-strong); border-radius: 999px; background: #fff; font: 500 .875rem/1.2 var(--font-body, inherit); color: var(--mm-ink); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.mm-chip span { font-size: .75rem; font-weight: 700; color: var(--mm-slate); }
@media (hover: hover) { .mm-chip:hover { border-color: var(--mm-green-600); } }
.mm-chip[aria-pressed="true"] { background: var(--mm-navy); border-color: var(--mm-navy); color: #fff; }
.mm-chip[aria-pressed="true"] span { color: var(--mm-green); }
.mm-filter .mm-count { padding: 0; border: 0; background: none; }
/* Fachrichtungen in allen Ansichten umbrechen – alle Bezeichnungen sichtbar und anklickbar */

/* Übersicht (Raster wie bisher, mit Fotos) */
.entry-content ul.mm-grid, .mm-grid { list-style: none !important; margin: 28px 0 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.mm-grid li { margin: 0 !important; }
.mm-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 24px 16px 20px; border: 1px solid var(--mm-line); border-radius: var(--r-lg, 12px); background: #fff; font: inherit; color: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
@media (hover: hover) { .mm-card:hover { border-color: var(--mm-green); box-shadow: 0 20px 40px -30px rgba(11,34,56,.45); transform: translateY(-2px); } }
.mm-card:focus-visible { outline: 3px solid rgba(176,203,31,.6); outline-offset: 2px; }
.mm-photo { width: 132px; height: 132px; margin-bottom: 12px; border-radius: 50%; overflow: hidden; background: var(--mm-sage-100); display: grid; place-items: center; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--mm-line); transition: box-shadow .2s; }
@media (hover: hover) { .mm-card:hover .mm-photo { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--mm-green); } }
.mm-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.mm-photo.is-initials { font: 800 2rem/1 var(--font-head, inherit); color: var(--mm-green-700); }
.mm-card-name { font-family: var(--font-head, inherit); font-weight: 700; font-size: 1.0313rem; color: var(--mm-navy); line-height: 1.3; }
.mm-card-cat { font-size: .875rem; color: var(--mm-green-700); font-weight: 600; line-height: 1.35; }
.mm-card-town { margin-top: 6px; font-size: .75rem; font-weight: 600; color: var(--mm-slate); background: var(--mm-sage); padding: 3px 9px; border-radius: 999px; }
.mm-grid .mm-empty { grid-column: 1 / -1; }

/* Ansicht umschalten */
.mm[data-view="raster"] .mm-wrap { display: none; }
.mm[data-view="karte"] .mm-grid { display: none; }
.mm-wrap { margin-top: 20px; }
.mm-dlg-links .l-fax, .mm-dlg-links .l-kim { font-size: .875rem; color: var(--mm-slate); overflow-wrap: anywhere; padding-left: 26px; }
@media (max-width: 520px) { .mm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .mm-photo { width: 96px; height: 96px; } .mm-card { padding: 18px 10px 16px; } .mm-switch button { padding: 9px 10px; } }

.mm-grid li::marker, .mm-list li::marker { content: none; }

@media (max-width: 860px) { .mm-dlg-grid { grid-template-columns: minmax(220px, 300px) 1fr; } .mm-dlg-photo img { min-height: 380px; } .mm-dlg-body { padding: 32px 30px 28px; } }
@media (max-width: 600px) { .mm-dlg-grid { grid-template-columns: 1fr; } .mm-dlg-photo img { min-height: 0; aspect-ratio: 4 / 3; height: auto; } .mm-dlg-photo.is-initials { min-height: 160px; } .mm-dlg-body { padding: 24px 22px 22px; } .mm-dlg-body h3 { font-size: 1.4rem; } }
