.slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  position: relative;
  height: calc(100vh - var(--banner-height) - var(--nav-height)); /* lock between banner + nav */
  overflow: hidden;
}

.slider-track {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 81vw; /* 36vw center + 2*22.5vw sides */
  max-width: 81vw;
  overflow: visible;
  position: relative;
  transition: transform 0.5s cubic-bezier(.77,0,.18,1);
  margin: 0 auto;
  height: 100%;
}

.slider-tile {
  background: rgba(0,0,0,0.85);
  color: #ffe600;
  border-radius: 2vw;
  box-shadow: 0 0 32px #0006;
  margin: 0 1vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  font-size: 2vw;
  min-width: 28vw;
  max-width: 28vw;
  height: 39.7vw; /* keep 1.42 aspect ratio */
  transition: transform 0.5s, font-size 0.5s, min-width 0.5s, max-width 0.5s, height 0.5s;
  flex: 0 0 28vw;
}

.slider-tile.center {
  min-width: 32vw;
  max-width: 32vw;
  height: 45.4vw; /* keep 1.42 aspect ratio */
  font-size: 2.5vw;
  z-index: 1;
  flex: 0 0 32vw;
}


.slider-tile.center .tile-caption {
  font-size: 2vw;
}

.tile-img {
  width: 80%;
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: 1vw;
  margin-top: 2vw;
  margin-bottom: 1vw;
  background: #2196f3;
  flex: 0 0 auto;
}

.tile-caption {
  width: 90%;
  text-align: center;
  font-size: 1.2vw;
  color: #ffe600;
  flex: 1 1 auto;
  display: block;         /* switch to block so text scrolls cleanly */
  margin: 0;
  padding: 1em;
  line-height: 1.3em;
  overflow-y: auto;       /* ✅ scroll long text */
  overflow-wrap: break-word;
}

.tile-caption::-webkit-scrollbar {
  width: 6px;
}
.tile-caption::-webkit-scrollbar-thumb {
  background: #ffe600;
  border-radius: 3px;
}

@media (max-width: 700px), (orientation: portrait) {
  .slider-container {
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - var(--banner-height) - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
  }

  .slider-track {
    width: 92vw;
    max-width: 92vw;
    margin: 0 auto;
    height: 100%; /* stretch to container */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .slider-tile,
  .slider-tile.center {
    min-width: 92vw;
    max-width: 92vw;
    height: 100%;
    margin: 0;
    flex: 0 0 92vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(5vw, 2.5vh, 9vw);
    overflow: hidden;
  }

  .tile-caption {
    font-size: clamp(3.5vw, 2vh, 6vw) !important;
    padding: 1em;
    line-height: 1.3em;
    overflow-y: auto;   /* ✅ scroll on mobile */
    width: 100%;
  }

  .slider-arrow {
    font-size: 13vw;
    width: 13vw;
    height: 22vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #ffe600;
    background: none;
    border: none;
    z-index: 10;
    transition: color 0.2s;
  }

  #slider-arrow-left {
    left: 0;
  }

  #slider-arrow-right {
    right: 0;
  }
}
