/**
 * Karusel referencí – jednoduché šipky, skrytý scrollbar, prostor pro kraje.
 */
.cr-carousel {
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(0.5rem, 2vw, 1rem);
  background: transparent;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cr-carousel__header {
  text-align: center;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

.cr-carousel__title {
  margin: 0 0 0.5rem;
  font-family: "Poppins", "Poppins ExtraBold", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  line-height: 1.2;
  color: #1a1a1a;
}

.cr-carousel__subtitle {
  margin: 0 auto;
  max-width: 48rem;
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  line-height: 1.55;
  color: #333;
}

.cr-carousel__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 1.2vw, 0.5rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Jednoduchá šipka – bez „krabičky“, větší klikací zóna */
.cr-carousel__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(0.35rem, 1.5vw, 0.55rem);
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.45);
  line-height: 0;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.cr-carousel__btn:hover {
  color: rgba(0, 0, 0, 0.85);
  background-color: rgba(0, 0, 0, 0.05);
}

.cr-carousel__btn:active {
  transform: scale(0.94);
}

.cr-carousel__btn:focus-visible {
  outline: 2px solid #f26522;
  outline-offset: 2px;
  color: rgba(0, 0, 0, 0.85);
}

.cr-carousel__icon {
  display: block;
  width: clamp(1.35rem, 4vw, 1.65rem);
  height: clamp(1.35rem, 4vw, 1.65rem);
}

.cr-carousel__viewport {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  /* proximity + padding – neusekne poslední loga jako „mandatory“ snap */
  scroll-snap-type: x proximity;
  scroll-padding-inline: clamp(0.25rem, 2vw, 1rem);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-block: 0.35rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cr-carousel__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cr-carousel__track {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  width: max-content;
  max-width: none;
  min-height: clamp(3.5rem, 12vw, 5rem);
  /* Horizontální „vzduch“ – kraje i poslední logo jdou dorolovat do viewportu */
  padding-inline: clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
}

.cr-carousel__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  padding: clamp(0.35rem, 1.5vw, 0.65rem) clamp(0.5rem, 2vw, 0.85rem);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
  max-width: min(200px, 42vw);
}

.cr-carousel__item:not(.cr-carousel__item--static):hover {
  background: rgba(0, 0, 0, 0.04);
}

.cr-carousel__item:focus-visible {
  outline: 2px solid #f26522;
  outline-offset: 2px;
}

.cr-carousel__logo {
  display: block;
  flex-shrink: 0;
  width: min(160px, 38vw);
  height: clamp(48px, 14vw, 72px);
  object-fit: contain;
  object-position: center;
  filter: grayscale(0.15);
  opacity: 0.92;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.cr-carousel__item:hover .cr-carousel__logo {
  opacity: 1;
  filter: grayscale(0);
}

@media (max-width: 480px) {
  .cr-carousel__row {
    gap: 0.1rem;
  }

  .cr-carousel__item {
    max-width: min(180px, 52vw);
  }

  .cr-carousel__logo {
    width: min(140px, 48vw);
    height: 52px;
  }
}
