/* SveHrNekretnine UI + AdSense helpers (mobile-first) */
:root {
  --sf5hr-primary: #a33c27;
  --sf5hr-primary-hover: #8a3220;
  --sf5hr-surface: #f7f5f4;
  --sf5hr-radius: 10px;
  --sf5hr-shadow: 0 4px 18px rgba(37, 37, 37, 0.08);
}

.ad-slot {
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.ad-slot__label {
  font-size: 0.7rem;
  line-height: 1;
}
.ad-slot--auto { min-height: 90px; }
.ad-slot--fluid { min-height: 120px; }
.ad-slot--fixed { min-height: 250px; }

/* Near-fold listing banner (search pages) */
.sf5hr-ad-atf {
  max-width: 100%;
  overflow: hidden;
}
.sf5hr-ad-atf .ad-slot {
  margin-bottom: 0;
}

/* Listing grid: spacing on columns (avoids card margin-collapse) */
.sf5hr-listing-grid > .sf5hr-listing-grid__item {
  margin-bottom: 1.25rem;
}
.sf5hr-listing-grid > .sf5hr-listing-grid__ad {
  margin-top: .35rem;
  margin-bottom: 1.5rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.sf5hr-listing-grid > .sf5hr-listing-grid__ad > .ad-slot {
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .sf5hr-listing-grid > .sf5hr-listing-grid__item {
    margin-bottom: 1.5rem;
  }
  .sf5hr-listing-grid > .sf5hr-listing-grid__ad {
    margin-top: .5rem;
    margin-bottom: 1.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

a.btn.sf5hr-cta-primary,
.btn.sf5hr-cta-primary {
  color: var(--sf5hr-primary) !important;
  border-color: var(--sf5hr-primary) !important;
  background: transparent !important;
}
a.btn.sf5hr-cta-primary:hover,
.btn.sf5hr-cta-primary:hover {
  color: #fff !important;
  background-color: var(--sf5hr-primary) !important;
  border-color: var(--sf5hr-primary) !important;
}

/* Listing grid cards */
.sf5hr-card {
  background: #fff;
  border-radius: var(--sf5hr-radius);
  box-shadow: var(--sf5hr-shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sf5hr-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 37, 37, 0.12);
}
.sf5hr-card__media {
  background: var(--sf5hr-surface);
}
.sf5hr-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 385 / 284;
  object-fit: cover;
  display: block;
}
.sf5hr-card__badges {
  position: absolute;
  top: .5rem;
  left: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}
.sf5hr-card__body {
  padding: .85rem 1rem 1rem;
}
.sf5hr-card__price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #252525;
  margin: 0;
}
.sf5hr-card__ppm2 {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: #696969;
}
.sf5hr-card__title {
  font-size: 1rem;
  line-height: 1.35;
  margin: .35rem 0;
  font-weight: 600;
}
.sf5hr-card__title a {
  color: var(--sf5hr-primary);
}
.sf5hr-card__title a:hover {
  color: var(--sf5hr-primary-hover);
  text-decoration: none;
}
.sf5hr-card__loc {
  font-size: .85rem;
  color: #696969;
  margin: 0;
}
.sf5hr-card__specs {
  font-size: .8rem;
  color: #555;
}
.sf5hr-card__specs .list-inline-item:not(:last-child):after {
  content: "·";
  margin-left: .35rem;
  color: #bbb;
}

/* Homepage hero */
.sf5hr-hero {
  background: linear-gradient(165deg, #fff 0%, var(--sf5hr-surface) 55%, #f0e8e5 100%);
  padding: 1.25rem 0 1.5rem;
}
.sf5hr-hero__title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.25;
  color: #252525;
  margin-bottom: .5rem;
}
@media (min-width: 768px) {
  .sf5hr-hero__title { font-size: 2rem; }
}
.sf5hr-hero__intro {
  font-size: .95rem;
  color: #555;
  max-width: 40rem;
}
.sf5hr-hero__search {
  background: #fff;
  border-radius: var(--sf5hr-radius);
  box-shadow: var(--sf5hr-shadow);
  padding: 1rem;
  margin-top: 1rem;
}
.sf5hr-hero-form__simple .form-control {
  min-height: 48px;
}
.sf5hr-hub {
  padding: 1rem 0 1.25rem;
}
.sf5hr-hub__grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.sf5hr-hub__link {
  display: inline-block;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e0dd;
  color: #333;
  font-size: .85rem;
  font-weight: 500;
}
.sf5hr-hub__link:hover {
  border-color: var(--sf5hr-primary);
  color: var(--sf5hr-primary);
  text-decoration: none;
}

/* Header search sheet - hidden until opened */
.sf5hr-search-sheet {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0,0,0,.45);
}
.sf5hr-search-sheet.is-open {
  display: block !important;
}
.sf5hr-search-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}
@media (min-width: 992px) {
  .sf5hr-search-sheet__panel {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 12vh;
    transform: translateX(-50%);
    width: min(560px, 92vw);
    border-radius: var(--sf5hr-radius);
    max-height: 76vh;
  }
}
.sf5hr-search-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #252525;
  font-size: 1.25rem;
  border: 0;
  background: transparent;
}

