/*
Theme Name: Halo Warszawa – Ulice
Theme URI: https://halo-warszawa.pl/ulice/
Author: Halo Warszawa
Description: Lekki, semantyczny motyw dla katalogu ulic Warszawy.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: halo-warszawa-ulice
License: GPL-2.0-or-later
*/

:root {
  --hw-red: #c51f3a;
  --hw-red-dark: #94152a;
  --hw-ink: #17212b;
  --hw-muted: #5d6975;
  --hw-line: #dce2e7;
  --hw-soft: #f4f6f7;
  --hw-white: #fff;
  --hw-content: 52rem;
  --hw-wide: 72rem;
  --hw-radius: 0.5rem;
  --hw-shadow: 0 0.35rem 1.25rem rgba(23, 33, 43, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--hw-white);
  color: var(--hw-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg,
iframe {
  max-width: 100%;
}

a {
  color: var(--hw-red-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--hw-red);
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 0.2rem solid var(--hw-red);
  outline-offset: 0.2rem;
}

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

.screen-reader-text:focus {
  z-index: 100000;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  background: var(--hw-white);
  color: var(--hw-ink);
  box-shadow: var(--hw-shadow);
}

.site-shell,
.content-shell {
  width: min(100% - 2rem, var(--hw-wide));
  margin-inline: auto;
}

.content-shell {
  max-width: var(--hw-content);
}

.site-header {
  border-bottom: 1px solid var(--hw-line);
  background: rgba(255, 255, 255, 0.98);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.7rem;
}

.site-brand {
  color: var(--hw-ink);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-brand::before {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--hw-red);
  content: "";
}

.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a,
.footer-nav a {
  color: var(--hw-ink);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.site-main {
  min-height: 65vh;
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

h1,
h2,
h3 {
  color: var(--hw-ink);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-size: clamp(2.05rem, 7vw, 3.65rem);
}

h2 {
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.45rem, 4.5vw, 2rem);
}

h3 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.16rem;
}

p,
ul,
ol,
table {
  margin-block: 0 1.2rem;
}

ul,
ol {
  padding-inline-start: 1.35rem;
}

li + li {
  margin-top: 0.35rem;
}

.page-intro {
  max-width: 47rem;
  margin-bottom: 2rem;
  color: var(--hw-muted);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
}

.eyebrow,
.street-context,
.archive-count {
  color: var(--hw-muted);
  font-size: 0.94rem;
}

.eyebrow {
  margin-bottom: 0.55rem;
  color: var(--hw-red-dark);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumb {
  margin-bottom: 1.4rem;
  color: var(--hw-muted);
  font-size: 0.9rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 0.35rem;
  color: #929ca5;
  content: "/";
}

.street-context {
  margin-bottom: 2rem;
}

.street-article__content {
  overflow-wrap: anywhere;
}

.street-article__content > .warsaw-street {
  margin-top: 2rem;
}

.warsaw-street section {
  margin-block: 2.5rem;
}

.warsaw-street h2 {
  padding-top: 1.25rem;
  margin-block: 2.5rem 1rem;
  border-top: 1px solid var(--hw-line);
}

.warsaw-street h3 {
  color: #2c3945;
}

.warsaw-street__bluf {
  padding: 1rem 1.15rem;
  margin-block: 1.5rem 2rem;
  border: 0;
  border-inline-start: 0.3rem solid var(--hw-red);
  border-radius: 0 var(--hw-radius) var(--hw-radius) 0;
  background: #fff5f6;
  font-size: 1.08rem;
}

.warsaw-street__bluf p:last-child,
.warsaw-street section > :last-child {
  margin-bottom: 0;
}

.warsaw-street__practical ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.warsaw-street__practical li {
  padding: 0.8rem 0.9rem;
  margin: 0;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  background: var(--hw-soft);
}

.warsaw-street__map label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 720;
}

.warsaw-street__map select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 2.5rem 0.65rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #aeb8c1;
  border-radius: var(--hw-radius);
  background: var(--hw-white);
  color: var(--hw-ink);
  font: inherit;
}

.warsaw-street__map iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  background: var(--hw-soft);
}

.warsaw-street__addresses ul {
  columns: 8rem 4;
  column-gap: 1.5rem;
}

.warsaw-street__addresses li {
  break-inside: avoid;
}

.warsaw-street table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.warsaw-street th,
.warsaw-street td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--hw-line);
  text-align: left;
}

.halo-related-streets {
  padding: 1.2rem;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  background: var(--hw-soft);
}

.halo-related-streets h2 {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.halo-related-streets__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.6rem 1.5rem;
}

.halo-related-streets__all {
  display: inline-block;
  margin-top: 0.45rem;
  font-weight: 720;
}

.district-map-figure {
  max-width: 44rem;
  margin-inline: auto;
}

.district-map-wrap {
  padding: 0.75rem;
  border: 1px solid var(--hw-line);
  border-radius: 0.75rem;
  background: var(--hw-white);
}

