.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}




  #main.search_results {
    display: flex;
    /*height: 100vh;*/
  }

  .filters {
    width: 260px; /*#dry #člsdjfpos8fzudsf*/
    background-color: white;
    border-right: 1px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    height: auto;       /* visina prema sadržaju */
    max-height: none;   /* ukloni ograničenja iz parent-a */
  }

  .just_filters{

    /*background-color: red;*/
    width: 220px;  /* #dry #člsdjfpos8fzudsf  - mora biti, jer mi inače flex stisne filtere ako naidje oglas koji to trazi...*/
  }


  /* Karta iznad filtera */
  .filter-map {
  		position: relative;
      width: 100%;
      margin-bottom: 20px;
      cursor: pointer;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      transition: transform 0.2s;
      background-color: black;
  }

  .filter-map img {
      width: 100%;
      display: block;
      opacity: 0.9;
      transition: opacity 0.4s;
  }

  .filter-map img:hover {
      opacity: 1;
  }


  .filter-map:hover {
      transform: scale(1.02);
  }



  .filter-map-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 20px;
      font-weight: bold;
      color: #fff;
      /*text-shadow: 0 1px 3px rgba(0,0,0,0.9);*/
      text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.7);
      pointer-events: none; /* da klik ide na link */
  }

  .filter-section{
     border-top: 1px solid #ddd;
     padding-bottom: 20px
  }

  /* Naslovi */
  .filter_section h4 {
      font-size: 18px;
      margin-bottom: 15px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 5px;
  }

  .filter-section h5 {
      font-size: 16px;
      margin-bottom: 8px;
      margin-top: 15px;
  }

  /* Opis filtera */
  .filter_description {
      display: block;
      font-size: 12px;
      color: #555;
      margin-bottom: 8px;
  }

  /* Checkbox label styling */
  .filter-section label {
      display: flex;
      font-size: 12px;
      cursor: pointer;
      font-weight: 300!important;
      transition: opacity 0.2s;
      opacity: 0.8;
  }

  .filter-section label .label-txt{
  	display: inline-block;
  	position: relative;
  	top: 5px;
  }

  .filter-section label:hover {
      /*background-color: #f0f8ff;*/
      opacity: 1;
  }

  .filter-section input[type="checkbox"] {
      margin-right: 8px;
  }

  /* Brojač pored checkboxa */
  .filter_counter {
      font-size: 12px;

  }

  .filter_counter:not(.mobile){
  	color: #777;
  	background-color: #e7e7e7;
  	padding: 2px 6px;
  	border-radius: 12px;
  	height: 24px;
  }

  .filter_counter.mobile {
  		margin-left: 5px;
      top: 5px;
  }

	.filter_counter.mobile::before {
    content: "(";
  }

	.filter_counter.mobile::after {
    content: ")";
  }

  .filter_range .filter_counter{
  	top: 15px;
  }
  .filter_range .filter_counter.mobile{
  	top: 20px;
  }



  .oglasi_section {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
  }

  /* Samo za vizualni dojam */
  .filter_section {
    color: #333;
  }

  .oglasi_section {
    color: #000;
  }




  .oglas_search_thumb {

    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s,opacity 0.5s;
  }

  .oglas_search_thumb.onOglasPage{
  	margin-bottom: 0;
  }

  .oglas_search_thumb .oglas-footer{

  	padding: 20px;
  	/*margin-top: 20px;*/
  	border-top: 1px solid #ddd;
  }

  .oglas_search_thumb.mobile .oglas-footer{
  	padding: 15px;
  }

  .oglas_search_thumb .mainDiv {
  	display: flex;
  	align-items: stretch; /* lijevi i desni dio iste visine */
  }

  .oglas_search_thumb:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }


  .oglas-slika-box {
    width: 220px;
    background-size: cover;
    background-position: center;
    /*max-height: 200px;*/
  }

  .oglas-slika-box.onOglasPage {
    width: 140px;
  }

  .oglas-slika-box.mobile:not(.onOglasPage){
  	width: 200px;
  }

  .oglas-slika-box.mobile.onOglasPage{
  	width: 100px;
  	flex-shrink: 0;
  }


  .oglas-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .oglas-naslov {
    font-size: 18px;
    font-weight: bold;
    color: #003580;
    margin-bottom: 6px;
  }

  .oglas-lokacija {

    gap: 10px;
    margin-bottom: 10px;
  }

  .oglas-lokacija:not(.mobile){
  	display: flex;
  	align-items: center;
  }

  .oglas-lokacija a {
    text-decoration: none;
    color: #0071c2;
    font-size: 14px;
  }

  .oglas-lokacija a:hover {
    text-decoration: underline;
  }

  .oglas-lokacija:not(.mobile) .icons{
  }


  .oglas-opis {
    color: #333;
    font-size: 13px;
    max-height: 80px;
    overflow: hidden;
  }

  .oglas-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }

  .rating-broj {
    background-color: #003580;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 14px;
  }

  .rating-opis {
    font-size: 14px;
    color: #222;
  }

  .rating-reviews {
    font-size: 11px;
    color: #666;
  }

  .oglas-desno {
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
    align-items: flex-end;
    padding: 15px;
    border-left: 1px solid #eee;
  }

  .oglas-desno:not(.mobile){
    min-width: 180px;

  }

  .oglas-cijena {
    font-weight: bold;
   
  }

  .oglas-cijena:not(.mobile) {
    font-size: 18px;
  }

  .oglas-cijena s {
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

.inactive-price{
	color: #999;
	text-decoration: line-through;
	margin-right: 8px;
}

.oglas-cijena-popust {
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f; /* crvena za isticanje popusta */
    margin-right: 8px;
}

/* Postotak popusta u malom badge-u */
.oglas-cijena-badge {
    background-color: #d32f2f;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
}


  .price-green{
  	color: #008009;
  }


  .cijena-napomena {
    font-size: 12px;
    color: #666;
  }

  .oglas-gumb {
    background-color: #0071c2;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
  }

  .oglas-gumb:hover {
    background-color: #005fa3;
  }

	/* Disabled varijanta */
	.oglas-gumb.disabled,
	.oglas-gumb:disabled {
	  background-color: #b0b0b0;
	  color: #f0f0f0;
	  opacity: 0.7;
	}

	/* Onemogući hover efekt kad je disabled */
	.oglas-gumb.disabled:hover,
	.oglas-gumb:disabled:hover {
	  background-color: #b0b0b0;
	}

  .map-btn {
    background-color: #e7f0fa;
    color: #0071c2;
    border: 1px solid #c6dff6;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .map-btn:hover {
    background-color: #d5e7fa;
  }


  .feed-wide-btn {
      display: block;
      margin: 20px auto 0 auto; /* centrira gumb ispod oglasa */
      font-size: 16px;
      font-weight: bold;
      padding: 10px 25px;
      background-color: #007bff;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: background-color 0.2s, opacity 0.2s;
  }

  .feed-wide-btn:hover:not(.loading) {
      background-color: #0056b3;
      /*transform: translateY(-1px);*/
  }

  .feed-wide-btn.loading {
      /*transform: translateY(0);*/
      background-color: black;
      opacity: 0.2;
  }






  /* Mobile top buttons */  
  .mobile-top-buttons {
	
      justify-content: space-between; /* prvi lijevo, srednji centar, treći desno */
      background-color: #fff;
      z-index: 1000;
      display: flex;
      gap: 10px;
      padding: 10px 30px;
      border-bottom: 1px solid #ddd;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      /*height: 100px;*/
  }

  .mobile-top-buttons.sticky { 
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      /*z-index: 1000!important;*/
  }


  /* Svaki gumb */
  .map-btn-top {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;

      /*font-weight: bold;*/
      border-radius: 6px;
      cursor: pointer;
      transition: background-color 0.2s;
      font-size: 14px;

      background-color: #fff;    /* bijela pozadina */
      color: #007bff;            /* plavi tekst i ikona */
      border: 1px solid #007bff; /* plavi obrub */
  }


  .map-btn-top:hover {
      background-color: #007bff; /* plava pozadina na hover */
      color: #fff;               /* bijeli tekst na hover */
  }

  .map-btn-top i {
      font-size: 16px; /* veličina ikone */
  }

/*
  @media ( min-width :603px) {
  	.mobile-top-buttons {
  		background-color: red;
  	}
  }*/




.unit-tabs {
  margin-bottom: 6px;
  display: block;
}

.unit-tabs:not(.asMobile){
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.unit-tabs.asMobile .unit-tab-btn{
	margin-right: 10px;
	margin-bottom: 3px;
	white-space:nowrap;
	display: inline-block;
}

.unit-tab-btn {
  flex: 1;
  min-width: 90px;
  background: #fff;
  color: #007bff;
  border: 1px solid #007bff;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.animAll{
	transition: all 0.2s;
}

.unit-tab-btn i {
  transition: all 0.2s;
}


.unit-tab-btn.active,
.unit-tab-btn:hover {
  background: #007bff;
  color: #fff;
}

.unit-tab-btn.active i,
.unit-tab-btn:hover i {
  color: white; /* ikona postaje bijela na hover */
}



.unit-tab-btn.no_capacity {
  opacity: 0.5;              /* učini ih poluprozirnima */
  filter: grayscale(80%);    /* blago posivi izgled */
}






.oglas-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: #f9fafc;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 16px;
}

.oglas-note i {
  color: #007bff;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.oglas-note-content {
  flex: 1;
}

.oglas-note-title {
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  font-size: 15px;
}

.oglas-note-text {
  color: #555;
  font-size: 14px;
  padding: 6px 0;
}

.oglas-note-text + .oglas-note-text {
  border-top: 1px solid #e4e8ee;
  margin-top: 6px;
}

.oglas-note.negative {
  background: #fff5f5;
  border-left-color: #e74c3c;
}

.oglas-note.negative .oglas-note-title {
  color: #c0392b;
}

.oglas-note.negative .oglas-note-text {
  border-top-color: #f2d7d5;
}



.match-dots {
  display: inline-flex;
  gap: 3px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
}
.dot.active {
  background: #28a745;
}

.dot.active.score-0 { background: #d9534f; } /* tamno crvena */
.dot.active.score-1 { background: #e67e22; } /* narančasta */
.dot.active.score-2 { background: #f1c40f; } /* žuta */
.dot.active.score-3 { background: #a0c334; } /* svjetlozelena */
.dot.active.score-4 { background: #5cb85c; } /* zelena */
.dot.active.score-5 { background: #2ecc71; } /* jarko zelena */



.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #e9f2ff;
  color: #0056b3;
  font-weight: 500;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: default;
  border: 1px solid #cfe0ff;
  transition: all 0.2s;
}

.filter-tag:hover {
  background-color: #dce9ff;
}

.filter-tag i {
  font-size: 13px;
  margin-left: 6px;
  cursor: pointer;
  color: #0056b3;
  transition: all 0.2s;
  opacity: 0.4;
}

.filter-tag i:hover {
  color: #ff3333;
  opacity: 1;

}



.sort-btn {
  background-color: #0056b3;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sort-btn:hover {
  background-color: #004099;
}

/* Popup container (hidden by default) */
.sort-popup {
  position: absolute;
  top: 55px;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 220px;
  z-index: 1000;
}

.search_results.mobile .sort-popup{
	position: fixed;
}


#mapPopupContainer .sort-popup{
	top: 45px;
	right: 40px;
}

.filter_popup{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow-y: scroll;
	background-color: white;
	z-index: 1000;
}



/* Inner content */
.sort-popup-content {
  padding: 10px;
}

.sort-popup-content h4 {
  font-size: 15px;
  margin: 0 0 8px;
  color: #333;
}

.sort-popup-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sort-popup-content li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sort-popup-content li:hover {
  background-color: #f0f4ff;
}

.map-btn-top.sort{
    border-radius: 15px;

}
.map-btn-top.sort-active {
    /*font-weight: 900;*/
    border: 2px solid #007bff; /* plavi obrub */

}






#mapPopupOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#mapPopupContainer {
  position: relative;
  width: calc(100% - 0px);
  height: calc(100% - 0px);
  background: white;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  transition: grid-template-columns 0.3s;
}

#mapPopupContainer:not(.onOglasPage) {
	display: grid;
	grid-template-columns: 230px 530px 1fr; /* dva lijeva sidebara + mapa dry #lsdfosdzfudsf */
	grid-template-rows: 1fr 0px;  /*0px je visina footera kojeg mogu dodati*/
	grid-template-areas:
	  "sidebarLeft sidebarRight map"
	  "footer footer footer";
	/*border-radius: 10px;*/
}

#mapPopupContainer.onOglasPage {
  width: 70%;
  height: 70%;
  display: block;
  overflow: hidden;
}

body.mobile #mapPopupContainer.onOglasPage {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
}





#mapSidebarLeft {
  grid-area: sidebarLeft;
  background: white;
  padding: 15px;
  border-right: 1px solid #ddd;
  overflow-y: auto;
}

