@property --scroll-y-position {
  syntax: "<percentage>";
  initial-value: -10%;
  inherits: false;
}
@property --reflection-y-position {
  syntax: "<percentage>";
  initial-value: -50%;
  inherits: false;
}
@property --scrollbar-color {
  syntax: "<color>";
  inherits: false;
  initial-value: transparent;
}
@property --opacity-1 {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.1;
}
@property --opacity-2 {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.1;
}
@property --opacity-3 {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.1;
}
@property --opacity-4 {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.1;
}

@property --text-offset-1 {
  syntax: "<number>";
  inherits: false;
  initial-value: 10;
}
@property --text-offset-2 {
  syntax: "<number>";
  inherits: false;
  initial-value: 10;
}
@property --text-offset-3 {
  syntax: "<number>";
  inherits: false;
  initial-value: 10;
}
@property --text-offset-4 {
  syntax: "<number>";
  inherits: false;
  initial-value: 10;
}

/* Scroll efekat za taksativno nabrojanje usluge na Service stranici High-tech layout - početak */

.container-and-background {
  display: flex;              /* Enable Flexbox */
  justify-content: center;    /* Center horizontally */
  align-items: center;        /* Center vertically */   
  background-image: none;     /* Remove decorative BGs in High-tech */
}

.container-services {
  width: 100%;
  height: 100%;
  border: 1px solid #000;     /* Clear black border (was semi-white) */
  margin-left: 33.33%;
  margin-right: 33.33%;
  position: relative;
}

/* Vertical glow rails — High-tech in black/white only */
.container-services::before,
.container-services::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 2px; /* Width of the glow */
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  background-repeat: no-repeat;
  background-position-y: var(--reflection-y-position); /* Dynamic scroll-based positioning */
  animation: on-scrolling both linear;
  animation-timeline: scroll();
  animation-range: 2.8vh;
}

.container-services::before {
  background-size: 0.2rem 2.5rem; /* small, sharp glow */
}

.container-services::after {
  background-size: 0.5rem 5rem;   /* wider, soft glow */
}

/* Creative keeps its own colored rails */
body.creative-layout .container-services::before,
body.creative-layout .container-services::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 76, 242, 0) 0%,
    rgb(255, 153, 102) 50.9132179054054%,
    rgba(10, 76, 242, 0) 100%
  );
  background-repeat: no-repeat;
  background-position-y: var(--reflection-y-position);
  animation: on-scrolling both linear;
  animation-timeline: scroll();
  animation-range: 2.8vh;
}

body.creative-layout .container-services::before {
  background-size: 0.2rem 2.5rem;
}
body.creative-layout .container-services::after {
  background-size: 0.5rem 5rem;
}

/* Adjust margins for tablets */
@media (min-width: 768px) and (max-width: 992px) {
  .container-services {
    margin-left: 10%;
    margin-right: 10%;
  }
}

/* Adjust margins for mobile screens */
@media (max-width: 767px) {
  .container-services {
    margin-left: 5%;
    margin-right: 5%;
  }
}

/* Text blocks — High-tech in solid black (remove blue-ish gradient text) */
.paragraph-services {
  color: #000;                /* High-tech: plain black text */
  background: none;           /* remove gradient text fill */
  -webkit-background-clip: initial;
  background-clip: initial;
  padding: 20px;
  line-height: 1.5em;
  --opacity-1: 0.1;
  --opacity-2: 0.1;
  --opacity-3: 0.1;
  --opacity-4: 0.1;
  --text-offset-1: 10;
  --text-offset-2: 10;
  --text-offset-3: 10;
  --text-offset-4: 10;
  animation: on-scrolling both linear;
  animation-timeline: scroll();
  animation-range: 10vh;
}

/* Creative keeps its size changes */
body.creative-layout .paragraph-services {
  font-size: 1.4rem;
}
@media (max-width: 767px) { 
  body.creative-layout .paragraph-services {
    font-size: 1rem;
  }
}

