:root {
  --bg: #f6fafb;
  --surface: #ffffff;
  --ink: #173044;
  --muted: #5e7481;
  --line: #d9e8ec;
  --blue: #126c86;
  --blue-dark: #0d4b60;
  --teal: #1aa6a3;
  --red: #c7212c;
  --red-soft: #fff1f1;
  --shadow: 0 22px 70px rgba(23, 48, 68, 0.13);
  --header-bg: rgba(255, 255, 255, 0.92);
  --hero-bg: linear-gradient(120deg, #ffffff 0%, #eef8fa 100%);
  --hero-fade: #ffffff;
  --section-soft: #ffffff;
  --notice-card: #ffffff;
  --notice-border: #ffd2d2;
  --insurance-bg: #eaf8f7;
  --map-bg: #ffffff;
  --map-placeholder: #e8f5f7;
  --service-shadow: 0 8px 24px rgba(23, 48, 68, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:has(.theme-toggle:checked) {
  --bg: #071923;
  --surface: #102936;
  --ink: #eef8fa;
  --muted: #b8cad1;
  --line: #214554;
  --blue: #66d2e0;
  --blue-dark: #9be4ec;
  --teal: #36d1c8;
  --red: #ff5d66;
  --red-soft: #260f16;
  --shadow: 0 24px 76px rgba(0, 0, 0, 0.38);
  --header-bg: rgba(7, 25, 35, 0.9);
  --hero-bg:
    radial-gradient(circle at 20% 26%, rgba(54, 209, 200, 0.14), transparent 26%),
    linear-gradient(120deg, #06161f 0%, #0b2b37 62%, #102936 100%);
  --hero-fade: #06161f;
  --section-soft: #0d2c38;
  --notice-card: #111f2a;
  --notice-border: #552028;
  --insurance-bg: #123d41;
  --map-bg: #0d2430;
  --map-placeholder: #153847;
  --service-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.theme-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

#ambulancia,
#mapa,
#kontakt {
  scroll-margin-top: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(220px, 48vw);
  border-radius: 6px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

body:has(.theme-toggle:checked) .brand {
  padding: 6px 8px;
  background: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-dark);
  font-weight: 700;
}

.nav a {
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  outline: none;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 30px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.switch-track {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 1px 4px rgba(23, 48, 68, 0.12);
}

.switch-track::before,
.switch-track::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  font-size: 10px;
  line-height: 1;
}

.switch-track::before {
  content: "";
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f4b942;
}

.switch-track::after {
  content: "";
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: -3px 0 0 #9cb7c1;
}

.switch-thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-dark);
  transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle:checked ~ .site-header .switch-thumb {
  transform: translateX(20px);
  background: var(--teal);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  min-height: min(620px, calc(100vh - 76px));
  background: var(--hero-bg);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--teal) 45%, transparent), transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: clamp(52px, 8vw, 110px) clamp(22px, 6vw, 82px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(2.55rem, 6vw, 5.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--red) 28%, transparent);
}

.button.secondary {
  background: var(--surface);
  color: var(--blue-dark);
  border: 1px solid var(--line);
}

.hero-image {
  position: relative;
  z-index: 1;
  min-height: 420px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: clamp(-96px, -6vw, -40px);
  padding: clamp(30px, 5vw, 78px) clamp(24px, 5vw, 72px) clamp(26px, 5vw, 62px) 0;
  overflow: visible;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 12% 8% 10% 20%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--teal) 22%, transparent), transparent 62%),
    radial-gradient(circle at 72% 36%, color-mix(in srgb, var(--red) 12%, transparent), transparent 45%);
  filter: blur(28px);
  pointer-events: none;
}

body:has(.theme-toggle:checked) .hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 22, 31, 0.38), rgba(6, 22, 31, 0.04) 48%, rgba(6, 22, 31, 0.16)),
    linear-gradient(180deg, rgba(6, 22, 31, 0.08), transparent 62%, rgba(6, 22, 31, 0.26));
  pointer-events: none;
}

.hero-image img {
  width: min(100%, 820px);
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 28px 44px rgba(18, 108, 134, 0.16));
}

.hero-art {
  position: relative;
  width: min(100%, 820px);
}

.hero-art img {
  display: block;
  width: 100%;
}

