/* ==========================================================
   Card Carousel: single row, responsive, bridges two sections
   Pair with card-carousel.js
   ========================================================== */
.case-role-grid {
    margin-bottom: 8vh;
}

.card-carousel {
  /* ---- tweak these ---- */
  --cc-min-card: 125px;        /* narrowest a card may get before one fewer is shown */
  --cc-max-card: 190px;        /* widest a card may get on large screens */
  --cc-gap: 20px;              /* space between cards */
  --cc-max-visible: 6;         /* most cards shown at once */
  --cc-ratio: 2 / 3;           /* image aspect ratio (width / height) */
  --cc-accent: #c000ff;;        /* arrow color */
  --cc-accent-hover: #ff54c2;
  --cc-label-color: #656565;
  --cc-label-size: 11px;        /* 0.7rem */
  --cc-label-lines: 3;         /* label is clamped to this many lines */

  /* set by JS, do not edit */
  --cc-card-w: 125px;
  --cc-img-h: 187px;

  position: relative;
  z-index: 3;                  /* paints above the next section's background */
  box-sizing: border-box;
  width: 100%;
  max-width: calc(
    var(--cc-max-visible) * var(--cc-max-card) +
    (var(--cc-max-visible) - 1) * var(--cc-gap)
  );
  margin: 2.5rem auto 0;
}

/* ---------- scrolling viewport ---------- */
.cc-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 4px 8px;        /* room for hover lift + focus ring */
  scroll-padding-inline: 4px;  /* keeps snapping aligned with the padding above */
  margin: -6px -4px -8px;
}
.cc-viewport::-webkit-scrollbar { display: none; }

.cc-track {
  display: flex;
  gap: var(--cc-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- cards ---------- */
.cc-card {
  flex: 0 0 var(--cc-card-w);
  width: var(--cc-card-w);
  margin: 0;
  scroll-snap-align: start;
}

.cc-card a {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  cursor: pointer;
}
.cc-card a:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 4px;
}

.cc-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--cc-ratio);
  object-fit: cover;
  background: #d9d9d9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cc-label {
  display: -webkit-box;
  -webkit-line-clamp: var(--cc-label-lines);
  line-clamp: var(--cc-label-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 1.3rem;
  font-size: var(--cc-label-size);
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--cc-label-color);
  color: #656565;
}

/* ---------- arrows ---------- */
.cc-arrow {
  position: absolute;
  top: calc(var(--cc-img-h) / 2);
  transform: translateY(-50%);
  z-index: 4;
  width: 32px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--cc-accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}
.cc-arrow:hover { background: var(--cc-accent-hover); }
.cc-arrow:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.cc-arrow[hidden] { display: none !important; }

.cc-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cc-prev { left: -16px; }
.cc-next { right: -16px; }


/*.cc-lightbox__info {
  flex: 0 0 auto;
  max-height: 35%;
  overflow: auto;
  box-sizing: border-box;
  padding: 20px 32px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}*/


@media (max-width: 700px) {
  .cc-prev { left: -4px; }
  .cc-next { right: -4px; }
}

/* ---------- section bridge ----------
   JS adds this class to the section holding the carousel so the
   part that spills into the next section is not clipped. */
.cc-bridge-source { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  .cc-viewport { scroll-behavior: auto; }
}

/* ---------- image overlay (lightbox) ----------
   Built by card-carousel.js and appended to <body>. */
.cc-lightbox {
  --cc-lb-w: 80vw;
  --cc-lb-h: 92vh;
  --cc-lb-close: 30px;         /* close button size */
  --cc-lb-close-inset: 10px;   /* distance from the panel's top-right corner */

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 0, 24, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.cc-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.cc-lightbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--cc-lb-w);
  height: var(--cc-lb-h);
  background: #0d0221;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cc-lightbox__stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: auto;
  display: flex;
      max-height: 75vh;
}

/* caption strip under the image */
.cc-lightbox__info {
  flex: 0 0 auto;
  max-height: 35%;
  overflow: auto;
  box-sizing: border-box;
  padding: 20px 32px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}
.cc-lightbox__info[hidden] { display: none; }
.cc-lightbox__title {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cc-accent-hover, #ff54c2);
}
.cc-lightbox__desc {
  margin: 0;
  max-width: 60vw;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}
.cc-lightbox__stage:focus-visible { outline: 2px solid var(--cc-accent, #c000ff); outline-offset: -2px; }

/* default: whole image fits inside the panel */
.cc-lightbox__img {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* very tall images: fill the panel width and scroll vertically */
.cc-lightbox.is-tall .cc-lightbox__img {
  align-self: flex-start;
  width: 100%;
  max-height: none;
  height: auto;
  margin: 0 auto;
}
  
.cc-lightbox__close {
  position: static;            /* no longer floats over the image */
  flex: 0 0 auto;
  align-self: flex-end;        /* right-aligned in the header row */
  margin: 8px 10px 8px 0;
  margin: 0 0 20px;
  box-sizing: border-box;
  width: var(--cc-lb-close);
  height: var(--cc-lb-close);
  padding: 0;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--cc-accent, #c000ff);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.cc-lightbox__close:hover { background: var(--cc-accent-hover, #ff54c2); }
.cc-lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cc-lightbox__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}


@media (max-width: 640px) {
 .cc-lightbox__info { padding: 0;}
  .cc-lightbox__desc {
    max-width: 100vw;
  }  

}
@media (prefers-reduced-motion: reduce) {
 


  .cc-lightbox, .cc-lightbox.is-open { transition: none; }
}