/* V40.3 — precise project anchor, consistent photo cards and actionable CTA */
#xp-projekti{scroll-margin-top:106px!important;padding-top:0!important;margin-top:12px!important}
.v403-contact-link{color:#0648ae;font-weight:800;text-underline-offset:3px;text-decoration-thickness:1.5px;white-space:nowrap}
.v403-contact-link:hover,.v403-contact-link:focus-visible{color:#063475;text-decoration:underline}
.v39-case-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;align-items:stretch}
.v39-case-card{display:flex;flex-direction:column;min-width:0}
.v39-case-card img{display:block;width:100%;height:215px!important;object-fit:cover!important;object-position:center}
.v39-case-info{flex:1;display:flex;flex-direction:column;justify-content:space-between;gap:10px;padding:17px 18px 18px}
.v39-case-info h3{margin:0!important;font-size:clamp(16px,1.12vw,19px)!important}
.v39-case-info p{margin:0!important}
/* Equal photo frames within every real-estate gallery (including previous full-height exceptions). */
.xp-gallery-polished-photo,.xp-property[data-v39-project] .xp-gallery-polished-photo{
  height:clamp(220px,24vw,340px)!important;aspect-ratio:auto!important;
  overflow:hidden!important;border-radius:15px!important;background:#edf4fb;
}
.xp-gallery-polished-photo img,.xp-property[data-v39-project] .xp-gallery-polished-photo img{
  display:block;width:100%!important;height:100%!important;max-height:none!important;
  object-fit:cover!important;object-position:center;
}
/* Tall facades must not lose the roof and ground. Uniform image frame, no destructive crop. */
.xp-property[data-v39-project="ref-pofalici"] .xp-gallery-polished-photo img,
.xp-property[data-v39-project="ref-sarajevo-garaze"] .xp-gallery-polished-photo img,
.xp-property[data-v39-project="ref-bjelasnica"] .xp-gallery-polished-photo img{
  object-fit:contain!important;
}
/* Single-photo entries are centered to avoid panoramic distortions */
.xp-property[data-v39-project="ref-pofalici"] .xp-gallery-polished,
.xp-property[data-v39-project="ref-vila"] .xp-gallery-polished,
.xp-property[data-v39-project="ref-sarajevo-garaze"] .xp-gallery-polished,
.xp-property[data-v39-project="ref-foca"] .xp-gallery-polished,
.xp-property[data-v39-project="ref-solar"] .xp-gallery-polished{
  display:flex!important;justify-content:center;align-items:center;
}
.xp-property[data-v39-project="ref-pofalici"] .xp-gallery-polished-photo,
.xp-property[data-v39-project="ref-vila"] .xp-gallery-polished-photo,
.xp-property[data-v39-project="ref-sarajevo-garaze"] .xp-gallery-polished-photo,
.xp-property[data-v39-project="ref-foca"] .xp-gallery-polished-photo,
.xp-property[data-v39-project="ref-solar"] .xp-gallery-polished-photo{
  max-width:880px!important;width:100%!important;
}
@media(max-width:1130px){.v39-case-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v39-case-card img{height:230px!important}}
@media(max-width:590px){
  #xp-projekti{scroll-margin-top:132px!important}
  .v39-case-grid{grid-template-columns:1fr!important}
  .v39-case-card img{height:225px!important}
  .xp-gallery-polished-photo,.xp-property[data-v39-project] .xp-gallery-polished-photo{height:240px!important}
}
/* Keep anchor navigation on the document, not on an overflow-hidden nested scroll box. */
.xp-main{overflow:clip}
/* Previous global scroll-padding combined with per-section scroll-margin, causing a double offset. */
html{scroll-padding-top:0!important}
#xp-oblasti{scroll-margin-top:110px!important}