#mapSidebarRight {
  grid-area: sidebarRight;
  background: white;
  padding: 15px;
  border-right: 1px solid #ccc;
  overflow-y: auto;
}

#mapPopupContainer.no-right-sidebar {
  grid-template-columns: 230px 1fr; /* samo prvi sidebar + mapa */
  grid-template-areas:
    "sidebarLeft map"
    "footer footer";
}

#mapPopupContainer.mobile {
  grid-template-columns: 1fr; /* samo mapa */
  grid-template-areas:
    "map"
    "footer";
}

#mapArea {
  grid-area: map;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

#mapFooter {
  grid-area: footer;
  background: #fafafa;
  border-top: 1px solid #ddd;
  text-align: center;
  /*line-height: 40px;*/
  /*font-size: 14px;*/
}

.onMapBtns{

	position: absolute;
	top: 10px;
	right: 14px;
	z-index: 10000; /* bitno! iznad mape */


}

.onmap-btn{

	display: inline-block;
	cursor: pointer;
	font-size: 16px;
	color: #333;
	background: #fff;
	padding: 5px 15px;
	border-radius: 20px;
	box-shadow: 0 0 5px rgba(0,0,0,0.2);
	z-index: 10000; /* bitno! iznad mape */
	transition: background 0.2s;
	margin-left: 8px;
}

