:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --success: #15803d;
  --chip: #e0f2fe;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }
img, svg { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.section { padding: 72px 0; }
.section-heading { max-width: 780px; margin-bottom: 28px; }
.section-heading h2, .panel__heading h2, .quick-guide h2, .map-grid h2, .correction h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}
.section-heading p { color: var(--muted); margin-top: 12px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.top-alert {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 10px 25px rgba(127, 29, 29, 0.25);
}
.top-alert__inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top-alert__text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.top-alert__text span { opacity: .92; }
.top-alert__call {
  margin-left: auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: #7f1d1d;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fca5a5;
  box-shadow: 0 0 0 rgba(252, 165, 165, .7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(252, 165, 165, .7); }
  70% { box-shadow: 0 0 0 14px rgba(252, 165, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 165, 165, 0); }
}

.hero {
  padding-top: 76px;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, .16), transparent 36%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, .16), transparent 33%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 42px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand-headline {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(54px, 7vw, 82px);
  height: clamp(54px, 7vw, 82px);
  border-radius: 22px;
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 16px 36px rgba(153, 27, 27, .16);
}
.brand-logo svg { width: 78%; height: 78%; }
h1 {
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 5rem);
  line-height: .96;
  letter-spacing: -0.06em;
}
h1 small {
  display: block;
  margin-top: 10px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--muted);
  text-transform: lowercase;
}
.lead {
  margin: 24px 0 0;
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}
.season-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: .92rem;
  color: var(--muted);
}
.season-note__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.6;
}
.season-note strong { color: var(--ink); }
.hero__actions, .card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero__actions { margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger-dark); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--small { min-height: 38px; padding: 8px 14px; font-size: .9rem; }
.btn--disabled { pointer-events: none; opacity: .48; }
.btn--hidden { visibility: hidden; pointer-events: none; }


.hero-emergency {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(220, 38, 38, .12);
}
.hero-emergency__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.hero-emergency__header .eyebrow { margin: 0; color: #991b1b; }
.hero-emergency__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
  font-size: .82rem;
}
.hero-emergency h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  transition: opacity .3s ease;
}
.hero-emergency p {
  margin: 10px 0 0;
  color: var(--muted);
  transition: opacity .3s ease;
}
.hero-emergency.is-fading h2,
.hero-emergency.is-fading p,
.hero-emergency.is-fading .hero-emergency__status {
  opacity: 0;
}
.hero-emergency__dots {
  display: flex;
  gap: 0;
  margin: -8px 0 -12px -14px;
}
.hero-emergency__dot {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.hero-emergency__dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background .2s ease;
}
.hero-emergency__dot.is-active::after { background: var(--danger); }
.hero-emergency__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.road-help-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #0f172a;
  color: #fff;
}
.road-help-card strong,
.road-help-card span { display: block; }
.road-help-card span { color: #cbd5e1; font-size: .92rem; }
.road-help-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.road-help-card__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  text-decoration: none;
}

.trust-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.trust-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: .9rem;
}
.hero-card {
  margin: 0;
  padding: 18px;
  border-radius: calc(var(--radius) + 10px);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) + 2px);
  background: #e2e8f0;
}
.hero-card figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .95rem;
}

