:root {
  --tp-primary: #1a56a0;
  --tp-primary-dark: #123f78;
  --tp-accent: #e8a13a;
  --tp-bg: #f4f6f9;
  --tp-card: #ffffff;
  --tp-border: #e2e6ec;
  --tp-text: #16202b;
  --tp-text-muted: #64748b;
  --tp-danger: #c0392b;
  --tp-radius: 14px;
  --tp-shadow: 0 4px 16px rgba(15, 35, 60, 0.08);
  --tp-shadow-lg: 0 12px 32px rgba(15, 35, 60, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--tp-bg);
  color: var(--tp-text);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-size: 21px; font-weight: 700; color: var(--tp-text); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--tp-primary); }
.header-nav { display: flex; gap: 24px; }
.header-nav a { color: var(--tp-text-muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.header-nav a:hover { color: var(--tp-primary); }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 120px;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.10) 0, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(232,161,58,0.20) 0, transparent 50%),
    linear-gradient(135deg, #0e2c4d 0%, #1a56a0 55%, #1d6fbf 100%);
  z-index: -1;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(120deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 40px);
}
.hero-inner { text-align: center; }
.hero h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Search panel (overlaps hero bottom edge) ---- */
.search-panel {
  background: var(--tp-card);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow-lg);
  padding: 24px 28px;
  margin: -76px auto 0;
  max-width: 1080px;
  position: relative;
  z-index: 5;
}
.search-form {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.field { display: flex; flex-direction: column; text-align: left; gap: 6px; flex: 1 1 150px; min-width: 130px; }
.field label { font-size: 12px; font-weight: 600; color: var(--tp-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.field select, .field input {
  height: 44px;
  border: 1px solid var(--tp-border);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 15px;
  background: #fff;
  color: var(--tp-text);
}
.field select:focus, .field input:focus {
  outline: none;
  border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 160, 0.15);
}

.btn-primary {
  height: 44px;
  padding: 0 22px;
  background: var(--tp-primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--tp-primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-search { flex: 0 0 auto; white-space: nowrap; }

.form-error { color: var(--tp-danger); margin: 14px 0 0; font-size: 14px; font-weight: 600; }

/* ---- Trust bar ---- */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  padding: 28px 0 8px;
  color: var(--tp-text-muted);
  font-size: 13.5px;
  font-weight: 600;
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item i { color: var(--tp-primary); font-size: 18px; }

/* ---- Loading ---- */
.results-loading { text-align: center; color: var(--tp-text-muted); padding: 40px 0; }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--tp-border);
  border-top-color: var(--tp-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Results ---- */
.results { margin: 36px 0 60px; }
.results-summary { margin: 0 0 18px; color: var(--tp-text-muted); font-size: 14px; font-weight: 600; }
.results-list { display: flex; flex-direction: column; gap: 16px; }

.parking-card {
  display: flex;
  align-items: stretch;
  min-height: 220px;
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  overflow: hidden;
  box-shadow: var(--tp-shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.parking-card:hover { box-shadow: var(--tp-shadow-lg); transform: translateY(-1px); }
.parking-card.best-price { border: 2px solid var(--tp-primary); }

.parking-card__left {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  min-width: 0;
}
.parking-card__name { font-size: 16px; font-weight: 700; margin: 0; }
.parking-card__meta { font-size: 13px; color: var(--tp-text-muted); }
.parking-card__price { font-size: 27px; font-weight: 700; line-height: 1; }
.parking-card__price span { font-size: 14px; font-weight: 500; color: var(--tp-text-muted); }
.parking-card__badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tp-primary);
  background: #e8f1fb;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-reserve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tp-primary);
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  width: fit-content;
  margin-top: 4px;
}
.btn-reserve:hover { background: var(--tp-primary-dark); }

/* ---- Image gallery (right side of card) ---- */
.parking-card__gallery {
  position: relative;
  flex: 0 0 260px;
  height: 220px;
  background: #eef1f5;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.25s ease;
}
.gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #dfe4ea;
}
/* Pierwszy slajd = logo parkingu — pokazujemy w całości, bez przycinania */
.gallery-track img:first-child {
  object-fit: contain;
  background: #ffffff;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  color: var(--tp-text);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s;
}
.parking-card__gallery:hover .gallery-arrow,
.parking-card__gallery:focus-within .gallery-arrow { opacity: 1; }
.gallery-arrow.prev { left: 8px; }
.gallery-arrow.next { right: 8px; }
.gallery-dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.gallery-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
}
.gallery-dots span.active { background: #fff; }

/* ---- Unavailable ---- */
.results-unavailable { margin-top: 24px; }
.parking-card--unavailable { opacity: .55; }
.parking-card--unavailable .parking-card__price { font-size: 15px; font-weight: 500; }
.parking-card--unavailable .parking-card__gallery { flex-basis: 180px; }

.site-footer {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--tp-border);
  color: var(--tp-text-muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 140px; }
  .hero h1 { font-size: 28px; }
  .search-panel { margin: -100px 16px 0; padding: 18px; }
  .search-form { flex-direction: column; align-items: stretch; }
  .field { min-width: unset; flex: none;}
  .btn-search { width: 100%; justify-content: center; }
  .parking-card { flex-direction: column-reverse; }
  .parking-card__gallery { flex-basis: 180px; width: 100%; }
  .gallery-track img { width: 100%; }
  .trust-bar { gap: 18px; font-size: 12.5px; }
}