/* ============================================================
   public.css  —  Šetnja Bjelovarom
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:       #f5f1eb;
  --clr-text:     #2c2418;
  --clr-accent:   #8b5e3c;
  --clr-accent2:  #c49a6c;
  --clr-light:    #ede8e0;
  --clr-white:    #ffffff;
  --clr-shadow:   rgba(0,0,0,.18);
  --radius:       8px;
  --font-main:    'Georgia', serif;
  --font-ui:      system-ui, sans-serif;
}

html, body { height: 100%; }
body { background: var(--clr-bg); color: var(--clr-text); font-family: var(--font-main); }

/* ---- Karta fullscreen ---- */
#map-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
}
#map {
  width: 100%;
  height: 100%;
}

/* Leaflet popup */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  box-shadow: 0 4px 16px var(--clr-shadow);
  font-family: var(--font-main);
}
.leaflet-popup-content {
  margin: 12px 16px;
}
.popup-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--clr-text);
}
.popup-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--clr-accent);
  font-family: var(--font-ui);
  font-size: .85rem;
  text-decoration: none;
}
.popup-link:hover { text-decoration: underline; }

/* Naslov na karti */
#map-title {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255,255,255,.92);
  padding: 8px 20px;
  border-radius: 24px;
  box-shadow: 0 2px 8px var(--clr-shadow);
  font-size: 1rem;
  font-family: var(--font-ui);
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
}

/* ---- Modal galerija ---- */
.loc-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.loc-modal[hidden] { display: none; }

.loc-modal-inner {
  background: var(--clr-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 700px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
}

.loc-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--clr-white);
  z-index: 1;
  opacity: .85;
}
.loc-modal-close:hover { opacity: 1; }

.loc-modal-header {
  background: var(--clr-accent);
  color: var(--clr-white);
  padding: 18px 48px 16px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.loc-modal-header h2 { font-size: 1.25rem; }

.loc-modal-desc {
  padding: 14px 24px;
  font-size: .95rem;
  line-height: 1.7;
  color: #3e3020;
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-light);
  white-space: pre-line;
}
.loc-modal-desc:empty { display: none; }

.loc-modal-loading {
  padding: 32px 24px;
  font-family: var(--font-ui);
  color: #888;
  text-align: center;
}

#modal-slider-wrap,
#modal-thumbs { padding: 0 16px; }
#modal-thumbs { padding-bottom: 16px; }

/* ---- Stranica lokacije ---- */
.loc-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 60px;
}

.loc-header {
  background: var(--clr-accent);
  color: var(--clr-white);
  padding: 28px 32px 22px;
}
.loc-header h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.loc-back {
  display: inline-block;
  color: var(--clr-accent2);
  font-family: var(--font-ui);
  font-size: .85rem;
  text-decoration: none;
  margin-bottom: 10px;
  opacity: .9;
}
.loc-back:hover { opacity: 1; text-decoration: underline; }

.loc-description {
  padding: 24px 32px;
  font-size: 1rem;
  line-height: 1.75;
  color: #3e3020;
  background: var(--clr-white);
  border-bottom: 1px solid var(--clr-light);
}

/* ---- Slider ---- */
.slider-section {
  padding: 28px 32px 0;
}
.slider-section h2 {
  font-size: 1.05rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 16px;
  color: var(--clr-accent);
  text-transform: uppercase;
}

.slider-main {
  position: relative;
  background: #1a1410;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 520px;
}

.slider-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #1a1410;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  color: #fff;
  padding: 32px 20px 14px;
  font-family: var(--font-ui);
}
.slider-caption-title { font-size: .95rem; }
.slider-caption-year  { font-size: .8rem; opacity: .75; margin-top: 2px; }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px var(--clr-shadow);
  transition: background .15s;
  z-index: 2;
}
.slider-btn:hover { background: var(--clr-white); }
.slider-btn-prev { left: 10px; }
.slider-btn-next { right: 10px; }

.slider-counter {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .75rem;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Thumbs */
.slider-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-accent2) var(--clr-light);
}
.slider-thumbs::-webkit-scrollbar       { height: 4px; }
.slider-thumbs::-webkit-scrollbar-track { background: var(--clr-light); }
.slider-thumbs::-webkit-scrollbar-thumb { background: var(--clr-accent2); border-radius: 2px; }

.thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: .55;
  border: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
}
.thumb.active,
.thumb:hover {
  opacity: 1;
  border-color: var(--clr-accent);
}

/* No postcards */
.no-postcards {
  padding: 40px 32px;
  font-family: var(--font-ui);
  color: #888;
}

/* ---- 404 ---- */
.not-found {
  text-align: center;
  padding: 80px 20px;
  font-family: var(--font-ui);
}
.not-found h1 { font-size: 5rem; color: var(--clr-accent2); margin-bottom: 12px; }
.not-found p  { color: #666; margin-bottom: 20px; }
.not-found a  { color: var(--clr-accent); }
