/* =========================================================
   TCP Product Slider
   - Desktop: scrollytelling (sticky stage + page scroll)
   - Mobile: horizontal swipe (scroll-snap x)
   ========================================================= */

.tcp-product-slider {
  --tcpps-sticky-offset: 0px; /* JS setuje (admin bar + Kadence header) */
  --tcpps-steps: 1;           /* JS setuje */
  --tcpps-step: 600px;        /* JS setuje (visina stage-a) */
}

/* --- Scrolly wrapper (desktop scroll “trajanje”) --- */
.tcp-product-slider .tcpps-scrolly {
  position: relative;
  height: calc(var(--tcpps-steps) * var(--tcpps-step));
}

/* --- Sticky stage (desktop) --- */
.tcp-product-slider .tcpps-stage {
  position: sticky;
  top: var(--tcpps-sticky-offset);
}

.tcp-product-slider .tcpps-stage.is-sticky {
  padding-top: 0;
}

/* --- Inner container --- */
.tcp-product-slider .tcpps-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Header --- */
.tcp-product-slider .tcpps-header {
  margin-bottom: 1.5rem;
}

.tcp-product-slider .tcpps-title {
  margin: 0;
  font-size: 1.3rem;
}

/* --- Layout wrapper --- */
.tcp-product-slider .tcpps-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* --- Bullets (desktop vertical) --- */
.tcp-product-slider .tcpps-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
}

.tcp-product-slider .tcpps-bullets::before,
.tcp-product-slider .tcpps-bullets::after {
  content: "";
  width: 2px;
  flex: 1;
  background: #edf2f4;
  opacity: 0.7;
}

.tcp-product-slider .tcpps-bullet {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #c4e4ff;
  background: #c4e4ff;
  padding: 0;
  cursor: pointer;
  display: block;
}

.tcp-product-slider .tcpps-bullet.is-active {
  border-color: #71a8f4;
  background: #71a8f4;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* --- Viewport (desktop stage canvas) --- */
.tcp-product-slider .tcpps-viewport {
  position: relative;
  height: 580px;
  max-height: 580px;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid #e2f2ff;
  background: #e2f2ff;
}

.tcp-product-slider.tcpps-has-cta .tcpps-viewport {
  border-radius: 1.25rem 1.25rem 0 0;
  border-bottom: none;
}

/* --- Slides (desktop: layered + fade) --- */
.tcp-product-slider .tcpps-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: center;
  box-sizing: border-box;

  padding: 0 2.25rem;
  transition: opacity 220ms ease;
}

.tcp-product-slider .tcpps-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Copy --- */
.tcp-product-slider .tcpps-slide-copy {
  font-size: 0.95rem;
  color: #4b5563;
}

.tcp-product-slider .tcpps-slide-copy > *:first-child {
  margin-top: 0;
}

.tcp-product-slider .tcpps-slide-copy > *:last-child {
  margin-bottom: 0;
}

.tcp-product-slider .tcpps-slide-copy h2 {
  color: #02182e;
}

