/* ORGANIZATIONS BLOCK */
.homepage-organization {
  padding-top: 3rem;
  padding-bottom: 3rem;


  .btn:hover {
    opacity: 0.8;
  }
}

.homepage-organization__head {
  text-align: center;
  margin-bottom: 2rem;
}

.homepage-organization__title {
  font-weight: 500;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  .homepage-organization__title {
    font-size: 3rem;
  }
}

.homepage-organization__text {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.homepage-organization__cta-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* MARQUEE — endless auto-scrolling logo strip.
   Two identical groups translate left in lockstep; when the first has fully
   exited, the second sits exactly where the first began -> seamless loop.
   `min-width: 100%` on each group guarantees no empty gap at any viewport
   width or logo count. */
.homepage-organization__marquee {
  --hp-org-gap:20px;
  --hp-org-duration: 60s;
  display: flex;
  gap: 20px;
  width: 100%;
  overflow: hidden;
}

.homepage-organization__group {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--hp-org-gap);
  flex-shrink: 0;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: hp-org-marquee var(--hp-org-duration) linear infinite;
}

@keyframes hp-org-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - var(--hp-org-gap)));
  }
}

/* Pause on hover/focus so logos stay clickable. */
.homepage-organization__marquee:hover .homepage-organization__group,
.homepage-organization__marquee:focus-within .homepage-organization__group {
  animation-play-state: paused;
}

.homepage-organization__group .views-row {
  flex: 0 0 auto;
  width: clamp(120px, 16vw, 180px);
  aspect-ratio: 1 / 1;
}

/* Accessibility: no auto-motion for reduced-motion users; allow manual scroll. */
@media (prefers-reduced-motion: reduce) {
  .homepage-organization__group {
    animation: none;
  }
  .homepage-organization__marquee {
    overflow-x: auto;
  }
}

@media (min-width: 768px) {
  .homepage-organization .view-organizations-public-blocks-db {
    grid-template-columns: repeat(1, 1fr);
  }
}





/* CARD LOGO */
.homepage-organization {
  .card-teaser-organization {
    border: 0px;
    aspect-ratio: 1 / 1;

    .card-teaser-organization__body {
      padding: 0;
    }

    .card-teaser-organization__logo,
    .card-teaser-organization__link {
      height: 100%;
    }

    .field > div,
    .field {
      position: relative;
      width: 100%;
      height: 100%;
    }
    img {
      width: 100%;
      height: 100%;
      position: absolute;
      filter: grayscale(100%);
      opacity: 0.8;
      transition:
        filter 0.3s ease,
        opacity 0.3s ease;
    }
  }
  .card a:hover img {
    filter: grayscale(0%);
    opacity: 1;
  }
}
