/* ==========================================================
   HalalBalkan – kartice gradova na /gradovi/ (klase hbc-*)
   Predložak: listeo-child/hb-gradovi/hb-gradovi.php
   Isti tokeni kao blog grid (hbb-*) i kartice objekata (hbk-*).
   ========================================================== */

.hbc{
  --hbc-tekst:#1f2937;
  --hbc-tih:#475569;
  --hbc-blijed:#64748b;
  --hbc-linija:rgba(17,24,39,.10);
  --hbc-crtkano:rgba(17,24,39,.16);
  --hbc-akcent:#1e73be;
  --hbc-akcent-tamni:#175a96;
  --hbc-meko:#f3f8fd;
  --hbc-zeleno:#15803d;
  --hbc-zeleno-meko:#effaf3;
  --hbc-r:16px;
  margin:8px 0 0;
  text-align:left;
  color:var(--hbc-tekst);
}
.hbc *,.hbc *::before,.hbc *::after{box-sizing:border-box}
.hbc-samo-citac{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hbc .hbb-ik{width:16px;height:16px;flex:0 0 16px}

/* ---------- Filteri i pretraga ---------- */
.hbc-alati{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;
  margin:0 0 24px;
}
.hbc-filteri{display:flex;flex-wrap:wrap;gap:8px}
.hbc button.hbc-filter{
  display:inline-flex;align-items:center;gap:7px;
  margin:0;padding:8px 14px;
  background:#fff;
  border:1px solid var(--hbc-crtkano);
  border-radius:999px;
  color:var(--hbc-tekst);
  font:inherit;font-size:14px;font-weight:500;line-height:1.2;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.hbc button.hbc-filter span{
  min-width:22px;padding:1px 7px;
  background:var(--hbc-meko);
  border-radius:999px;
  color:var(--hbc-akcent-tamni);
  font-size:12px;font-weight:600;text-align:center;
}
.hbc button.hbc-filter:hover{border-color:var(--hbc-akcent);color:var(--hbc-akcent-tamni)}
.hbc button.hbc-filter.is-aktivan{background:var(--hbc-akcent);border-color:var(--hbc-akcent);color:#fff}
.hbc button.hbc-filter.is-aktivan span{background:rgba(255,255,255,.2);color:#fff}
.hbc button.hbc-filter:focus-visible{outline:3px solid rgba(30,115,190,.35);outline-offset:2px}

.hbc-trazi{
  position:relative;display:flex;align-items:center;
  flex:0 1 260px;margin:0;
}
.hbc-trazi .hbb-ik{position:absolute;left:14px;color:var(--hbc-blijed);pointer-events:none}
.hbc input.hbc-unos{
  width:100%;height:42px;margin:0;padding:0 14px 0 40px;
  background:#fff;
  border:1px solid var(--hbc-crtkano);
  border-radius:999px;
  box-shadow:none;
  color:var(--hbc-tekst);
  font:inherit;font-size:15px;
}
.hbc input.hbc-unos:focus{border-color:var(--hbc-akcent);outline:3px solid rgba(30,115,190,.18)}

/* ---------- Grid ---------- */
.hbc-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}
@media (min-width:640px){.hbc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}}
@media (min-width:1024px){.hbc-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}}

/* ---------- Kartica ---------- */
.hbc-kartica{
  position:relative;
  display:flex;flex-direction:column;
  background:#fff;
  border:1px solid var(--hbc-linija);
  border-radius:var(--hbc-r);
  overflow:hidden;
  box-shadow:0 6px 20px rgba(17,24,39,.06);
  transition:box-shadow .2s ease,transform .2s ease,border-color .2s ease;
  font-size:15px;line-height:1.55;
}
.hbc-kartica[hidden]{display:none}
.hbc-kartica:hover,.hbc-kartica:focus-within{
  box-shadow:0 14px 34px rgba(17,24,39,.11);
  border-color:rgba(30,115,190,.28);
  transform:translateY(-2px);
}

.hbc-slika{position:relative;aspect-ratio:16/10;background:#e9eef3;overflow:hidden}
.hbc-slika img.hbc-img{
  position:absolute;inset:0;width:100%;height:100%;max-width:none;
  object-fit:cover;transition:transform .5s ease;
}
.hbc-kartica:hover .hbc-img{transform:scale(1.04)}
.hbc-drzava{
  position:absolute;top:12px;left:12px;z-index:1;
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 10px 5px 8px;
  background:rgba(255,255,255,.94);
  border-radius:999px;
  box-shadow:0 2px 8px rgba(15,23,42,.14);
  color:var(--hbc-akcent-tamni);
  font-size:12px;font-weight:600;letter-spacing:.02em;line-height:1.3;text-transform:uppercase;
}
.hbc-drzava .hbb-ik{width:13px;height:13px;flex-basis:13px}

.hbc-tijelo{display:flex;flex-direction:column;flex:1 1 auto;padding:16px 18px 16px}
.hbc h3.hbc-naslov{margin:0 0 6px;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:-.005em}
.hbc .hbc-naslov a.hbc-link{color:var(--hbc-tekst);text-decoration:none}
.hbc .hbc-naslov a.hbc-link::after{content:"";position:absolute;inset:0;z-index:2;border-radius:var(--hbc-r)}
.hbc-kartica:hover .hbc-link{color:var(--hbc-akcent-tamni)}
.hbc .hbc-link:focus-visible{outline:none}
.hbc .hbc-link:focus-visible::after{outline:3px solid var(--hbc-akcent);outline-offset:-3px}

.hbc p.hbc-opis{
  margin:0 0 12px;
  color:var(--hbc-tih);font-size:14.5px;line-height:1.55;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.hbc-oznaka{color:var(--hbc-blijed);font-weight:600}

.hbc ul.hbc-fakti{
  list-style:none;display:flex;flex-wrap:wrap;gap:8px;
  margin:auto 0 0;padding:12px 0;
  border-top:1px dashed var(--hbc-crtkano);
  border-bottom:1px dashed var(--hbc-crtkano);
}
.hbc li.hbc-fakt{
  display:inline-flex;align-items:center;gap:6px;
  margin:0;padding:5px 10px;
  background:var(--hbc-meko);border-radius:8px;
  color:var(--hbc-tih);font-size:13px;font-weight:500;line-height:1.35;
}
.hbc-fakt .hbb-ik{width:15px;height:15px;flex-basis:15px;color:var(--hbc-akcent)}
.hbc li.hbc-fakt--halal{background:var(--hbc-zeleno-meko);color:#166534}
.hbc-fakt--halal .hbb-ik{color:var(--hbc-zeleno)}

.hbc-dno{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.hbc-dalje{display:inline-flex;align-items:center;gap:6px;color:var(--hbc-akcent);font-size:14px;font-weight:600}
.hbc-dalje .hbb-ik{transition:transform .2s ease}
.hbc-kartica:hover .hbc-dalje .hbb-ik{transform:translateX(3px)}
.hbc a.hbc-vaktija{
  position:relative;z-index:3;
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 11px;
  border:1px solid rgba(21,128,61,.25);
  border-radius:999px;
  color:var(--hbc-zeleno);
  font-size:13px;font-weight:600;line-height:1.2;text-decoration:none;
  transition:background .15s ease,border-color .15s ease;
}
.hbc a.hbc-vaktija:hover{background:var(--hbc-zeleno-meko);border-color:var(--hbc-zeleno)}
.hbc a.hbc-vaktija:focus-visible{outline:3px solid rgba(21,128,61,.35);outline-offset:2px}

.hbc p.hbc-prazno{margin:20px 0 0;color:var(--hbc-tih)}

@media (max-width:639px){
  .hbc-alati{flex-direction:column;align-items:stretch}
  .hbc-alati>.hbc-filteri,.hbc-alati>.hbc-trazi{width:100%;max-width:100%;min-width:0}
  .hbc-filteri{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .hbc-filteri::-webkit-scrollbar{display:none}
  .hbc button.hbc-filter{flex:0 0 auto}
  .hbc-trazi{flex:1 1 auto}
  .hbc p.hbc-opis{-webkit-line-clamp:2}
}
@media (prefers-reduced-motion:reduce){
  .hbc-kartica,.hbc-img,.hbc-dalje .hbb-ik{transition:none}
  .hbc-kartica:hover,.hbc-kartica:hover .hbc-img{transform:none}
}
