/*
 * Staff Carousel CSS
 *
 * This stylesheet is scoped to elements inside the .sc-carousel-wrapper container so that it does
 * not interfere with the rest of the site. Colours are controlled via CSS custom properties on
 * the wrapper element (accent color and button colours). If those variables are not defined on the
 * wrapper, fallback values are provided here.
 */

.sc-carousel-wrapper {
  --sc-accent-color: #082a7b;
  --sc-button-bg: #082a7b;
  --sc-button-text: #ffffff;
  --sc-heading-color: #082a7b;
  --sc-arrow-bg: #082a7b;
  --sc-arrow-icon: #ffffff;
  --sc-heading-font: "Arial Black", "Arial Bold", Arial, sans-serif;
  --sc-body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

/*
 * Responsive heading sizes. These rules adjust the font size of the carousel heading
 * based on the chosen heading level (h1–h6). Without these overrides, the
 * .about-title class would apply a single large size regardless of heading level,
 * making it difficult to visually distinguish between different levels. To
 * customise the sizes, modify the values below. Larger levels (h1) are largest.
 */
.sc-carousel-wrapper h1.about-title { font-size: 3.5rem; }
.sc-carousel-wrapper h2.about-title { font-size: 3rem; }
.sc-carousel-wrapper h3.about-title { font-size: 2.5rem; }
.sc-carousel-wrapper h4.about-title { font-size: 2rem; }
.sc-carousel-wrapper h5.about-title { font-size: 1.75rem; }
.sc-carousel-wrapper h6.about-title { font-size: 1.5rem; }

.sc-carousel-wrapper *,
.sc-carousel-wrapper *::before,
.sc-carousel-wrapper *::after {
  box-sizing: border-box;
  font-family: var(--sc-body-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.sc-carousel-wrapper body {
  margin: 0;
  padding: 0;
}

.sc-carousel-wrapper .about-title {
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  position: relative;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--sc-heading-font, "Arial Black", "Arial Bold", Arial, sans-serif);
  /* Clean, solid heading fill driven by the customisable heading colour. */
  color: var(--sc-heading-color, #082a7b);
  margin-bottom: 20px;
}

/*
 * Visually-hidden staff roster. Carries the full name/role/link content in the HTML for
 * search engines and screen readers; the visible name/role slots are driven by JavaScript.
 */
.sc-carousel-wrapper .sc-staff-roster {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sc-carousel-wrapper .carousel-container {
  width: 100%;
  max-width: 1200px;
  height: 450px;
  position: relative;
  perspective: 1000px;
  margin: 0 auto;
}

/*
 * Until JavaScript has positioned the cards (and added .sc-ready to the wrapper), hide the
 * track. This prevents the brief flash where all cards are stacked at centre — which makes the
 * last card appear on top — before the two featured cards are arranged side by side.
 * visibility:hidden (not display:none) keeps the cards laid out so their width can be measured.
 */
.sc-carousel-wrapper:not(.sc-ready) .carousel-track {
  visibility: hidden;
}

.sc-carousel-wrapper .carousel-track {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sc-carousel-wrapper .card {
  position: absolute;
  width: 280px;
  height: 380px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.sc-carousel-wrapper .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: grayscale(100%);
}

.sc-carousel-wrapper .card.center {
  z-index: 10;
  transform: scale(1.1) translateZ(0);
}
.sc-carousel-wrapper .card.center img {
  filter: none;
}
.sc-carousel-wrapper .card.left-2 {
  z-index: 1;
  transform: translateX(-400px) scale(0.8) translateZ(-300px);
  opacity: 0.7;
}
.sc-carousel-wrapper .card.left-1 {
  z-index: 5;
  transform: translateX(-200px) scale(0.9) translateZ(-100px);
  opacity: 0.9;
}
.sc-carousel-wrapper .card.right-1 {
  z-index: 5;
  transform: translateX(200px) scale(0.9) translateZ(-100px);
  opacity: 0.9;
}
.sc-carousel-wrapper .card.right-2 {
  z-index: 1;
  transform: translateX(400px) scale(0.8) translateZ(-300px);
  opacity: 0.7;
}
.sc-carousel-wrapper .card.hidden {
  opacity: 0;
  pointer-events: none;
}
/* Position initial left and right cards closer together without overlapping.
   The translation values here should be at least half the card width (~280px) to avoid overlap
   but leave a small gap (we use ±150px). */
.sc-carousel-wrapper .card.init-left {
  /* Position + scale of the first featured card. Both --init-offset and --init-scale are set in
     JavaScript (see applyInitialLayout) so the two featured cards always fit the container —
     shrinking on narrow screens rather than being clipped. */
  transform: translateX(calc(-1 * var(--init-offset))) scale(var(--init-scale, 1)) translateZ(0);
  z-index: 8;
  opacity: 1;
}
.sc-carousel-wrapper .card.init-right {
  /* Position + scale of the second featured card. */
  transform: translateX(var(--init-offset)) scale(var(--init-scale, 1)) translateZ(0);
  z-index: 8;
  opacity: 1;
}
.sc-carousel-wrapper .card.init-hidden {
  opacity: 0;
  pointer-events: none;
}

/*
 * When two members are shown (the initial featured view), hide the decorative lines
 * around their names. This prevents the blue bars from appearing on the featured
 * profiles.
 */
.sc-carousel-wrapper .member-info.show-both .member-name::before,
.sc-carousel-wrapper .member-info.show-both .member-name::after {
  display: none;
}

/* Display first and last names on separate lines. JavaScript splits the full name
 * into spans with classes .first-name and .last-name.
 */
.sc-carousel-wrapper .first-name,
.sc-carousel-wrapper .last-name {
  display: block;
}

/* Optionally emphasize the last name; adjust as desired. */
.sc-carousel-wrapper .last-name {
  font-weight: 700;
}

/* Ensure initial featured images are in colour */
.sc-carousel-wrapper .card.init-left img,
.sc-carousel-wrapper .card.init-right img {
  filter: none;
}

.sc-carousel-wrapper .member-info {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
  transition: all 0.5s ease-out;
  flex-wrap: wrap;
}
.sc-carousel-wrapper .member-slot {
  text-align: center;
}
.sc-carousel-wrapper .slot-B {
  display: none;
}
.sc-carousel-wrapper .member-info.show-both .slot-B {
  display: block;
}
.sc-carousel-wrapper .member-name {
  color: var(--sc-accent-color);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.sc-carousel-wrapper .member-name::before,
.sc-carousel-wrapper .member-name::after {
  content: '';
  position: absolute;
  top: 100%;
  width: 60px;
  height: 2px;
  background: var(--sc-accent-color);
}
.sc-carousel-wrapper .member-name::before {
  left: -80px;
}
.sc-carousel-wrapper .member-name::after {
  right: -80px;
}
.sc-carousel-wrapper .member-role {
  color: #848696;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 0;
  margin-top: -15px;
  position: relative;
}

/* Dots */
.sc-carousel-wrapper .dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.sc-carousel-wrapper .dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sc-accent-color, #082a7b) 20%, transparent);
  cursor: pointer;
  transition: all 0.3s ease;
}
.sc-carousel-wrapper .dot.active {
  background: var(--sc-accent-color);
  transform: scale(1.2);
}

/* Visible keyboard focus indicators for the interactive controls. */
.sc-carousel-wrapper .nav-arrow:focus-visible,
.sc-carousel-wrapper .dot:focus-visible,
.sc-carousel-wrapper .card:focus-visible {
  outline: 2px solid var(--sc-accent-color, #082a7b);
  outline-offset: 3px;
}

/* Navigation arrows */
.sc-carousel-wrapper .nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--sc-arrow-bg, #082a7b);
  color: var(--sc-arrow-icon, #ffffff);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  padding: 0;
}
/* SVG chevrons scale with the button and inherit its colour via currentColor. */
.sc-carousel-wrapper .nav-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}
.sc-carousel-wrapper .nav-arrow:hover {
  background: color-mix(in srgb, var(--sc-arrow-bg, #082a7b) 80%, #000);
  transform: translateY(-50%) scale(1.1);
}
.sc-carousel-wrapper .nav-arrow.left {
  left: 20px;
}
.sc-carousel-wrapper .nav-arrow.right {
  right: 20px;
}

/* Profile button styling */
.sc-carousel-wrapper .profile-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 25px;
  background-color: var(--sc-button-bg);
  color: var(--sc-button-text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.sc-carousel-wrapper .profile-btn:hover {
  background-color: var(--sc-accent-color);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .sc-carousel-wrapper .about-title {
    font-size: 2.5rem;
  }
  .sc-carousel-wrapper .carousel-container {
    height: 300px;
  }
  .sc-carousel-wrapper .card {
    width: 200px;
    height: 280px;
  }
  .sc-carousel-wrapper .card.left-2 {
    transform: translateX(-250px) scale(0.8) translateZ(-300px);
  }
  .sc-carousel-wrapper .card.left-1 {
    transform: translateX(-120px) scale(0.9) translateZ(-100px);
  }
  .sc-carousel-wrapper .card.right-1 {
    transform: translateX(120px) scale(0.9) translateZ(-100px);
  }
  .sc-carousel-wrapper .card.right-2 {
    transform: translateX(250px) scale(0.8) translateZ(-300px);
  }
  /* On mobile, display the member names and buttons side‑by‑side instead of stacking. */
  .sc-carousel-wrapper .member-info {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .sc-carousel-wrapper .member-slot {
    flex: 1 0 45%;
    max-width: 45%;
    text-align: center;
  }
  .sc-carousel-wrapper .member-name {
    font-size: 1.3rem;
  }
  .sc-carousel-wrapper .member-role {
    font-size: 0.8rem;
  }
  .sc-carousel-wrapper .member-name::before,
  .sc-carousel-wrapper .member-name::after {
    /* Hide decorative lines on mobile to avoid overlapping and misalignment. */
    display: none;
  }
  .sc-carousel-wrapper .profile-btn {
    font-size: 0.75rem;
    padding: 8px 14px;
  }

  /* The initial featured card positions/scale are handled by the base .init-left / .init-right
     rules via the JS-set --init-offset and --init-scale variables, so no mobile override is
     needed here. */
}