.map-round-btn{
	position: relative;
	top: 2px;
	border-radius: 50%;
	padding: 5px 8px;
	font-size: 20px;

}


.onmap-btn:hover {
  background: #eee;
}





.map-rec-btn {
	position: absolute;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  background: #fff;
  padding: 5px 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  z-index: 10000; /* bitno! iznad mape */
  transition: background 0.2s;
}

.map-rec-btn:hover {
  background: #eee;
}

.map-rec-btn._sidebarCollapser{
	top: 10px;
	left: 759px;  /*dry #lsdfosdzfudsf  - ovo je zbroj širina obje klone*/
}


.map-rec-btn._sidebarCollapser.no-right-sidebar{
	top: 10px;
	left: 229px;  /*dry #lsdfosdzfudsf*/
}

.mapCustomPopUp{
	position: absolute;
	background-color: white;
	z-index: 1000;
	min-width: 700px;
	min-height: 300px;
}

.mapOglasMobileBox{
	position: fixed;
	bottom: 5px;
	left: 5px;
	z-index: 1000;
	max-height: calc(100% - 20px);
	overflow-y: scroll;
	padding-top  : 15px;
	padding-right: 15px;
}


.price-marker {
  background: transparent;
  border: none;
}

.price-tag {
  background: white;
  color: black;
  border-radius: 12px;
  padding: 4px 8px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  white-space: nowrap;
  transform: translate(-50%, -100%); /* pozicionira iznad točke */
}

