/* ============================================================
   CSIA CLIENTI — Frontend Styles
   ============================================================ */

/* ---- SLIDER ---- */
.csia-slider {
  overflow: hidden;
  padding: 16px 0;
  position: relative;
}
.csia-slider__track {
  display: flex;
  transition: transform .6s ease;
}
.csia-slider__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.csia-slider__item img {
  max-height: 100%;
  max-width: 98%;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Fade edges */
.csia-slider::before,
.csia-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.csia-slider::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}
.csia-slider::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

/* ---- FILTERS ---- */
.csia-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.csia-fbtn {
  padding: 7px 18px;
  border-radius: 24px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  line-height: 1.4;
}
.csia-fbtn:hover {
  border-color: #015b99;
  color: #015b99;
}
.csia-fbtn.active {
  background: #015b99;
  border-color: #015b99;
  color: #fff;
}

/* ---- GRID ---- */
.csia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--csia-col-min, 170px), 1fr));
  gap: 16px;
}
.csia-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px 6px 10px;
  text-align: center;
  transition: all .3s ease;
  cursor: default;
  position: relative;
}
.csia-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  border-color: #00adef;
}
.csia-card.csia-hidden {
  display: none;
}
.csia-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.csia-card--link:hover {
  text-decoration: none;
}

/* Logo area */
.csia-card__logo {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 8px;
}
.csia-card__logo img {
  max-height: 118px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.csia-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #f0f4f8;
  color: #94a3b8;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Text */
.csia-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #08273a;
  line-height: 1.3;
}
.csia-card__cat {
  font-size: 11px;
  color: #00adef;
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Tooltip */
.csia-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(.95);
  background: #08273a;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all .2s ease;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.csia-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #08273a;
}
.csia-card:hover .csia-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .csia-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .csia-card { padding: 4px 4px 8px; }
  .csia-card__logo { height: 100px; }
  .csia-card__logo img { max-height: 98px; }
  .csia-card__name { font-size: 12px; }
  .csia-slider__item img { max-height: 80%; }
  .csia-fbtn { padding: 5px 12px; font-size: 12px; }
}
@media (max-width: 480px) {
  .csia-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
