/** infinity */
.scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  position: relative;
  cursor: grab;
  scrollbar-width: none;
  margin: 0px 10%;
}

.scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.scroll-wrapper.dragging {
  cursor: grabbing;
  user-select: none;
}

.scroll-track {
  scroll-snap-type: x mandatory;
}

.scroll-card {
  flex: 0 0 calc(100% / 2.1);
  scroll-snap-align: start;
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.image-wrapper {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  position: relative; /* necesario para overlay */
}

.scroll-card img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 15px;
  object-fit: cover;
  object-position: center;
}

/* Overlay de texto arriba a la izquierda */
.overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem;
  color: #fff;
  text-align: left;
  z-index: 2;
  max-width: 80%;
  /*background: rgba(0,0,0,0.4);
  border-radius: 0 0.5rem 0.5rem 0;*/
}

.overlay-text h5,
.overlay-text p {
  margin: 0;
  /*text-shadow: 1px 1px 4px rgba(0,0,0,0.8);*/
}

/* Botones de navegación */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.scroll-left { left: 0; }
.scroll-right { right: 0; }

/* Botones cuadrados globales */
.scroll-global-actions {
  justify-content: flex-start;
  padding-left: 1rem;
}

.square-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
  .scroll-card {
    flex: 0 0 100%;
    padding: .25rem;
  }

  .image-wrapper {
    min-height: 560px;         /* altura mínima acordada */
    width: 89vw;
  }

  .scroll-card img {
    flex: 1;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
  }

  .overlay-text {
    top: 1.2rem !important;
	/*top: 2rem;
    left: 1rem;
    font-size: 1rem;
    padding: 0.75rem;
    max-width: 90%;
    background: rgba(0,0,0,0.5);
    border-radius: 0.5rem;*/
  }
	.overlay-text h5 {
		font-size: 2rem !important;
	}

  .scroll-wrapper {
    margin: 0;
  }
}