/* ===== Image Comparison Custom ===== */

.ic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* override-uje Elementor kontrola */
  column-gap: 24px;
  row-gap: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;                            /* flex/grid item sme da se skupi */
}

.ic-item { width: 100%; min-width: 0; }

/* okvir 16:9 - padding-top tehnika umjesto aspect-ratio.
   Visina dolazi iz SIRINE (padding %), pa je Elementor flex
   kontejneri (align-items: stretch, min-height) ne mogu pregaziti. */
.ic-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;                     /* 16:9 */
  overflow: hidden;
  border-radius: 5px;
  cursor: ew-resize;
  touch-action: none;
  --pos: 50%;
  background: #eee;
}

.ic-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* lijevo = PRE (bazna), desno = POSLE (klipovana) */
.ic-after { clip-path: inset(0 0 0 var(--pos)); }

/* bijela linija 1.5px */
.ic-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 1.5px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

/* hvataljka na vertikalnom centru linije */
.ic-handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 0;
}
.ic-handle svg { width: 34px; height: 23px; display: block; }

/* naziv tretmana 20px ispod slike */
.ic-caption {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}
.ic-caption-icon { width: 17px; height: 17px; flex: 0 0 auto; line-height: 0; }
.ic-caption-icon svg { width: 17px; height: 17px; display: block; }
.ic-caption-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.16;
  color: #230303;
  margin: 0;
}

/* ============================================================
   FIX <=768px: Elementor flex kontejneri (.e-con / .e-con-inner)
   na tablet breakpointu nature visinu (align-items: stretch,
   min-height, transform) i izbace sadrzaj iz okvira.
   Isti obrazac kao dokazani slimator-vimeo fix.
   ============================================================ */
@media (max-width: 768px) {
  .e-con-inner:has(.ic-grid),
  .e-con:has(.ic-grid),
  .elementor-element:has(.ic-grid) {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
  }

  /* zakljucaj okvir - visina iskljucivo iz sirine */
  .ic-frame {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 56.25% !important;
    overflow: hidden !important;
  }
  .ic-frame img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
  }
}

/* ===== Vidljivost stavki po uredjaju (Elementor breakpointi) ===== */
@media (min-width: 1025px) {
	.ic-item.ic-hide-desktop { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.ic-item.ic-hide-tablet { display: none !important; }
}
@media (max-width: 767px) {
	.ic-item.ic-hide-mobile { display: none !important; }
}
