.putuj-ad-slot {
  width: 100%;
  margin: 32px auto;
  min-height: 0;
}

.putuj-ad-slot-empty {
  display: none;
}

.putuj-ad-unit {
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

.putuj-ad-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a8f98;
  font-weight: 600;
}

.putuj-ad-link {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.putuj-ad-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.putuj-ad-html {
  width: 100%;
  overflow: hidden;
}

#putuj-ads-side-rails {
  pointer-events: none;
}

.putuj-ad-rail {
  position: fixed;
  top: var(--putuj-ad-rail-top, 120px);
  width: var(--putuj-ad-rail-width, 160px);
  z-index: 80;
  pointer-events: auto;
}

.putuj-ad-rail-left {
  left: calc((100vw - var(--putuj-ad-container-width, 1200px)) / 2 - var(--putuj-ad-rail-width, 160px) - var(--putuj-ad-rail-gap, 24px));
}

.putuj-ad-rail-right {
  right: calc((100vw - var(--putuj-ad-container-width, 1200px)) / 2 - var(--putuj-ad-rail-width, 160px) - var(--putuj-ad-rail-gap, 24px));
}

.putuj-ad-rail .putuj-ad-unit {
  margin-bottom: 20px;
}

.putuj-ad-rail .putuj-ad-image {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

.putuj-ad-sticky {
  position: sticky;
  top: 110px;
}

.putuj-ad-slot-single_after_paragraph_3,
.putuj-ad-slot-single_middle_content {
  margin-top: 36px;
  margin-bottom: 36px;
}

@media (max-width: 767px) {
  .putuj-ad-slot {
    margin: 24px auto;
  }

  .putuj-ad-image {
    border-radius: 8px;
  }

  .putuj-ad-sticky {
    position: static;
  }
}

/* Preporučene/fiksne širine po pozicijama */
.putuj-ad-unit-home_after_hero,
.putuj-ad-unit-home_between_sections,
.putuj-ad-unit-footer_above_newsletter {
  max-width: 970px;
}

.putuj-ad-unit-single_after_paragraph_3,
.putuj-ad-unit-single_middle_content,
.putuj-ad-unit-single_before_related {
  max-width: 728px;
}

.putuj-ad-unit-single_sidebar_top,
.putuj-ad-unit-single_sidebar_sticky {
  max-width: 300px;
}

@media (max-width: 767px) {
  .putuj-ad-unit-single_after_paragraph_3,
  .putuj-ad-unit-single_middle_content,
  .putuj-ad-unit-single_before_related {
    max-width: 320px;
  }
}


/* Putuj Ads Visual Helper */
body.putuj-ads-helper-active .putuj-ad-slot {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  padding: 14px;
  border: 2px dashed #1f5b49;
  border-radius: 14px;
  background: repeating-linear-gradient(45deg, rgba(31, 91, 73, .08), rgba(31, 91, 73, .08) 10px, rgba(255,255,255,.88) 10px, rgba(255,255,255,.88) 20px);
  box-shadow: inset 0 0 0 1px rgba(31, 91, 73, .08);
  color: #123b31;
  text-align: center;
  font: 700 13px/1.35 Arial, sans-serif;
}

body.putuj-ads-helper-active .putuj-ad-slot-empty {
  display: flex !important;
}

body.putuj-ads-helper-active .putuj-ad-slot::before {
  content: attr(data-putuj-ad-position) "\A" attr(data-putuj-ad-size) "\A pozicija reklame";
  white-space: pre-line;
}

body.putuj-ads-helper-active .putuj-ad-slot-home_after_hero::before { content: "home_after_hero\A 970x90 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-home_between_sections::before { content: "home_between_sections\A 970x90 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-archive_after_featured::before { content: "archive_after_featured\A 970x90 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-archive_after_grid::before { content: "archive_after_grid\A 970x90 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-footer_above_newsletter::before { content: "footer_above_newsletter\A 970x90 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-single_sidebar_top::before { content: "single_sidebar_top\A 300x250 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-single_sidebar_sticky::before { content: "single_sidebar_sticky\A 300x600 px"; }
body.putuj-ads-helper-active .putuj-ad-slot-single_after_paragraph_3::before { content: "single_after_paragraph_3\A 728x90 desktop / 320x100 mobile"; }
body.putuj-ads-helper-active .putuj-ad-slot-single_middle_content::before { content: "single_middle_content\A 728x90 desktop / 320x100 mobile"; }
body.putuj-ads-helper-active .putuj-ad-slot-single_before_related::before { content: "single_before_related\A 728x90 desktop / 320x100 mobile"; }

body.putuj-ads-helper-active .putuj-ad-slot-loaded {
  outline: 3px solid rgba(31, 91, 73, .35);
  outline-offset: 6px;
}

body.putuj-ads-helper-active .putuj-ad-slot-loaded::before {
  position: absolute;
  top: -16px;
  left: 14px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: #1f5b49;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

body.putuj-ads-helper-active #putuj-ads-side-rails .putuj-ad-rail {
  min-height: 600px;
  border: 2px dashed #1f5b49;
  border-radius: 16px;
  background: repeating-linear-gradient(45deg, rgba(31, 91, 73, .10), rgba(31, 91, 73, .10) 10px, rgba(255,255,255,.88) 10px, rgba(255,255,255,.88) 20px);
  box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

body.putuj-ads-helper-active #putuj-ads-side-rails .putuj-ad-rail::after {
  position: absolute;
  top: -34px;
  left: 0;
  right: 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: #1f5b49;
  color: #fff;
  font: 700 12px/1.2 Arial, sans-serif;
  text-align: center;
}

body.putuj-ads-helper-active #putuj-ads-side-rails .putuj-ad-rail-left::after {
  content: "LEFT / POOL — 160x600";
}

body.putuj-ads-helper-active #putuj-ads-side-rails .putuj-ad-rail-right::after {
  content: "RIGHT / POOL — 160x600";
}

body.putuj-ads-helper-active #putuj-ads-side-rails .putuj-ad-rail:empty::before {
  content: "Side banner\A 160x600 px";
  white-space: pre-line;
  color: #123b31;
  font: 700 13px/1.35 Arial, sans-serif;
  text-align: center;
}

#putuj-ads-helper-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  width: min(380px, calc(100vw - 44px));
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(16, 24, 40, .25);
  border: 1px solid rgba(31, 91, 73, .18);
  overflow: hidden;
  font: 13px/1.45 Arial, sans-serif;
  color: #152b24;
}

