:root {
  color-scheme: dark;
  --ink: #101720;
  --panel: #19232e;
  --text: #f5f7fa;
  --muted: #b4c0cc;
  --accent: #e5fa62;
  --line: #354351;
  --paper: #f1f4f6;
  font: 100% / 1.5 Inter, system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
a { color: inherit; }
img { display: block; width: 100%; }
svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(100% - 4rem, 75rem); margin-inline: auto; }
:focus-visible { outline: 3px solid #7197ec; outline-offset: 5px; }
.skip { position: fixed; z-index: 5; top: .5rem; left: .5rem; transform: translateY(-150%); background: var(--accent); color: var(--ink); padding: .5rem 1rem; }
.skip:focus { transform: none; }

.brand { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; font-weight: 850; letter-spacing: .13em; text-decoration: none; }
.brand img { width: 2.1rem; height: 2.1rem; }
.masthead {
  position: sticky;
  z-index: 4;
  top: 0;
  padding-block: .75rem;
}
.navigation-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: .55rem .65rem .55rem .9rem;
  border: 1px solid #425164;
  border-radius: 1.2rem;
  background: #17222ef5;
  backdrop-filter: blur(14px);
  box-shadow: 0 .5rem 1.6rem #070c1552;
}
.section-nav {
  display: flex;
  gap: .15rem;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: .95rem;
  background: #0d141d;
}
.section-nav a {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  padding-inline: .9rem;
  border-radius: .7rem;
  color: #dce5ef;
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.section-nav a:hover { background: #28384a; color: white; }
.section-nav a[href="#pogotowie-agd"] { background: #282d65; color: #f0efff; }
.section-nav a[href="#pogotowie-agd"]:hover { background: #363f9c; }
.navigation-bar .header-call {
  justify-self: end;
  min-height: 2.85rem;
  border-radius: .85rem;
  white-space: nowrap;
  font-size: 1.25rem;
}

.hero { background: radial-gradient(ellipse at 85% 12%, #263a4d, transparent 56%); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy photos" "emergency emergency"; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-block: clamp(1.75rem, 4vw, 3.5rem); }
.location { display: flex; align-items: center; gap: .65rem; color: var(--accent); font-size: .9rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.location::before { content: ""; width: 1.5rem; height: 2px; background: currentColor; }
h1 { font-size: clamp(1.75rem, 4vw, 3.1rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 750; margin-block: 1rem; }
h1 em { display: block; color: var(--accent); font-style: normal; }
.intro { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.65rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 3.15rem; padding: .7rem 1.05rem; border: 1px solid transparent; border-radius: .75rem; font-weight: 750; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.action { background: var(--accent); color: var(--ink); }
.action:hover { background: #f0ff9b; }
.outline { border-color: #667789; }
.outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-media { grid-area: photos; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.photo { min-width: 0; display: block; text-decoration: none; cursor: zoom-in; }
.photo-frame { display: block; position: relative; overflow: hidden; border-radius: 1rem; }
.photo img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.photo-repair img { object-position: 57% 55%; }
.photo:hover img, .photo:focus-visible img { transform: scale(1.065); }
.photo-name { display: block; margin-top: .55rem; font-size: .94rem; font-weight: 650; }
.photo-zoom { position: absolute; inset: auto .55rem .55rem auto; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #101720e8; color: white; transition: background .2s, color .2s; }
.photo:hover .photo-zoom, .photo:focus-visible .photo-zoom { background: var(--accent); color: var(--ink); }
.photo-dialog { position: fixed; margin: auto; padding: 0; width: max-content; max-width: calc(100% - 1.5rem); max-height: calc(100% - 1.5rem); border: 0; border-radius: .9rem; background: var(--ink); color: var(--text); }
.photo-dialog[open] { animation: enter .2s ease-out both; }
.photo-dialog::backdrop { background: #080e17df; backdrop-filter: blur(6px); }
.photo-dialog form { display: flex; justify-content: flex-end; padding: .45rem; }
.photo-dialog img { width: auto; max-width: 100%; height: auto; max-height: 76vh; max-height: 76dvh; object-fit: contain; margin-inline: auto; }
.photo-close { background: var(--panel); color: var(--text); cursor: pointer; font: inherit; min-height: 2.6rem; padding-block: .3rem; }
.photo-close span { font-size: 1.35rem; }
body:has(.photo-dialog[open]) { overflow: hidden; }

.emergency { grid-area: emergency; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(.85rem, 2vw, 1.55rem); padding: clamp(1rem, 2.4vw, 1.75rem); border-radius: 1.25rem; background: radial-gradient(ellipse at 3% 0%, #5146d7 0%, transparent 55%), #3039ac; color: #fff; }
.emergency-icon { display: grid; place-items: center; width: 3.8rem; aspect-ratio: 1; border: 1px solid #ffffff63; border-radius: .95rem; background: #ffffff26; }
.emergency-icon svg { width: 2.8rem; height: 2.1rem; animation: van-arrival .7s .25s ease-out; }
.emergency h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.emergency p { margin-top: .4rem; color: #eef0ff; }
.emergency-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.emergency-actions .button { padding-inline: .8rem; }
.emergency-chat { border-color: #ffffffa3; color: #fff; white-space: nowrap; }
.emergency-chat:hover { border-color: white; background: #ffffff20; }
.emergency-call { background: #fff; color: #272787; white-space: nowrap; }
.emergency-call:hover { background: #e5eaff; }
.emergency :focus-visible { outline-color: white; }

.services { color-scheme: light; background: var(--paper); color: var(--ink); padding-block: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); letter-spacing: -.027em; line-height: 1.08; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; margin-top: 1.5rem; }
.service-card { min-width: 0; padding: clamp(1.25rem, 3vw, 2.2rem); background: #fff; border: 1px solid #dbe2e8; border-radius: 1.15rem; transition: border-color .2s, box-shadow .2s; }
.service-card:focus-within, .service-card:hover { border-color: #8a9caf; box-shadow: 0 .6rem 1.6rem #1017200d; }
.service-icon { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: .7rem; margin-bottom: .95rem; }
.electric-icon { background: #ecf8ad; }
.repair-icon { background: #e0ebfd; }
.person { font-size: 1rem; font-weight: 700; color: #344359; }
.service-card h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.13; letter-spacing: -.025em; margin: .3rem 0 .55rem; }
.service-card > p:not(.person), details ul { color: #253448; font-size: 1.125rem; line-height: 1.65; }
.service-card > p:not(.person) + p { margin-top: .75rem; }
details { margin-top: 1.15rem; }
summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 3.2rem; padding: .6rem .85rem; border: 1px solid #c8d4e0; border-radius: .65rem; background: #edf2f7; color: #172437; list-style: none; font-size: 1.0625rem; font-weight: 750; }
summary:hover, details[open] summary { background: #e2eaf3; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: .9rem; height: .9rem; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
details[open] summary::after { background-size: 100% 2px, 0 0; }
details ul { margin: .75rem 0 0; padding: 0 0 .25rem 1.25rem; }
details li + li { margin-top: .25rem; }

.whatsapp { background: #dbf7e7; border-color: #9edbbb; color: #115737; }
.whatsapp:hover { background: #c0efd4; border-color: #7cc7a0; }
.service-whatsapp { margin-top: 1rem; }

.contact { padding-block: clamp(2.5rem, 6vw, 5rem); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.9rem, 2.5vw, 1.5rem); }
.contact-panel, .location-card { padding: clamp(1.15rem, 3vw, 2.25rem); border-radius: 1.15rem; background: var(--panel); border: 1px solid var(--line); }
.contact-panel { display: grid; gap: 1.25rem; align-content: start; }
.location-card h3 { color: var(--muted); font-size: 1rem; }
.location-card address { margin: .3rem 0 .9rem; font-size: 1.2rem; font-weight: 700; font-style: normal; line-height: 1.35; }
.location-map { display: block; position: relative; border-radius: .75rem; overflow: hidden; background: #e8eee3; }
.location-map img { height: auto; filter: grayscale(1) brightness(.67) contrast(.86); }
.map-pin { position: absolute; top: 50%; left: 50%; width: 1.15rem; height: 1.15rem; transform: translate(-50%, -50%); border: 2px solid #101720; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.map-pin::after { content: ""; position: absolute; inset: -3px; border: 2px solid #3039ac; border-radius: inherit; opacity: 0; }
.location-map.is-visible .map-pin::after { animation: map-pulse 1.4s ease-out 3; }
.map-open { position: absolute; inset: auto auto .55rem .55rem; padding: .35rem .65rem; border-radius: .45rem; background: #101720; color: var(--text); font-size: .85rem; font-weight: 650; }
.location-map:hover .map-open { background: #3039ac; }
.map-source { display: inline-block; margin-top: .45rem; color: var(--muted); font-size: .8rem; }
@keyframes map-pulse {
  from { transform: scale(1); opacity: .85; }
  to { transform: scale(2.9); opacity: 0; }
}
.contact h2 { margin: .65rem 0 .5rem; }
.contact-panel p:last-child { color: var(--muted); }
.contact-actions { display: grid; align-content: start; }
.contact-actions a { text-decoration: none; }
.contact-label { color: var(--muted); font-size: .88rem; font-weight: 650; }
.contact-phone {
  display: grid;
  gap: .15rem;
  padding: .75rem 1rem .85rem;
  margin-bottom: .4rem;
  border-radius: .75rem;
  background: #242f2c;
  transition: background .2s;
}
.contact-phone:hover { background: #2d3e36; }
.contact-number {
  color: var(--accent);
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  font-weight: 750;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .25rem .7rem;
  min-height: 3rem;
  padding: .5rem .1rem;
  border-bottom: 1px solid var(--line);
}
.contact-row strong { font-size: .98rem; font-weight: 650; }
.contact-row:hover strong { color: var(--accent); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem; padding-block: 1rem 1.4rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer-inner .brand { color: var(--text); }
.mobile-contact { display: none; }

@keyframes van-arrival {
  from { opacity: .4; transform: translateX(-.45rem); }
  75% { opacity: 1; transform: translateX(.12rem); }
  to { transform: translateX(0); }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy { grid-area: copy; animation: enter .55s ease-out both; }
.hero-media { animation: enter .65s .09s ease-out both; }
.emergency { animation: enter .55s .14s ease-out both; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  html { scroll-padding-top: 1rem; }
  .masthead { position: relative; padding-block: .65rem .15rem; }
  .navigation-bar { grid-template-columns: 1fr auto; gap: .55rem; padding: .55rem; }
  .navigation-bar .brand { margin-inline-start: .25rem; }
  .section-nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: auto 1fr 1fr; }
  .section-nav a { padding-inline: .5rem; font-size: .875rem; }
  .navigation-bar .header-call { padding-inline: .65rem; font-size: 1.0625rem; }
  .service-card > p:not(.person), details ul { font-size: 1.0625rem; }
  .hero-layout, .service-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-layout { grid-template-areas: "copy" "emergency" "photos"; gap: 1.5rem; }
  .emergency { grid-template-columns: auto minmax(0, 1fr); }
  .emergency-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
  h1 { font-size: clamp(1.6rem, 7.5vw, 3rem); }
  .mobile-contact:not([hidden]) { display: block; position: fixed; z-index: 3; inset: auto 0 0; padding: .55rem 1rem max(.55rem, env(safe-area-inset-bottom)); background: #101720f5; border-top: 1px solid var(--line); }
  .mobile-contact .button { display: flex; width: 100%; }
  .has-mobile-contact .footer-inner { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .brand { gap: .4rem; font-size: .9rem; }
  .brand img { width: 1.7rem; height: 1.7rem; }
  .emergency-icon { width: 2.7rem; }
  .emergency-icon svg { width: 2rem; height: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
