/* ==========================================================================
   Landing page — "Our Facilities" carousel (#nsrl-coverflow)
   The page's one dark band. laboratory-coverflow.js fills the track and sets
   data-offset on each card. Skeleton (empty track / caption): public-ui.css.
   ========================================================================== */

.nsrl-coverflow {
  position: relative;
  width: 100%;
  padding: var(--nsrl-section-y) var(--nsrl-gutter);
  color: var(--nsrl-color-on-dark-muted);
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(8, 127, 135, 0.35) 0%, rgba(8, 127, 135, 0) 70%),
    radial-gradient(50% 40% at 10% 100%, rgba(201, 162, 39, 0.16) 0%, rgba(201, 162, 39, 0) 70%),
    var(--nsrl-color-green-950);
  overflow: hidden;
  isolation: isolate;
}
.nsrl-coverflow::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%);
}

.nsrl-coverflow .nsrl-coverflow__inner {
  max-width: var(--nsrl-container-wide);
  margin: 0 auto;
}

/* ---------- Header ---------- */
.nsrl-coverflow__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.nsrl-coverflow h2.nsrl-coverflow__heading { color: #ffffff; }
.nsrl-coverflow h2.nsrl-coverflow__heading em { color: var(--nsrl-color-gold-300); }
.nsrl-coverflow p.nsrl-coverflow__lead {
  margin: 0;
  max-width: 44ch;
  font-size: var(--nsrl-fs-lead);
  line-height: var(--nsrl-lh-body);
  color: var(--nsrl-color-on-dark-muted);
}

/* ---------- Stage ---------- */
.nsrl-coverflow__stage {
  position: relative;
  padding: 8px 0 24px;
}
.nsrl-coverflow__track {
  position: relative;
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16 / 7;
  margin: 0 auto;
}
@supports not (aspect-ratio: 1) {
  .nsrl-coverflow__track { height: 380px; }
}

.nsrl-coverflow__card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: var(--nsrl-radius-xl);
  overflow: hidden;
  cursor: pointer;
  background-color: var(--nsrl-color-green-800);
  -webkit-transform: translate(-50%, 0) scale(0.5);
  transform: translate(-50%, 0) scale(0.5);
  opacity: 0;
  transition:
    transform 0.7s var(--nsrl-ease-out),
    opacity 0.5s ease,
    filter 0.5s ease,
    box-shadow 0.4s ease,
    z-index 0s 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.nsrl-coverflow__card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(6, 40, 24, 0) 50%, rgba(6, 40, 24, 0.7) 100%);
  opacity: 0;
  transition: opacity var(--nsrl-dur-base) ease;
  pointer-events: none;
}

.nsrl-coverflow__image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1s var(--nsrl-ease-out);
}
.nsrl-coverflow__image--empty {
  background-color: var(--nsrl-color-green-800);
  background-image:
    radial-gradient(circle at 30% 35%, rgba(127, 211, 214, 0.25) 0 18%, transparent 19%),
    radial-gradient(circle at 70% 65%, rgba(201, 162, 39, 0.3) 0 14%, transparent 15%),
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1.3px);
  background-size: auto, auto, 18px 18px;
}

.nsrl-coverflow__card[data-offset="0"] {
  -webkit-transform: translate(-50%, 0) scale(1);
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  filter: none;
  z-index: 5;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.nsrl-coverflow__card[data-offset="0"]::after { opacity: 1; }
.nsrl-coverflow__card[data-offset="0"]:hover .nsrl-coverflow__image { transform: scale(1.05); }

.nsrl-coverflow .nsrl-coverflow__card .nsrl-coverflow__view {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: var(--nsrl-fw-bold);
  color: var(--nsrl-color-green-950);
  background-color: var(--nsrl-color-gold-500);
  border-radius: var(--nsrl-radius-pill);
  opacity: 0;
  -webkit-transform: translateY(8px);
  transform: translateY(8px);
  transition: opacity var(--nsrl-dur-base) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out);
  pointer-events: none;
}
.nsrl-coverflow__card[data-offset="0"] .nsrl-coverflow__view { opacity: 1; transform: none; }
@media (hover: hover) {
  .nsrl-coverflow__card[data-offset="0"] .nsrl-coverflow__view { opacity: 0; transform: translateY(8px); }
  .nsrl-coverflow__card[data-offset="0"]:hover .nsrl-coverflow__view,
  .nsrl-coverflow__card[data-offset="0"]:focus-visible .nsrl-coverflow__view { opacity: 1; transform: none; }
}

.nsrl-coverflow__card[data-offset="1"]  { -webkit-transform: translate(calc(-50% + 64%), 0) scale(0.78); transform: translate(calc(-50% + 64%), 0) scale(0.78); opacity: 0.45; filter: saturate(0.5) brightness(0.8); z-index: 4; }
.nsrl-coverflow__card[data-offset="-1"] { -webkit-transform: translate(calc(-50% - 64%), 0) scale(0.78); transform: translate(calc(-50% - 64%), 0) scale(0.78); opacity: 0.45; filter: saturate(0.5) brightness(0.8); z-index: 4; }
.nsrl-coverflow__card[data-offset="2"]  { -webkit-transform: translate(calc(-50% + 116%), 0) scale(0.6); transform: translate(calc(-50% + 116%), 0) scale(0.6);  opacity: 0.18; filter: saturate(0.3) brightness(0.7); z-index: 3; }
.nsrl-coverflow__card[data-offset="-2"] { -webkit-transform: translate(calc(-50% - 116%), 0) scale(0.6); transform: translate(calc(-50% - 116%), 0) scale(0.6);  opacity: 0.18; filter: saturate(0.3) brightness(0.7); z-index: 3; }
.nsrl-coverflow__card[data-offset="far"] { opacity: 0; pointer-events: none; z-index: 1; }

