/* ========================================
   Services Page — Tech Brands
   ======================================== */

.section-tech-brands {
  background-color: var(--color-bg-dark);
  padding-top: 0;
  padding-bottom: 0;
}
.no-grid {
    background-color: transparent;
    background-image:
        repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px),
        repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px);
    background-size: 1px 20px, 1px 20px;
    background-position: 0 0, 100% 0;
    background-repeat: repeat-y, repeat-y;
}
/* Dashed vertical lines — solo sx e dx */
.section-tech-brands.section--grid-dark::after {
  background-image:
    repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px),
    repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px);
  background-size: 1px 20px, 1px 20px;
  background-position: 0% 0, 100% 0;
  background-repeat: repeat-y, repeat-y;
}
.section-tech-brands .grid-cross {display: none;}
/* Header — label sopra la griglia */
.tech-brands-header-wrap {
  grid-column: 1 / -1;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
  padding-top: 50px;
  padding-bottom: 0;
}

.tech-brands-label {
  display: block;
  font-family: var(--font-primary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-subtitle);
  line-height: 1;
  color: var(--color-gray-text);
}

/* Divisore orizzontale sotto il label — esce dal container come le altre sezioni */
.tech-brands-divider {
  grid-column: 1 / -1;
  height: 1px;
  background-color: var(--color-grid-line-dark);
  margin-top: 23px;
  margin-left: calc(-1 * max(0px, (100vw - var(--container-max)) / 2));
  margin-right: calc(-1 * max(0px, (100vw - var(--container-max)) / 2));
}

/* Grid loghi — 2 colonne con linea centrale solo in questa area */
.tech-brands-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  position: relative;
}

/* Linea verticale centrale — solo nel grid, non nell'header */
.tech-brands-grid::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-image: repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px);
  background-size: 1px 20px;
  background-repeat: repeat-y;
  pointer-events: none;
  z-index: 0;
}

.tech-brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: var(--card-pt) var(--card-pl);
  position: relative;
}

/* Divisore orizzontale tra le righe — esce dal container a piena larghezza */
.tech-brand-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -9999px;
  right: -9999px;
  height: 1px;
  background-color: var(--color-grid-line-dark);
}

/* Divisore verticale tra le colonne — gestito dal background-image del container */

.tech-brand-logo {
  height: auto;
  width: 176px;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
  transition: opacity 0.3s ease;
}

.tech-brand-item:hover .tech-brand-logo {
  opacity: 1;
}

/* Hidden during LOB filtering */
.tech-brand-item.is-hidden {
  display: none;
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */

@media (max-width: 1024px) {
  .tech-brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 3 colonne: linea centrale del grid non serve, i divisori interni usano ::after sui singoli item */
  .tech-brands-grid::after {
    display: none;
  }

  .tech-brand-item::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 1px;
    background-image: repeating-linear-gradient(to bottom, var(--color-grid-line-dark) 0px, var(--color-grid-line-dark) 10px, transparent 10px, transparent 20px);
    background-size: 1px 20px;
    background-repeat: repeat-y;
  }

  .tech-brand-item:nth-child(3n+1)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .tech-brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 2 colonne: ripristina linea centrale sul grid, nasconde ::after degli item */
  .tech-brands-grid::after {
    display: block;
  }

  .tech-brand-item::after {
    display: none;
  }

  .tech-brand-item:nth-last-child(-n+2)::after {
    content: '';
    display: block;
    position: absolute;
    top: auto;
    bottom: 0;
    left: -9999px;
    right: -9999px;
    width: auto;
    height: 1px;
    background-image: none;
    background-color: var(--color-grid-line-dark);
  }
  .tech-brand-logo {
      width: 100px;
  }
  .tech-brand-item {
    min-height: 110px;
  }
}