.district-map {
  display: block;
  width: 100%;
  height: auto;
}

.district-map path {
  vector-effect: non-scaling-stroke;
  fill: var(--hw-white);
  fill-rule: evenodd;
  stroke: #88949e;
  stroke-width: 1.5;
}

.district-map a path {
  transition: fill 120ms ease, stroke 120ms ease;
}

.district-map a:hover path,
.district-map a:focus path {
  fill: #ffe7ea;
  stroke: var(--hw-red);
  stroke-width: 2.5;
}

.district-map a:focus {
  outline: none;
}

.district-map text {
  fill: var(--hw-ink);
  font-size: 28px;
  font-weight: 720;
  paint-order: stroke fill;
  pointer-events: none;
  stroke: rgb(255 255 255 / 88%);
  stroke-linejoin: round;
  stroke-width: 5px;
  text-anchor: middle;
}

.district-map text.is-compact {
  font-size: 24px;
}

.district-map path.is-inactive {
  fill: #e4e8eb;
  stroke: #b6bec5;
}

.district-map text.is-inactive {
  fill: #7d8790;
}

.district-map path.district-map__river-water {
  fill: #a9cfdf;
  pointer-events: none;
  stroke: #f8fbfc;
  stroke-width: 2;
}

@media (max-width: 32rem) {
  .district-map-wrap {
    padding: 0.25rem;
  }

  .district-map text {
    font-size: 40px;
    stroke-width: 6px;
  }

  .district-map text.is-compact {
    font-size: 34px;
  }
}

.district-map__credit {
  margin-top: 0.5rem;
  color: var(--hw-muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.district-map__credit a {
  color: inherit;
}

.district-grid,
.street-discovery,
.district-sections {
  padding: 0;
  list-style: none;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.7rem;
}

.district-grid li {
  margin: 0;
}

.district-grid a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  color: var(--hw-ink);
  font-weight: 700;
  text-decoration: none;
}

.district-grid a:hover {
  border-color: var(--hw-red);
  color: var(--hw-red-dark);
}

.district-grid__count {
  color: var(--hw-muted);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
}

.featured-street {
  padding: 1.25rem;
  border-inline-start: 0.3rem solid var(--hw-red);
  border-radius: 0 var(--hw-radius) var(--hw-radius) 0;
  background: var(--hw-soft);
}

.featured-street__name {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--hw-ink);
  font-size: 1.25rem;
  font-weight: 760;
}

.featured-street__district {
  margin: 0;
  color: var(--hw-muted);
}

.street-discovery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.3rem 1.75rem;
}

.street-discovery li {
  margin: 0;
  padding-block: 0.42rem;
  border-bottom: 1px solid #edf0f2;
}

.district-sections > li {
  padding-block: 0.25rem 1.4rem;
  margin: 0;
  border-bottom: 1px solid var(--hw-line);
}

.district-sections h3 {
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
}

.district-sections__meta {
  margin-bottom: 0.75rem;
  color: var(--hw-muted);
}

.district-sections__streets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.25rem 1.4rem;
  padding-left: 1.15rem;
}

.district-sections__all {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 720;
}

.letter-nav {
  margin-block: 2rem;
}

.letter-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.letter-nav li {
  margin: 0;
}

.letter-nav a {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--hw-line);
  border-radius: 0.3rem;
  color: var(--hw-ink);
  font-weight: 750;
  text-decoration: none;
}

.letter-nav a:hover {
  border-color: var(--hw-red);
  color: var(--hw-red-dark);
}

.alphabet-group {
  scroll-margin-top: 1rem;
}

.alphabet-group h2 {
  padding-bottom: 0.45rem;
  border-bottom: 0.15rem solid var(--hw-red);
}

.alphabet-group ul,
.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.25rem 2rem;
  padding-left: 1.2rem;
}

.alphabet-group li,
.result-list li {
  padding-block: 0.35rem;
}

.pagination {
  margin-top: 2.5rem;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pagination .page-numbers {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--hw-line);
  border-radius: 0.3rem;
  text-decoration: none;
}

.pagination .current {
  border-color: var(--hw-red);
  background: var(--hw-red);
  color: var(--hw-white);
}

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--hw-line);
  background: var(--hw-soft);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer p {
  margin: 0;
  color: var(--hw-muted);
  font-size: 0.9rem;
}

@media (min-width: 48rem) {
  .site-shell,
  .content-shell {
    width: min(100% - 3rem, var(--hw-wide));
  }

  .content-shell {
    max-width: var(--hw-content);
  }

  .site-main {
    padding-block: 3.5rem 5rem;
  }

  .warsaw-street__bluf,
  .halo-related-streets,
  .featured-street {
    padding: 1.35rem 1.5rem;
  }
}

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

  .district-map a path {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .district-map-wrap,
  .letter-nav {
    display: none;
  }

  body {
    color: #000;
  }

  a {
    color: inherit;
  }
}