/* --- Visual --- */
.tcp-product-slider .tcpps-slide-visual {
  margin: 0;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcp-product-slider .tcpps-slide-image {
  max-width: 80%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  margin: 0 auto;
}

/* --- No slides --- */
.tcp-product-slider .tcpps-no-slides {
  font-size: 0.9rem;
  color: #6b7280;
}

/* --- CTA --- */
.tcp-product-slider .tcpps-cta {
  background: #02152f;
  border-radius: 0 0 1.25rem 1.25rem;
  border: 1px solid #02152f;
  border-top: none;
}

.tcp-product-slider .tcpps-cta-inner {
  position: relative;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* CTA panels (overlay + fade, no translate) */
.tcp-product-slider .tcpps-cta-panel {
  position: absolute;
  inset: 0;
  padding: inherit;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;

  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.tcp-product-slider .tcpps-cta-panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

.tcp-product-slider .tcpps-cta-copy {
  flex: 1 1 auto;
  color: #f9fafb;
  font-size: 0.95rem;
}

.tcp-product-slider .tcpps-cta-copy p {
  font-size: 32px;
}

.tcp-product-slider .tcpps-cta-action {
  flex: 0 0 auto;
}

.tcp-product-slider .tcpps-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.tcp-product-slider .tcpps-cta-button:hover {
  background: #1d4ed8;
}

/* =========================================================
   Customizer CSS (scoped) – moved into file
   ========================================================= */

.acf-slider-block-wrapper .blue-highlight a {
  display: flex;
  gap: 5px;
  max-width: 100%;
}

.acf-slider-block-wrapper .blue-highlight a:after {
  position: relative;
  right: 0;
  top: 4px;
  min-width: 20px;
  min-height: 20px;
}

.acf-slider-block-wrapper .blue-highlight a:hover:after {
  right: -3px;
}

.tcp-product-slider .tcpps-slide-copy h2 {
  margin: 0 0 0.3em;
}

.tcp-product-slider .tcpps-slide-copy p {
  font-size: 22px;
  line-height: 36px;
  margin-bottom: 1em;
}

.tcp-product-slider .tcpps-slide-copy ul {
  list-style: none;
  padding: 0;
}

.tcp-product-slider .tcpps-slide-copy li {
  background: transparent url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24.9337 9.59995C24.4003 9.06662 23.6003 9.06662 23.067 9.59995L13.067 19.6L8.93366 15.4666C8.40032 14.9333 7.60033 14.9333 7.06699 15.4666C6.53366 16 6.53366 16.8 7.06699 17.3333L12.1337 22.4C12.4003 22.6666 12.667 22.8 13.067 22.8C13.467 22.8 13.7337 22.6666 14.0003 22.4L24.9337 11.4666C25.467 10.9333 25.467 10.1333 24.9337 12.59995Z' fill='%23346860'/%3E%3C/svg%3E") no-repeat 0 0;
  padding-left: 40px;
  font-size: 18px;
  line-height: 32px;
  margin-bottom: 0.25em;
}

.tcp-product-slider .tcpps-slide-copy > *:first-child {
  margin-top: 0;
  margin-bottom: 0;
  color: #085dd4;
  font-size: 22px;
}

/* =========================================================
   Desktop tweaks
   ========================================================= */

@media (min-width: 768px) {
  .tcp-product-slider .tcpps-cta {
    margin-left: 1.85em;
  }

  .tcp-product-slider .tcpps-cta-inner {
    padding: 1.25rem 14rem;
    min-height: 100px;
  }
}


/* =========================================================
   Mobile: horizontal swipe slider (scroll-snap x)
   ========================================================= */

@media (max-width: 768px) {
  .tcp-product-slider {
    padding: 0 !important;
  }

  /* scrolly behaves like normal section on mobile */
  .tcp-product-slider .tcpps-scrolly {
    height: auto;
  }

  .tcp-product-slider .tcpps-stage {
    position: relative;
    top: auto;
  }

  .tcp-product-slider .tcpps-inner {
    padding: 0 !important;
  }

  .tcp-product-slider .tcpps-wrapper {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* bullets horizontal */
  .tcp-product-slider .tcpps-bullets {
    flex-direction: row;
    justify-content: center;
  }

  .tcp-product-slider .tcpps-bullets::before,
  .tcp-product-slider .tcpps-bullets::after {
    display: none;
  }

  /* viewport becomes horizontal scroller */
  .tcp-product-slider .tcpps-viewport {
    max-height: none;
    height: auto;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;

    scroll-snap-type: x mandatory;
    display: flex;

  }

  /* slides become 100% width cards */
  .tcp-product-slider .tcpps-slide {
    position: relative !important;
    inset: auto !important;

    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;

    flex: 0 0 100%;
    width: 100%;
    height: 100%;

    scroll-snap-align: start;
    scroll-snap-stop: always;

    grid-template-columns: 1fr;
    padding: 1.75rem 1.5rem;
    align-content: center;
    display: flex;
    flex-direction: column;
  }

  .tcpps-viewport::-webkit-scrollbar {
    display: none;
  }
  
  .tcpps-viewport{
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .tcp-product-slider .tcpps-slide-image {
    max-width: 100%;
  }

  .tcp-product-slider .tcpps-slide-copy > *:first-child {
    font-size: 20px;
  }

  .tcp-product-slider .tcpps-cta {
    min-height: 140px;
  }

  .tcp-product-slider .tcpps-cta-inner {
    padding: 2.5rem 1.5rem;
  }

  .tcp-product-slider .tcpps-cta-panel {
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
  }

  .tcp-product-slider .tcpps-cta-action {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .tcp-product-slider .tcpps-cta-copy p {
    font-size: 19px !important;
  }

  .tcp-product-slider .tcpps-slide-copy h2 {
    font-size: 25px;
    margin: 0.25em auto 0.5em;
  }

  .tcp-product-slider .tcpps-slide-copy li {
    font-size: 15px;
    line-height: 28px;
  }

  .tcp-product-slider .tcpps-slide-copy p {
    font-size: 16px !important;
    line-height: 1.5;
    margin-bottom: 1em;
  }
}


/* Desktop default: copy je iznad dugmeta, u dugmetu se ne vidi */
.tcpps-btn__copy { display: none; }

@media (max-width: 768px) {
  /* Mobile: sakrij posebnu copy liniju */
  .tcpps-cta-copy, .tcpps-btn__label { display: none; }
  .tcp-product-slider .tcpps-cta { min-height: initial; }

  /* Mobile: ubaci copy u dugme kao drugi red */
  .tcpps-btn__copy {
    display: block;
    margin-top: 6px;      /* po potrebi */
    font-weight: 300;     /* po potrebi */
    opacity: .85;         /* po potrebi */
    margin: 0;
  }

  /* Ako želiš da dugme bude “two-line” lepo */
  .tcpps-cta-action a {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start; /* ili center */
  }
}