.putuj-ads-helper-panel-head {
  background: #123b31;
  color: #fff;
  padding: 14px 16px;
}

.putuj-ads-helper-panel-head strong,
.putuj-ads-helper-panel-head span {
  display: block;
}

.putuj-ads-helper-panel-head span {
  opacity: .82;
  margin-top: 2px;
  font-size: 12px;
}

.putuj-ads-helper-panel-body {
  padding: 14px 16px;
}

.putuj-ads-helper-panel-body p {
  margin: 0 0 10px;
}

.putuj-ads-helper-panel-body summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f5b49;
  margin-bottom: 10px;
}

.putuj-ads-helper-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.putuj-ads-helper-list-item {
  padding: 9px 10px;
  border: 1px solid rgba(31, 91, 73, .16);
  border-radius: 12px;
  background: #f4faf7;
}

.putuj-ads-helper-list-item code,
.putuj-ads-helper-list-item strong,
.putuj-ads-helper-list-item span {
  display: block;
}

.putuj-ads-helper-list-item code {
  color: #1f5b49;
  font-weight: 700;
  margin-bottom: 2px;
}

.putuj-ads-helper-list-item span {
  color: #5b6b66;
  font-size: 12px;
  margin-top: 3px;
}

.putuj-ads-helper-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #1f5b49;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 767px) {
  body.putuj-ads-helper-active .putuj-ad-slot-single_after_paragraph_3::before,
  body.putuj-ads-helper-active .putuj-ad-slot-single_middle_content::before,
  body.putuj-ads-helper-active .putuj-ad-slot-single_before_related::before {
    content: attr(data-putuj-ad-position) "\A 320x100 px mobile";
  }

  #putuj-ads-helper-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}