.nsrl-coverflow__card:focus-visible {
  outline: 3px solid var(--nsrl-color-gold-400);
  outline-offset: 4px;
}

/* ---------- Caption + controls bar ---------- */
.nsrl-coverflow__bar {
  max-width: 880px;
  margin: 16px auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
  padding-top: 24px;
  border-top: 1px solid var(--nsrl-color-on-dark-line);
}
.nsrl-coverflow__caption {
  min-height: 84px;
  min-width: 0;
  text-align: left;
}
.nsrl-coverflow h3.nsrl-coverflow__caption-title {
  margin: 0 0 8px;
  font-family: var(--nsrl-font-display);
  font-size: var(--nsrl-fs-h3);
  font-weight: 500;
  line-height: var(--nsrl-lh-snug);
  letter-spacing: -0.015em;
  color: #ffffff;
  text-transform: none;
}
.nsrl-coverflow p.nsrl-coverflow__caption-desc {
  margin: 0;
  max-width: 56ch;
  font-size: var(--nsrl-fs-sm);
  line-height: var(--nsrl-lh-body);
  color: var(--nsrl-color-on-dark-muted);
}
.nsrl-coverflow__caption-title:not(:empty),
.nsrl-coverflow__caption-desc:not(:empty) {
  animation: nsrl-rise-in 0.45s var(--nsrl-ease-out);
}

.nsrl-coverflow__controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

html body .nsrl-coverflow button.nsrl-coverflow__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-height: 0;
  padding: 0;
  font-family: var(--nsrl-font-body);
  font-size: 18px;
  line-height: 1;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--nsrl-dur-fast) ease, color var(--nsrl-dur-fast) ease, border-color var(--nsrl-dur-fast) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out);
}
html body .nsrl-coverflow button.nsrl-coverflow__arrow:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--nsrl-color-green-950);
}
html body .nsrl-coverflow button.nsrl-coverflow__arrow--prev:hover { transform: translateX(-2px); }
html body .nsrl-coverflow button.nsrl-coverflow__arrow--next:hover { transform: translateX(2px); }
html body .nsrl-coverflow button.nsrl-coverflow__arrow:focus-visible {
  outline: 2px solid var(--nsrl-color-gold-400);
  outline-offset: 3px;
}

.nsrl-coverflow__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
html body .nsrl-coverflow button.nsrl-coverflow__dot {
  width: 8px;
  height: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--nsrl-radius-pill);
  background-color: #ffffff;
  opacity: 0.3;
  cursor: pointer;
  transition: width var(--nsrl-dur-base) var(--nsrl-ease-out), opacity var(--nsrl-dur-fast) ease, background-color var(--nsrl-dur-fast) ease;
}
html body .nsrl-coverflow button.nsrl-coverflow__dot:hover { opacity: 0.6; }
html body .nsrl-coverflow button.nsrl-coverflow__dot.is-active {
  width: 28px;
  background-color: var(--nsrl-color-gold-500);
  opacity: 1;
}
html body .nsrl-coverflow button.nsrl-coverflow__dot:focus-visible {
  outline: 2px solid var(--nsrl-color-gold-400);
  outline-offset: 2px;
}

.nsrl-coverflow[hidden],
.nsrl-coverflow__arrow[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nsrl-coverflow__head { grid-template-columns: 1fr; }
  .nsrl-coverflow__track { max-width: 560px; aspect-ratio: 16 / 9; }
  .nsrl-coverflow__card[data-offset="1"]  { transform: translate(calc(-50% + 56%), 0) scale(0.72); }
  .nsrl-coverflow__card[data-offset="-1"] { transform: translate(calc(-50% - 56%), 0) scale(0.72); }
  .nsrl-coverflow__card[data-offset="2"],
  .nsrl-coverflow__card[data-offset="-2"] { opacity: 0; pointer-events: none; }
}

@media (max-width: 600px) {
  .nsrl-coverflow__track { max-width: 300px; aspect-ratio: 4 / 3; }
  .nsrl-coverflow__card[data-offset="1"]  { transform: translate(calc(-50% + 44%), 0) scale(0.72); opacity: 0.35; }
  .nsrl-coverflow__card[data-offset="-1"] { transform: translate(calc(-50% - 44%), 0) scale(0.72); opacity: 0.35; }
  .nsrl-coverflow__bar { flex-direction: column; align-items: stretch; }
  .nsrl-coverflow__controls { justify-content: space-between; }
  html body .nsrl-coverflow button.nsrl-coverflow__arrow { width: 44px; height: 44px; }
  .nsrl-coverflow .nsrl-coverflow__card .nsrl-coverflow__view { right: 12px; bottom: 12px; padding: 7px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .nsrl-coverflow__card,
  .nsrl-coverflow__image,
  html body .nsrl-coverflow button.nsrl-coverflow__arrow,
  html body .nsrl-coverflow button.nsrl-coverflow__dot { transition: none; }
  .nsrl-coverflow__caption-title:not(:empty),
  .nsrl-coverflow__caption-desc:not(:empty) { animation: none; }
}