/* Mobile header: keep brand + actions on one row */
@media (max-width: 991.98px) {
  .main-header .navbar {
    flex-wrap: nowrap;
    min-height: 52px;
    padding-top: .35rem;
    padding-bottom: .35rem;
  }
  .main-header .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: .5rem;
    max-width: min(42vw, 130px);
  }
  .main-header .sf5hr-logo-mobile {
    height: 36px;
    width: auto;
    max-width: 100%;
  }
  .sf5hr-header-mobile-actions {
    flex-shrink: 0;
    gap: .15rem;
  }
  .sf5hr-header-mobile-actions .sf5hr-search-toggle {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.1rem;
  }
  .sf5hr-header-mobile-actions .sf5hr-header-cta {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    padding: .35rem .5rem;
    margin: 0;
  }
  .sf5hr-header-mobile-actions .navbar-toggler {
    line-height: 1;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Search layout filters */
.sf5hr-filter-fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1rem;
  z-index: 1040;
  min-height: 44px;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  background: var(--sf5hr-primary);
  color: #fff !important;
  border: 0;
  font-weight: 600;
  box-shadow: var(--sf5hr-shadow);
}
@media (min-width: 992px) {
  .sf5hr-filter-fab { display: none !important; }
}
.sf5hr-filters-desktop {
  position: sticky;
  top: 5.5rem;
}
.sf5hr-market-strip summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sf5hr-primary);
}

/* Property sticky CTA (not an ad) */
.sf5hr-mobile-cta {
  display: none;
}
@media (max-width: 991.98px) {
  .sf5hr-mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: #fff;
    border-top: 1px solid #e8e4e1;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  }
  body.sf5hr-has-mobile-cta {
    padding-bottom: 4.5rem;
  }
}
.sf5hr-mobile-cta__price {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}
.sf5hr-show-sidebar-ad {
  margin-top: .75rem;
}
.sf5hr-show-ad-under-breadcrumb {
  max-width: 100%;
  overflow: hidden;
  margin-top: .75rem;
  margin-bottom: 1rem;
  padding-top: .25rem;
  padding-bottom: .25rem;
}
.sf5hr-show-ad-under-breadcrumb .ad-slot {
  margin-bottom: 0;
}
.sf5hr-show-ad-atf,
.sf5hr-show-ad-mid,
.sf5hr-show-ad-desc,
.sf5hr-show-ad-related {
  max-width: 100%;
  overflow: hidden;
}
.sf5hr-show-ad-atf .ad-slot,
.sf5hr-show-ad-mid .ad-slot,
.sf5hr-show-ad-desc .ad-slot,
.sf5hr-show-ad-related .ad-slot {
  margin-bottom: 0;
}
@media (max-width: 991.98px) {
  .sf5hr-show-sidebar-ad {
    margin-top: 1rem;
    margin-bottom: .5rem;
  }
}

/* Unified search bar - brand primary red */
.sf5hr-search-bar {
  background: var(--sf5hr-primary);
  padding: .75rem 0;
}
.sf5hr-search-bar .advanced-search {
  min-height: 44px;
}
.sf5hr-search-bar .sf5hr-advanced-toggle-mobile {
  min-height: 0;
  z-index: 2;
  width: 2.75rem;
  padding-left: .65rem !important;
  padding-right: .65rem !important;
  margin: 0;
  justify-content: center;
  background: #fff;
  border-radius: .25rem 0 0 .25rem;
}
.sf5hr-search-bar .sf5hr-advanced-toggle-mobile:after {
  margin-left: 0;
  font-size: 1.25rem;
}
.sf5hr-range-label {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}
.sf5hr-range-label--dark {
  color: #444;
}
.sf5hr-range-field .input-group-text {
  background: #f3f1f0;
  border: 0;
  color: #555;
  font-size: .8rem;
  font-weight: 600;
  min-width: 2.5rem;
  justify-content: center;
}
.sf5hr-range-field .form-control {
  min-height: 48px;
}
.sf5hr-search-bar .sf5hr-range-field {
  background: #fff;
  border-radius: .25rem;
  overflow: hidden;
}
.sf5hr-range-error {
  margin-top: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: #ffe8e4;
}
.sf5hr-range-error--dark {
  color: #a33c27;
}
.sf5hr-range-field.is-invalid {
  outline: 2px solid #ffb4a8;
  outline-offset: 1px;
}
.sf5hr-hero-form .btn-primary {
  background-color: var(--sf5hr-primary);
  border-color: var(--sf5hr-primary);
}
.sf5hr-hero-form .btn-primary:hover {
  background-color: var(--sf5hr-primary-hover);
  border-color: var(--sf5hr-primary-hover);
}
/* Show page gallery: avoid collapsed slider when image pending */
.galleries .item-size-4-3 {
  min-height: 200px;
  background: var(--sf5hr-surface);
}
@media (min-width: 768px) {
  .galleries .item-size-4-3 { min-height: 320px; }
}
.galleries .card-img {
  display: block;
  overflow: hidden;
  color: transparent; /* hide broken-image alt text */
  text-indent: -9999px;
}
.galleries .card-img img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  display: block;
  text-indent: 0;
  color: inherit;
}

