/* Logo Carousel v3.0 - no dependencies
   Theme it by overriding these variables on .logo-carousel (or any parent). */
.logo-carousel {
  --lc-accent: #0033A0;        /* CCC deep blue: buttons, active dot */
  --lc-progress: #FFB81C;      /* CCC gold: countdown bar */
  --lc-tile-bg: #ffffff;
  --lc-tile-border: #e3e7ef;
  --lc-text: #3b4252;
  --lc-cols: 10;               /* 10 x 5 = 50 logos per slide on desktop */
  --lc-gap: 10px;
  --lc-tile-ratio: 3 / 2;
  --lc-radius: 10px;
  --lc-fade: 600ms;

  position: relative;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  color: var(--lc-text);
  font: inherit;
}

.logo-carousel *,
.logo-carousel *::before,
.logo-carousel *::after { box-sizing: border-box; }

/* Slides stack in one grid cell so the height never jumps */
.lc-viewport { display: grid; }
.lc-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(var(--lc-cols), minmax(0, 1fr));
  gap: var(--lc-gap);
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--lc-fade) ease, visibility 0s linear var(--lc-fade);
}
.lc-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--lc-fade) ease, visibility 0s;
}

.lc-tile {
  aspect-ratio: var(--lc-tile-ratio);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
  background: var(--lc-tile-bg);
  border: 1px solid var(--lc-tile-border);
  border-radius: var(--lc-radius);
}
.lc-tile a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lc-tile img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Tiles of the incoming slide arrive one after another */
.lc-slide.is-active .lc-tile {
  animation: lc-in 500ms cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 12ms);
}
@keyframes lc-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Controls */
.lc-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.lc-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lc-tile-border);
  border-radius: 50%;
  background: var(--lc-tile-bg);
  color: var(--lc-accent);
  cursor: pointer;
}
.lc-btn:hover { border-color: var(--lc-accent); }
.lc-btn svg { width: 18px; height: 18px; }

.lc-status { flex: 1; min-width: 0; }
.lc-count { font-size: .875rem; margin: 0 0 8px; }
.lc-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--lc-tile-border);
  overflow: hidden;
}
.lc-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--lc-progress);
  transform-origin: left;
  transform: scaleX(0);
}

.lc-dots { display: flex; gap: 8px; flex: none; }
.lc-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--lc-tile-border);
  cursor: pointer;
}
.lc-dot[aria-current="true"] { background: var(--lc-accent); }

.logo-carousel :focus-visible {
  outline: 3px solid var(--lc-progress);
  outline-offset: 2px;
}
.lc-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Responsive: always 50 per slide, columns divide 50 evenly */
@media (max-width: 1000px) {
  .logo-carousel { --lc-cols: 5; --lc-tile-ratio: 2 / 1; }
}
@media (max-width: 560px) {
  .logo-carousel { --lc-cols: 5; --lc-gap: 5px; --lc-radius: 6px; --lc-tile-ratio: 1 / 1; }
  .lc-tile { padding: 6%; }
  .lc-dots { display: none; }
  .lc-controls { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-carousel { --lc-fade: 0ms; }
  .lc-slide.is-active .lc-tile { animation: none; }
}
