/* --- Global fixes for mobile overflow and text scaling --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Floating slider with bottom-only shadow + thin border; width ≤1600px */
.r76-wrap{
  width: min(99vw, 1600px);
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  font-family: Arial, sans-serif;

  border-radius: 12px;
  overflow: hidden;                 /* clip corners and internals */
  background: transparent;          /* no fill */

  border: 1px solid rgba(0,0,0,.14);/* thin border */

  /* bottom-only “lift” shadow via drop-shadow (downward offsets) */
  box-shadow: none;
  filter:
    drop-shadow(0 30px 60px rgba(0,0,0,.32))
    drop-shadow(0 12px 24px rgba(0,0,0,.18));
}

/* Carousel core */
.carousel{ position:relative; width:100%; max-width:100%; overflow:hidden; touch-action:pan-y; }
.carousel-track{ display:flex; transition:transform .5s ease-in-out; max-width:100%; }
.carousel-slide{ min-width:100%; position:relative; max-width:100%; }

/* Images: responsive, never exceed viewport width */
.carousel-slide img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  max-height:100vh;
  object-fit:contain;
}

/* Full-width caption band pinned to bottom (no translateX) */
.caption{
  position:absolute; left:0; right:0; bottom:0; z-index:10;
  display:flex; flex-direction:column; justify-content:flex-end; text-align:center; color:#fff;
  padding:20px;
  background:linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  opacity:0; transition:opacity .6s ease;
}

/* One-line, JS-autofit text (start at max; JS shrinks if needed) */
:root{
  --r76-title-max: 76px;
  --r76-title-min: 16px;
  --r76-subtitle-max: 38px;
  --r76-subtitle-min: 14px;
}
.caption h2{
  margin:0; font-size:var(--r76-title-max); line-height:1.2;
  text-shadow:3px 3px 8px rgba(0,0,0,.95);
  white-space:nowrap; overflow:hidden;
  text-decoration:none; /* no underline */
}
.caption p{
  margin:14px 0 0; font-size:var(--r76-subtitle-max); line-height:1.3; color:#fff;
  text-shadow:2px 2px 6px rgba(0,0,0,.9);
  white-space:nowrap; overflow:hidden;
  text-decoration:none; /* no underline */
}

/* The whole slide is a link, but without default blue/underline */
.carousel-slide > a{
  display:block; position:relative; color:inherit; text-decoration:none; outline:none; cursor:pointer;
}

/* Hover (desktop): subtle affordance without underline */
.carousel-slide > a:hover .caption h2,
.carousel-slide > a:hover .caption p{
  filter: brightness(1.05);
}

/* Keyboard focus: visible ring (accessibility) */
.carousel-slide > a:focus-visible{
  outline:2px solid rgba(255,255,255,.9);
  outline-offset:4px;
  border-radius:8px;
}

/* Arrows */
.carousel-button{
  position:absolute; top:50%; transform:translateY(-50%);
  background:none; border:none; padding:0; cursor:pointer; z-index:20;
}
.carousel-button.prev{ left:15px; }
.carousel-button.next{ right:15px; }
.carousel-button img{ width:40px; height:40px; }

/* Hide arrows on the smallest windows */
@media (max-width: 480px) {
  .carousel-button { display: none !important; }
}

/* Thumbnails strip: smooth, touch-friendly scrolling */
.carousel-nav{
  display:flex; justify-content:flex-start; gap:10px; padding:15px; background:#fff;
  overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
  scroll-snap-type:x proximity; scroll-behavior:smooth; -webkit-overflow-scrolling:touch;
}
.carousel-nav::-webkit-scrollbar{ display:none; }
.carousel-nav img{
  flex:0 0 auto; width:120px; max-width:20vw; height:auto; cursor:pointer;
  border:3px solid transparent; border-radius:4px; transition:border .3s, opacity .3s;
  scroll-snap-align:center;
}
.carousel-nav img:hover{ opacity:.6; }
.carousel-nav img.active{ border:3px solid #333; }

/* Arrow size tweak for smaller laptops/tablets (if visible) */
@media (max-width:768px){
  .carousel-button img{ width:45px; height:45px; }
}