/* Animated offsets/opacities remain */
.paragraph-services:nth-child(1) {
  opacity: var(--opacity-1);
  transform: translateY(calc(var(--text-offset-1) * 1px));
}
.paragraph-services:nth-child(2) {
  opacity: var(--opacity-2);
  transform: translateY(calc(var(--text-offset-2) * 1px));
}
.paragraph-services:nth-child(3) {
  opacity: var(--opacity-3);
  transform: translateY(calc(var(--text-offset-3) * 1px));
}
.paragraph-services:nth-child(4) {
  opacity: var(--opacity-4);
  transform: translateY(calc(var(--text-offset-4) * 1px));
}

@keyframes on-scrolling {
  0% {
    --scroll-y-position: -5%;
    --reflection-y-position: -5%;
    --opacity-1: 0.1;
    --opacity-2: 1;
    --opacity-3: 0.1;
    --opacity-4: 0.1;

    --text-offset-1: 0;
    --text-offset-2: 10;
    --text-offset-3: 10;
    --text-offset-4: 10;
  }
  5% {
    --scroll-y-position: -2%;
    --reflection-y-position: -2%;
    --opacity-1: 1;
    --opacity-2: 0.1;
    --opacity-3: 0.1;
    --opacity-4: 0.1;

    --text-offset-1: 0;
    --text-offset-2: 10;
    --text-offset-3: 10;
    --text-offset-4: 10;
  }
  25% {
    --scroll-y-position: 25%;
    --reflection-y-position: 25%;
    --opacity-1: 1;
    --opacity-2: 0.1;
    --opacity-3: 0.1;
    --opacity-4: 0.1;

    --text-offset-1: 0;
    --text-offset-2: 10;
    --text-offset-3: 10;
    --text-offset-4: 10;
  }
  50% {
    --scroll-y-position: 50%;
    --reflection-y-position: 50%;
    --opacity-1: 0.1;
    --opacity-2: 1;
    --opacity-3: 0.1;
    --opacity-4: 0.1;

    --text-offset-1: 10;
    --text-offset-2: 0;
    --text-offset-3: 10;
    --text-offset-4: 10;
  }
  70% {
    --scroll-y-position: 70%;
    --reflection-y-position: 70%;
    --opacity-1: 0.1;
    --opacity-2: 0.1;
    --opacity-3: 1;
    --opacity-4: 0.1;

    --text-offset-1: 10;
    --text-offset-2: 10;
    --text-offset-3: 0;
    --text-offset-4: 10;
  }
  90% {
    --scroll-y-position: 90%;
    --reflection-y-position: 90%;
    --opacity-1: 0.1;
    --opacity-2: 0.1;
    --opacity-3: 0.1;
    --opacity-4: 1;

    --text-offset-1: 10;
    --text-offset-2: 10;
    --text-offset-3: 10;
    --text-offset-4: 0;
  }
  100% {
    --text-offset-1: 10;
    --text-offset-2: 10;
    --text-offset-3: 10;
    --text-offset-4: 10;
    --opacity-1: 0.1;
    --opacity-2: 0.1;
    --opacity-3: 0.1;
    --opacity-4: 0.1;
    --scroll-y-position: 105%;
    --reflection-y-position: 105%;
    --scrollbar-color: rgba(0, 0, 0, 0.1); /* subtle BW scrollbar tint */
  }
}

/* Scroll efekat … kraj */


/* Background na stranici Services - početak */

/* Creative keeps its background images */
@media (min-width: 1024px) {
  body.creative-layout .container-and-background {
    background-image: 
      url(/media/all-services/logo-fade.webp), 
      url(/media/all-services/tesladevelopment-reci-pozadina-services-annie-font.webp),
      url(/media/all-services/services-sa-strane-creative-1.webp),
      url(/media/all-services/services-sa-strane-creative-2.webp);

    /* Position for each image */
    background-position: bottom 1% right 1%,
                         bottom 5% left 5%,
                         top left,
                         center right;

    /* Size for each image */
    background-size: 15vw auto,
                     20vw auto,
                     20vw auto,
                     20vw auto;

    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  }
}

/* For smaller screens, remove the background images (Creative too) */
@media (max-width: 1023px) {
  .container-and-background {
    background-image: none;
  }
}

/* Background na stranici Services - kraj */
