:root {
  /* Civic-oriented palette tuned for strong contrast and quick readability. */
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #e6edf2;
  --text: #14212b;
  --muted: #4e5f6d;
  --brand: #0f5a78;
  --brand-strong: #0b4258;
  --alert: #b83620;
  --alert-strong: #8f2918;
  --line: #c9d7e1;
  --shadow: 0 10px 30px rgba(12, 30, 42, 0.12);
  --radius: 14px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans", "Liberation Sans", Tahoma, sans-serif;
  background: radial-gradient(circle at 10% -20%, #eaf4fb 0%, #f4f6f8 60%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: var(--brand-strong);
}

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.15rem);
}

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.8rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.emergency-strip {
  background: var(--alert);
  color: #fff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.98rem;
}

.emergency-strip a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.site-header {
  /* Sticky navigation stays visible during long scrolls. */
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 74px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
  font-size: 1.05rem;
}

.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.45rem;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

.primary-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
}

.primary-nav.open {
  display: block;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.8rem 0.95rem;
}

.primary-nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 0.7rem 0.5rem;
  border-radius: 8px;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: var(--surface-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  padding: 0.68rem 1rem;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brand-strong);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.btn-alert {
  background: var(--alert);
  color: #fff;
  white-space: nowrap;
}

.btn-alert:hover,
.btn-alert:focus-visible {
  background: var(--alert-strong);
}

.hero {
  /* Hero uses the required cover image with overlay for readable text. */
  min-height: clamp(500px, 78vh, 780px);
  background-image: linear-gradient(125deg, rgba(6, 16, 25, 0.78), rgba(15, 90, 120, 0.44)),
    url("../images/tppe-gevgelija-4.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-overlay {
  width: 100%;
  min-height: inherit;
  display: grid;
  align-items: center;
}

.hero-content {
  padding: clamp(3.5rem, 9vw, 6.8rem) 0 3rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: #d6e4f1;
}

.subtitle {
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  margin: 0 0 1rem;
  color: #e7f1f7;
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(184, 54, 32, 0.9);
  color: #fff;
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: clamp(2.9rem, 6.5vw, 5rem) 0;
}

.accent {
  background: linear-gradient(180deg, #eef4f8, #f8fbfd);
}

.split {
  display: grid;
  gap: 1.5rem;
}

.about-image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.prose p {
  max-width: 90ch;
}

.cards {
  /* Results are presented as responsive cards for easier mobile scanning. */
  display: grid;
  gap: 0.95rem;
  margin-top: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.gallery {
  /* Gallery defaults to 2 columns on small screens. */
  margin-top: 1.2rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
  margin: 0;
}

.gallery-trigger {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  background: var(--surface-strong);
}

.gallery-trigger img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery-trigger:hover img,
.gallery-trigger:focus-visible img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.emergency-section {
  background: linear-gradient(180deg, #f7fbff, #f2f7fb);
}

.contact-layout {
  display: grid;
  gap: 1rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.emergency-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}

.emergency-list li {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #eff5fa;
}

.disclaimer {
  margin: 0;
  font-weight: 700;
  color: var(--alert-strong);
}

form {
  display: grid;
  gap: 0.55rem;
}

label {
  font-weight: 700;
}

input,
textarea {
  font: inherit;
  border: 1px solid #97aabd;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fff;
}

textarea {
  resize: vertical;
}

.form-feedback {
  margin: 0.25rem 0 0;
  color: var(--brand-strong);
  font-weight: 700;
}

.site-footer {
  background: #16232d;
  color: #f2f8fc;
  padding: 1rem 0;
}

.footer-layout {
  display: grid;
  gap: 0.45rem;
}

.site-footer a {
  color: #d1eaf9;
}

.lightbox {
  /* Lightweight modal viewer, progressively enhanced by JavaScript. */
  position: fixed;
  inset: 0;
  background: rgba(4, 11, 16, 0.92);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  z-index: 100;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(980px, 92vw);
  justify-self: center;
}

#lightbox-image {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
}

#lightbox-caption {
  color: #e4ecf1;
  text-align: center;
  margin-top: 0.65rem;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.2rem;
}

.lightbox-nav {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.9rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1f89d7;
  outline-offset: 2px;
}

@media (min-width: 760px) {
  /* Tablet/Desktop layout upgrades. */
  .menu-toggle {
    display: none;
  }

  .primary-nav {
    display: block;
    position: static;
    box-shadow: none;
    border-bottom: 0;
    background: transparent;
  }

  .primary-nav ul {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
  }

  .nav-shell {
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
  }

  .split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-layout {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
}

@media (min-width: 1080px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  /* Print-friendly text-only output for municipal archiving/sharing. */
  :root {
    --bg: #fff;
    --text: #000;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header,
  .menu-toggle,
  .btn,
  .hero,
  .gallery,
  .lightbox,
  .site-footer {
    display: none !important;
  }

  .section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  a {
    text-decoration: none;
    color: #000;
  }
}
