/* Elektro Mai – eigenständige Leistungsübersicht, Präfix ems-. */
.ems-services {
  --ems-width: 1280px;
  --ems-ink: #18181b;
  --ems-muted: #62676b;
  --ems-accent: #b46900;
  --ems-gold: #f6a800;
  box-sizing: border-box;
  padding: clamp(64px, 7vw, 104px) 24px 40px;
  color: var(--ems-ink);
  background: #fafafa;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ems-services *, .ems-services *::before, .ems-services *::after { box-sizing: border-box; }
.ems-services [hidden] { display: none !important; }
.ems-container { max-width: var(--ems-width); margin-inline: auto; }
.ems-intro { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 36px 64px; margin-bottom: 38px; }
.ems-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--ems-muted); font-size: 12px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.ems-eyebrow::before { content: ""; flex: 0 0 32px; height: 2px; background: var(--ems-gold); }
.ems-heading { margin: 0; font-size: clamp(34px, 4.1vw, 52px); font-weight: 800; line-height: 1.09; letter-spacing: -.04em; }
.ems-description { max-width: 480px; margin: 0 0 5px; color: var(--ems-muted); font-size: 18px; line-height: 1.7; text-wrap: pretty; }
.ems-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; padding-top: 26px; border-top: 1px solid #e5e6e4; scroll-margin-top: 24px; }
.ems-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ems-filter { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 44px; padding: 10px 19px; border: 1px solid #e4e5e3; border-radius: 999px; background: #fff; color: #52585b; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 160ms, border-color 160ms, color 160ms; }
.ems-filter span { color: #8b5700; font-size: 10px; }
.ems-filter[aria-pressed="true"] { border-color: #e6bc70; background: #fff1d5; color: #18181b; }
.ems-result { flex: 0 0 auto; margin: 0; color: var(--ems-muted); font-size: 12px; }
.ems-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.ems-card { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); min-width: 0; border: 1px solid #e5e6e3; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 8px 24px #18181b04; }
.ems-media { position: relative; min-width: 0; min-height: 340px; overflow: hidden; background: #e8e5df; }
.ems-media img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 450ms ease; }
.ems-card[data-ems-card="elektro"] .ems-media img { object-position: 80% center; }
.ems-card[data-ems-card="klima"] .ems-media img { object-position: 68% center; }
.ems-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 68%, #18181b12); pointer-events: none; }
.ems-media-icon { position: absolute; z-index: 1; left: 18px; top: 18px; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffff88; border-radius: 12px; background: #fffffff0; color: #ad6900; box-shadow: 0 4px 20px #18181b08; }
.ems-media-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.ems-content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 340px; padding: 27px 27px 22px; }
.ems-category { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; color: #7a551e; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.ems-category span { color: #8a8e8a; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.ems-title { margin: 0; font-size: clamp(23px, 2.05vw, 29px); line-height: 1.15; font-weight: 750; letter-spacing: -.03em; overflow-wrap: anywhere; }
.ems-card-description { margin: 15px 0 16px; color: var(--ems-muted); font-size: 14px; line-height: 1.65; text-wrap: pretty; }
.ems-explore { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 66px; margin-top: auto; padding: 12px 14px; border: 1px solid #e8c279; border-radius: 11px; background: #fff0ce; color: #292c25; font: inherit; font-size: 13px; font-weight: 750; line-height: 1.4; text-align: left; cursor: pointer; transition: background 160ms, border-color 160ms; }
.ems-explore small { display: block; margin-top: 4px; color: #78591f; font-size: 11px; font-weight: 500; line-height: 1.5; }
.ems-explore svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: #9b6504; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ems-details { width: 100%; margin-top: auto; padding-bottom: 8px; }
.ems-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-block: 1px solid #ecece9; color: #53595b; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.ems-details summary::-webkit-details-marker { display: none; }
.ems-details summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 160ms; }
.ems-details[open] summary svg { transform: rotate(180deg); }
.ems-details ul { display: grid; gap: 8px; margin: 14px 0 4px; padding: 0; list-style: none; }
.ems-details li { position: relative; padding-left: 13px; color: #53595b; font-size: 12px; line-height: 1.5; }
.ems-details li::before { content: ""; position: absolute; top: .65em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #c48215; }
.ems-card-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: 4px; color: #18181b; font-size: 12px; font-weight: 650; line-height: 1.4; text-decoration: none; }
.ems-card-link svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: #a56910; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms; }
.ems-detail-intro { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 36px; margin-bottom: 26px; }
.ems-detail-intro h3 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 750; letter-spacing: -.03em; }
.ems-detail-intro h3:focus-visible { outline: 3px solid #aa6a00; outline-offset: 6px; border-radius: 2px; }
.ems-detail-intro p { max-width: 530px; margin: 0; color: var(--ems-muted); font-size: 14px; line-height: 1.65; }
.ems-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.ems-service-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 310px; padding: 28px 30px 20px; border: 1px solid #e4e6e1; border-bottom: 3px solid #e8b657; border-radius: 15px; background: #fff; box-shadow: 0 7px 24px #18181b05; }
.ems-service-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: #fff7e8; color: #303832; }
.ems-service-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ems-service-icon .ems-icon-accent { stroke: #b46900; }
.ems-service-card h4 { margin: 18px 0 0; font-size: 23px; font-weight: 750; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.ems-service-description { margin: 12px 0 0; color: #62676b; font-size: 14px; line-height: 1.75; text-wrap: pretty; }
.ems-service-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 19px; padding: 0; list-style: none; }
.ems-service-tags li { position: relative; padding-left: 11px; color: #6a6e68; font-size: 12px; line-height: 1.65; }
.ems-service-tags li::before { content: ""; position: absolute; left: 0; top: .7em; width: 3px; height: 3px; border-radius: 50%; background: #b67b1d; }
.ems-service-inquiry { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 46px; margin-top: auto; padding-top: 12px; border-top: 1px solid #ecece7; color: #252c26; font-size: 12px; font-weight: 700; text-decoration: none; }
.ems-service-inquiry svg, .ems-back svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: #a56910; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ems-back { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; margin-top: 26px; padding: 11px 19px; border: 1px solid #e0e2dc; border-radius: 999px; background: #fff; color: #52585b; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ems-services[data-ems-view="detail"] .ems-image-note { display: none; }
.ems-contact-band { display: flex; align-items: center; gap: 20px; margin-top: 28px; padding: 30px 32px; border-radius: 18px; background: #202123; color: #fff; }
.ems-contact-mark { flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #ffffff28; border-radius: 14px; color: #f6b63f; }
.ems-contact-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.ems-contact-band h3 { margin: 0 0 5px; font-size: 19px; font-weight: 650; line-height: 1.4; letter-spacing: -.015em; }
.ems-contact-band p { margin: 0; color: #c0c1bf; font-size: 13px; line-height: 1.6; }
.ems-contact-band > a { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; margin-left: auto; padding: 12px 21px; border-radius: 999px; background: #fff3dc; color: #18181b; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.ems-contact-band > a svg, .ems-dialog svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ems-image-note { margin: 15px 2px 0; color: var(--ems-muted); font-size: 11px; }
.ems-services :is(a, button, summary):focus-visible { outline: 3px solid #aa6a00; outline-offset: 4px; }
.ems-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 36px; border: 1px solid #e4e7e3; border-radius: 18px; background: #fff; color: #18181b; font: inherit; overflow-y: auto; }
.ems-dialog::backdrop { background: #18181b88; }
.ems-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f4f4f4; color: #18181b; cursor: pointer; }
.ems-dialog-kicker { margin: 8px 32px 18px 0; color: var(--ems-muted); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.ems-dialog h2 { margin: 0 0 18px; font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.03em; }
.ems-dialog-topic { display: inline-block; max-width: 100%; margin: 0 0 5px; padding: 6px 12px; border: 1px solid #ead5af; border-radius: 8px; background: #fff4df; color: #765216; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.ems-dialog #ems-dialog-description { margin-bottom: 22px; color: var(--ems-muted); font-size: 15px; line-height: 1.65; }
.ems-dialog-phone, .ems-dialog-email { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 13px 18px; border-radius: 9px; font-size: 15px; font-weight: 650; text-decoration: none; }
.ems-dialog-phone { background: #18181b; color: #fff; }
.ems-dialog-phone small { display: block; margin-bottom: 3px; color: #bcbeba; font-size: 11px; font-weight: 400; }
.ems-dialog-email { margin-top: 10px; border: 1px solid #e1e4e1; color: #18181b; }
.ems-dialog-address { margin: 16px 0 0; color: var(--ems-muted); font-size: 12px; text-align: center; }
@media (hover: hover) {
  .ems-filter:hover { border-color: #cfb88f; background: #fff8eb; color: #18181b; }
  .ems-card:hover .ems-media img { transform: scale(1.025); }
  .ems-card-link:hover svg { transform: translateX(3px); }
  .ems-explore:hover { border-color: #dca239; background: #ffe5ad; }
  .ems-service-inquiry:hover { color: #8c5b0a; }
  .ems-back:hover { border-color: #cfb88f; background: #fff8eb; }
  .ems-contact-band > a:hover { background: #ffe6b2; }
}
@media (max-width: 1099px) and (min-width: 760px) {
  .ems-card { grid-template-columns: minmax(0, 1fr); }
  .ems-media { min-height: 0; aspect-ratio: 1.8; }
  .ems-content { min-height: 315px; }
  .ems-title br { display: none; }
  .ems-contact-band { flex-wrap: wrap; }
  .ems-contact-band > a { margin-left: 68px; }
}
@media (max-width: 759px) {
  .ems-services { padding: 56px 16px 24px; }
  .ems-intro { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 28px; }
  .ems-eyebrow { font-size: 10px; letter-spacing: 1.1px; gap: 8px; }
  .ems-eyebrow::before { flex-basis: 24px; }
  .ems-heading { font-size: clamp(34px, 8vw, 44px); }
  .ems-description { max-width: 560px; font-size: 16px; line-height: 1.65; }
  .ems-toolbar { flex-wrap: wrap; gap: 12px; padding-top: 22px; margin-bottom: 20px; }
  .ems-filter { padding-inline: 15px; font-size: 12px; }
  .ems-result { width: 100%; }
  .ems-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ems-card { grid-template-columns: minmax(0, 1fr); }
  .ems-media { min-height: 0; aspect-ratio: 1.65; }
  .ems-content { min-height: 0; padding: 24px; }
  .ems-title { font-size: 29px; }
  .ems-title br { display: none; }
  .ems-card-description { font-size: 15px; }
  .ems-details { margin-top: 4px; }
  .ems-details summary, .ems-details li, .ems-card-link { font-size: 13px; }
  .ems-detail-intro { display: block; margin-bottom: 22px; }
  .ems-detail-intro h3 { font-size: 25px; }
  .ems-detail-intro p { margin-top: 12px; }
  .ems-service-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .ems-service-card { min-height: 0; padding: 24px 24px 18px; }
  .ems-service-card h4 { font-size: 23px; }
  .ems-service-description { font-size: 15px; }
  .ems-service-inquiry { font-size: 13px; }
  .ems-contact-band { flex-wrap: wrap; gap: 18px; padding: 25px 24px; }
  .ems-contact-mark { display: none; }
  .ems-contact-band h3 { font-size: 22px; }
  .ems-contact-band p { font-size: 14px; }
  .ems-contact-band > a { width: 100%; margin: 2px 0 0; }
  .ems-dialog { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ems-services *, .ems-services *::before, .ems-services *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