.price-tag.selected{
	background: black;
	color: white;
}



/* Pozicija srca */
.heart-wrapper {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s ;
}

.heart-wrapper:not(.filled){
	opacity: 0.9;
}

.heart-wrapper:hover {
  opacity: 1;
}

.heart-wrapper.filled:hover {
  opacity: 0.9;
}

/* Srce */
.heart-icon {
  font-size: 15px;
  color: gray; /* crvena */
  opacity: 0.8;

}

.heart-icon.bigSize{
	font-size: 25px;
}

.heart-icon.onOglasPage{
	transition: opacity 0.2s ;
}
.heart-icon.onOglasPage:not(.filled){
	opacity: 0.3;
}

.heart-icon.onOglasPage:hover{
	opacity: 1!important;
}

/* Kada je ispunjeno */
.heart-icon.filled {
  color: #e31b23;
  animation: pulse 0.4s ease;
  opacity: 0.8;
  color: #e31b23; /* crvena */

}

/* Animacija pulsa */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


.priceInBtn{
	background-color: #007bff;
	color: white;
	padding: 2px 5px;
	border-radius: 4px;
	transition: all 0.2s;
}

.unit-tab-btn.active .priceInBtn,
.unit-tab-btn:hover .priceInBtn
{

	background-color: white;
  color: #007bff;

}


.oglas_search_thumb.top-host
 {
    border: 2px solid #FFD700; /* zlatni okvir za Top Host */
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); /* zlatni glow */
}


.top-host-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #FFD700;
    color: #000;
    font-weight: bold;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    text-transform: uppercase;
}
