/* ==========================================================================
   SERVICES SECTION (WHAT WE DO) WITH DOT GRID BACKDROP
   ========================================================================== */
.services {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 140px 50px 140px 50px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  background-color: transparent;
  clip-path: inset(0); /* Klipowanie wideo ditheru w tle do granic tej sekcji */
}

.services::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: calc(100% + 1px);
  background: transparent; /* Tło w 100% obsługiwane przez WebGL i przezroczystość */
  z-index: 2;
  pointer-events: none;
}

/* Tło wideo Halftone */
.services__video-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 3; /* Globalnie w body pod sekcjami (z-index >= 10), ale nad wideo Hero (z-index 1-2) */
  pointer-events: none;
  opacity: 0; /* Domyślnie przezroczyste, wyłaniane w JS gdy sekcja Services jest na ekranie */
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  image-rendering: pixelated;
}

.services__video-wrapper {
  display: none;
}

.services__brands-container {
  width: 100%;
  margin-bottom: clamp(60px, 8vh, 100px); /* Odstęp od logotypów do tytułu WHAT WE DO. */
}

.services__wrapper {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 100%; /* Rozciągnięcie na 100% szerokości z paddingami */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Wiersze dwukolumnowe */
.services__top-row,
.services__bottom-row {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: clamp(40px, 6vw, 100px);
  width: 100%;
}

.services__top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.services__top-right {
  display: flex;
  align-items: flex-start;
}

.services__title {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 7.5vw, 6.2rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 clamp(30px, 4vh, 50px) 0;
}

.services__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.services__cat-btn {
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 10px 20px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.services__cat-btn:hover {
  background-color: #ffffff;
  color: var(--bg-primary);
  border-color: #ffffff;
}



.services__desc {
  font-family: var(--font-primary);
  font-size: clamp(1.3rem, 2.5vw, 2.3rem);
  font-weight: 400;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-align: left;
  max-width: 100%;
}

/* Linia pozioma - taka sama jak w hero */
.services__divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.35);
  width: 100%;
  margin: clamp(45px, 6vh, 70px) 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* Część dolna */
.services__bottom-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.services__bottom-right {
  width: 100%;
}

/* Moduł TLDR z wezwaniem do kontaktu */
.services__tldr {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 24px);
  width: 100%;
}

.services__tldr-text {
  font-family: var(--font-primary);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  color: #ffffff; /* Biały kolor dla maksymalnej czytelności */
  font-weight: 400;
  line-height: 1.4;
}

.services__tldr-btn {
  background-color: #0b0c0c;
  border: none;
  border-radius: 0;
  padding: 8px 24px 8px 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  width: fit-content;
}

.services__tldr-btn:hover {
  background-color: #121313;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.05);
}

.services__tldr-icon {
  width: 38px;
  height: 38px;
  border-radius: 0;
  border: none;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.services__tldr-svg {
  width: 16px;
  height: 16px;
}

.services__tldr-btn:hover .services__tldr-icon {
  background-color: #ffffff;
  color: var(--bg-primary);
}

.services__tldr-email {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Trzy kolumny list usług */
.services__lists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  width: 100%;
}

.services__list-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.5s ease, opacity 0.5s ease;
  border-radius: 8px;
  padding: 16px;
  margin: -16px; /* Anuluje padding kontenera w spoczynku */
  border: 1px solid transparent;
}

/* Efekt podświetlenia po kliknięciu kategorii */
.services__list-col.active-highlight {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.02);
  animation: col-pulse-glow 1.5s ease-out;
}

@keyframes col-pulse-glow {
  0% {
    box-shadow: 0 0 0 0px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 2px rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0px transparent;
    border-color: rgba(255, 255, 255, 0.15);
  }
}

.services__list-title {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.1vw, 0.85rem);
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.services__list-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.services__list-item {
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  font-weight: 300;
  color: #ffffff; /* Biały kolor dla czytelności na tle wideo halftone */
  position: relative;
  padding-left: 0;
  transition: color 0.3s ease, transform 0.3s ease;
}

.services__list-item:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* --- RESPONSYWNOŚĆ (RWD) --- */
@media (max-width: 1200px) {
  .services {
    padding: 120px 40px 120px 40px;
  }
}

@media (max-width: 1024px) {
  .services {
    padding: 100px 30px 100px 30px;
  }
  
  .services__top-row,
  .services__bottom-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .services__tldr {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .services__lists-grid {
    grid-template-columns: 1fr; /* Listy układają się pionowo na tabletach/komórkach */
    gap: 30px;
  }
  
  .services__list-col {
    padding: 0;
    margin: 0;
  }
  
  .services__list-col.active-highlight {
    animation: none;
    background-color: transparent;
    border-color: transparent;
  }
}

@media (max-width: 640px) {
  .services {
    padding: 80px 20px 80px 20px;
  }
  
  .services__categories {
    gap: 10px;
  }
  
  .services__cat-btn {
    padding: 10px 16px;
  }
  
  .services__tldr {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
