/* =========================
   Title
========================= */
.about-title {
  font-size: clamp(2.5rem, 8vw, 7.5rem);
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  position: absolute;
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
  font-family: "Arial Black","Arial Bold",Arial,sans-serif;
  background: linear-gradient(to bottom, rgb(8 42 123 / 35%) 30%, rgb(255 255 255 / 0%) 76%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================
   Carousel Container + Track
========================= */
.carousel-container {
  width: 100%;
  max-width: 1200px;
  height: 450px;
  position: relative;
  perspective: 1000px;
  margin: 0 auto;              /* keep centered within section */
  overflow: hidden;
}

.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);
}

/* =========================
   Cards
========================= */
.carousel-card {
  position: absolute;
  width: 280px;
  height: 380px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  transition: transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
  cursor: pointer;
  will-change: transform, opacity;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: inherit;
}

/* Active center card */
.carousel-card.center {
  z-index: 10;
  transform: scale(1.1) translateZ(0);
}

/* Side positions (desktop defaults) */
.carousel-card.left-2 {
  z-index: 1;
  transform: translateX(-400px) scale(0.8) translateZ(-300px);
  opacity: 0.7;
}
.carousel-card.left-1 {
  z-index: 5;
  transform: translateX(-200px) scale(0.9) translateZ(-100px);
  opacity: 0.9;
}
.carousel-card.right-1 {
  z-index: 5;
  transform: translateX(200px) scale(0.9) translateZ(-100px);
  opacity: 0.9;
}
.carousel-card.right-2 {
  z-index: 1;
  transform: translateX(400px) scale(0.8) translateZ(-300px);
  opacity: 0.7;
}

/* Minor image style hooks (kept for future tweaks) */
.carousel-card.center img,
.carousel-card.left-1 img,
.carousel-card.left-2 img,
.carousel-card.right-1 img,
.carousel-card.right-2 img {
  filter: none;
}

/* Hide non-visible */
.carousel-card.hidden {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   Member Info (below carousel)
========================= */
.carousel-member-info {
  text-align: center;
  margin: 40px auto 0;
  max-width: 680px;               /* keeps the text block nicely contained */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.carousel-member-name {
  color: rgb(8, 42, 123);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.carousel-member-name::before,
.carousel-member-name::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 100px;
  height: 2px;
  background: rgb(8, 42, 123);
}
.carousel-member-name::before { left: -120px; }
.carousel-member-name::after  { right: -120px; }

.carousel-member-role {
  color: #848696;
  font-size: 1.5rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 0;
  margin-top: -15px;
  position: relative;
}

.carousel-member-bio {
  color: #848696;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.01em;
  padding: 10px 0;
  margin-top: -15px;
  text-transform: none;           /* fixed: explicit value */
}

.carousel-member-info h2,
.carousel-member-info p,
.carousel-member-social-icons {
  transition: opacity 0.4s ease;
}

.carousel-member-social-icons {
  margin-top: 0.5rem;
}
.carousel-member-social-icons a {
  margin-right: 10px;
  color: var(--accent);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}
.carousel-member-social-icons a:hover {
  color: var(--highlight);
}

/* =========================
   Dots
========================= */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(123,16,8,0.2);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}
.carousel-dot.active {
  background: rgba(123,16,8,0.6);
  transform: scale(1.2);
}

/* =========================
   Arrows
========================= */
.carousel-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(123,16,8,0.6);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  border: none;
  outline: none;
  padding-bottom: 4px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.carousel-nav-arrow:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}
.carousel-nav-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.carousel-nav-arrow.left  { left: 20px;  padding-right: 3px; }
.carousel-nav-arrow.right { right: 20px; padding-left: 3px;  }

/* =========================
   Responsive Tweaks
========================= */

/* Tablet */
@media (max-width: 768px) {
  .carousel-container {
    height: 360px;
    perspective: 800px;
  }
  .carousel-card {
    width: 240px;
    height: 300px;
  }
  .carousel-card.left-2  { transform: translateX(-220px) scale(0.75) translateZ(-200px); }
  .carousel-card.left-1  { transform: translateX(-110px) scale(0.85) translateZ(-80px);  }
  .carousel-card.right-1 { transform: translateX(110px)  scale(0.85) translateZ(-80px);  }
  .carousel-card.right-2 { transform: translateX(220px)  scale(0.75) translateZ(-200px); }
}

/* Mobile */
@media (max-width: 480px) {
  .carousel-container {
    height: 280px;
    perspective: 600px;
  }
  .carousel-card {
    width: 180px;
    height: 220px;
  }
  .carousel-card.left-2  { transform: translateX(-140px) scale(0.7)  translateZ(-150px); }
  .carousel-card.left-1  { transform: translateX(-70px)  scale(0.8)  translateZ(-60px);  }
  .carousel-card.right-1 { transform: translateX(70px)   scale(0.8)  translateZ(-60px);  }
  .carousel-card.right-2 { transform: translateX(140px)  scale(0.7)  translateZ(-150px); }
  .carousel-member-name::before,
  .carousel-member-name::after {
    display: none; /* remove the horizontal lines on small screens */
  }
}

  /* Very small phones */
/* Very small phones */
@media (max-width: 320px) {
  .carousel-container {
    height: 200px;      /* slightly shorter to reduce overflow */
    perspective: 400px; /* reduce perspective for small screens */
  }

  .carousel-card {
    width: 120px;       /* smaller card width */
    height: 160px;      /* smaller card height */
  }

  .carousel-card.left-2  { transform: translateX(-70px) scale(0.6) translateZ(-100px); opacity: 0.6; }
  .carousel-card.left-1  { transform: translateX(-40px) scale(0.7) translateZ(-50px); opacity: 0.8; }
  .carousel-card.right-1 { transform: translateX(40px)  scale(0.7) translateZ(-50px); opacity: 0.8; }
  .carousel-card.right-2 { transform: translateX(70px)  scale(0.6) translateZ(-100px); opacity: 0.6; }

  .carousel-card.center {
    transform: scale(1) translateZ(0); /* reduce scale slightly to prevent overflow */
    z-index: 10;
  }

  /* Member name lines adjustments */
  .carousel-member-name::before,
  .carousel-member-name::after {
    width: 20px;
    left: -20px;
    right: -20px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .carousel-card,
  .carousel-member-info,
  .carousel-dot {
    transition: none !important;
  }
}
