.home-grid {
  display: grid;
  list-style: none;
  grid-gap: .75rem;
  line-height: 0;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
}
.home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.filter-btn {
  padding: .375rem .75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.22);
  color: var(--color-black);
  cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

[data-theme="dark"] .filter-btn {
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .filter-btn {
    color: #fff;
  }
}
.filter-btn[aria-pressed="true"] {
  background: rgba(255,255,255,.35);
  border-color: rgba(255,255,255,.7);
}
.home-grid li[hidden] {
  display: none !important;
}
.home-grid li {
  position: relative;
  --cols: 1;
  --rows: 1;

  overflow: hidden;
  background: transparent;
  line-height: 0;
}
.home-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.23);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.20);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1.5px solid rgba(255,255,255,0.38);
}
[data-theme="dark"] .home-grid a {
  background: rgba(24, 35, 44, 0.32);
  border: 1.5px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px 0 rgba(15, 18, 45, 0.30);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-grid a {
    background: rgba(24, 35, 44, 0.32);
    border: 1.5px solid rgba(255,255,255,0.10);
    box-shadow: 0 8px 32px 0 rgba(15, 18, 45, 0.30);
  }
}
.home-grid figure {
  position: relative;
  width: 100%;
  height: 100%;
}
.home-grid img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .3s;
}
.home-grid figcaption {
  display: none;
}

@media screen and (min-width: 45em) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .home-grid li {
  }
  .home-grid a {
    aspect-ratio: 1 / 1;
  }
}

@media screen and (min-width: 60rem) {
  .home-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Flip card styles */
.flip-card {
  position: absolute;
  inset: 0;
  perspective: 1000px;
}
.flip-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .8s ease;
}
.flip-card.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.flip-back {
  transform: rotateY(180deg);
}

/* Kunden Grid */
h1:has(+ .kunden-grid) {
  margin-left: 20%;
  margin-right: 20%;
  margin-top: 8rem;
  margin-bottom: 0;
  text-align: center;
  font-size: 2rem;
  line-height: 1.25em;
}

.kunden-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 1rem;
  list-style: none;
  margin-top: 1rem;
  margin-left: 20%;
  margin-right: 20%;
  padding-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.kunden-grid li {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.kunden-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 1rem;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  display: block;
}

.kunden-grid li:hover img {
  transform: scale(1.05);
}

@media screen and (max-width: 60rem) {
  .kunden-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 45em) {
  h1:has(+ .kunden-grid) {
    margin-left: 5%;
    margin-right: 5%;
  }
  .kunden-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-left: 5%;
    margin-right: 5%;
    grid-gap: 0.5rem;
  }
  .kunden-grid img {
    padding: 0.5rem;
  }
}

@media screen and (max-width: 30em) {
  h1:has(+ .kunden-grid) {
    margin-left: 5%;
    margin-right: 5%;
  }
  .kunden-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-left: 5%;
    margin-right: 5%;
    grid-gap: 0.5rem;
  }
  .kunden-grid img {
    padding: 0.5rem;
  }
}
