/* === BASE STYLES (mobile-first) === */
.clients {
  width: min(350px, 100%);
  --vw: min(350px, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-height: fit-content;

  left: 50%;
  transform: translateX(-50%);
  margin-top: 50px;
  position: relative;
}
.clients .clients_text {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  margin-bottom: 30px;
}
.clients_texxxxt {
  /* Scroll-driven animation (shows final state when unsupported) */
  animation: clients_apper 0.3s ease;
  animation-timeline: view();
  animation-range: entry -10% cover 50%;
  padding: 0;
  margin: 0 auto;
}
/* ===== ANIMATIONS ===== */
@keyframes clients_apper {
  from {
    opacity: 0;
    transform: translateX(-200px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0px) scale(1);
  }
}
.clients .clients_text p.client_header {
  font-family: RomateHood;
  font-size: 2.5em;
  font-weight: 100;
  align-self: flex-start;
}
.clients .clients_text .clients_title1 {
  font-family: TheSeasonsBold;
  font-size: 3em;
  margin-top: 5px;
  align-self: flex-end;
}
.clients .clients_text .clients_title2 {
  align-self: end;
  font-size: 1.6em;
  font-family: TheSeasonsBold;
}
.clients .clients_desc {
  font-family: TheSeasonsLight;
  font-size: 1em;
  margin-top: 10px;
  align-self: center;
  text-align: center;
  width: 100%;
}
.clients .clients_box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: row;
  padding: 0;
  margin: 0;
  max-width: var(--vw);
  width: 100%;
  --vh: 480px;
  max-height: 480px;
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 20px,
    black calc(100% - 20px),
    transparent 100%
  );
  position: relative;
}
.clients_boxxxx {
  /* Scroll-driven animation (shows final state when unsupported) */
  animation: clients_apper_clients_box 0.2s ease;
  animation-timeline: view();
  animation-range: entry -10% cover 50%;
  padding: 0;
  margin: 0 auto;
}
/* ===== ANIMATIONS ===== */
@keyframes clients_apper_clients_box {
  from {
    opacity: 0;
    transform: translateX(300px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0px) scale(1);
  }
}
.clients .clients_box button {
  border: none;
  outline: none;
}
.clients .clients_box .logo_strip {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 0;
  width: max-content;
  will-change: transform;
  animation: slide-y var(--dur, 12s) linear infinite alternate;
}
.clients .clients_box .logo_strip:hover {
  animation-play-state: paused; /* stopira animaciju dok je miš preko */
}
.clients .clients_box .logo_strip:active {
  animation-play-state: paused; /* stopira animaciju dok je miš preko */
}
.clients .clients_box .logo_strip:nth-child(1) {
  --dur: 8s;
}
.clients .clients_box .logo_strip:nth-child(2) {
  --dur: 5s;
  animation-direction: alternate-reverse;
}
.clients .clients_box .logo_strip:nth-child(3) {
  --dur: 10s;
}
.clients .clients_box .logo_strip .logo {
  width: 80px;
  height: 80px;
  margin: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-direction: column;
}
.clients .clients_box .logo_strip .logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
}
.clients .clients_box .logo_strip .logo .logo_inner {
  position: absolute;
  width: 105%;
  height: 105%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 2.5s linear infinite;
  background: linear-gradient(
    180deg,
    rgba(240, 148, 51, 1) 0%,
    rgba(230, 104, 60, 1) 25%,
    rgba(220, 39, 67, 1) 50%,
    rgba(204, 35, 102, 1) 75%,
    rgba(188, 24, 136, 1) 100%
  );
  transition: 0.2s;
}

/* === ANIMATIONS === */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes slide-y {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, calc(-100% + var(--vh)), 0);
  }
}
@keyframes slide-x {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-100% + var(--vw)), 0, 0);
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  .clients .clients_box .logo_strip,
  .clients .clients_box .logo_strip .logo .logo_inner {
    animation: none !important;
  }
}

/* === TABLET (min-width: 768px) === */
@media (min-width: 768px) {
  .clients {
    margin-top: 80px;
    width: min(700px, 100%);
    --vw: min(600px, 100%);
    flex-direction: column;
  }
  .clients .clients_text {
    margin-bottom: 20px;
  }
  .clients .clients_box::before {
    content: "";
    background-color: black;
    z-index: 0;
    position: absolute;
    top: 0;
    height: 1px;
    width: 110%;
  }
  .clients .clients_box {
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    max-width: var(--vw);
    max-height: 350px;
    --vh: 350px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
      to left,
      transparent 0,
      black 20px,
      black calc(100% - 20px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0,
      black 20px,
      black calc(100% - 20px),
      transparent 100%
    );
    position: relative;
  }
  .clients .clients_box .logo_strip {
    flex-direction: row;
    width: auto;
    height: max-content;
    align-items: center;
    animation: slide-x var(--dur, 12s) linear infinite alternate;
  }
}

/* === DESKTOP (min-width: 1200px) === */
@media (min-width: 1200px) {
  .clients {
    width: min(1100px, 100%);
    --vw: min(750px, 100%);
    flex-direction: row;
    justify-content: space-between;
    margin-top: 100px;
    margin-bottom: 100px;
    position: relative;
  }
  .clients .clients_text {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    padding: 20px;
  }
  .clients .clients_text p.client_header {
    font-family: RomateHood;
    font-size: 5em;
    font-weight: 100;
    text-align: start;
    align-self: start;
  }
  .clients .clients_text .clients_title1 {
    font-family: TheSeasonsBold;
    font-size: 3em;
    margin-top: 0px;
    position: relative;
    left: 0;
    align-self: flex-end;
  }
  .clients .clients_text .clients_title2 {
    font-size: 2em;
    position: relative;
    top: 0%;
    margin-bottom: 0px;
  }
  .clients .clients_desc {
    font-family: TheSeasonsLight;
    font-size: 1em;
    margin-top: 10px;
    position: absolute;
    bottom: -50px;
    transform: translateX(-50%);
    left: 50%;
    bottom: 0;
    width: 300px;
  }
  /* .clients .clients_text::after {
    content: "";
    background-color: black;
    z-index: 4;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -5%;
    height: 150%;
    width: 2px;
  } */
  .clients .clients_box::before {
    display: none;
  }

  .clients .clients_box {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    max-width: var(--vw);
    width: 100%;
    height: 100%;
    --vh: 500px;
    height: 500px;

    overflow-x: hidden;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      black 20px,
      black calc(100% - 20px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0,
      black 20px,
      black calc(100% - 20px),
      transparent 100%
    );
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 500px;
  }
  .clients .clients_box .logo_strip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    will-change: transform;
    animation: slide-x var(--dur, 12s) linear infinite alternate;
    flex-direction: row;
    margin: 0;
    padding: 0;
  }
  .clients .clients_box .logo_strip .logo {
    width: 110px;
    height: 110px;
  }
}
