.temino-logos-wrapper { width: 100%; }
.temino-logos-swiper  { width: 100%; }

:root {
  --temino-card-h: 100px;      /* Zielhöhe der Karte */
  --temino-gap: 8px;           /* dein bestehender gap zwischen Bild & Caption */
}

/* Outer width control via align classes */
.wp-block-temino-logos.temino-logos-outer {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
}
.wp-block-temino-logos.temino-logos-outer.alignwide { max-width: var(--wp--style--global--wide-size); }
.wp-block-temino-logos.temino-logos-outer.alignfull { max-width: none; width: 100%; }

/* Slide-Container */
.temino-logo-slide {
  height: var(--temino-card-h);
  min-height: var(--temino-card-h);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* CARD: Standard */
.temino-logo-card {
  height: var(--temino-card-h);
  max-height: var(--temino-card-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--temino-gap);
  min-width: 0;
  box-sizing: border-box;
}

/* Logo-Box */
.temino-logo-media {
  height: 90px;
  width: clamp(160px, 28vw, 250px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.temino-logo-img {
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

.temino-logo-caption {
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  color: #333;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  /* max 2 Zeilen */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Abstand zwischen Slides */
.temino-logos-swiper .swiper-wrapper { align-items: center; }

/* Grayscale */
.temino-logos-swiper.is-grayscale .temino-logo-img { filter: grayscale(100%); opacity: 0.9; }
.temino-logos-swiper.is-grayscale .temino-logo-card:hover .temino-logo-img { filter: none; opacity: 1; }

/* slidesPerView:auto */
.temino-logos-swiper .swiper-slide { width: auto; }

/* Weißer Kartenhintergrund */
.temino-logos-swiper .temino-logo-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 0.75rem;
  box-sizing: border-box;
}

/* Rechteckige Logos: zentrierte Caption */
.temino-logos-swiper .temino-logo-card:not(.is-square) .temino-logo-caption { text-align: center; }

/* Quadratische Logos */
.temino-logo-card.is-square {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  max-width: 360px;
}

.temino-logo-card.is-square .temino-logo-media {
  width: 90px;
  height: 90px;
  flex: 0 0 90px;
}

.temino-logo-card.is-square .temino-logo-caption {
  text-align: left;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - (100px + 12px + 1.5rem));
  /* Optional Clamp:
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  */
}

/* Aktiviert weiches Ausblenden an beiden Rändern */
.temino-logos-outer.has-fade .temino-logos-swiper {
  /* Breite Fade-Zone nach Bedarf anpassen (z. B. 48px) */
  --fade-w: 100px;

  -webkit-mask-image: linear-gradient(to right,
    transparent 0,
    #000 calc(var(--fade-w) * 1),
    #000 calc(100% - var(--fade-w)),
    transparent 100%
  );
          mask-image: linear-gradient(to right,
    transparent 0,
    #000 calc(var(--fade-w) * 1),
    #000 calc(100% - var(--fade-w)),
    transparent 100%
  );
}

/* Phones */
@media (max-width: 480px) {
  .temino-logo-media { width: clamp(140px, 44vw, 200px); }
  .temino-logo-card.is-square { max-width: 340px; }
}