.hero-ekg-pulse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero-ekg-pulse polyline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 24;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1120;
  stroke-dashoffset: 1120;
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.92))
    drop-shadow(0 0 16px rgba(199, 33, 44, 0.7));
  mix-blend-mode: screen;
  opacity: 0;
  animation: hero-ekg-scan 3.8s ease-in-out infinite;
}

@keyframes hero-ekg-scan {
  0%,
  40% {
    stroke-dashoffset: 1120;
    opacity: 0;
  }

  48% {
    opacity: 0.88;
  }

  68% {
    stroke-dashoffset: 0;
    opacity: 0.88;
  }

  100% {
    stroke-dashoffset: -1120;
    opacity: 0;
  }
}

.notice {
  padding: clamp(34px, 5vw, 62px) clamp(20px, 5vw, 72px);
  background:
    radial-gradient(circle at 24% 48%, color-mix(in srgb, var(--red) 15%, transparent), transparent 28%),
    var(--red-soft);
  border-top: 1px solid var(--notice-border);
  border-bottom: 1px solid var(--notice-border);
}

.notice-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
  background: var(--notice-card);
  border-left: 6px solid var(--red);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.notice-kicker {
  margin: 0 0 6px;
  color: #8d1820;
  font-weight: 800;
}

.notice h2 {
  color: var(--red);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  text-transform: uppercase;
}

.notice p:last-child {
  max-width: 920px;
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(64px, 8vw, 116px) clamp(20px, 5vw, 72px);
}

.section-copy,
.section-heading,
.service-list,
.contact-grid {
  max-width: 1120px;
}

.intro {
  background:
    linear-gradient(180deg, var(--section-soft), var(--surface));
}

.intro-focused {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  text-align: center;
  padding-top: clamp(58px, 7vw, 92px);
  padding-bottom: clamp(54px, 7vw, 86px);
}

.intro-focused .section-copy {
  margin: 0 auto;
}

.intro-focused p {
  margin-left: auto;
  margin-right: auto;
}

.intro p {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.insurance {
  display: inline-block;
  padding: 14px 16px;
  background: var(--insurance-bg);
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  color: var(--ink) !important;
  font-weight: 800;
}

.services {
  display: block;
  background:
    linear-gradient(180deg, var(--surface), var(--bg));
}

.section-heading {
  margin: 0 auto 30px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.service-list li {
  position: relative;
  min-height: 72px;
  padding: 18px 18px 18px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--service-shadow);
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 20%, transparent);
}

.map-section {
  padding: clamp(64px, 8vw, 116px) clamp(20px, 5vw, 72px);
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 28%),
    var(--map-bg);
}

.map-wrap {
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 7;
  background: var(--map-placeholder);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-link {
  max-width: 1120px;
  margin: 14px auto 0;
  text-align: right;
}

.map-link a {
  color: var(--blue-dark);
  font-weight: 800;
}

.contact {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, #092f3d, #0d4b60);
  color: #ffffff;
}

body:has(.theme-toggle:checked) .contact {
  background:
    radial-gradient(circle at 20% 20%, rgba(54, 209, 200, 0.16), transparent 24%),
    linear-gradient(135deg, #06161f, #0d2c38);
}

.contact .eyebrow,
.contact a {
  color: #bdf2ee;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
}

.contact-item {
  min-height: 170px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}

.contact-item span {
  display: block;
  margin-bottom: 12px;
  color: #bdf2ee;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-item a,
.contact-item p {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.contact-item:first-child {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(189, 242, 238, 0.4);
}

.contact-item:first-child a {
  color: #ffffff;
  font-size: 1.18rem;
}

.contact-item small {
  display: block;
  margin-top: 8px;
  color: #d4e6eb;
  line-height: 1.4;
}

.site-footer {
  padding: 26px clamp(20px, 5vw, 72px);
  background: #092f3d;
  color: #c5d9df;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero,
  .section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-image {
    min-height: 300px;
    margin-left: 0;
    padding: 20px;
    order: -1;
  }

  .hero-image::before {
    inset: 10% 14%;
  }

  .service-list,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-wrap {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .theme-switch {
    align-self: flex-end;
  }

  .hero-copy {
    padding-top: 44px;
  }

  .button {
    width: 100%;
  }
}