.panel {
  margin-top: -20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.panel__heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.search-box {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.search-box__icon {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--primary);
}
.search-box input {
  width: 100%;
  min-height: 60px;
  border: 0;
  outline: 0;
  font-size: 1.05rem;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.filter-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  padding: 9px 12px;
  color: #334155;
  cursor: pointer;
  font-weight: 750;
}
.filter-chip:hover, .filter-chip.is-active {
  border-color: var(--primary);
  background: #dbeafe;
  color: #1e40af;
}
.filter-chip--open.is-active {
  border-color: var(--success);
  background: #dcfce7;
  color: #166534;
}
.district-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.district-row label { font-weight: 850; }
.district-row select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.status-text { margin: 16px 0 0; color: var(--muted); font-weight: 750; }

.quick-guide { background: #0f172a; color: #fff; }
.quick-guide .eyebrow { color: #93c5fd; }
.quick-guide p { color: #cbd5e1; }
.quick-guide a { color: #bfdbfe; font-weight: 900; }
.quick-guide__grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 34px;
  align-items: start;
}
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 18px 18px 18px 62px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-weight: 900;
}

.tire-guide {
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.tire-guide__grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 34px;
  align-items: start;
}
.tire-guide__content p {
  color: var(--muted);
  margin: 12px 0 0;
}
.tire-guide__content h3 {
  margin: 28px 0 0;
  font-size: 1.15rem;
}
.tire-guide__content h3:first-of-type { margin-top: 0; }
.tire-guide__content a { color: var(--primary-dark); font-weight: 700; }

.last-updated {
  margin-top: 8px;
  font-size: .88rem;
  color: var(--muted);
}
.last-updated a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}
.last-updated a:hover { text-decoration: underline; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(15, 23, 42, .08);
}
.card.is-priority {
  border-color: rgba(220, 38, 38, .35);
  box-shadow: 0 16px 45px rgba(220, 38, 38, .12);
}
.card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.22;
}
.badges, .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: .76rem;
  font-weight: 850;
}
.badge { background: #f1f5f9; color: #334155; }
.badge--high { background: #dcfce7; color: #166534; }
.badge--mid { background: #fef3c7; color: #92400e; }
.badge--low { background: #fee2e2; color: #991b1b; }
.badge--open { background: #dcfce7; color: #166534; }
.badge--closed { background: #fee2e2; color: #991b1b; }
.badge--unknown { background: #e2e8f0; color: #334155; }
.tag { background: var(--chip); color: #075985; }
.card__meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .94rem;
}
.card__meta strong { color: var(--ink); }
.phone-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
  text-decoration: none;
}
.note {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: .92rem;
}
.card-actions { margin-top: auto; }
.card-actions .btn { min-height: 40px; padding: 9px 12px; font-size: .9rem; }
.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px dashed #cbd5e1;
  text-align: center;
  color: var(--muted);
}

.map-section { background: linear-gradient(180deg, #fff, #eff6ff); }
.map-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 34px;
  align-items: center;
}
.feature-list { padding-left: 20px; color: var(--muted); }
.leaflet-map {
  width: 100%;
  height: min(62vh, 520px);
  min-height: 430px;
  max-height: 600px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #e2e8f0;
  isolation: isolate;
}

/*
  Kritični Leaflet layout stilovi.
  Ovaj blok drži mapu ispravnom čak i ako se eksterni leaflet.css učita sporo,
  bude blokiran ili ga WordPress/cache plugin premjesti.
*/
.leaflet-container {
  position: relative;
  overflow: hidden;
  background: #dbe4ea;
  outline-offset: 1px;
  font-family: inherit;
  touch-action: none;
  z-index: 1;
}
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.leaflet-tile {
  width: 256px;
  height: 256px;
  max-width: none !important;
  max-height: none !important;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.leaflet-container img.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: initial;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
  max-width: none !important;
}
.leaflet-control-container .leaflet-top,
.leaflet-control-container .leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}
.leaflet-control-container .leaflet-top { top: 10px; }
.leaflet-control-container .leaflet-bottom { bottom: 10px; }
.leaflet-control-container .leaflet-left { left: 10px; }
.leaflet-control-container .leaflet-right { right: 10px; }
.leaflet-control { pointer-events: auto; }
.leaflet-popup,
.leaflet-tooltip {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
  padding: 1px;
  text-align: left;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15,23,42,.22);
}
.leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.45;
}
.leaflet-popup-tip-container { display: none; }
.leaflet-map__fallback {
  min-height: inherit;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
.map-marker {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(15,23,42,.25);
}
.map-marker--priority { background: var(--danger); }
.leaflet-popup-content { font-family: inherit; }
.map-popup strong { display: block; margin-bottom: 4px; color: var(--ink); }
.map-popup p { margin: 0 0 8px; color: var(--muted); }
.map-popup a { font-weight: 800; color: var(--primary-dark); }

.faq { background: #fff; }
.faq-list { display: grid; gap: 12px; }
details {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: #fff;
}
summary { cursor: pointer; font-weight: 900; }
details p { color: var(--muted); margin-bottom: 0; }

.correction__box {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: #0f172a;
  color: #fff;
}
.correction__box .eyebrow { color: #93c5fd; }
.correction__box p { color: #cbd5e1; }

.footer {
  padding: 28px 0;
  background: #020617;
  color: #cbd5e1;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer a { color: #fff; }

.noscript-list {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

@media (max-width: 980px) {
  .hero__grid, .quick-guide__grid, .map-grid, .tire-guide__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-alert__call { margin-left: 0; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 22px, 1160px); }
  .section { padding: 46px 0; }
  .top-alert__inner { align-items: flex-start; padding-block: 10px; }
  .top-alert__text { display: block; }
  .top-alert__text span { display: block; }
  .top-alert__call { width: 100%; }
  .hero { padding-top: 44px; }
  .brand-headline { align-items: flex-start; }
  .road-help-card { flex-direction: column; align-items: stretch; }
  .road-help-card__actions a { flex: 1; }
  .hero__actions .btn, .hero-emergency__actions .btn, .card-actions .btn, .correction__box .btn { width: 100%; }
  .panel { padding: 18px; border-radius: 20px; }
  .panel__heading, .correction__box { flex-direction: column; align-items: stretch; }
  .search-box { grid-template-columns: 42px 1fr; }
  .search-box input { min-height: 54px; font-size: 1rem; }
  .filters { gap: 8px; }
  .filter-chip { padding: 8px 10px; font-size: .88rem; }
  .cards { grid-template-columns: 1fr; }
  .leaflet-map { height: 420px; min-height: 360px; }
  .footer__inner { display: block; }
}