/* Hide side rails when footer enters viewport */
#putuj-ads-side-rails.putuj-ads-rails-hidden-footer {
  display: none !important;
}


/* Device and bottom protection for side rails */
#putuj-ads-side-rails.putuj-ads-rails-hidden-device,
#putuj-ads-side-rails.putuj-ads-rails-hidden-bottom {
  display: none !important;
}

@media (max-width: 1023px), (pointer: coarse) {
  #putuj-ads-side-rails {
    display: none !important;
  }
}


/* v1.5.4 stronger protection for helper/cache conflicts */
#putuj-ads-side-rails.putuj-ads-rails-hidden-device,
#putuj-ads-side-rails.putuj-ads-rails-hidden-footer,
#putuj-ads-side-rails.putuj-ads-rails-hidden-bottom,
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-device,
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-footer,
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-bottom {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* v1.5.5 final side rail visibility guard */
#putuj-ads-side-rails[data-putuj-rails-hidden="1"],
#putuj-ads-side-rails.putuj-ads-rails-hidden-device,
#putuj-ads-side-rails.putuj-ads-rails-hidden-footer,
#putuj-ads-side-rails.putuj-ads-rails-hidden-bottom,
body.putuj-ads-helper-active #putuj-ads-side-rails[data-putuj-rails-hidden="1"],
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-device,
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-footer,
body.putuj-ads-helper-active #putuj-ads-side-rails.putuj-ads-rails-hidden-bottom {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* Archive/category horizontal banners: 920x180 px with cover image */
.putuj-ad-unit-archive_after_featured,
.putuj-ad-unit-archive_after_grid {
  width: 100%;
  max-width: 920px;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
}

.putuj-ad-unit-archive_after_featured .putuj-ad-link,
.putuj-ad-unit-archive_after_grid .putuj-ad-link,
.putuj-ad-unit-archive_after_featured .putuj-ad-html,
.putuj-ad-unit-archive_after_grid .putuj-ad-html {
  width: 100%;
  height: 100%;
}

.putuj-ad-unit-archive_after_featured .putuj-ad-image,
.putuj-ad-unit-archive_after_grid .putuj-ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.putuj-ads-helper-active .putuj-ad-slot-archive_after_featured,
body.putuj-ads-helper-active .putuj-ad-slot-archive_after_grid {
  max-width: 920px !important;
  min-height: 180px !important;
}


/* v1.5.7: Disable sticky behavior for all Putuj sidebar ads */
.putuj-ad-sticky,
.putuj-ad-unit-single_sidebar_sticky {
  position: static !important;
  top: auto !important;
}


/* Single post banner under featured image: 920x180 px with cover image */
.putuj-ad-unit-single_after_featured_image {
  width: 100%;
  max-width: 920px;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
}

.putuj-ad-unit-single_after_featured_image .putuj-ad-link,
.putuj-ad-unit-single_after_featured_image .putuj-ad-html {
  width: 100%;
  height: 100%;
}

.putuj-ad-unit-single_after_featured_image .putuj-ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.putuj-ads-helper-active .putuj-ad-slot-single_after_featured_image {
  max-width: 920px !important;
  min-height: 180px !important;
}


/* v1.5.8 helper: always show resolution inside every helper box */
body.putuj-ads-helper-active .putuj-ad-slot[data-putuj-ad-size]::before {
  content: attr(data-putuj-ad-position) "\A" attr(data-putuj-ad-size) "\A pozicija reklame" !important;
  white-space: pre-line !important;
}
